This is actually pretty fantastic and interesting to explore, @hpcodecraft. Gold star work.
I'm going to post a version here though that moves the arrows and plotter as fast as the block size you are using to draw with and with less hiccup.
I will tell you - when you are redrawing the screen at a pixel size of 1x1 each frame, you might just XOR the cursor there and it will be about 100x faster and smoother to work in the field.
If you like, I can give you an example.
Hello @dw817, thanks for your reply :)
I've compared your version with mine and saw you removed the throttling from the cursor (this I understand), and put in three poke-statements. These I don't understand, could you explain what they do? I'm not into the whole memory part of PICO-8 yet.
Also, for the XOR the cursor thing you mentioned, an example would help me a lot! I noticed the speed gets really low and there are frame drops with grid size 1 & 2, if I try to draw every frame. That's why I also put in some throttling there, so that the player at least can see every generation.
If you know a way to make this better, I'd be happy to learn about it.
@Enderboy011 It's my PICO-8 version of "Conway's Game of Life", a "zero player game" - you input an initial playfield and then see how it evolves.
The evolution follows these three rules only:
- Any live cell with two or three live neighbours survives.
- Any dead cell with three live neighbours becomes a live cell.
- All other live cells die in the next generation. Similarly, all other dead cells stay dead.
The game has been invented in 1970 and new patterns are still found today. It also is turing-complete, which means you can build a computer inside the game (if you're patient and have a large play field).
If you want to learn more, there is lot of info to find via Google (including a google easteregg).
Youtube has some nice videos of crazy stuff people do with it, I recommend "epic conway's game of life" by Rational Animations, for example.
Very nice! Not sure if this is interesting to you, but the technique from https://www.lexaloffle.com/bbs/?tid=46044 seems like it could be used to get fast updates at 128x128. 60fps should be possible, I think - you can certainly get the neighbor count much faster than that, not sure what the extra shifts and boolean ops required to go from neighbor count to actual cell values will do.
That is pretty fast animation agreed, yet I happen to like @hpcodecraft's rendition more cause it has more options that allow you to explore the anomaly in closer detail.
Oh, and here is an example of XPLOT. Back in the day we had to do this to move graphics over backgrounds in computers that couldn't redraw the screen every cycle because they were so slow.
Someone may mention, you could use memory transfers too for the screen which would be far easier than xplot, now that the cork is out of the bottle we have a new 32k of memory to play with.
[Please log in to post a comment]