bw logo

Chapter 1. Overview

This tutorial provides a brief overview of the minimum steps needed to get a basic game working from scratch. Game developers and technical artists working with BigWorld for the first time should work through this tutorial to get a feel for the way the various files and directories fit together to produce a working game.

The game demo that ships with the BigWorld package is called FantasyDemo. If you are reading this tutorial, you have probably already spent some time playing through it and seeing some of the things that the BigWorld engine can do. Unfortunately for new developers, FantasyDemo is actually a rather large and involved project, so using it as a reference point for implementing a new game can be quite confusing. In general, it is not obvious what can and cannot be stripped out to create a skeleton game.

Instead, this document will work from an empty directory and build the project file by file, to give you a clear understanding of what each file and directory is for.

Note

For details on BigWorld terminology, see the document Glossary of Terms.

1.1. Conventions

1.1.1. Files and directories

This document uses Unix filesystem conventions for file naming i.e., files will be named <res>/scripts/db.xml, and not <res>\scripts\db.xml. You should follow this practice when developing your game, whether or not you are dealing with client-side or server-side scripts and/or assets.

This tutorial assumes you are working on a Windows box, with the files mounted on a local filesystem. The early stages of the tutorial are entirely client-side, so any issues regarding the synchronisation of files between the client and server are not addressed here. Cross machine synchronisation is discussed in Server Installation and Configuration.

Note

This tutorial assumes that the BigWorld package was extracted to the directory C:\BigWorld.

1.1.2. Linux development environment

This tutorial assumes that you are using a UNIX user account called Fred. The parts of this tutorial that involve resources mounted on a Linux filesystem assume that they are mounted at $HOME/mf (i.e., /home/fred/mf).

1.2. Provided files

All files used in this tutorial are provided in the tutorial directory of your BigWorld package.

As shipped, the files represent the final state of the completed tutorial. If you are new to BigWorld development, then you probably want to see the minimal set of files required at each stage of the tutorial, instead of just diving into the completed tutorial (which while much simpler than FantasyDemo, still consists of a fair number of files). To help you with this, BigWorld provides a utility (tutorial/bw_generate_res_trees.py) that strips down the resource tree to the minimal state needed for a particular stage of the tutorial. If you run the utility with the symbolic name of a chapter (e.g., ./tutorial.py CLIENT_SERVER), then the stripped resources are extracted to an appropriately named <res> directory in the tutorial directory (e.g., tutorial/res_client_server). You can then alter the paths.xml[1] and .bwmachined.conf[2] settings to point to these stripped trees.

Even if you are doing the final stage of the tutorial, it may be helpful to run this stripping utility before looking through the source code, as it removes all inclusion/exclusion steps that we have inserted to facilitate the stripping process and makes the code easier to read.

Note

The symbolic constants for each chapter are given in the chapter heading e.g., CLIENT_ONLY.

1.3. Debugging

There may be times while working through the tutorial that the client won't start due to some error in the scripts. In order to discover the cause of the error, use a program such as DebugView (available on the Microsoft website) which captures and displays debug output.



[1] For details on how to configure paths.xml, see Defining resource paths , and A simple space.

[2] For details on how to configure .bwmachined.conf, see Starting and connecting to the server.