Level Creation Howto

Ok, if you are here, then most likely you want to create your own levels. That's a good thing. It's not a difficult process, and this howto will make it even easier.

Requirements

  • Neverball (yes, this really is needed ;-))
  • GtkRadiant, the level design tool. Recommended version: 1.5

Quake mapping / Neverball mapping

For those who know everything about Quake engine mapping, you can go ahead and forget most of it. Neverball mapping has significantly fewer restrictions than Quake mapping.

Some of the important differences are as follows:

  • The scale differs. In Quake there are 8 units to a foot. In Neverball there are 64 units to a meter. The default major grid in radiant marks 64 units, so meters are easy to work with.
  • Neverball maps need not be closed. Neverball environments are generally entirely visible all of the time, so all the attention paid to visibility by Quake becomes unnecessary. Maps don't leak.
  • Brushes are referred to as “lumps”. They may overlap. In fact, it is sometimes advantageous to overlap lumps.
  • Shaders do not modify geometry. The textures you apply are the textures that appear in Neverball.
  • No curves. Neverball physics doesn't consider them.
  • Most of Quake's entities are meaningless in Neverball. A few of them are used, but in modified form. These are documented below.
  • No lights. All lighting is dynamic.

Brushes

Creating

You mainly handle the brushes with the mouse buttons, see below in the Shortcuts section.

You create rectangular brushes (blocks) by dragging the mouse.

When you create a brush, it's initially 6 sided. In the “Brush” menu, you can change it into a prism, sphere or cone.

Reshape brushes (blocks) with the clipper tool (xyz icon). This cuts sections off the brushes to form non-rectangular shapes.

Editing

Manipulate your brushes with edges, vertex etc :

  • Pressing E you can modify the edges, move the points and that moves the edges.
  • Pressing V you can modify the vertexes, use it as with the edges.

In GtkRadiant, you cannot create concaves brushes.

With the numerical keys “1, 2, 3, 4,…, and 9” you can change the grid. By default, all the points snap to the grid. You can deactivate this feature in the “Grid” menu.

You can rotate your brushes in the menu “Selection”, “Flip”, “Rotate” or “Arbitrary Rotation.

