Islands by M-1
Genre: endless runner + sumo
Proof of concept of a game with the map entirely generated by a fractal. Do not expect a finished, polished game :wink:.
Goal: escape to land and keep your enemy in the water before the time runs out. If both of you survive, the map shrinks.
There is no score or endgame screen - the game just zooms out and restarts when a player dies.
Controls - Arrow keys / WASD: movement - Space: push away enemy (ability recharges), hold ground (it is harder for your enemy to push you)
Player - Inner circle: on land indicator - Middle: player color - Outer circle: push away ability charge indicator (green when ability ready)
The Julia fractal shader based on Julia Islands by golinad. Opted out of the Graphics rating category for that reason. Specifically, the original shader was distilled to the functions below.
Relevant part of the height shader (single float output into a RenderTexture, which is used also in-game for land/water detection etc.) ``` float2 cSqr(float2 c){ return float2(c.xc.x - c.yc.y, 2.0c.xc.y); }
float landscapeJulia(float2 uv) { const int maxIt = _Iterations; // Normalized pixel coordinates (from 0 to 1) uv *= 2;
int it = 0;
float2 z = uv;
float2 c = _Seed.xy;
float minD = length(z);
for(int i=0; i< maxIt;i++){
z = cSqr(z) + c;
if(length(z) > 50.0) break;
it++;
minD = min(length(z), minD);
}
// Time varying pixel color
return -1.0 + 1.5*float(it)/float(maxIt);
}
float frag (v2f i) : SVTarget { float2 uv = i.uv - float2(0.5, 0.5); uv /= _Zoom; float height = landscapeJulia((uv+Offset.xy)/2);
return height;
} ```
Second shader (visualisation) transforms the height into RGB ``` float3 landColor(float h) { float hn = h0.5 + 0.5; return float3(0.1, 0.3, 0.4) + float3(hn, 0.7hn, 0.4*hn); }
fixed4 frag (v2f i) : SVTarget { fixed4 col = tex2D(SubTex, i.uv); float height = col.r; // the height is stored in the red channel col.rgb = landColor(height); return col; }
```
| Link | https://m-1.itch.io/islands |
| Original URL | https://ldjam.com/events/ludum-dare/54/islands |
Ratings
| Given | 6🗳️ | 8🗨️ |