Upcoming Events
Unite 2010
11/10 - 11/12 @ Montréal, Canada

GDC China
12/5 - 12/7 @ Shanghai, China

Asia Game Show 2010
12/24 - 12/27  

GDC 2011
2/28 - 3/4 @ San Francisco, CA

More events...
Quick Stats
100 people currently visiting GDNet.
2406 articles in the reference section.

Help us fight cancer!
Join SETI Team GDNet!
Link to us Events 4 Gamers
Intel sponsors gamedev.net search:

Creating Virtual Worlds


Section 1 - A single room

$room = { texture => $txt->texture("blustn"), };         # line 1
$world = cell ( name => "Hello World", room => $room );  # line 2
$bunch = worldAsBunch ( 0, 0, 0, 32, 32, 16, $world);    # line 3

Example 1


1: A single room

Thats it! You may wonder now, what has happened? And where are all the details?

Okay, for the slow ones :o)

We described a room in line 1, and the only thing we set was the texture, which is named 'blustn'.

In line 2 we described our world, gave it a name and said it should use the room described earlier. The call cell() will fill in any parameters we left with good default values.

In line 3 we constructed the world as a bunch, which contains all the gory brushes and objects from our world and can then be saved to a mission file. The wrapper will do the rest for us. In line 3 the 6 parameters are X,Y and Z of the world's center and its width, length and height.

Just FYI, here is the output from the script:

VWorld Tutorial Wrapper v0.0.1 (C) Copyright by Tels 2000. All Rights Reserved.

Call as perl vtutorial.pl [section] where section is 1..x and defaults to 1.

Reading tutorial section 1...
Texture families: 8
flavours: 59 links: 242
Tutorial Section 1

Hello World: 0 0 0 (32 32 16)
Debug on for 'Hello World'
Unrotated 0 out of 1 cubes (1 brushes).
Optimizing: air's (1)
Removed 0 rendundand cubes by comparing 0 times.
Stuffing meself into VBR:
'Hello World' contains:
1 brushes, 1 rooms, 0 flows, 0 objects and 0 lights in 3 groups.
Generating object system: 0 links (0 with data), 0 properties.
Done, enjoy data/vtut_1.mis!
Destroyed 'Hello World'

That's it! Load the mission into DromEd, type light_bright[Enter] in the lower right command window (since we haven't added any lights/lamps, and you would otherwise not see anything), then portalize, build the room database, and then hit [ALT]+[G] to go into Game Mode. Walk around and enjoy the empty space a bit.

Now onto to some more complex things...



Two rooms


Contents
  Introduction
  What you need
  How it was...
  A single room
  Two rooms
  Three rooms over the edge
  Another brick in the wall
  Doorways to Heaven
  Redefine the world
  Links, routes, etc.
  More ideas
  Afterword

  Printable version
  Discuss this article