-
Large 3D Maps
Hi,
I'm building on a 3D game engine for visual basic.
im still a beginner in it :(
but im working on it for more than a year, testing with pieces of code i find on the internet.
Now im able to set up a simple directx render,
but to build a engine, using file and stuff , thats a little harder.
i want to use big maps, so the games get very slow,
like 3 FPS :(
now i kind of get it, how to work with terains,
i found some little trick to load very big map, doesnt mather how big :)
instead of load all vertexes and stuff on initializing the map.
Get the coordinates of the player.
create and array to hold the area the player in, little larger than the view distance.
With some calculations, stream the vertex date from an binary opened file. Maybe it sounds hard,
But each point had a size
Len(myLTVertex)
Cause the map is a rectangle shape,
you create a kind of raster in the file.
Do the same for objects and stuff.
Im still building on the engine, so i coulnd test it out a lot.
If some one got any suggestions you can contact me by mail or icq
If you want to help building the engine (The engine is for a amazing game plan) and a game , please contact me.
Email: [email protected]
ICQ: 59781659
-
That is generally the way it works when dealing with maps larger then, say, 4096x4096. The reason your map is rendering so slowly, though, is because it is so large, and you are rendering ALL of it EVERY frame. for even a 1000x1000 size map, that is still 1,000,000 vertices that need to be transformed every frame (D3D DOES clip most of them away, but not very well). What you need to do is either find a way to clip away all of the polygons that you dont want to render each frame (the ones you cant see from the current camera position), or find some sort of LOD algorithm that you can implement in VB (take a look around http://www.vterrain.org/ ).
Z.