Skip to content

Codename Viking game. Work in progress by UVic GameDev club.

Notifications You must be signed in to change notification settings

Lambdanaut/viking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

=================
-----VIKING------
=================

Codename Viking game project. Work in progress by UVic GameDev club.

=================
----TODO LIST----
=================

See TODO file in repository root folder

=================
Build Dependencies
=================

Building this project requires:

	1) The Irrlicht rendering engine.
		The library files for Irrlicht must be in your path.
		The include files for irrlicht must be accessible as <irrlicht/Irrlicht.h>
		I recommend downloading the latest version of Irrlicht from their SVN repository.
		Follow the instructions here to set it up: http://irrlicht3d.org/wiki/index.php?n=Main.InstallingIrrlicht

	2) Scons software construction tool 
		On ubuntu, download it with "sudo apt-get install scons"
		otherwise: http://www.scons.org/

	3) C++ compiler with good C++11 support (g++ recommended)
		I think Scons somehow detects which compiler you should use?

	4) You should have python installed whether or not you decide to build this project. Python is just awesome.

	5) Maybe boost will eventually be used.

=================
Naming Convention
=================

Types and functions:
	class/struct naming: UpperCase

	primitive typedefs (u32, s32): lowercase

	function: camelCase

	member variables: camelCase

Files:
	One class per file

	Files have the same name as class, including capitalization.

	Headers use .hpp extension rather than .h

	Source files use .cpp extension rather than .cc or .c++

	header guards for MyClass.hpp:
		#ifndef MYCLASS_HPP_INCLUDED
		#define MYCLASS_HPP_INCLUDED
		#endif // MYCLASS_HPP_INCLUDED

	namespace for all code in project:
		namespace vik
		{
		NOTE: no indentation inside the namespace
		} // end namespace vik

If you are not sure about an element of naming conventions,
Either look for something similar already done in the code base OR
consult Nicolas. Consistency is mostly important at the interface level.

=================
------Builds-----
=================

viking uses the scons build system, because it "just works" often.
To build viking, type in "scons" from the command line, with optional arguments specified later in the README.
The build will be created in build/CONFIGURATION/bin/, where CONFIGURATION is either Release or Debug.

You may clean a build with "scons -c". Note that this will clean the release build. If you want to clean the debug
build or clean the tests as well, you must use something like "scons debug=1 test=1 -c" (for more info on debug and test, read further in this document)

here's a summary of the arguments, which have their use documented later in this document:
-------------------------------------------
name		default		summary
-------------------------------------------
viking		1		builds viking application from source in 'source' subdirectory
debug		0		builds everything in debug mode (if set to 0, will build in release mode)
test		0		builds unit tests in 'tests' subdirectory

=================
----Debugging----
=================

By default, the scons script builds in release mode. To build in debug mode, you must append the "debug=1" argument.

Put simply, building in debug mode can be done by using the command "scons debug=1"

Debug mode will enable debug symbols with -g and define _DEBUG
Release mode will enable optimization and define NDEBUG

=================
--Unit Testing--
=================

Files in the 'tests' directory are there for testing before integrating into the engine.
Files in the 'tests' folder that match the pattern Test*.cpp are compiled if you run scons with the argument test=1
Note that the assert() macro sometimes used for testing only works if you also build with the debug=1 argument

Therefore, the correct way to build the unit tests is "scons test=1 debug=1"

If you only want to build the tests but not viking, you can specify "viking=0 test=1" in the command line to do so.

About

Codename Viking game. Work in progress by UVic GameDev club.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages