// Genesaver: copyright 2003 Sam Stafford. //Enums, constants, and the like. enum Color { Black, Grey, Green, Red, Blue, Yellow, Cyan, Magenta }; struct Settings { bool AA; bool AAline; bool shade; bool save; short mutate; short plants; // per 1000 ticks short cscale; // percent of default size short cspeed; // percent of default speed short camera; int gticks; // timesteps per screen short gwidth; // data points per screen short zoom; bool wake; bool drawvis; bool lizard; float alpha; //state variable, not setting }; struct FSettings { float gtime; float gstep; float ps; float pr; float ar; float am; float as; float at; float av; float whratio; //screen width/height ratio short ac; }; extern Settings settings; extern FSettings fsettings; #define NULL 0 //null #define P_E 500.0 //Plant energy #define P_R fsettings.pr //Plant radius #define P_C Grey //Plant color #define P_S fsettings.ps //Plant spawning ( number of plants to spawn per step ) #define A_R 20 //Max animal radius #define A_S 0.5 // Max animal speed as a multiple of radius #define A_D 10 // Amount of color an animal can eat per step. #define A_V 60 // Visual distance in image-pixels. #define D_M settings.mutate //Number of times to mutate DNA on a split #define F_D //Optimum distance for "flocking" fitness. #define N_R 0.015 //Neuron radius when rendering brain #define N_L 0.03 //Neuron label "radius" #define W_P 15 //World population (constant) #define W_F 500 //Number of steps per fitness check #define W_I 50000 //Number of steps per image rotation #define W_A display_buffer == 'b' //display animals in world view? #define W_S true //save genes on exit? #define W_C 0.9 //percent diff that can be consumed to force an autoswap #define C_WORLD 1 //"World" camera setting #define C_CHASE 2 //"Chase" camera setting #define C_GRAPH 3 //"Graph" camera setting #define G_TIME fsettings.gtime //Ticks per graph point #define G_STEP fsettings.gstep //Width in screen coords tween points #include "util.h"
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#20 | 5890 | Sam Stafford |
Increased granularity of "digestion" setting so that lower values can be set. (This change is backwards-compatible with old settings files.) |
||
#19 | 5818 | Sam Stafford | Configurable painter opacity. | ||
#18 | 5691 | Sam Stafford |
Rebuilt Scenesaver with Qt 3.3.6. Added a new flag to the config file (not in the GUI since it's pretty esoteric) that uses the background image on every other rotation in shuffle mode. |
||
#17 | 5589 | Sam Stafford | Make painter speed configurable. | ||
#16 | 4577 | Sam Stafford | Add new "smudge distance" tunable. | ||
#15 | 4572 | Sam Stafford |
New "smudge" feature. REALLY COOL. Off by default (pctsmudge=0) since it's a CPU hog. |
||
#14 | 4561 | Sam Stafford | New smooth autoscaling, with configurable fit-to-screen behavior. | ||
#13 | 4465 | Sam Stafford |
Genetically engineered organisms - there's now an option to seed the initial population with these relentlessly efficient creatures rather than random mutants. Kinda neat-looking, but not as organic-looking as pure evolved creatures. |
||
#12 | 4462 | Sam Stafford | Image shuffle option. | ||
#11 | 4458 | Sam Stafford |
Allow screenshot to capture the current buffer rather than always defaulting to the front one. (This lets people take cool "diff" screenshots.) |
||
#10 | 4457 | Sam Stafford |
After the first round of user feedback: 1) Added option to autoscale images if they don't match in size (on by default) 2) Fixed crash bug if you tried to cycle the chasecam when it had never been initialized. |
||
#9 | 4451 | Sam Stafford | All significant variables are now user-tweakable. | ||
#8 | 4448 | Sam Stafford | Turn this thing into a Windows screensaver. | ||
#7 | 4447 | Sam Stafford | Cleanup size-heredity code. | ||
#6 | 4446 | Sam Stafford |
Finished neural inputs, made size hereditary, auto-rotation of images once a certain amount of diffs have been consumed, saving genomes at finish. |
||
#5 | 4441 | Sam Stafford | Ported chase-cam view. | ||
#4 | 4440 | Sam Stafford | Bug fixes, new features, the usual. | ||
#3 | 4439 | Sam Stafford | Hooked the brain up to its muscles, gave the world physics. | ||
#2 | 4433 | Sam Stafford |
More work on this little project. The AI is still nonexistent. |
||
#1 | 4430 | Sam Stafford |
Start importing alife/AI code from Genesaver. Much tweaking will need to be done. |
||
//guest/sam_stafford/genesaver/src/globals.h | |||||
#4 | 3356 | Sam Stafford |
Calculate display width/height ratio, if possible, and set default zoom level to prevent distortion. (Windows only, thus far.) |
||
#3 | 3354 | Sam Stafford |
Code refactoring - split "main" functions into main.cpp (non-Windows) and winmain.cpp (Windows), with all shared code going in util.cpp. No functional changes. |
||
#2 | 3349 | Sam Stafford |
Add a simulation variable "crtrspeed" that regulates the speed of the creatures. This allows those with blazingly fast CPUs to slow the action down. (Those with crawlingly slow CPUs are out of luck, since above crtrspeed=400%, the creatures just teleport around the screen.) |
||
#1 | 3052 | Sam Stafford |
Add Genesaver to the Public Depot. It's not in any way Perforce-related, but it does share a bit of code with Jamgraph, and it feels strange to have an open-source project that's not in the PD. |