top | item 9800754

A Doom-like engine on the Raspberry Pi – 9800 lines of bare metal assembly

115 points| kcsongor | 10 years ago |reddit.com

41 comments

order

habosa|10 years ago

I don't even know what to say ... 9800 lines of assembly is so few. I am very impressed. I think I might use more lines writing this in a "modern" language.

Game developers always impress me.

Narishma|10 years ago

Well, it's only 9800 lines because it's incomplete. It's barely a tech demo.

delecti|10 years ago

Raspberry Pi seems to be the new target of Atwood's Law in place of Javascript.

Any application that can be ported to Raspberry Pi will eventually be ported to Raspberry Pi.

hamburglar|10 years ago

Considering the point of the Raspberry Pi foundation is to provide a readily available low cost general computing platform for learning and experimentation, it seems entirely appropriate that people would port stuff to it for the sake of porting stuff to it.

Smushman|10 years ago

not to denigrate the hard work... but without a keyboard, just how am I supposed to enter cheat codes??

Nice work BTW.

morsch|10 years ago

Clearly, the answer is you write a keyboard emulator running on the RPi in 9800 lines of of assembly.

wbsun|10 years ago

An (probably) easy way is to connect a switch to a GPIO pin, then watch for special patterns of on/off sequences as cheat codes :), and you end up programming a computer in binary code.

z92|10 years ago

The original Doom ran on 33MHz processor and 4MB RAM. I can't understand why it might have any problem running on RPi.

morsch|10 years ago

It doesn't. I imagine it's still a fun way to learn ARM assembly and an impressive achievement. Note that apparently they didn't use any operating system and built their own controller from scratch.

duaneb|10 years ago

I played doom on my ipod mini. I'm pretty sure this wasn't to stress the insane hardware of a pi so much as x86 is completely miserable to bare-metal program in.

lcswi|10 years ago

Hm, that's hardly anything like doom. It is more like a very basic raycasting engine from several years before that. Doom in 9800 would be really impressive. This does not seem very special if you ever wrote your own engine like that.

nathancahill|10 years ago

They wrote a raycasting engine in 9800 lines of assembly, running on a Pi, using Doom's textures. Is it Doom? No, but it's pretty darn impressive. Avoid gratuitous negativity.

JonathonW|10 years ago

Looks like they have part of what made Doom unique (at the time)-- they've got height differences and non-perpendicular walls, but don't quite have the same lighting and texture mapping capability that Doom had.

And the demo doesn't show whether or not they have Doom's dynamic capabilities (that let level builders make things like moving elevators).

This looks like it's probably somewhere between Wolfenstein 3D and Doom in terms of engine features.

afandian|10 years ago

As a first-year University assembly project in 4 weeks, I'd be a bit more hesitant to judge.

myth_buster|10 years ago

From the comments:

  OP's project isn't a simple port. They wrote an original DOOM-like engine, 
  from scratch, in assembly language. It only looks like 
  DOOM because they're using DOOM textures.

ehaliewicz2|10 years ago

It's a common misconception, but Doom uses a BSP-tree based renderer, not raycasting.

Cyph0n|10 years ago

Great work for a first year project. It was completed in 3 weeks according to the thread. I wouldn't have been able to pull it off.

confiscate|10 years ago

good job guys. the controller on the breadboard looks pretty neat

kcsongor|10 years ago

that is actually not a breadboard, the stuff is soldered :)

Negative1|10 years ago

Keep in mind they are calling it a "replica", not a port. From the video there's some form of game logic, the raycaster and asset loader. Other than that, it doesn't appear to be the full game.

Still, though, AWESOME! Can't wait to check out the code when it goes up on Github (they said soon).

deevus|10 years ago

If only the cyber-demon was always that easy!