Skip to content

Timothep/Cells.net

Repository files navigation

STILL HEAVILY WORK IN PROGRESS, NO API IS FIXED YET

###################################################

Cells.net is a programming game based on the "Cells" game programmed in Python by phreeza (https://github.com/phreeza/cells) and ported to C#.

Just imagine a flat world, ok 'hilly' world, but flat at its borders - like a giant pizza with mount olive, cheese hills and the anchovi reefs in the middle - where a small population of cellular automatons live in peace. Well, the world they live in is not really flat... but you know... like most very ancient cultures (cells culture... mwarf!), those cells did not really get the big picture yet.

Anyhow. They lived in peace for a few ticks (which are like centuries for them) until they developped enough to get a functioning brain... and that's when the problems started. Now they wander around spreading like an unstoppable plague, they divide and conquer, they ravage and rampage... they do all it takes to survive. They work individually or as a whole... each having its own consciousness or controlled by a giant mastermind... one is sure though, they don't like dying ; neither individually nor as a whole.

Your role in all this? Well it's quite easy to say and much less to do. You are the minds, or the mastermind, you can teach your minions how to think, how to behave... but in the end, it will be only them on the battlefield!

Each cell has a brain. Brains can be shared or unique for a special cell.

Upon each game cycle, the brains are given the possibility to think and pass over the actions they suggest to the cells. They have 0.x ms time to answer per cell that they manage (masterminds are potentially more powerful, but won't necessarily be able to update each and every cell during this time period. When activated, the brain shall plan all the actions that it want its cells to perform and pass over his commands. When the time is up, if the brain hasn't answered, his turn will be skipped and the cell will wander around like a puppet without a master (you don't want to see this do you?). The game engine will gather the commands and pass them over to the cells to apply them.

Here are the commands they can pass: 
* MOVE
* SPAWN (divide into two cells - has a cost and both resulting cells retain half of the remaining energy)
* EAT (gather energy from the energy sources)
* RELEASE (suicide)
* ATTACK
* LIFT (lifts one unit of ground)
* DROP (drops one unit of ground)

The world is 3 dimentional and thus contains "elevations". Cells may only cross a certain elevation difference (3 units max), ie they can’t move up or down a too steep cliff. This is important, because it makes it possible to build walls. At certain locations on the map, energy can be found. Cells need energy to survive (need to eat). There are two sources of energy, one that is scattered around the whole world and is not renewable. And the other, which is generated by plants, symbolized by green dots on the map and which produce this energy at different rates for ever. The world is divided into integer coordinates. A cell may only move to an adjacent coordinate any given turn. Elevations are also given as integers.

Cells need a certain amount of energy every turn to survive. They can store as much energy as they want in themselves. If their energy level reaches zero, they die, and they leave behind an amount of energy at the coordinate they died in. Cells can only sense the fields they are on, and the ones directly adjacent to them up to a 5x5 square around them. The information they can sense is the elevation and energy of the coordinates, the presence of any cells present and the team they are on. If a cell encounters an enemy, it can either choose to attack or to do nothing. If both choose to attack, they both sustain heavy damage(loss of energy). If both do nothing, they walk away unharmed. If one attacks, and the other doesn’t, the defending one sustains damage, but not as much as if it had attacked. Cells, being cells, can reproduce by splitting into 2. This requires a certain amount of energy, and the spawner can pass some arguments to the constructor of the spawnee. Cells can lift one unit of earth from the ground, reducing the elevation there by one, and later dump it at a different location.

Cells can always communicate with each other. They send messages to each other through a team message cue and messages get delivered in the next turn.

Not integrated ideas:

- Cells are not aware of where they are.
- Cells lay down pheromones, these contain direction: any cells on the same side can see it. The pheromone can have multiple flavors (integer).
- Pheromones overwrite each other (only one per landscape block).
- Cells have unlimited memory space.
- Cells can not see the entire playing field – only a 6×6 view of their surroundings.
- Cells can not communicate with anybody – only cells in a 6×6 view of their surroundings.
- On receiving communication a cell gains one more chance to communicate in that turn. It is not allowed to reply to the same cell during that turn.
- The landscape is generated using fractals

Design Principles:

- Multithreading

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages