Ah ok, so it's better to use multiple meshes with only 1 surface.
I'm thinking about making a game where you can drive your vehicle (car, truck, bus, taxi, ...) through a city.
The entire map will be tile-based and needs to be created on-the-fly as you drive through the map.
Several tiles around you (withing range of sight) need to be created while playing.
I cannot have the map modelled in a 3D-package, as you need to have the ability to build new factories, create extra roads, tunnels and bridges (all in 3D).
If it was just a game like GTA, then I could divide the entire map into tiles and load them as you go, but now the game needs to check several things.
If there is a tunnel-entrance on a certain tile, that tile may not be created as part of the terrain, as it would block the tunnel-entrance for example.
When you add a road-tile next to a straight road, that straight road needs to be converted in a T-junction, if you know what I mean.
So my idea was to have tiles (which are 10x10 Blitz Units) and segments (which are 10x10 tiles).
A road-piece is just 1x1 tile, and a building can be 3x3 tiles.
A segment is one big mesh of 100x100 Blitz Units and is created based on the data for each tile which is in that segment.
I need this, because when too many tiles are created seperately (I had a range of sight of 250 Units around you), then I had 2500 seperate meshes, which slows down severely.
Now I only have 25 segments, which speeds up the rendering.
I create a mesh (segment) and create all vertices and triangles of each tile inside that segment and add it to that segment-mesh (all into one surface).
I want to do this like that, because I hate loading-screens, so the game must dynamically load everything in range (and unload everything outside this range).
It's a game like GTA, where you can drive through a city and do missions, but you can also build factories, buy vehicles and set them to work to transport the goods from one factory to another.
The game must process every vehicle on the map, even when not in range (like X2: The Threat and X3: Reunion).
I'm thinking about making a game where you can drive your vehicle (car, truck, bus, taxi, ...) through a city.
The entire map will be tile-based and needs to be created on-the-fly as you drive through the map.
Several tiles around you (withing range of sight) need to be created while playing.
I cannot have the map modelled in a 3D-package, as you need to have the ability to build new factories, create extra roads, tunnels and bridges (all in 3D).
If it was just a game like GTA, then I could divide the entire map into tiles and load them as you go, but now the game needs to check several things.
If there is a tunnel-entrance on a certain tile, that tile may not be created as part of the terrain, as it would block the tunnel-entrance for example.
When you add a road-tile next to a straight road, that straight road needs to be converted in a T-junction, if you know what I mean.
So my idea was to have tiles (which are 10x10 Blitz Units) and segments (which are 10x10 tiles).
A road-piece is just 1x1 tile, and a building can be 3x3 tiles.
A segment is one big mesh of 100x100 Blitz Units and is created based on the data for each tile which is in that segment.
I need this, because when too many tiles are created seperately (I had a range of sight of 250 Units around you), then I had 2500 seperate meshes, which slows down severely.
Now I only have 25 segments, which speeds up the rendering.
I create a mesh (segment) and create all vertices and triangles of each tile inside that segment and add it to that segment-mesh (all into one surface).
I want to do this like that, because I hate loading-screens, so the game must dynamically load everything in range (and unload everything outside this range).
It's a game like GTA, where you can drive through a city and do missions, but you can also build factories, buy vehicles and set them to work to transport the goods from one factory to another.
The game must process every vehicle on the map, even when not in range (like X2: The Threat and X3: Reunion).