If you're using opengl than you might still have to work out optimization issues. You take the lines that make up the sectors, each straight line then gets made into a flat polygon. I would also like to note that all files would be compressed with BZip2 or something, so the sidedef compression would really only be useful after loading, not before-hand (I think). I'm still interested in whether or not my design would be functional, though. You know what they say, "don't even think about optimization until it becomes truley necessary." But then, what culling algorithm would I use? Or maybe it's not even necessary for a game like that. I've written a Wolfenstein 3-D-style 2.5-D raycaster before using software rendering, maybe I should try my hand at using OpenGL. I should probably implement a grid-type 2.5-D game before I get too far into this line of thought. Wouldn't result in a hall-of-mirrors in OpenGL, but would result in black strips, which would be kind of lame. I think that would actually be necessary for doors, otherwise the sides of them would move up to and then there'd be no walls. I guess pegging could be implemented with just two integers for each side of the wall indicating PEG_TOP, PEG_BOTTOM or PEG_NONE. I'm REALLY hoping that I formatted the code tags correctly. Thank you for any time you can spare, I know this is a very long message and I'm probably asking for more than I think I am. Would this work? Are the data structures efficient? Should I split linedefs into sidedefs so that each side can be scripted separately, or so that sides with the same texture information share them to reduce memory usage? Should I use short for vertices, instead of int? Is my link_line system impractical? Have I gone insane?Īlso, how would I do collision detection? Is there a tutorial on how to do collisions between lines and bounding cylinders (I imagine cylinders are the best option for sprites, am I right?). GLUEBLOB would be the name of a function that's called to make the sprite act like a glue-blob) */ 11 char update īitmaps would be stored in the game format as names in char style. 1 /* the x and y position of the sprite, relative to the world, not the room */ 2 int x, y 3 4 /* the angle of the sprite */ 5 int angle 6 7 /* the texture currently used to represent the sprite */ 8 ALLEGRO_BITMAP *texture 9 10 /* the script called to update the sprite's logic (essentially indicates type, i.e.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |