Difference between revisions of "Generator"

From Another End
Jump to: navigation, search
(Server-Side Generation)
 
Line 22: Line 22:
 
* Change empty space radius around items depending on values. E.g. in a higher fertility zone, acceptable places for trees are closer together
 
* Change empty space radius around items depending on values. E.g. in a higher fertility zone, acceptable places for trees are closer together
 
** perhaps keep trying to spawn items until no acceptable place is found after 3 tries?
 
** perhaps keep trying to spawn items until no acceptable place is found after 3 tries?
 +
* Probability of creating an item (which could change based on fertility / civilization?)
 +
* Noise Maps (smaller scale) (essentially an object density map?) - wherever noise exceeds threshold, create an item if possible
 +
*

Latest revision as of 15:27, 6 November 2014

Client-Side Load Process

The generator object on the client side is kept synced with the game server to allow for quick, and continuous loading of the environment. The proposed process for loading the client side assets is as follows:

Size and area of generator loading process.

Each grid square measures 50 meters squared.

  1. There is 150 meters around the very outside which has low poly terrain loaded only. This area helps create a larger view distance and allows the player to look for landmarks.
  2. This is followed by 100 meters of level tow, which contains high poly terrain and large, environmental objects.
  3. The inner most area is 150 meters squared and has everything loaded for the player to interact with.

This makes the total loaded area about 650 meters squared. This should allow the player to see land being generated, but never travel fast enough to reach the edge of the world.

Socket.IO is being used to communicate with the Node.JS server. The client socket connector is located in Generator.js.

Server-Side Generation

Similar to client but with a larger radius. This is so that terrain is already generated when the client requests it.


Item Placement

Ideas:

  • Spawn certain # of items per square -> check conditions at each spawn point to see what type to spawn
  • Change empty space radius around items depending on values. E.g. in a higher fertility zone, acceptable places for trees are closer together
    • perhaps keep trying to spawn items until no acceptable place is found after 3 tries?
  • Probability of creating an item (which could change based on fertility / civilization?)
  • Noise Maps (smaller scale) (essentially an object density map?) - wherever noise exceeds threshold, create an item if possible