Creating a new world

From Computing and Software Wiki

Revision as of 14:10, 17 March 2008 by 130.113.109.88 (Talk)
Jump to: navigation, search

After reading this tutorial, you should able to create a basic world and get it run.

Make a new world
Start C4, when the main menu is displayed, press the ESC key to close it and press the tilde key twice to display the main toolbar.

  • pic

Click on the Tools menu and select New World, or press Ctrl-N

  • pic

A new world file is displayed with the name untitled.

  • pic

Click on the World menu and select Save World As ...

  • pic

Save it as "Base" or any name you like in the directory "Data/MyGame/world".

  • pic

To minimize the potential for loss of data, save worlds on a regular basis. When adding major updates, add a version number suffix to the end of the filename, so if the world file gets corrupted at any point it is easy to use the previous version. E.g. the next time the file needs saving, choose Save Word As ... and change the name to Base-01, Base-02 etc.

Creating a Skybox
Access the Scene Graph by right clicking in a viewport and selecting "Scene Graph"

  • pic

The Scene Graph will display all of the world's nodes in a hierarchical tree structure, with the Infinite Zone at the root, this is also called the Root Node. As this is a new world file, no nodes have been added to the scene graph yet, by default there is always an Infinite Zone.

  • pic

With the Scene Graph open, select the first node called Infinite Zone, the selected Node is highlighted in green.

  • pic

Once highlighted press Ctrl-I or select Get Info from the Node menu. The Node info dialog is displayed for the Infinite Zone, defaulting to the Zone tab. As a Skybox needs to be added to the Infinite Zone, check the Render skybox in this zone check box.

  • pic

Click OK to close the Node Info dialog. To add the skybox, the skybox page needs to be visible in the editor, from the main menu bar at the top, click on Page and select Skybox.

  • pic

The Skybox Page is displayed on the Left.

  • pic

Click on the icon and notice that the cursor turns to a small crosshair, click on the Infinite Zone node in the Scene Graph and the skybox node is attached to the Infinite Zone node. The Scene Graph now looks like this, note that the new node is highlighted in green once it is added.

  • pic

Press the 1 key or click on the button, to return to the Select Nodes pointer. Open up the Node Info dialog (By pressing Ctrl-I).

  • pic

Click on the Skybox tab

  • pic

To add a texture, click on the Arrow on the right of Positive X texture map text box, and the Texture Map dialog is displayed. If the demo is being used to work through this tutorial, the textures will not be visible, and their respective text values will have to be added manually.

  • pic

Select Storm1.tex and Click OK.

  • pic


Note that the texture map dialog displayed Data/Demo/sky/ as the path name, whereas in the Node Info dialog the path ends up as sky/Storm1
Browse to the textures or just enter them by hand, so, copy the first value and paste the values in the remaining fields, changing the final number. Also check the Enable skybox glow check box.

  • pic

So the finished dialog looks like

  • pic



Creating a Plane or Geometric
For more detail or creating a geometric, please go to Adding geometric object
For add material on floor or geometric, please go to Adding Materials
Creating a plane (or floor) to let our objects or player to run on, so they do not fall into "space"

  • pic

Adding a box on the plane

  • pic



Creating a Player or Spectator Spawn Marker
A spawn or Spectator marker has to be added in order to run the new world.
From the Page menu, select Markers.

  • pic

The markers page is added to the panel on the left.

  • pic

Add a Location Marker to the scene using the top left viewport, add it on top of the floor bottom right. As in the image below.

  • pic

Rotate the marker around so that the red arrow points towards the column, the red arrow is the direction the player will point when spawning.

  • pic

Finally decide what type of spawn marker is required, highlight the marker and press Ctrl-I, click on the Locator tab and in the Locator type text box add either spwn (for a character) or spec (for a spectator).

  • pic

Click OK. And Save the World file.

  • pic

From the World menu, select Save and Play World

  • pic

Once the world file loads, press ESC to remove the toolbar, you can now move around the world as a character or spectator.


References
http://www.terathon.com/wiki/index.php?title=Creating_a_Basic_World

Personal tools