Petri
Petri is a chill cellular life simulator. Witness the rise and fall of countless living cells all trying their best to survive and reproduce.
Behavior and ultimate fitness are governed by stats, mutations, and a move-set, all of which are encoded into rudimentry DNA that is passed down to offspring.
Cells that consume enough food become healthy enough to reproduce. Reproduction weakens a cell, but allows it to pass its DNA (with potential mutations) on to the next generation.
Controls
❎ (X): Cycle through display modes
Enter/Pause: Display pause menu and adjust various game parameters
Additional Info
Stats
Each cell has three stats: strength, agility, and speed.
- Speed determines how likely a cell is to move
- Strength determines how likely a cell is to consume energy each time it moves
- Agility determines how likely a cell is to change direction each time it moves
Move Sets
Each cell has a move-set consisting of a list of numbers, 1-4, representing a cardinal direction.
Display Modes
The default display mode will output the number of living cells, the number of total births, the number of total dead cells, the amout of food currently in the environment, and the highest generation achieved.
The text-based display mode outputs the stats of the most recently birthed cells. Move-sets for each cell are indicated by a band of pixels, each color representing a different direction.
Sounds
There are only two sounds effects in the game, one to indicate a birth, and one to indicate a death.
Moon Missions
My take on a lunar lander game, for the Pico-8.
Features:
- One obnoxious flying saucer
- A catchy intro tune
- Semi-procedural levels
- Persistent high scores
Directions:
Try to land your lunar vehicle on the surface of the moon while keeping an eye on your fuel
and landing speed. Do your part to advance science (and boost your high score) by passing
through each level's "data" waypoints. Keep an eye out for alien interface!
Tip 1: When your landing speed is too high to land, warning lights flash from within your ship.
Tip 2: Keep your eyes out for each level's fuel cannister to get some extra range and boost your score.
How would I go about comparing numbers greater than 32,767?
I'm using @Felice's code from https://www.lexaloffle.com/bbs/?pid=22677:
function get_score_text(val) local s = "" local v = abs(val) while (v!=0) do s = shl(v % 0x0.000a, 16)..s v /= 10 end if (val<0) s = "-"..s if(s=="") then s="0" end return s end |
I'm saving the three highest scores to the cart data. Unfortunately, I'm struggling to solve how to determine if the user's current high score (stored as a string) is greater than one of the other three. I'm looking for a function along these lines:
function check_new_high_score() --high_scores = table of tables { 1 => (player_name), 2 => (player score) } for i=1,#high_scores do local raw_high_score = get_score_text(config.total_score) local raw_saved_score = high_scores[i][2] if(raw_high_score>raw_saved_score) then [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=82692#p) |