Core wars
Introduction
Thinking about core wars. No idea if this is anything like the original game, but the game I want goes something like:
Take a chunk of linear memory, an instruction set, and a number of active read heads. Every tick each read head atomicly reads and executes the induction at its current location. Instructions can have one of a number of effects: Change the value of the current location, change the current location, store a value in a register, create a new read head, delete the current read head.
Players write instruction sequences that are written into memory. The object of the game is to have your read head as last one standing.
Details
- Memory is the surface of a torus (that is, a square joined top to bottom and side to side)
- Read heads are tagged as owned by a player. The read head from a "create a read head" instruction is owned by the owner of the read head that executes the instruction. (Instructions in memory aren't owned)
- All values are 8 bit unsigned integers. All maths is mod 256.
- Still thinking about registers for read heads. Something about being able to "build" or "earn" more (or taking "damage" and losing one?)