Friday, March 8, 2013

Working on: Terrain

Right now, I'm working on Terrain.  Here is its initial draft.

I wanted to achieve a few key concepts with this:

  • Create a grid of tiles, that are some how managed on the client.
  • Randomly assign 2 different tile textures to clearly see the layout.
  • Adjust vertices for a height map.  This image is just done with random heights.
  • Use only single polygons for each square.  (technically two for the triangles)
  • This was built in a separate unity project to experiment with the design/management and not mangle the current code, until I'm satisfied the architecture works.
Work that needs to be done on this:
  • This is generated at random when the scene starts.  I need this to be generated by the server and stored there.  The client will need to load it.
    • I'm presently working out exactly how to save the data.  This probably wont be SQL/DB, but instead be some binary save format
  • Camera scrolling movement.  Keeping the same Y position (height over the map) yet freely sliding across the map.  
  • Camera Rotation.  the camera will keep the same X/Z axis angle, but rotate on the Y Axis (spin left or right)
  • The size will be locked to a small region, perhaps 400x400 tiles, which will be initialized when the map is first created.  I would plan on the player being able to purchase additional land expansions for their city over time, but that is not needed right away.
  • Better land forming algorithms.  This was entirely random, but what I will most likely end up with, is a land mass generator.  
    • Height will be determined in random grid shapes.  producing hills and lakes, instead of the currently jagged terrain.
    • Water will run at Y = 0.  Anything going below that will see the water.  
    • Each GridTile, will hold 4 Land Type Ids.  depending on which type of land it is on any side.  
      • This will be based off of corner, not edge.  I.e.  if to the north it is sand, and the sound it is grass, then this would have the NE and NW corners represented by sand, and the SE and SW corners represented by grass.
    • Textures will be selected based on the 4 land types, and assigning a tile that works for it.
  • A separate tool will be needed to generate the Land Tile Textures.
    • I built a tool like this in VB6 about 14 years ago, but the nature of it is to provide tileable textures for each of the basic types (presuming at the moment that will be Grass, Dirt, Stone, Sand, Gravel, Concrete and Pavement) and then apply a mask to each combination to produce any type. 
    • This has some slight variations, as the VB 6 edition was limited to two basic tiles, and this is increased to four basic tile types.  
What I will need soon:
  • I can continue the development for a while.  So this is not urgent *yet*.
  • I need concept art for how things will look, so that we can agree to it, and start building models and textures off of the same theme.
    • Anyone with graphics skills, I could use the help.  I purposefully am leaving certain details off of this blog, and have additional insight to give, but your welcome to just draft something up and send it as a possibility to use.
    • I'm waiting on finding out more about the graphics skill/interest of those artists who express interest in helping, and make the art/style work with that. 

1 comment:

  1. After consulting GameDev.Net, I came to the conclusion that the MVC4 service is still based on a website. I could story binary files for the maps of each player. I could use the HttpClient method to download the binary file, then process it. JSON won't get clogged, and neither will SQL. Both of those data sources would essentially use a separate variable for each value to store, making searching, separating and processing a pain.

    So, a binary file. If I can get that generation working, I'll probably another alpha then.

    ReplyDelete