New games every week!
Loving PlayMyCode
Blog
10th July 2011
I've always found Flash slightly more complicated than it needs to be.
For a few years I attempted to learn various versions of the official Flash demoes, and SoThink's 900% cheaper clone. They were ok, but they weren't designed for coders. Flash was an artist's tool, with tweening and vector graphics and all that other none-codery stuff. -=-=- Over the past few years, though, they've created Flex, and lots of other dev'rs have built up batches of libraries to make things like Sprites and Gamey things so much easier to make. Nowadays, you can get away without the proper expensive Flash tools, you can code in proper ascii, get things working, then click a compile button and have your Flash program run. It's a massive difference from how Flash used to be. They made it more for dev'rs, and the internet as a whole has thanked them. .. But I haven't. I can't hack it. Still today, every time I pick up a Fast Flash Tool or a speedy quick library that "helps" the developer, the tools require you to install 3 or 4 bits and pieces to specific places, make 3/4 "simple" includes, then "easily" create a hello world example test that takes only about 50-odd lines to show a single sprite on the screen. Flash is messy, and no matter what I try, I always end up glancing at the 30-or-so files that I've managed to cobble together, and eventually just give up the whole thing. This has happened FAR too many times. For the past few weeks, I've been playing around with PlayMyCode. PlayMyCode doesn't make Flash games, instead opting to make your creations HTML5 compatible. They'll run in any compatible, well updated browser. Safari/Chrome/Firefox/Opera, and .. .. if you're lucky, they might work in Internet Explorer.... but we'll ignore that, because it's shit. Rather than throwing 100 includes, frames, tweens, vectors and other nastyness at you, PlayMyCode starts things off nice and simple. Head to the site, register, log in, and click Build. You're asked to create a new project, or edit an old one. Once done, you're given a box to put your code in, and a box that plays your game. No include files, no sprawling mess. This is old-skool, and it works. A simple Hello World example is your starting point. setFont( 'Arial', 32, 'italic' ) // The code inside this do block is run each frame onEachFrame() do fill( 0, 0, 0 ) setColor( 255, 255, 255 ) fillText( "Hello World!", 10, 32 ) end It's simple, it's effective, and it teaches you the basics. 1. How to load a font. 2. How to make a loop. 3. How to clear the screen. 4. How to change colours. 5. How to display some text. From there you can head into the API and grab all the rest of the things as you need them. There's functions to load/draw sprites on the screen, there's some nice audio functions, mouse/keyboard input routines, and more. As a coder who's been working in dozens of different variants of Basic over the years, the commands aren't too hard to pick up. Any decent retro coder should be able to flick through the APIs and find things they're used to. Clump it all into one great big file, save, run. Job done. The best thing? This all works right there in your browser. You don't "save" things. You "store" them into the PlayMyCode site's "cloud". If you create a new image to use as a sprite, you first upload it, then use it where it is. If you decide to edit a project later, but are on a different computer.. Doesn't matter. Everything is still on their server. You don't even have to host your projects. Just embed them to your own site, like you would a Youtube video. Everything's just there! It's fast, it's online, and it works. That's all you need. None of this nasty "17,000 includes to draw a sprite" malarky. Just get the game working. Work your way through it's simple functions, and you can even start to play around with the more complex stuff. Delta stuff's in there to keep everything flowing as smoothly as possible. You can fiddle around with alphas and static background, to make nice blurry swirly effects.. There's even those "new coder/OOP" style object things, for those who don't prefer to cram everything into Arrays like I do. Loads to play with, loads to learn, and masses of stuff that you can achieve. The fact that the PMC authors have recently demonstrated a classic Wolfenstein styled 3D engine using less than 1000 lines of PMC code, is proof positive that it can deal with almost anything. PlayMyCode games no longer work.. so long as you've got a good browser running it all! Views 43, Upvotes 5
Daily Blog
New games every week!
|