Live data from Hacker News

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

juhakiili.com

31–40 of 41 posts

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

#31
post #29

Earlier quoted context omitted.

Checkerboard: 0x24 cycles. http://imgur.com/C1UeEdn (EDIT: 0x16, see below) My key insight was twofold: 1. If you start every thread at 0x00 and make the first N commands "THR @00", you get 2^(n+1)-1 threads running by the time your first thread exits the chain of THR commands. 2. You can use a single array MOV instruction to set a range of program counters, effectively causing every thread to jump to a set position.…

Awwww this is great stuff. I would love to hear your thoughts on how the language could be changed/improved to make puzzles and optimizing even more fun.

It currently has too many instructions. A single one is enough: https://en.wikipedia.org/wiki/One_instruction_set_computer

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

#32
post #29

Earlier quoted context omitted.

Awwww this is great stuff. I would love to hear your thoughts on how the language could be changed/improved to make puzzles and optimizing even more fun.

The biggest thing for me is being able to save/load solutions. I ended up keeping multiple browser tabs open as I tried to tweak solutions / attempt different puzzles. As for the language itself, a MOD operation to go with the DIV operation is useful. bitwise AND / OR / NOT / XOR could be interesting. Something that would make threads a lot more versatile would be some way to have them behave differently from one ano…

Interesting thoughts. Thank you for the feedback.

The copy-pasting to clipboard doesn't work in the webgl for browser security reasons, but you can download a Windows build that has working copy to clipboard. I'll make an OSX build later also. See the link here: http://bit.ly/1V1PiHt

How to make threads operate differently on same code is interesting. I don't really want to do another prefix, because I want to keep the realism of 255 opcodes and I've already used 128. The permutations of new prefix would not fit anymore. I also like the JTI suggestion, but perhaps it doesn't go as far as I would like.

Currently I'm thinking that maybe in addition to program counter, the thread would have another slot where it can define "memory offset". You could state the offset when you start the thread, but it is also modifiable later on, as its in memory. You would call for example "THR @023 010 000", which would essentially mean that for ALL operations for that thread, ALL memory addresses get a offset of +010. I think this is very close to what you suggested with threadID. I think the offset would live next to program counter (FE & FF). Do you think that would work?

I've played TIS-100 and named this game similarly BOX-256 as a homage, since TIS-100 pretty much inspired the whole thing. It's a wonderful game.

Great ideas on the new levels. I will shortly update with more levels and I'll be sure to add your suggestions in to the mix :)

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

#33
post #32

Earlier quoted context omitted.

The biggest thing for me is being able to save/load solutions. I ended up keeping multiple browser tabs open as I tried to tweak solutions / attempt different puzzles. As for the language itself, a MOD operation to go with the DIV operation is useful. bitwise AND / OR / NOT / XOR could be interesting. Something that would make threads a lot more versatile would be some way to have them behave differently from one ano…

Interesting thoughts. Thank you for the feedback. The copy-pasting to clipboard doesn't work in the webgl for browser security reasons, but you can download a Windows build that has working copy to clipboard. I'll make an OSX build later also. See the link here: http://bit.ly/1V1PiHt How to make threads operate differently on same code is interesting. I don't really want to do another prefix, because I want to keep t…

You can't access localstorage or anything for persistence? Can't create a popup with copy-pastable text? Any means of input or output from the game short of screenshots and manual typing at all?

The "all operations offset" sounds tricky but interesting. It'd be problematic in a typical usage scenario, but probably work well with my horrible "every line of code runs in a 1-cycle loop on its own thread" style :P

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

#35
post #32

Earlier quoted context omitted.

Interesting thoughts. Thank you for the feedback. The copy-pasting to clipboard doesn't work in the webgl for browser security reasons, but you can download a Windows build that has working copy to clipboard. I'll make an OSX build later also. See the link here: http://bit.ly/1V1PiHt How to make threads operate differently on same code is interesting. I don't really want to do another prefix, because I want to keep t…

You can't access localstorage or anything for persistence? Can't create a popup with copy-pastable text? Any means of input or output from the game short of screenshots and manual typing at all? The "all operations offset" sounds tricky but interesting. It'd be problematic in a typical usage scenario, but probably work well with my horrible "every line of code runs in a 1-cycle loop on its own thread" style :P

I will go for the tricks you mentioned for the input/output in browser, but will take some time to implement.

I'll take a step back and think about the threading some more.

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

#36

I looked at this a couple of times today before finally digging in and as I completed each level I looked forward more and more to the next level. And then there were no more levels, far sooner than I expected. I hope the author adds more in time. Edit: Oh and earlier today after having looked at it many times I bought http://www.lexaloffle.com 's combination of Voxatron and Pico-8. I've spent sometime today learning…

There will be more levels in few days.

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

#38
post #36

I looked at this a couple of times today before finally digging in and as I completed each level I looked forward more and more to the next level. And then there were no more levels, far sooner than I expected. I hope the author adds more in time. Edit: Oh and earlier today after having looked at it many times I bought http://www.lexaloffle.com 's combination of Voxatron and Pico-8. I've spent sometime today learning…

There will be more levels in few days.

Great, thanks!
Post reply on HN