reproduce by laying eggs (action is faster than budding, but hatching is longer. Egg can be destroyed/eaten by other gospers)
attack other gospers
leech energy off of other gospers
eat the corpses of other gospers
give energy to other gospers
gosper passive traits
photosynthesize based on tile light levels
stomach with variable size for storing and processing food
create corposes upon death that can be eaten and degrade over time
spread diseases which mutate in their effects and the types of gospers they target
gosper perception
Sight: detects with high quality in a far reaching cone shape and drops in quality in low light
Hearing: detects in a far reaching circle, but only when gospers take actions
Smell: detects with medium quality in a medium sized circle
Touch: detects with high quality, but only in adjacent tiles
Taste: gospers can taste corpses as they are eaten and decide whether to keep eating
gosper decision making
make choices based on the tiles and gospers within perception range
low quality perception randomizes values in percieved gospers and tiles
allow decisions to be influenced by the "genome" (RGB values) of gospers
randomize the way that percieved factors influence gospers and allow them to evolve startegies by mutating these randomized values slightly in offspring
gosper stat system
point bank that gospers allocate from on spawn
allow small chance of stat mutation in each offspring
map
use layered noise maps to generate more complex terrain
optional day/night cycles
optional cloud cover
circular maps in addition to rectangular maps
several different themed terain generation algorithms to choose from
different map sizes
god powers
create and remove gospers
change gosper stats
change tile stats
UI
<< and >> buttons for speeding up and slowing down game speed
options button that pauses the game and pops up a modal window
help button that pauses the game and sends you to the instructions (I have a link on the top left but I want to better integrate this into the UI without obfuscating it too much)
pregame menus for choosing map type and game mode and usage stats. also allow settings and help to be accessed from here
sound
user management
website
create a portal page with links to all the other pages
create a changelog
Map Types
Game Modes
Creative Mode
watch gospers explore and evolve
intervene with god-like powers without limitations
Mission Mode
complete missions on predesigned maps
access to abilities varies depending on the mission
Zombie Defense Mode
defend a colony of gospers from wave after wave of agressive zombie gospers
intervene with god-like powers by spending mana that you gain over time
colony gospers are always green and zombie gospers are always red
the game ends when the entire colony is destroyed
colony gospers do not reproduce
Gosper Hunt Mode
spawn gospers and use other god powers to find and kill a hidden enemy gosper
you only see what your gospers see
the hidden gosper will always try to flee, has no action or passive energy costs, and no max age
try to get the lowest time
Battle Mode
compete with other users to control a percent of the world with gospers descendant from ones you placed
intervene with god-like powers by spending mana that you gain over time
players are assigned colors at the start of the game and player gospers are always the same color
play locally, over a network, or over the Internet
Realm Mode
compete to top the leaderboard in a neverending battle mode that keeps running on a server even after you close the game
a handful of maps ("realms") are shared by all users
choose a color for your gospers to appear as. gospers of a similar or same color will be treated as kin
spend mana to change your color (thereby changing aliances)
send messages to other players to try to get them to change their colors or otherwise act in your favor
rate of mana increase is determined by the amount of mana being used by players (more active players = slower mana increase per player)
Rogue Mode
take over a single gosper and see how long you can survive
the game only progresses when you take an action
your gosper has no max age
import maps built in creative mode
Arcade Mode
take over a single gosper and run around, unbound to the map
the game progresses at a steady rate, whether you take actions or not
your gosper has no max age
import maps built in creative mode
Fantastic Voyage Mode
take over a spaceship and shoot gospers to death to gain points
the game progresses at a steady rate, whether you take actions or not
some gospers will have ranged attacks and will evolve different shooting patterns
import maps built in creative mode
Graphics
Optimizations
predict how many frames before actions are projected to complete for a gosper, action/strategy choice opportunities become availible, or max age/0 energy are hit and only run calculations against gospers that are either in frame, recieve an interaction from another gosper, have their targeted tile blocked, or have hit their prediction thresholds
multithreading
split map into equal sized sections equal to the number of threads-1 with a two tile border between threads
each section is assigned to a thread and the gospers within that section are processed by the corresponding thread
gospers in the 2 tile border areas are processed by the master thread before or after (alternate each frame) every other thread finishes
newly created gospers are generated in the master thread after all child threads are finished (to avoid a collsion in the gosper list array)
since gospers can only affect adjacent tiles this strategy does not allow for race conditions
special cases like projectile creation, movement, collision, and destruction in the fantastic voyage mode will be handled in the master thread
maybe create an additional child thread to handle UI updates, audio, etc...
might wait until after I port away from the prototype, but if not webworkers are an option
port to faster platform
web js is being used for prototyping and may be slower and more limiting than other options
eventually I want to port to a different platform to improve performance. options include:
port business logic to nodejs and use websockets or similar communication protocol to pass info back and forth. frontend exists just for input capturing, sound rendering, canvas manipulation, and DOM manipulation
port entire program to nodejs and use electron for frontend rendering
compile nodejs port to binaries with pkg or similar bin packager
port entire game to Unity
Bugs/Tweaks
fix camera zoom bug
camera should zoom to center of view/zoom out with previous view centered
camera currently just goes to some strange position
fix touch dragging
touch drag doesnt work for changing view position
this makes mobile unusable
behavior should match mouse dragging
only try to render within the viewport
every gosper on the map is being sent to the renderer
while the renderer performs its own culling, the extra processing required to send each gosper to the renderer eats into the framerate
delete dead gospers
the gosperList array currently holds onto all gospers that have ever lived
this eventually creates both memory issues, and framerate issues as the array is looped through each frame
instead dead gospers should be nulled in the gosperList array, and their former positions in the array should be added to an array that gets popped from when new gospers are created (if this new array has length greater than 0)
fix timing issues
some calculations seem to still be frame dependent evidenced by changes in survival rates when frame rates change
when I started adding frame independent calculations gospers started dying off in large sudden chunks rather than gradually as they had done previously