Archived

This topic is now archived and is closed to further replies.

Platform game... display lists ideas, please....

This topic is 5797 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well... i''m programming a platform game in OGL, but I have a problem... I can create a display list for only one platform (a simple cube) and change the texture when I have to draw them... but if I put some cubes together, a black line appears between them... Okey, I know this is because I draw two polygons in the same position (for example, the right face of a cube next to the left face of another cube). Okey... so... what I have to do? My two ideas are: 1> My first idea is create the cube without the bottom and right face, in other list put them and draw them when necessary... but I have the same problem but not so frequently... 2> The other idea is create a structure with all the faces separetly and create a list for each one (I don''t like this so much)... For example: struct { GLuint front; GLuint up; . . . } block; Well... What I do? Anyone has a better idea?? Okey.. thanks for reading this... I guess someone could help me... It isn''t difficult, is it??? c u soon, dudes... "Don''t take the life so seriously, ''cause you won''t survive to it"...

Share this post


Link to post
Share on other sites

Does this happen if you don''t use textures and just shade the cubes?

I had a problem like this once and it was caused by the fact that a polygon does not quite exactly match the edge of a texture. You might be able to change this behaviour by setting your texture co-ordinates to just inside the border of the texture.

Is your texture set to GL_CLAMP or GL_REPEAT? This might make a difference.

Keef

-----------------------
glDisable(WORK);
glEnable(GL_CODING);

Share this post


Link to post
Share on other sites
Hi mckracken! Will your game be in 3D or 3D (a platform game is usually 2D) If it''s going to be 2D, I would use an engine similar to the font engine from Nehe Tuts. Or, if it''s 3D, I would make levels with a quake editor. I''m making a platform game too and I use the second method.

Share this post


Link to post
Share on other sites