A JavaScript tile-based game
I must say I've been slightly inspired by Wolfenstein 3D on the iPhone. Playing the game through now as a more established programmer has irked a dormant interest in game programming. So I turned to the one language I know enough to get the job done: JavaScript.
I began work this afternoon on a tile based game. I initially attempted to do the whole thing without consulting any docs, but quickly began to research pathfinding algorithms after my own implementation continually sent the enemies through walls. I have decided to implement the A* algorithm so the enemies in the game can move towards the player.
In the screenshot above, the yellow square is the player, the green square an enemy and the red square the finish. The graphics remind me of an old game called Millipede I used to play on the Atari 2600. As you can see, I could do with a hand from someone at least versed in NES graphics.
On the programming side of things, I've implemented a level parser and rendered (turning a string into a visual level) and a couple of handy methods. I have an isPassable() for determining where the player can move and an isAdjacent() so my (currently stationery) enemies can kill the player on side impact.
This game will mostly be just a learning experience. I don't intend anyone to have much fun with it. I will release it into my projects when it is finished. I'm excited to work on this, as the last game I created (Snakes and Ladders) was done in Visual Basic 6 when I was 17.
Comments
Alexander Dickson
Posted on Monday, 4th January 2010 @ 10:48pm.I've considered this before as well. Have you created many games in Flash? I have created a few simple ones, and they were still a bit of a challenge.
Although I have not done it myself, I recommend creating an iPhone game. It seems to be a lucrative market if your game is successful!
Ashley Simons
Posted on Wednesday, 30th December 2009 @ 10:25am.I'm trying to process a few emotions relating to Game Dev at the moment. My work is fairly keen on the flash / rich user experience scene. Am considering studying the math, as3, flash and papervision3D route. I do find it interesting, but am torn between my lightweight web app routes / direction and my love for games / maths. It sure would be a lot of work to get good.
Alexander Dickson
Posted on Wednesday, 2nd December 2009 @ 10:44pm.@Andrew Cobby Hey mate, yes I do utilise jQuery to help with this game, however I really shouldn't, as games are processor intensive things, and some of jQuery's abstractions aren't exactly fast. The Each utility is one example. I'd be better off using a simple for loop.
To post code, I utilise the GeSHi library. I pick up the code in the post body using a regex (shock!), and then parse it using the library. I skip this process for displaying through my RSS feed.
Andrew Cobby
Posted on Wednesday, 2nd December 2009 @ 10:35pm.Hey mate,
That's really cool!
Did you base this off jQuery?
Also, what do you use to post code?
Philippa Sutton
Posted on Wednesday, 25th November 2009 @ 11:41am.I love computer games!! haha it loooks very windows 95 love it!
Peter Pascoe
Posted on Sunday, 8th November 2009 @ 6:15pm.Haha.
Looks good dude.
Games are something I can relate to.
Leave a Comment
Note: Your comment may require approval before it is posted to the site.