Results 1 to 10 of 121

Thread: G.T.A.2 Map Editor

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Is the map like 3D with different layers, or flat plane of tiles? If there are layers, it might at least look best by finding the "roof-block" and plotting its color. You can get roof-block by starting searching from sky/height-max level downwards, until you meet a block that is non-empty. (And you could cache this information for later use in a byte-array)

    As for color averages, OpenGL can do that for you. If you for example wanted to draw a roughly blurred map of 32x32 world, using only every second tile of it:
    - Initialize a 16x16 texture with GL_LINEAR.
    - Plot every second tile to it.
    - Render the texture with any size quad.
    (Obviously this is just a bad example. It'd be better to use 32x32 texture for full details.)

    But also some simple algorithm if you have to do it manually:
    Code:
    For-loop through tiles from 0 to MapWidth-2, 0 to MapHeight-2:
      color.R:=(col[x,y].R + col[x+1,y].R + col[x,y+1].R + col[x+1,y+1].R)*0.25; // Average Red
      // Same for Green and Blue channels
    Last edited by User137; 18-09-2013 at 01:46 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •