Mythic Project -> World Creation
Many details remain to be decided related to the way the world will be created and modified in Mythic.
The world will be divided into maps, each with the own coordinate system. Maps are limited in size because the positions are stored using floats, since this is what is used by graphics hardware and OpenGL. Some time ago, we roughly calculated that a map could be a 10 mile wide square, assuming that we want to have a precision of one inch in all parts of the map. But, we need to check this calculation and document it.
The passage of a character from one map to another can be done continuously or discretely. A continuous transition means the user does not perceive the transition from one map to the other. A discrete transition means the user sees a break when going from one map to another, called a loading screen. Discrete transitions are easier to implement, so for the time being, all map transitions in Mythic will be discrete. In Mythic, players travel to new maps by activating portals.
Maps need a means of collision for the purpose of constraining players and NPCs from passing through objects. We are going to implement this in the following stages.
In the first stage, the world is rendered as a flat surface; characters are kept on the y=0 plane and can otherwise pass through everything in the world. The Map is rectangular and characters are restricted from leaving the area.
In this stage, the surface of the map is generated from a height map, which is an image in which pixels represent average terrain height for a specific square area (or cell). We will look at how Horde terrain generation works to get more detail on this.
In this stage, we add collision boundaries to the static models that are placed in the world. Characters will be able to pass through other characters but will not be able to pass through the collision models.
The following represent the basic types of data associated with maps.
We need to build a version of the client, called a map editior, that allows for the editing of the above map elements.
Initially, we will construct map manually with the aid of our existing client. The client displays coordinates and orientation of the avatar in the world, which can be used as a means to specify the location of objects and their collision boundaries. However, the client will not be able to generate or edit height maps, so we need to create height maps and terrain texturing maps in an image editing tool. We map build a height map editor or use an existing one.
One approach to solving the problem of world creation is to use an editor that creates BSP files. See the following.
An alternative approach is to use Sauerbraten method, which is to use a "6-directional heightfield (or octree) world model." See the comment in the Horde3D forums. I am maintaining Sauerbraten notes.