Live data from Hacker News

BOX-256: a tiny game about writing assembly code to pass the graphics tests

juhakiili.com

11–20 of 41 posts

Re: BOX-256: a tiny game about writing assembly code to pass the graphics tests

#11
post #8

Love it, very Zachtronicesque. If the author is reading, here are couple of improvement ideas: * Show the level number somewhere so its easier to discuss with others * Add some way to know how well I did on the level, either by having some leaderboards or rating system/target cycle count * Allow pausing the execution when running * Not sure if it would make sense to have full 8-bit color palette instead of 4 bits. Pr…

8 bit palette means trying to match the colour against 256 possibilities instead of 16.

That reminds me of one additional improvement suggestion: allow viewing the color values of the target pixels somehow.

Re: BOX-256: a tiny game about writing assembly code to pass the graphics tests

#16
post #12

Neat! Would like my own editor though. This doesn't have a lot of text editing capabilities and is fixed size. How well does this map to real x86 assembly programming?

Real x86 is very different; you have limited registers (especially 32bit x86), very weird variable length instruction encoding, gazillion different instructions, memory access takes significant amount of time. Of course having near infinite amount of memory compared to the 256 bytes of BOX256 changes the way you program your code too.

Re: BOX-256: a tiny game about writing assembly code to pass the graphics tests

#17
post #8

Love it, very Zachtronicesque. If the author is reading, here are couple of improvement ideas: * Show the level number somewhere so its easier to discuss with others * Add some way to know how well I did on the level, either by having some leaderboards or rating system/target cycle count * Allow pausing the execution when running * Not sure if it would make sense to have full 8-bit color palette instead of 4 bits. Pr…

I just had to make a quick mockup of hardware version of BOX256: http://i.imgur.com/Vw1i459.jpg

Re: BOX-256: a tiny game about writing assembly code to pass the graphics tests

#18
post #15

The `thr` statement is not very useful at the moment. It's impossible to pass parameters to a piece of code using threads :( I have to duplicate my code in order to use the threads

Not sure how you would integrate that sort of thing to the ISA though. Maybe something like:

    00 THR 004 001 @A0
    04 JEQ 001 @A0 010
    08 --- parent thread
    ...
    10 --- child thread
where THR instruction would store a value that is visible only to child in some memory location, in this example value 001 would be stored at @A0, which is then used to distinguish the threads in a conditional jump.

Re: BOX-256: a tiny game about writing assembly code to pass the graphics tests

#20
post #15

The `thr` statement is not very useful at the moment. It's impossible to pass parameters to a piece of code using threads :( I have to duplicate my code in order to use the threads

It's really ungainly to work with -- but it does drop the cycle counts to solve the problems by running more threads.
Post reply on HN