v1.2
-fixed issue where vegetation would regrow instantly when frame counter loops around.
v1.1
-added more sounds
v1.0
A holiday-inspired island simulation with dinosaurs and humans trying their absolute best to prosper.
Created after watching Jurassic Park™ 1-5 during the holidays.
You can only observe in this game.
Arrow keys to move camera.
Z to track an entity.
While tracking an entity, tap Z to show/hide ai.
hold X to speed up.
hold X and tap Z to lock ultra speed up and show a faster summary board.
Tap x or z while in ultra speed summary screen to return to normal speed.
The summary board will show the current count of each entity type, as well as the highest generation achieved.
If an entity type is extinct, it will show the remaining respawn delay.
The "AI" is a super simple neural net based on the absolute simplest example I could find online.
First input layer is:
1..n neurons representing a fading signal for each action an entity can take
1 health fraction neuron
2 energy fraction neuron
1-3 neurons for each sense direction (forward, left, right...), for each other entity category (friendly humans, hostile humans, carnivores, herbivores, eggs, plants, non-steppable), as well as one of of these for entities of the same type (or its associated eggs)
The hidden layers are just 2x8 neurons.
Output layer is 1 neuron for each possible action that entity can take, for example:
"move_forwards, move_backwards, rotate_move_left, rotate_move_right, bite_forwards, egg_backwards"
The output layer is used as a weighted action choice, where the brighter neurons have a higher chance to become the selected action.
Each neuron is connected by weights and a bias to the neurons in the previous layer. Negative weights (activation causes sum to go down) are represented by red lines, and Positive weights (activation causes sum to go up) are represented by green lines. Gray lines are < 0.5 distance from 0 weights. The lines light up when their source neuron activates above 0.5)
All actions cost energy.
All entities also require energy just to exist.
Movement costs energy equal to the amount of segments the entity is composed of.
Doing actions which are considered the objective for the entity give them energy:
- Herbivores get energy from foraging
- Carnivores get energy from chewing other things
- Hunters get energy from shooting herbivores and carnivores
- Girl gets energy from kicking carnivores
- Cameramen get energy from getting a unique shot of each entity type
- Paleontologists get energy from observing unobserved entities in a reasonable frequency
- Tranquilizer get energy from shooting energy stealing darts at carnivores
- Biologists get energy from healing other entities
- Park jeeps get energy from same source as Paleontologists
- Hunter wranglers get energy from same source as Hunters
If an entity gets above 100% energy, it will convert the extra energy to health.
Laying eggs (dinosaurs) or creating a copy of yourself (humans) requires 75% of your energy bar. Eggs increase in energy over time and pop once they are fully charged. Copies are locked for 150 ticks where they can still be damaged, but they cannot do anything.
When an entity lays an egg or creates a copy of itself, the child entity inherits part of the parent's neural net. The second generation takes 50% of the parent weight and biases, the third 75%, the forth 83%, and so on.
If your type becomes extinct on the island, it will respawn as a group after 3000 ticks.
Plants regrow after 1000 ticks.
Plants are placed in 3 layers: low, mid, high.
moschops can only reach low
stegosaurus can reach low and mid
diplodocus can reach mid and high
Different plants have different energy values, where fruity bushes are big trees are the best, while sparse grass have the lowest.
CREDITS:
This thread for rotating sprite code:
https://www.lexaloffle.com/bbs/?pid=52525
very nice - the tileset and sprites would make a very good RTS game (with 2 factions!)
This is fascinating! I like the long/chained entity types, very original.
Found a bug: after a while on superspeed, the plants started instantly regenerating. Dinos stuffed themselves silly until memory ran out
[Please log in to post a comment]