This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
faunMode true | |
debugMode false | |
devMode true | |
zoomViewSpanLog 5.75 | |
zoomSpanLogForDialogue 4 | |
unzoomedViewSpanRelZoomedp 2.7 | |
mapViewSpanRelWorldp 1.3 | |
boardViewSpanRelZoomedp 0.5 | |
cameraZoomDur 0.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ParentBeingBody | |
hello | |
'"Oh. Sopra mori. Welcome to the world, little spore. Have you been introduced to the town yet? | |
>"What's \"Sopra mori\"? | |
'"Impossible to explain to such a little thing as you, darling little spore. There's so much you have to learn. You'll take some directions to town, wont you? | |
enter directions | |
>"Where is it? | |
enter directions | |
>"Leave me alone | |
'"A dangerous attitude. Bad things can happen to you out here alone, you know. If you don't go to town and take root, you could lose ALL of your data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void updateApproacher(v2& currentPosition, v2& currentVelocity, v2 target, float delta, float acceleration, float deceleration, float maxSpeed){ | |
if(delta == 0) return; | |
v2 dto = target - currentPosition; | |
float dtm = dto.magnitude(); | |
float vm = currentVelocity.magnitude(); | |
auto distanceToStop = [&](float initialVelocity, float deceleration){ | |
float deltdec = deceleration*delta; | |
float numberOfFramesToSlowDown = max(0.0f, floor((initialVelocity - deltdec)/(deltdec))); | |
return numberOfFramesToSlowDown*delta*(initialVelocity - (deltdec*(numberOfFramesToSlowDown + 1))/2); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float linearAccelerationEaseInOutWithInitialVelocity(float t, float initialVelocity){ | |
if(t >= 1.0){ return 1.0; } | |
return t*(t*((initialVelocity - 2)*t + (3.0f - 2*initialVelocity)) + initialVelocity); | |
} | |
float velocityOfLinearAccelerationEaseInOutFromInitialVelocity(float t, float initialVelocity){ | |
if(t >= 1.0){ return 0.0; } | |
return t*((3.0f*initialVelocity - 6.0f)*t + (6.0f - 4.0f*initialVelocity)) + initialVelocity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void FolkBodySpec::prepAnimation(){ | |
//start by identifying clusters | |
auto groupColorings = fillCopies(itemTrayDimensionX*itemTrayDimensionY, 0); | |
u8 nextColoring = 1; | |
vector<Coord> centralNode; | |
overRegion(itemTrayDimensionX, itemTrayDimensionY, [&](Coord c){ | |
uint ik = itemOffset(c); | |
if(locatedItems[ik]){ | |
u8 gc; | |
if(!groupColorings[ik]){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Term const* findTermConst(vector<Term> const& candidates, string const& key){ | |
for(Term const& t : candidates){ | |
if(t.isList() && t.l.l.size() > 1){ | |
Term const& ft = t.l.l[0]; | |
if(ft.isStr() && ft.s.s == key){ | |
return &t; | |
} | |
} | |
} | |
return nullptr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//graph stuff | |
template<typename T> | |
struct GraphNode{ | |
vector<GraphNode*> neighbors; | |
T v; | |
void unlink(){ | |
for(GraphNode* neigh : neighbors){ | |
removeEl(neigh->neighbors, this); | |
} | |
neighbors.clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const float MemerPower = 2; | |
struct Memer{ //where p represents the pulse magnitude and delta represents the amount of time that has passed since the last pulse, the Memer sort of remembers the last couple of pulses and how long ago they were. For any consistent p, d, Will arrive at an equilibrium v that is higher if delta is lower and higher if p are higher. And I think- I'm not sure of this but it seems like something like this will hold- I think that for any a,b p,d where a/b = p/d, if you keep pulsing (a,b) and (p,d) they'll end up similar? | |
float v; | |
Memer(float v = 1):v(v){} | |
void pulse(float p, float delta){ | |
float xof = log(v)/log(MemerPower); | |
v = pow(MemerPower, xof-delta) + p; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precision mediump float; | |
varying vec4 color; | |
varying vec2 uv; | |
varying float pixelSize; | |
varying float innerRadius; | |
varying vec2 angleUnit; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precision mediump float; | |
attribute vec4 a_position; | |
attribute vec4 a_color; | |
attribute vec2 a_uv; | |
attribute vec2 a_angleUnit; | |
attribute float a_pixelSize; | |
attribute float a_innerRadius; | |
uniform mat4 u_projection; | |
varying vec4 color; |