Archived

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

Zealot

Game Loop Question

Recommended Posts

Zealot    127
Ok, I need some help with starting a new game and loading a saved game. When I was developing a game, I noticed shortly into it, that I would need some way to insert the player into the game loop based on a save file. After that I thought that I might should do it like this... When you choose start new game, it loads the first map, sets the location, and then runs the map scripts as neccesary, and when you choose load game, it would load the map that you were on, and then the location, then run scripts on that map. I don''t know if this is a very good way to do it, so help me out. Also, I was making an OpenGL program, and I noticed that if you made a polygon intersect another one, it looks REALLY bad. Is there any way to fix this easily? Thanks En taro Adun! Doom to all who threaten the homeworld! *Protoss Zealot - Starcraft*

Share this post


Link to post
Share on other sites
RandomTask    122
Instead of two polygons intersecting use four polygons that share the same orthogonal line where the previous polygons intersected. This will give the visual equivalent of two polygons intersecting.

This will take care of your problems. The openGL state machine doesn''t understand what you are trying to do because it has such things as backfaces to think about. You can always break your models down into smaller polygons that don''t break any of the model creation rules. Try to the openGL reference manual online (Red Book I think.) This will tell you the polygon creation rules. You MUST follow these or you will have a horrible time.

Cheers,

RandomTask

Share this post


Link to post
Share on other sites