I've decided to do a game based on the artic convoys of world war 2
I've put up some screenshots here http://stainlessbeer.weebly.com/convoy.html
My problem is the ocean, I'm working in OpenGLES 1, so no shaders.
The approach I'm using at the moment is a view aligned height map with logarithmic scaling, so I get more detail at the front of the screen than at the back.
It's 128 * 8 verts, but every vert is on screen so it looks and animates really nicely.
To give you an idea of how it works, I'll put in a few code snippets.
The z coordinate of each row of verts is taken from this table.
const float zcoords[]={0,-4,-8,-16,-128,-256,-512,-2048};
The x coord is calculated from the z coord
z = zcoords[j]; // Start z
x = z *0.5f; // Start x
sx = -z/64; // X step
I animate the height field using a simple trig function based on the verts position.
for (int j=0; j<8; j++)
{
float t = start_time[j] + time;
for (int i=0; i<128; i++)
{
float y = (1.25f * kdSinf(t+(i*0.5)*(j+1)*0.15));
verts[pos]= y;
This looks really good, a lot like deep ocean waves.
The trouble is without any shaders it is difficult to make the height map look like water.
I scroll the water texture against time to give it some feel, and I calculate the vertex colour based on height, but it's still not good enough.
Any ideas?














