Hacker Newsnew | comments | show | ask | jobs | submitlogin

When I tried to build the project I got a linker error, but running the prebuilt iso (linked in the readme) with qemu worked just fine. A very impressive project!

Edit: The link error is probably just a stupid mistake on my part; I was trying to build on a 64-bit machine. It doesn't seem to have any problems on 32 bit.




For others who might be interested, compilation works fine in Ubuntu 12.04 after `apt-get install build-essential nasm qemu`. If you install libsdl and libsdl-dev you can run the reference version written in C which runs significantly faster.

It's indeed an impressive project, doubly so as it was initally only for a university project. Instead of just making a game in assembly he made the project his own by extending it -- bootable, raytaced, raytraced shadow, textures and so on! =]

-----


>Instead of just making a game in assembly

Not to discount what he did, but he didn't write the game in Assembly. He wrote it in C then decompiled it to Assembly and used that as a starting point for the Assembly code.

From the article:

>Starting in assembly right away would be a bit too insane, so I first wrote a reference implementation in C

As someone who started in Assembly right away creating several games with a much simpler 6510 CPU, I can vouch for the fact that starting in Assembly would be a bit too insane especially on modern CPUs.

-----


He doesn't say anything about decompiling.

  > Then I began slowly porting everything to handwritten assembly.

-----


>Starting in assembly right away would be a bit too insane, so I first wrote a reference implementation in C

How did he make the reference code? I'm reading that as he wrote an implementation in C, then decompiled it and then cleaned up the decompiled Assembly language code.

Maybe I'm wrong. How do you take his statement above?

-----


Author here, I did look at some of the assembly output from C code, especially for frequently called functions like get_block/set_block, but other than that I used no reference but the original C code to write the assembly.

-----


He probably asked the compiler to emit the assembly it generates (e.g. gcc's -S option); disassembling or decompiling would be overkill.

-----


He COMPILED the C code into its assembly stage with a gcc option. He probably just looked at the .S file from gcc..

-----


You can also read it as, write C code, test. Repeat until you have functionality you want. Pick block of C code, replace with assembly equivalent. Repeat.

-----


What was your linker error? If you haven't already, you should either file a bug or solve it yourself and send a pull request of your solution. As someone who hacks around with small open source projects enough, nothing is more annoying than that type of small error that everyone who knows how to fix it finds the solution to obvious to report (it is probably installing an undocumented dependency), and every who doesn't gives up on the project. Admittedly, I have been guilty of solving these problems for myself many times.

-----


Also, its interesting to think about how badly we can estimate size of code. When I saw the headline, I thought its going to be pretty large with 50K lines of code. Turned out to be much smaller - ~3K lines of code.

That's impressive too!

-----




Applications are open for YC Summer 2015

Guidelines | FAQ | Support | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: