PDA

View Full Version : Platform game in ARM/THUMB assembly



wraggster
December 24th, 2010, 00:13
News via http://tomdevsblog.drunkencoders.com/2010/12/23/platform-game-in-armthumb-assembly/

Hey everyone,

For a school project I wanted to learn ARM assembly, and I thought it was fun to do that via developing a platform game in it.

With learning ARM assembly I also learned THUMB assembly which is just ARM assembly lite (lite in the way that the opcodes are smaller but also less capable of doing things).

The beginning was hard, but after some time I got the hang of it and until now I’ve produced a platform game where you can walk around and jump:)

Because I’m planning to code this platformer totally in assembly, I don’t use libnds function for setting sprites etc.: I make them my own:p

I’ll try to keep you informed about updates and this time I’ve a demo:

http://dl.dropbox.com/u/7943543/project.nds

the controls are:

d-pad: walk around (yeah even upwards and downwards, I just wanted to check that scrolling in these directions worked)

a: jump

note: scrolling the background is done via an algorithm which copy columns or rows of the background when needed. So if you go out of map, this algorithm will make calculations which give a nonsense answer. That means that if you go out of the map you’ll see garbage. Mind that you’re at the down left corner at the beginning so don’t scroll left-down directly when you start the game:)

Tom