3 ms·
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.
by keely 11y ago
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.
- ekimekim 11y agoThe 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 another even when executing the same code. Perhaps a new instruction like JTI X Y: Jump if Thread Id (defined as 0xFF - location of program counter) is equal to Y Or much more versatile but harder to account for in opcodes: a new prefix #XX which behaves like @(XX + thread id). So you could, for example, write 0x42 to a per-thread slot in an array starting at 0xA0 by doing "MOV 042 #A0" For making the puzzles interesting: The problem is most shapes and images can simply be described in memory and subsequently brute-force PIXed in sequence. After the simplest puzzles, the trick is having images that do not fit easily in memory and require procedural description. Checkerboard is a good example here. What about something like fizzbuzz but described in colors (like this: http://imgur.com/RMEaKAg http://imgur.com/RMEaKAg)? Or tricky questions where a seemingly random image actually has a simple pattern (like this: http://imgur.com/TbTPZnh http://imgur.com/TbTPZnh (spoilers here: http://imgur.com/73De5QF http://imgur.com/73De5QF ))? Unfortunately you're very limited as there's no actual input; the program's exact output is always entirely known. Several people here have mentioned TIS-100: It's not the exact same thing as what you're doing, but it could be an interesting thing to compare with if you haven't played it yet. EDIT: Just for fun, my best time for that second puzzle I posted is 0x103.
- keely 11y agoInteresting 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 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 :)
- ekimekim 11y agoYou 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
- keely 11y agoI 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.
- Kristine1975 11y agoIt currently has too many instructions. A single one is enough: https://en.wikipedia.org/wiki/One_instruction_set_computer https://en.wikipedia.org/wiki/One_instruction_set_computer