Skip to main content
gamedev.net
🔒 Locked

Game Loop Question

Started by Zealot 0 replies 150+ views
Original Post
Zealot
Zealot
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*
----------------------------------------------------------You know, I might as well go ahead and say I can't fix the problem... because that's when I figure out how.
RandomTask
RandomTask
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.