pulling at a net to create terrain

Started by
3 comments, last by com 21 years, 4 months ago
I''m thinking about creating an engine where you specify the size of a net (as in the little squares that join together) then you simply pull at it with the mouse to create the terrain you like. But the problem is, i''ve been unable to find any tutorials on createing the net. I''ve seen one at www.gametutorials.com (under open gl in a few of the camera tutorials) but i dont want to use open gl. So is there any tutorials out there for creating a net in SDL? thx.
Advertisement
This depends on what you mean by "creating the net". I would think that there are 3 steps to what you want to do.

1. Accept some input for the sizes, say n by m, and then draw an n * m terrain in wireframe. You can do this in SDL and OpenGL or SDL and DirectX, gametutorials has tutorials for both I believe.

2. Let a user select vertices of the terrain to be changed. I know most tutorial sites have tut''s on picking in OpenGL, its not that hard, and I''m sure DX does it in a similar way.

3. Capturing mouse movement and using the movement to adjust the height of the terrain somehow.

If you take it step by step and ask questions as you go you should be fine.
i assumn you want to us this to create environments for youre game ? if so there is plenty of software that you can use, wouldnt this be kind of reinventing the wheel ?

if you intend to use it as a level editor in youre game then please ignore me :D
Well im working on it now, one question: can you have sdl in mfc?
nvm, ill have to use open gl on its own as my compliler doesnt seem to like sdl with mfc or sdl and opengl, just gives my open gl header file errors (gl.h).

This topic is closed to new replies.

Advertisement