You can merge two or more brushes into one (if it's possible) in the menu “Selection”, “CGS”, “CGS Merge”.

You can also substract, but be carefull of this feature as it can do strange things, particularly with curved brushes.

Please refer to Editing recommendations for instructions on what NOT TO DO! and advanced techniques.

Textures

Then apply textures to the faces of your brush (only visible surfaces need textures, all other surfaces should have the invisible texture applied - this looks like a transparent white with green and red stripes).

To add textures select the faces you want, click on your choice in the texture list or alternatively press T to open the texture menu and make your choice.

If there are not any textures, you have forgotten to load them. Menu “Textures”, “mtrl”.

Paint your first brush with 'invisible' texture. From then on, all new brushes will be 'invisible' texture. When you have completed the map, paint textures only on faces that will be visible. This will simplify rendering for the final compiled .map file.

If the textures are not placed properly, press S to launch the surface inspector.

With the offset of the H and V shift you can adjust the texture placement.

With the scale you can increase/decrease the texture size.

The step values are the number increased/decreased to the corresponding values when clicking on the arrows.

It is important to match the grid when you create brushes to create easier texture placement. See Editing recommendations for details about texture placement.

See Adding Material section if you want create new textures.

Entities

You will also need to create entities. To do this, right click, choose the entity name from the menu/submenus, and an entity is created at that point.

Press N to open the entities menu, and set up your entity; to add a key, type its name, its value and press enter.

All the brushes are entities of classname “worldspawn”.

Shortcuts

For 3 button wheel mouse :

with the left button you mainly manipulate brushes :

a single click does nothing…

  • If you click in empty space in a 2D view and nothing is selected : dragging the mouse creates a brush (6 sides)
  • If you click inside a selected brush : dragging the mouse moves the brush
  • If you click outside a selected brush : dragging the mouse resizes the selected brush

with the right button :

  • If you click in a 2D view : drag mouse to pan view
  • If you click in a 3D view : a single click puts you in “navigation mode”. turn view with the mouse, and move in/out with mouse wheel and arrows, right click again to quit this mode

with the middle button :

  • If you cilck in a 2D view : dragging the mouse moves the camera direction (not very usefull)

with the mouse wheel :

in all view it zooms in & out

Using the keyboard :

There is a lot of shortcut, I give you the mains :

keyboard + mouse :

Shift + left click select/deselect a brush
Ctrl + shift + left click select a face in 3D view
Ctrl + shift + alt + left click select/deselect several faces in 3D view

keyboard only :

Escape deselect all
Space duplcate selected brush(es)
E change selected brush(es) to edges editing mode. You can manipulate the brush edges
V change selected brush(es) to vertex editing mode. You can manipulate the brush vertices
X select the 'Clipper' tool for cutting and reshaping rectangles
N open the “entites” dialog (see above)
S launch “Surface inspector” dialog. Used to adjust textures on brush faces (see above)
Backspace delete the selected brush(es)
Ctrl + G snap to grid

You can also have a look at the official Command Reference.

Final

To establish maximum compatibility, some sections only apply to a certain set of “engine versions”. For those affected sections, a compatibility

Compile the map

Assume the map is named funkyball.map. Process it into a .sol with the following command. The first item specified is the input .map from gtkradiant, the second gives the location of the mtrl directory. Output should be similar.

$mapc funkyball.map ~/neverball/data

mtrl  vert  edge  side  texc  geom  lump  path  node
  10   552  1086   130   277   854   132     0    33
body  coin  goal  view  jump  swch  ball  char  indx
   1    18     1     1     0     0     1    84  4286   115

Add your map in Neverball

Neverball levels are organized into sets. All that stuff is in some .txt files in the “data/” neverball directory. These text files are a bit complex, so take example on the existing files of the initial sets. All the files listed into these text files have to be in the “data/” diretory. The mains directories in “data” are by convention like this :

data/
 |
 +--- back/                     (contains statics backgrounds)
 |
 +--- bgm/                      (contains musics)
 |
 +--- map-name_of_the_set/      (contains the compiled maps)
 |
 +--- map-back/                 (contains the animated backgrounds)
 |
 +--- shot-name_of_the_set/     (contains the screenshots)

Set file

The set file works differently in 1.5.0 and later than in the earlier versions.

For 1.5.0

You have a file called “sets.txt”. It may be refered to as the “master set file” as it links to all the other sets. It contains one line each containing a link to an existing set file. A new set may be established simply by making a new set file and typing it full name in the master set file.

The format for each set file is as follows

{%SETNAME%}
{%DESCRIPTION%}
{%SETSHOT%}
{%HARD_TIMES%} {%MEDIUM_TIMES%} {%EASY_TIMES%} {%HARD_COINS%} {%MEDIUM_COINS%} {%EASY_COINS%}

Subsequent lines are following by a link to each level using the full name relative to the data directory.

For 1.4.0

You have a file called “sets.txt”, it contains all the sets, one by line. One line contains 6 elements separted by one space or a return to the line :

[file containing the levels] [file containing the defaults scores (easy, medium, hard)] [file in the ~/.neverball/ directory containing your scores] [file of the set image (.jpg)]

[set name]

[set comments]

Level file (1.4.0)

This section applies to version 1.4.0 and earlier.

The file which contains levels (usually levels-name_of_the_set.txt) is based on the same idea. Each line contains 7 elements :

[map file name (.sol)] [animated background] [level screenshot (.jpg)] [background image] [max time to unlock the goal in hundredths of seconds] [number of coins you have to get to unlock the goal] [music file]

Indeed, the background is build with an animated one in a .sol file and a static background. They works by pair :

map-back/clouds.sol  &   back/land.png
map-back/ocean.sol   &   back/ocean.png
map-back/alien.sol   &   back/alien.png
map-back/city.sol    &   back/city.png
map-back/jupiter.sol &   back/space.png
map-back/blank.sol  is simply empty

The time is in hundredths of seconds.

There is 6 musics in neverball :

bgm/track1.ogg
bgm/track2.ogg
bgm/track3.ogg
bgm/track4.ogg
bgm/track5.ogg
bgm/title.ogg

The first line of a level file is not the first level. This line indicates what to display when you have not selected any levels (e.g. the “Back” button). So only the screenshot is important here. And then you have the levels lines.

Score file (1.4.0)

This section applies to version 1.4.0 and earlier.

This file contains all defaults scores for time and coins (easy, hard, medium). Then again, one line refers to one level, and build with 7 elements :

[easy time] [easy coins] [medium time] [medium coins] [hard time] [hard coins] [level file name without the .sol]

Here also the times are in in hundredths of seconds. And then again, the first line is a bit particular. It is simply the score for completing a full set :

[easy time] [easy coins] [medium time] [medium coins] [hard time] [hard coins] TOTAL

And then the scores are listed. If you complete a set from first to last level the total scores are compared to the first line of this file.

Level shot

A level shot is a screen-shot of a level without the ball or any coins visible. It is used to preview a level in the level selection screen. Level shots are listed along with their SOL files, background files, etc in the levels.txt file. There are two ways to acquire a level shot: per level, and per set.

To acquire a single level shot, press F12 at the level's intro screen. This will clear the HUD and all entities. Then, press F10 to take a screen-shot normally. Rename the screen-shot as needed and prepare it as described below.

To capture level shots for an entire set, go to the set's selection screen and press F12. This will iterate through all levels and automatically take a screen-shot of each. The resulting BMP files will have the same name as the source SOL file as listed in the levels.txt file.

NOTE: If the SOL file has the name “sol/foo.sol” then the resulting screen-shot will have the name “sol/foo.bmp”. Thus, if your normal screen-shot directory is your home directory, you must ensure that $(HOME)/sol exists and that the level shots may be written there.

To be properly usable in level selection, a level shot must have power-of-two size. Screen-shots generally don't, thus they must be non-uniformly scaled. 256×256 is usually a good choice. JPG is usually a good format, as it is compact. Both the size and format of the image are optional.

The author uses the following ImageMagick command line to convert an entire set of level shots to JPG.

mogrify -resize 256x256! -format jpg -quality 95 *.png
 
level_creation_howto.txt · Last modified: 2010/01/29 15:00 by 86.60.168.73
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki