Epiar - Next Generation

Get Started. It's Free
or sign up with your email address
Rocket clouds
Epiar - Next Generation by Mind Map: Epiar - Next Generation

1. Libraries

1.1. NOTE: Not everything listed here should be used - this is just a list of libraries that should be considered

1.2. lua

1.2.1. Flexible, easy to use and easy to integrate scripting language

1.3. libconfuse

1.3.1. provides a flexible, human-readable format for scripting

1.3.2. http://www.nongnu.org/confuse/

1.4. enet

1.4.1. Network support

1.4.2. http://enet.bespin.org/Features.html

1.5. SDL

1.5.1. Cross-platform "anything"

1.6. cairo

1.6.1. Vector graphics

1.6.2. Can render on a OpenGL context

1.7. OpenGL

1.7.1. 2D "compositing" layer

1.7.2. Allows efficient rotation and scaling

1.7.3. Allows pixel shaders for advanced light and particle effects

1.8. physics library?

1.8.1. ODE

1.8.2. PhysX

1.8.3. Havok

1.8.4. Our own simple system, as in the past?

1.9. sqlite

1.10. XML library

1.11. Irrlicht

1.11.1. Provides most of the above, plus a full 3D engine

2. Architecture

2.1. Framework

2.1.1. Gui

2.1.1.1. Video

2.1.1.1.1. Renders into OpenGL context

2.1.2. Audio

2.1.2.1. Uses SDL's raw audio facilities

2.1.3. Component

2.1.3.1. Provides a generic component and property system for C++

2.1.3.2. Support for serialization and deserialization of components

2.1.4. ResourceManagement

2.1.5. Net

2.1.5.1. Defines and implements the basic server/client objects needed

2.1.5.2. Remoting of Components

2.2. Epiar

2.2.1. Simulation

2.2.1.1. Implements the raw game logic

2.2.1.2. Support movement prediction (useful for both server and client)

2.2.2. Visualizer

2.2.2.1. Displays the game world

2.2.3. Editor

2.2.3.1. Uses the visualizer to provide interactive editing of the game world being displayed

2.2.4. Game

2.2.4.1. The subsystem that ties all this shit plus user input together to provide a playable interface

3. Code Convention

3.1. File Management

3.1.1. .h

3.1.1.1. Header Files

3.1.1.2. Should have header guards

3.1.1.2.1. FILE_NAME_IN_ALL_CAPS_H

3.1.1.2.2. Additionally, an #ifdef-ed #pragma once for those compilers that support it, in order to have faster compile times

3.1.2. .cpp

3.1.2.1. Implementation files for non-template things

3.1.2.2. Should first include common.h, then it's associated header, before doing anything else

3.1.3. .hpp

3.1.3.1. Implementation files for template things

3.1.3.2. Shoudl have no header guard

3.1.3.3. Included only by its associated .h file (enforced by #error-ing when the header guard macro isn't defined)

3.1.4. Names

3.1.4.1. In General, the filename should be the namespaces plus the final symbol, separated by underscores

3.1.4.1.1. Don't use directories instead, as this brings errors with many linkers

3.1.4.2. The final name should be capitalized in the case of a type, and not capitalized otherwise

3.1.4.3. Examples

3.1.4.3.1. Epiar_Ship.h for class Epiar::Ship

3.1.4.3.2. Epiar_Win32_misc.h for related miscellaneous types and functions in the Epiar::Win32 namespace

3.1.5. Directories

3.1.5.1. No separation of source and include directories

3.1.5.2. For library sub-components, a post-build script should be responsible for assembling the correct files

3.1.6. Common files

3.1.6.1. common.h

3.1.6.1.1. precompiled header for those compilers that support it

3.1.6.1.2. Should contain common macros, definitions, and library includes

3.1.6.1.3. Helps reduce compile time for compilers with precompiled header support

3.1.6.2. <Namespace>.h

3.1.6.2.1. Common external functions and types belonging to a namespace

3.1.6.3. <Namespace>_internal.h

3.1.6.3.1. Internal definitions belonging to a namespace that shouldn't be exposed to the outside

3.1.6.3.2. Should only be included by source files within that namespace or child namespaces

3.2. Naming

3.2.1. Namespaces

3.2.1.1. Capitalized CamelCase

3.2.1.2. Should have logical group names

3.2.2. Classes

3.2.2.1. Capitalized CamelCase - NO PREFIXES

3.2.2.2. Should be singular nouns

3.2.2.2.1. Prefer "EngineManager" over "Engines"

3.2.2.3. Use classes for opaque "objects"

3.2.2.4. Internal symbols that must be in the public or protected interface but should not be used should be prefixed with an underscore

3.2.3. Structures

3.2.3.1. Capitalized CamelCase - NO PREFIXES

3.2.3.2. Should describe the set of data contained within it as noun

3.2.3.3. Use structures over classes for sets of concrete data that are kept in a relatively small scope

3.2.3.3.1. class-local, internal to a namespace, etc.

3.2.4. Enumerations

3.2.4.1. Capitalized CamelCase - NO PREFIXES

3.2.4.2. Should describe the enumeration type as noun

3.2.4.3. Enumeration Values

3.2.4.3.1. PREFIX_ALL_CAPS_WITH_UNDERSCORES

3.2.4.3.2. The prefix should be an abbreviation of the enumeration name

3.2.4.3.3. Example

3.2.5. #defines

3.2.5.1. NAMESPACE_ALL_CAPS

3.2.5.2. If associated with a namespace, the namespace should be contained in the name

3.2.5.2.1. C++ Preprocessor does not respect C++ namespaces

3.2.6. Functions

3.2.6.1. CapitalCamelCase

3.2.6.2. Should be verbs as commands

3.2.6.2.1. SetProperty

3.2.6.2.2. EnableShield

3.2.7. Variables

3.2.7.1. lowerCamelCase

3.2.7.2. no prefixe

3.2.7.3. Should accurately describe what they are without being overly verbose.

3.2.7.3.1. Prefer uint i; over uint shipIterationLoopIndex;

3.2.7.3.2. Prefer uint numRows; over uint nr;

3.2.8. Template Arguments

3.2.8.1. When no ambiguity is present, a single capital T is allowed

3.2.8.1.1. template <typename T> class List;

3.2.8.2. Prefix T

3.2.8.2.1. template <typename TClass, typename TBase> class Inherit;

3.2.8.2.2. template <unsigned int Tcount> class Counter;

3.2.9. Interfaces

3.2.9.1. Same as classes, no prefix!

3.2.9.2. Not required, but preferred to end with "able"

3.2.9.2.1. Renderable

3.2.9.2.2. Enumerable

3.2.9.2.3. Doable

3.3. Syntax Details

3.3.1. In a nutshell: K&R style, hard tabs, no pretty-prenting of functions to line up, exceptions allowed when it improves readability in that particular section

4. Component System

4.1. A system which utilizes OOP but goes much farther in expressive power and configurability

4.2. Individual items are "Components". These components expose certain interfaces and properties, and may hold other components.

4.3. A goal is reached by connecting several small components with concrete tasks

4.4. Example

4.4.1. Component Ship

4.4.1.1. Properties

4.4.1.1.1. "Position"

4.4.1.2. Interfaces

4.4.1.2.1. WorldObject

4.4.1.2.2. Ship (implicit)

4.4.1.3. Child Properties

4.4.1.3.1. Component CargoHold

4.4.1.3.2. Component WorldObject

4.4.1.3.3. Component ModelRenderable

4.5. The live state of the system can be exported by simply querying all the properties of a component, and imported by instantiating a component with the given properties

4.6. Implementation Details

4.6.1. class Component

4.6.2. class Property

5. Neue Idee