Skip to content

rstrobl/starjumper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##############
# STARJUMPER #
##############

REQUIREMENTS
============

- OpenSceneGraph
- bullet Physics Library

INSTALL
=======
cmake .
make

CODING CONVENTIONS
==================

- Tabs: 4 Whitespaces

- Classes and methods:
	- Camel-case
	- Classes start with capital letter (files are named _exactly_ like the class)
	- Methods don't, neither do variables
	- private member variables start with _ (underscore)
	- No egyptian-style brackets
	- #pragma once instead of include guards in header files (#ifndef ... #define ... #endif)
	
	Example:
	--------

	*** FooBar.h ***

	#pragma once

	class FooBar
	{
	private:
		int _member1;
		int _member2;
	protected:
		int fooBarMethod();
	public:
		FooBar(int member1, int member2);
		char suckMyDick();
	}
	
	
	*** FooBar.cpp ***
	
	FooBar::FooBar(int member1, int member2) :
		_member1(member1),
		_member2(member2)
	{
		// More code here
	}
	
- Comments
	- License and commented-out code: /* ... */
	- All other comments:             // ...
	- No capital letters at the beginning

- for-loops
	- unless required otherwise, use size_t as type for run variable
	- preincrement, not postincrement the run variable
	- e.g.: for(size_t i = 0; i < 100; ++i)

- Don't use if constructs without brackets

	Good:

		if(your_mother == your_grandma)
		{
			std::cout << "haha" << std::cout;
		}
		
	Bad:
	
		if(your_mother == your_grandma)
			std::cout << "haha" << std::cout;
			
- Don't use namespaces!
- use const if possible!

About

A Skyroads Clone in C++ using OpenSceneGraph and bullet physics library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published