Hi there,
I've started working on my next project, a first person shooter that spoofs Wolfenstein 3D.
Like Wolfenstein 3D, the levels feature very basic square archetecture. The map is made up of a grid, represented by a 2D array, and each value in that array represents either a wall, an open space, a player or an object etc etc. This works very well except..
It runs very slow on some levels that have been made. Granted, I dont have a super high performance PC (2.8ghz PIV Laptop with crap graphics) but I think it still should run faster. Levels where theres lots of wall and very little open space run exceptionally slow, presumably because of the large number of polygons (for instance, if the 48*48 map was filled with walls, there would be 2304 blocks, and since cubes have six sides that means that there would be 13824 textured polygons being rendered every cyle).
So what should I do? I had thought of a couple of possible solutions, including cutting the top and bottom off each cube, since neither are actually seen in the game (reducing the number of polygons by a third). Cutting out the polygons between walls might chop polygons down by another half, but im not aware of a way to remove individual sides from a cube made with the createcube() function, so would I have to create a mesh from scratch? how should I go about doing that?
Cutting back the viewing range speed things up a little bit, but not much. Is there any other obvious techniques for speeding things up that i've overlooked?
Many thanks!
--
Erik Hogan
I've started working on my next project, a first person shooter that spoofs Wolfenstein 3D.
Like Wolfenstein 3D, the levels feature very basic square archetecture. The map is made up of a grid, represented by a 2D array, and each value in that array represents either a wall, an open space, a player or an object etc etc. This works very well except..
It runs very slow on some levels that have been made. Granted, I dont have a super high performance PC (2.8ghz PIV Laptop with crap graphics) but I think it still should run faster. Levels where theres lots of wall and very little open space run exceptionally slow, presumably because of the large number of polygons (for instance, if the 48*48 map was filled with walls, there would be 2304 blocks, and since cubes have six sides that means that there would be 13824 textured polygons being rendered every cyle).
So what should I do? I had thought of a couple of possible solutions, including cutting the top and bottom off each cube, since neither are actually seen in the game (reducing the number of polygons by a third). Cutting out the polygons between walls might chop polygons down by another half, but im not aware of a way to remove individual sides from a cube made with the createcube() function, so would I have to create a mesh from scratch? how should I go about doing that?
Cutting back the viewing range speed things up a little bit, but not much. Is there any other obvious techniques for speeding things up that i've overlooked?
Many thanks!
--
Erik Hogan