FlashPunk is a very handy 2D game engine built in ActionScript 3. It’s used a lot in game jams (often to great effect) due to it being so quick and easy to piece something together. I’ve used it for my last 3 or 4 jam entries and figured I’d post a little intro to it.
Hi there. After being a creepy Ludum Dare lurker for a long time in the past, I managed to enter all three this year, which is great. For 28, I made The Trials of Chad, which you can play over on Newgrounds.
All things considered, I’m fairly satisfied with it. I’m a big fan of difficult games and that has echoed down into the entry, so I made a full run video along with the actual game:
What went well:
- It’s ‘finished’! There’s a clear start and end with obvious progression, which is always nice! The last hour was a bit hairy as it was very much broken, had no music, ending or high-score integration before then.
- Flash Pro with Flash Punk. It probably seems odd to mix a timeline based IDE with a completely import based engine but they actually work well together. I found that it’s much easier to include different fonts, for example, by using the Flash Pro library. It’s also nice to be able to throw a soundtrack into Pro and let it handle the conversion (I’ve also known Builder/Developer to cut the end off sounds and SFX, which Pro doesn’t). The grainy overlay and slight shadow are both layers in Pro placed over a symbol that contains all the Punkery:
- Newgrounds. I love it. There’s no more supportive place for small games in my (admittedly limited) experience. The comments are constructive without being offensive, the loaders, ads, medals and score tables are ridiculously easy to implement and their willingness to feature LD games is awesome. The extra attention from that means that even if players just waited for it to load, glanced at the first stage and navigated away, it would still have accrued more play time than development time. Can’t ask for much more than that for a jam game!
- The screen transitions. Flash Punk doesn’t have much in the way of support for this (it doesn’t support levels running simultaneously , as far as I can tell) so I fudged it a little. By keeping a snapshot of the game on the last frame of a level, I could add a new Entity to the following level and tween it out straight away. It almost looks like the level is still running as it animates away. I got the idea from a student a day earlier when he accidentally rotated his entire game world instead of just his character. It looked so bizarre I decided to make a mental note to use it in future .
- The shop. I quite like the little in-game store.
What didn’t go so well:
- Being ill. Being ill sucks. I lost 5-6 hours that would’ve been put into graphics (the blocks and stripes weren’t a design choice, even though I don’t hate them) but I didn’t have much choice. I was a little disappointed; I’d set a personal goal of making real graphics for a change, as most of my other games have monochromatic/Limbo-esque styles, which isn’t bad but does get a bit samey.
- The controls. The dashing, as cool as it is, can be tricky to activate when needed. Being sat on my own for 2 days, I suppose I had just gotten used to it and didn’t invest time in making it any easier.
- The level design. The levels could be better. I spent a bit of time editing the engine to take in pictures and auto-tile the level based on the position of solid black pixels. Different shades of grey (or blue, actually) were reserved for coins, jump pads, baddies and player spawns. I would have liked to make better use of all that, given the time I put into coding it up. One nice side-effect was when I accidentally used the player shade to place coins, resulting in an army of Chads that all worked just fine. This happy accident lead to the levels where you control multiple Chads – so not all bad!
- Bugs. They’re in there but I won’t draw too much attention to them!
I’ve enjoyed it! Play my game!
I made a game in 59 and a half minutes for the 0h game jam! Have a play:
Use the left and right keys to dodge. Click to restart. Think I might be on to something here!
I screen recorded the development, so I might upload that somewhere
I like 3D and I rarely get to play with it… so let’s make some. We’re aiming for the scene below (but I won’t show you all of that just yet!)
Make sure you have Flash player 11+!
Much happier with the performance this time. Misshapen pretty much failed as a game but it did result in my making of the following list for future attempts:
- Sleep through the announcement of the theme!!!
- Use an existing engine.
- Eat well!
- Spend a good few hours on the idea – not 10 minutes
The first 2, I think, were crucial. I was 4-5 hours behind most of the world when I first heard the theme (due to being asleep) but I was all the better for it. It could even work out that you get more development time this way. Surely everyone is going to have 2 nights’ sleep over the 48 hours?! I just cut one of mine in half by starting it a few hours before the compo.
I used FlashPunk instead of coding my own Engine and, although it lacks the use of standard objects like MovieClips that I often use, it’s perfect for quickly putting games together. Follow the link, learn it!
Anyway… the game! You can head over to Newgrounds to play it (I was even lucky enough to make it into the featured games list) or you can watch me playing it in the video below:
The source code for the game is here. It probably shows how poor an artist I am and how, hopefully, I make up for it by coding weird stuff. Check how I did things if you like… but don’t be a thief!
Note: The source has a bug in – Souls are not removed from the game when they go off screen, which eventually crashes the game. Put the following line into the update function in the Soul class if you need the fix too: