Making a CA "game"

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
SludgeMcGunkman
Posts: 9
Joined: November 13th, 2024, 12:11 am

Making a CA "game"

Post by SludgeMcGunkman »

I call it a "1 player game". You pick a spaceship and gotta get to the end while avoiding pretty much everything. The player (blue) cells follow the same rules as the environment (Life by default) but with the addition that player cells are only created when all living neighbors are also blue, to prevent complications. Working on attacks at the moment, which will need their own cell state as well. The game even has a different intro depending on your rule/ship :P
image.png
image.png (23.71 KiB) Viewed 9398 times


I also use the engine for more general CA testing like searching for interesting rules. It supports Generations/multistate rules, LTL neighborhoods, alternating rules, and neighborhoods that extend backwards in time. It's nothing groundbreaking, but I wanted to make the tool from scratch so that I could experiment with new ways to find rules. Also to make the game idea mentioned previously, of course.
Attachments
game1.gif
game1.gif (613.41 KiB) Viewed 9398 times
search.gif
search.gif (590.51 KiB) Viewed 9398 times
sludgegunkler on catagolue.hatsaya.com
making a game of Game of Life
fooling around
User avatar
SludgeMcGunkman
Posts: 9
Joined: November 13th, 2024, 12:11 am

some rules I found

Post by SludgeMcGunkman »

Here are some things I saw while messing around with parameters. I won't bother to classify any of these because I will inevitably misuse the terminology/notation.

Memory means the number of past map states that a neighborhood will include.
Also, the "Generations" counter refers to the aging of cells, if enabled. When it's at 0 then the rules relating to that "gamemode" are ignored.
snakeship.gif
snakeship.gif (560.6 KiB) Viewed 9154 times
This one has a few interesting ships and oscillators, but it mostly disappears quickly without leaving still life as far as I can see.
space travel.gif
space travel.gif (1.61 MiB) Viewed 9154 times
space travel 2.gif
space travel 2.gif (1.01 MiB) Viewed 9154 times
More ships and oscillators, although most of the ships are just blocks. Sometimes they will emit sparks from their hindcorners. The blinkers are somewhat interesting.

The next time I post, I will remember to bring more rules.
sludgegunkler on catagolue.hatsaya.com
making a game of Game of Life
fooling around
User avatar
confocaloid
Posts: 6697
Joined: February 8th, 2022, 3:15 pm
Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms

Re: some rules I found

Post by confocaloid »

SludgeMcGunkman wrote: December 14th, 2024, 4:15 pm Here are some things I saw while messing around with parameters. [...]
[...]
This one has a few interesting ships and oscillators, but it mostly disappears quickly without leaving still life as far as I can see.
[...]
There is an object that appears to be an oblique spaceship, visible in that animation. It appears to be (2,1)c/4, with the following phases:

Code: Select all

x = 89, y = 9, rule = LifeHistory
9B.9B.9B.9B.9B.9B.9B.9B.9B$9B.9B.9B.9B.9B.9B.9B.B2A6B.9B$9B.9B.9B.3B
2A4B.9B.2BA6B.B2A6B.B2A6B.2A7B$9B.4BA4B.3B2A4B.3B2A4B.2B2A5B.B2A6B.3B
A5B.2BA6B.3BA5B$4B2A3B.3B2A4B.5BA3B.4BA4B.5BA3B.2BA6B.BABA5B.2BA6B.9B
$7BAB.4BA4B.3BABA3B.4BA4B.9B.3BA5B.9B.9B.9B$9B.5BA3B.9B.9B.9B.9B.9B.
9B.9B$9B.9B.9B.9B.9B.9B.9B.9B.9B$9B.9B.9B.9B.9B.9B.9B.9B.9B!
#C [[ VIEWONLY GRID ]]
However, I seem to be unable to match this evolutionary sequence to [my understanding of] the parameters visible in the picture. If I understand the parameters correctly, this should work by alternating between two CA. The part "Memory:1" suggests that both of those CA take into account two most recent generations (the current generation and the previous generation) when computing the next generation. Does "neighbourhood range 3 shape +" mean the 13-cell cross neighbourhood? Does "neighbourhood range 1 shape M" mean the 9-cell Moore neighbourhood? Do the rules followed at a given tick use a single neighbourhood (both for the current and the previous generation), or the rules simultaneously use two different neighbourhoods at every tick?
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
User avatar
SludgeMcGunkman
Posts: 9
Joined: November 13th, 2024, 12:11 am

Re: some rules I found

Post by SludgeMcGunkman »

confocaloid wrote: December 14th, 2024, 6:29 pm
SludgeMcGunkman wrote: December 14th, 2024, 4:15 pm Here are some things I saw while messing around with parameters. [...]
[...]
This one has a few interesting ships and oscillators, but it mostly disappears quickly without leaving still life as far as I can see.
[...]
There is an object that appears to be an oblique spaceship, visible in that animation. It appears to be (2,1)c/4, with the following phases:

Code: Select all

x = 89, y = 9, rule = LifeHistory
9B.9B.9B.9B.9B.9B.9B.9B.9B$9B.9B.9B.9B.9B.9B.9B.B2A6B.9B$9B.9B.9B.3B
2A4B.9B.2BA6B.B2A6B.B2A6B.2A7B$9B.4BA4B.3B2A4B.3B2A4B.2B2A5B.B2A6B.3B
A5B.2BA6B.3BA5B$4B2A3B.3B2A4B.5BA3B.4BA4B.5BA3B.2BA6B.BABA5B.2BA6B.9B
$7BAB.4BA4B.3BABA3B.4BA4B.9B.3BA5B.9B.9B.9B$9B.5BA3B.9B.9B.9B.9B.9B.
9B.9B$9B.9B.9B.9B.9B.9B.9B.9B.9B$9B.9B.9B.9B.9B.9B.9B.9B.9B!
#C [[ VIEWONLY GRID ]]
However, I seem to be unable to match this evolutionary sequence to [my understanding of] the parameters visible in the picture. If I understand the parameters correctly, this should work by alternating between two CA. The part "Memory:1" suggests that both of those CA take into account two most recent generations (the current generation and the previous generation) when computing the next generation. Does "neighbourhood range 3 shape +" mean the 13-cell cross neighbourhood? Does "neighbourhood range 1 shape M" mean the 9-cell Moore neighbourhood? Do the rules followed at a given tick use a single neighbourhood (both for the current and the previous generation), or the rules simultaneously use two different neighbourhoods at every tick?
Yes, correct on all of those. None of the neighborhoods count the center in as a neighbor (C=0). The current rule at any moment only uses one neighborhood/set of values at a time, starting with the one labeled with "(0)". The "alternate every x turns" means it will start on neighborhood 0, change to 1 the next turn, and repeat.
sludgegunkler on catagolue.hatsaya.com
making a game of Game of Life
fooling around
User avatar
b-engine
Posts: 3762
Joined: October 26th, 2023, 4:11 am
Location: Somewhere on where Earth At
Contact:

Re: Making a CA "game"

Post by b-engine »

SludgeMcGunkman wrote: November 27th, 2024, 1:24 am The player (blue) cells follow the same rules as the environment (Life by default) but with the addition that player cells are only created when all living neighbors are also blue, to prevent complications.
This is the exact rule defined as ruletable:

Code: Select all

#R CGoL-game-test
! 
@RULE CGoL-game-test
@TABLE 
n_states:3
neighborhood:Moore
symmetries:permute

var a={0,1,2} 
var a1=a
var a2=a
var a3=a
var a4=a
var a5=a
var a6=a
var a7=a
var a8=a
var b={1,2}
var b1=b
var b2=b
var b3=b
0,2,2,2,0,0,0,0,0,2
2,2,2,2,0,0,0,0,0,2
2,2,2,0,0,0,0,0,0,2
0,b,b1,0,0,0,0,0,0,0
a,b,b1,a1,0,0,0,0,0,1

a,a1,a2,a3,a4,a5,a6,a7,a8,0

@NAMES 
1 Enemy
2 Player
@COLORS
1 255 255 255
2 0 0 255
User avatar
PiSpaceships
Posts: 218
Joined: January 17th, 2025, 12:20 pm

Re: Making a CA "game"

Post by PiSpaceships »

You interested me! Can I play this game?
INACTIVE
User avatar
SludgeMcGunkman
Posts: 9
Joined: November 13th, 2024, 12:11 am

Re: Making a CA "game"

Post by SludgeMcGunkman »

PiSpaceships wrote: December 30th, 2024, 12:28 pm You interested me! Can I play this game?
Short answer: yes, but it's not a real "game" at the moment.

The last time I worked on it was around the time of my last post here. It seems like the last thing I was in the middle of working on was properly implementing the shooty part, which will hopefully become the most fun part of the game. There are a few other tweaks I gotta make before it feels like a real game and not just an experiment.

I thought it would be a fun idea to try and it's a miracle that I got it to work at all. There are only a few tested rules that work with the gameplay, but I can always search for more. Thanks for showing interest! I probably will work on it more now that it's been brought back to my attention. If you would like to play it as it is now or to try it out with a different ruleset I can send you a copy, somehow.

Also: how does it show your "Joined" date as after the date you made this post?
sludgegunkler on catagolue.hatsaya.com
making a game of Game of Life
fooling around
User avatar
PiSpaceships
Posts: 218
Joined: January 17th, 2025, 12:20 pm

Re: Making a CA "game"

Post by PiSpaceships »

SludgeMcGunkman wrote: April 6th, 2025, 10:32 pm
PiSpaceships wrote: December 30th, 2024, 12:28 pm You interested me! Can I play this game?
Short answer: yes, but it's not a real "game" at the moment.

The last time I worked on it was around the time of my last post here. It seems like the last thing I was in the middle of working on was properly implementing the shooty part, which will hopefully become the most fun part of the game. There are a few other tweaks I gotta make before it feels like a real game and not just an experiment.

I thought it would be a fun idea to try and it's a miracle that I got it to work at all. There are only a few tested rules that work with the gameplay, but I can always search for more. Thanks for showing interest! I probably will work on it more now that it's been brought back to my attention. If you would like to play it as it is now or to try it out with a different ruleset I can send you a copy, somehow.
How will this game be played? And what is the goal?
SludgeMcGunkman wrote: April 6th, 2025, 10:32 pm Also: how does it show your "Joined" date as after the date you made this post?
Because I wrote this post on my old account, TBPO, but I later transferred my posts to the newer account.
INACTIVE
User avatar
SludgeMcGunkman
Posts: 9
Joined: November 13th, 2024, 12:11 am

Re: Making a CA "game"

Post by SludgeMcGunkman »

PiSpaceships wrote: April 7th, 2025, 1:21 pm
SludgeMcGunkman wrote: April 6th, 2025, 10:32 pm
PiSpaceships wrote: December 30th, 2024, 12:28 pm You interested me! Can I play this game?
Short answer: yes, but it's not a real "game" at the moment.

The last time I worked on it was around the time of my last post here. It seems like the last thing I was in the middle of working on was properly implementing the shooty part, which will hopefully become the most fun part of the game. There are a few other tweaks I gotta make before it feels like a real game and not just an experiment.

I thought it would be a fun idea to try and it's a miracle that I got it to work at all. There are only a few tested rules that work with the gameplay, but I can always search for more. Thanks for showing interest! I probably will work on it more now that it's been brought back to my attention. If you would like to play it as it is now or to try it out with a different ruleset I can send you a copy, somehow.
How will this game be played? And what is the goal?
SludgeMcGunkman wrote: April 6th, 2025, 10:32 pm Also: how does it show your "Joined" date as after the date you made this post?
Because I wrote this post on my old account, TBPO, but I later transferred my posts to the newer account.
The game is played by simultaneously shifting the position of all the player's cells in the direction of the arrow keys. It's kind of a "brute force" means of movement. The player cells (hopefully) stay together and any pieces that fall off due to interactions with the environment become purple, which means you can't move those ones with the arrow keys. The same type of cell is used for projectiles.

The game clearly isn't fully automated, I had to take some liberties in making it playable but it clashes with what makes cellular automata so nice sometimes.

The goal of the game is just to reach the end of the stage. At the moment, projectiles don't work. But even if they did, it would only be for potentially removing obstacles in the way of your ship.

All of this is still being worked on, so it's subject to change. My focus when making the game is to allow for a variety of rules and to have a variety of ships available for each rule, so the plans for future mechanics are already restricted quite a bit. I predict the biggest challenge will be the "variety of ships available for each rule" part. Not all of them are 100% compatible with my movement function outlined above.

As for where to host it... Maybe itch.io? Or something like that?
sludgegunkler on catagolue.hatsaya.com
making a game of Game of Life
fooling around
MXMLLN
Posts: 39
Joined: December 28th, 2022, 12:36 am
Contact:

Re: Making a CA "game"

Post by MXMLLN »

Itch.io would be great.
You can also post of Github, but Itch.io is where works would mostly get played
Quantum-mechanics
Posts: 154
Joined: September 17th, 2023, 4:38 am

Re: Making a CA "game"

Post by Quantum-mechanics »

SludgeMcGunkman wrote: April 6th, 2025, 10:32 pm
PiSpaceships wrote: December 30th, 2024, 12:28 pm You interested me! Can I play this game?
Short answer: yes, but it's not a real "game" at the moment.

The last time I worked on it was around the time of my last post here. It seems like the last thing I was in the middle of working on was properly implementing the shooty part, which will hopefully become the most fun part of the game. There are a few other tweaks I gotta make before it feels like a real game and not just an experiment.

I thought it would be a fun idea to try and it's a miracle that I got it to work at all. There are only a few tested rules that work with the gameplay, but I can always search for more. Thanks for showing interest! I probably will work on it more now that it's been brought back to my attention. If you would like to play it as it is now or to try it out with a different ruleset I can send you a copy, somehow.

Also: how does it show your "Joined" date as after the date you made this post?
Shooty part? I think player can choose a rake as his/her spaceship.
Can you publish a part of game for us?
Post Reply