Difference between revisions of "Generator"

From Another End
Jump to: navigation, search
(Client-Side Load Process)
(Server-Side Generation)
Line 14: Line 14:
 
==Server-Side Generation==
 
==Server-Side Generation==
 
Similar to client but with a larger radius. This is so that terrain is already generated when the client requests it.
 
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?

Revision as of 22:06, 4 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?