Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
CPU BattleTanks (pddring.github.io)
57 points by vmorgulis on Jan 4, 2016 | hide | past | favorite | 11 comments


I think this would be much easier to appreciate and understand if the idea was first explained in text.

Now the user lands on a page with a grid, a tank and some control arrows, with no idea how all of it relates to CPUs. I'm sure the whole thing is rich and deep, but it's probably lost on most of the visitors.


Thanks-good point. I've added a brief welcome message. I made this for a couple of lessons teaching about low level programming and how CPUs work for my Y9 CS students before getting them started with python. Very surprised to see it on here!



A link to the wiki page https://github.com/pddring/cpu-battle-tank/wiki should be better than main page to explain what is CPU BatteTanks.


For the first twenty years of my career I was an embedded systems engineer (hardware and software) - thanks for bringing back lots of good memories!


I got to level three but the program is blank and I can't find any documentation as to what the "special" instructions are.


In the code editor window, if you expand the "Output" frame the two drop-downs tell you the numbers of the available output devices (argument to the OUT mnemonic) and for the output device you select, the number of the commands it accepts (in the accumulator register).


The control pad system is broken. It doesn't do what I tell it to, and often does other unexpected things. Firefox 43.0.1 on Windows.


Does it help knowing that it's not "move up/down/left/right" but "move forward/backward" (the up and down arrows) and "rotate body clockwise/anti-clockwise" (the right and left arrows)?


It still rotates weirdly, it goes 0->-90 by turning 270 degrees instead of -90 (it's just animation bug, but very confusing).

Also there's no obvious connection to CPU until level 2, and level 1 is boring. If not for the hn comments I would assume "shitty tank game" and stopped playing after 2 minutes.


It 'd be great if one could use the keyboard. Mouse input sucks hard.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: