Table of Contents
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.
This document uses Unix filesystem conventions for file naming
i.e., files will be named
,
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.
<res>
\scripts\db.xml
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
.
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
directory in the tutorial directory (e.g.,
<res>
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.
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.