Jump to content

Highmap


Recommended Posts

hey guys.

Me and my Team are creating a new gamemode like Adventure Survivel from Bear grylls. We made a map larger then San fierro and now we want to make a minimap of this island. But How? The Game is to slow to render all of the more then 500 thousend Objects. What can i do now?

Link to comment

You can cast a ray from sky to the ground to find what material is at that point using. So if you create a render target, go through every square meter (or some less precise area, like 2x2 or 4x4) of the map, getting the material and drawing a pixel of its color into the render target during the process, the render target will contain the map which you can save into the image file.

dxCreateRenderTarget 
processLineOfSight, testLineAgainstWater --to get the material 
dxDrawRectangle --to draw the pixel 
dxGetTexturePixels --to get the texture data 
fileCreate, fileWrite, fileClose --to write that data into the file 

And remember, when you cast the ray, the local player must be near enough to make sure that objects are loaded.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...