Log In  

Cart #jurgen-2 | 2021-01-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

-fixed issue where vegetation would regrow instantly when frame counter loops around.

-added more sounds

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.

This thread for rotating sprite code:

P#85933 2020-12-30 19:35 ( Edited 2021-01-03 17:41)

Cart #47949 | 2018-01-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

This is a SPLIT-SCREEN, 1-VERSUS-1, 4X - similar to Civilization or Europa Universalis.

Build cities!
Explore deserted ruins!
Research new technologies!
Wage war!
Build fortifications!
Conquer the world!

Player 1:
Arrow keys - Navigate menu & control movement orders.

Player 2:
EDSF - Navigate menu & control movement orders.



How to play
Use your Scout to uncover the surrounding area and explore ruins to gain gold and resources.
Use your Settler to find a resource rich strategic location for your first city.
Use your City to build, workers improve cities and build military buildings, inventors for defense and research.

Good Luck!


When giving units move orders:
Hold the direction you would like to go and press Confirm to add a step to the move order.
To undo a step you added, hold the opposite direction and press Confirm.
Release the direction keys and press Confirm to confirm the order. press Cancel to cancel the order.

When placing your first city, what it covers is important, but also the surrounding tiles since you can expand your city later.

When a building is placed, it must first complete construction (brown bar). This is automatic and simply takes a couple of seconds.

Every 'turn', each city harvests a number of surrounding tiles matching its population. Cities will additionally always generate 3 production from the center tile.

When a city has harvested enough food (yellow bar), it will grow 1 population. The bigger the city, the slower the growth. If the city is starving, it will eventually loose population.

When producing something, the city will collect production (white bar). When enough production has been collected, the selected unit will be created (if no other unit is blocking the city tile).

If nothing is being produced by the city, it defaults to "tax", which automatically converts all generated production into gold.

You can build workers to create improvements around your city which will increase the amount of resources generated by your population. An improvement built on top of a natural resource will replace the natural resource.

You can build settlers to establish new cities, but keep in mind each settler built will reduce your city population by 1.

To build new types of units, your worker will need to build one of the military tech buildings (garrison, archery, stables, siege, docks...).

To build even more advanced units, you will need to 'research' by first building the 'lab' which can be built by the 'Inventor'. The lab can once built be found under the "forts & research" tab.

The lab, as well as any building built by the inventor, can be placed anywhere and does not need to be in range of a city.

Buildings under attack will temporarily pause construction.

Military units cost upkeep, but if they are standing on a completed friendly structure, they will always cost 1 gold in upkeep.

If you cannot pay for upkeep, your military units will start to lose health.

Units cannot occupy the same tile.

Destroyed city improvement and city tech buildings never die, but simply become disabled for 180 seconds. They will automatically rebuild themselves as the war dies down.

Movement into a tile can never be canceled.

All units can walk in shallow water, but much more slowly.

Boats and ships can move on land, as long as there is a friendly structure present. This means that you can build canals by placing any type of structure to connect the bodies of water.

Damage dealt causes a knock-back on moving units. If your close combat unit is moving towards multiple ranged units, the knock-back can significantly hinder your chances of ever getting in range yourself!

You only need to research the final level of one type to access "Research Industry" (Modern age unlock).

If you no longer need a unit, you can disband it.

Unit tips

The Scout is a unique fast upkeep-free unit. It can't be built. Take care of it!

Walls and Trenches slow the movement of enemy units.

Stable units are generally more expensive to build!

Canoe and longboat can't travel in deep ocean water (black).

Artillery and siege units can attack 2 tiles away, but their health and speed is not that great!

Rocket can even attack 3 tiles away!

Horses are fast! But not in forests...

Stable units are generally more expensive to build and cost 4 upkeep!

Mechanized units are generally more expensive to build and cost between 4-5 upkeep!

Airfield units are the most expensive to build and cost up to 6 upkeep!

Balloon range is less than 1 which means it cannot attack other units (units cannot occupy the same tile!). Only the buildings and tiles directly under it.

Man-o-war is a very powerful ship, but it mainly gets its power from more attacks per second, this means its attacks are less effective vs very armored ships like the modern Ironclad or armored units like knights

Ranger shoots fast low damage, while Bazooka shots slow and high damage.

Tank and Heavy Tank have lots of armor!

Destroyer can shoot up to 2 tiles and Cruiser can attack up to 3 tiles away!

P#47415 2017-12-16 01:01 ( Edited 2018-11-17 07:10)

Follow Lexaloffle:        
Generated 2021-01-17 18:52 | 0.107s | 4194k | Q:37