Since my last post was so darn pessimistic with all those hardware malfunctions and what-not, I thought I would write a happier post about what I did well in Das Sad!
Wee Scope
First thing was that I managed to keep a small scope this time, hooray! If I didn’t have all those hardware failures I would have had oodles of time to make more audio, build some actual escalation, make a tutorial, and balance the whole thing out a little more. Next LD, providing absence of aforementioned issues and a similar scope, I should be able to make a exceptionally radical game for you guys.
2D Arrays are Exclamatory Adjective!
For this here game I taught myself how to use 2D arrays, super handy for grid-based movement and collision. This here is the tutorial I used:
http://flashdevz.wordpress.com/2008/08/27/as3-pathfinding-part-1-understanding-2d-arrays/
I ultimately used the grid system that came out of the array as a basis for… well just about everything else. As you can see in the picture right over <—– positions where a dude was were marked with a 1. All I had to do for collision then was check if the position in the array I was moving to was a 1 or 0, if 0 reset my current position to 0 and the new position to 1.
If any of you have more foresight than me and say “But what if you move two side-by-side and the poor first guy sees the position is blocked even though it is about to be clear? What then?!?!” Well, I certainly stumbled into that problem and came out a better man.
What I did for that little issue was if a piece was moving to an occupied position, it would store that position in a Global variable. Then, whenever another piece moved it would check if the position it was moving from was equal to the Global var. If so, tell the other fella to go ahead and move, the way is clear.
Paths Everywhere

Next thing I did that I thought was pretty neato was the enemy pathing, all of which was based of the grid that came out of my 2D Array. It was rather simply really, I would initialize an enemy with an array of point values represented spots on the grid (as seen —–>). Then, from spawning the enemy simply moves from its spawn location towards the first point and as it exceeds it, increases a currentTurn variable. Then it will look for the next position at the currentTurn value index of the array filled with destination points.
The red path was drawn with basically the same approach, only with a few more conditions in there. At enemy spawn the path would set up one-by-one at a delay of what I believe was 0.05 seconds? Sounds familiar enough. Going one grid space each time, it would check if the current destination point was at the same Y location, if so it knew it was moving moving horizontally and would place the horizontal piece. Same thing for vertical, only replace “Y” with “X”. When it was spot on the destination point, it would check if the next point where above, below, left, or right of it and place the respective corner there to. Neat right? At least I thought so.
The Rest
That’s pretty much all the stuff that I thought was interesting enough to talk about unless asked or coerced. All-in-all I’m happy with how Das Sad turned out despite all the issues, probably going to try and take it a little further down the road. Well, not take it down the road, but down the road do more with it. Oh, by the way, in case you were curious about the name: Well I was testing it I lined up the A,S,D keys as SAD and I thought DAMN! I’m gonna call it Sad, then I noticed that backwards it said Das, and I thought JACKPOT! So Das Sad was born, as little sense as it makes.
I would also like to attribute much of my happiness to a wide variety of software and libraries that did not fail on me and was also free! FlashDevelop is a great IDE if you wanna make some flash games and don’t wanna pay Adobe. FlashPunk is a totally cyber-awesome AS3 library if you just don’t want to work too hard. SFXR, I believe I have Ludum Dare to thank for this handy little sound effect creation device. Also, Audacity, for being free and helping me convert .wav to .mp3! Oh, and graphics were done in Photoshop, not free therefore not as cool.
That was a pretty long post on what you probably already know. Oh well, I shan’t un-write what has been written.