TheJosh / chaotic-rage

An unusual zombie shooter game for Windows and Linux
GNU General Public License v2.0
35 stars 10 forks source link

Feature: rejig surface loading for maps #69

Closed TheJosh closed 10 years ago

TheJosh commented 10 years ago

I'm not fully sure about the current "heightmap" system, perhaps switch to meshes instead? It's worth testing, might solve the performance issues with many zombies.

enjgine commented 10 years ago

Mesh system would be improvement. Mesh system doesn't provide for unexpected collisions but height map limits map creation to the 2D plane with coding intervention and complicates non-terrain design (No overhangs/No intersects ect..). Perhaps a GldSrc or similar system?

TheJosh commented 10 years ago

There is already support for meshes so we would only need to make the heightmap optional and then a level could be composed of a mesh instead of using the heightmap system.

There are some features which are possible with a heightmap system which aren't with a mesh such as playing the correct walking sound based on the terrain so there is no reason why they couldn't be left in as an option. I've even thought in the past about adding in support for multiple heightmaps at different locations, to support really large maps, especially if you could dynamically load and unload from ram depending on the movements of the characters.

enjgine commented 10 years ago

I would definitely like support for mesh-map; it would be especially helpful for campaign.

TheJosh commented 10 years ago

I'll see if I can have a play with this tomorrow.

I'm having some computer issues at the moment and have been doing everything from my phone but hopefully I can get it working. On 08/06/2014 5:00 PM, "enjgine" notifications@github.com wrote:

I would definitely like support for mesh-map; it would be especially helpful for campaign.

Reply to this email directly or view it on GitHub https://github.com/TheJosh/chaotic-rage/issues/69#issuecomment-45430544.

enjgine commented 10 years ago

What model format would you suggest, if you were to write up mesh based. Of course .dae would be a great viability so if that is what you are looking into I might start having a play around with map modelling (have a play with this also).

TheJosh commented 10 years ago

The map mesh loading uses the assimp library just like everything else, so the model can be practically anything. I've been using .dae for most things.

Currently maps are 1x heightmap, 0-1x water surface and 0 or more map meshes. Take a look at the city map in the test mod for a map with meshes. I think there are others too.

We should just make the heightmap optional and then you could use only meshes. We could test the concept by creating a flat map with very low terrain (all black heightmap) and then loading a big mesh in and placing it over the heightmap. On 08/06/2014 11:06 PM, "enjgine" notifications@github.com wrote:

What model format would you suggest, if you were to write up mesh based. Of course .dae would be a great viability so if that is what you are looking into I might start having a play around with map modelling (have a play with this also).

Reply to this email directly or view it on GitHub https://github.com/TheJosh/chaotic-rage/issues/69#issuecomment-45436963.

TheJosh commented 10 years ago

Maps now support multiple heightmaps, or no heightmaps if required. You can use this to make a mesh-only map, or you could use the multiple heightmap option for multi-layered maps or large maps.

There isn't support for dynamic heightmap tile loading at the moment, but this could be added if anyone wanted to create extremely large maps where the map cannot fix entirely within ram.