Updated readme

dev
Shariq Shah 7 years ago
parent 370b58e978
commit 7339ad6834
  1. 114
      README.md

@ -1,6 +1,7 @@
# Project Symmetry
- ## About
## About
A simple first person shooter that may or may not have anything to do with the concept of symmetry.
The game has a similar struct to older games like Quake where the objective is usually to survive and get to end of the level while killing monsters/demons.
The purpose of this project is to serve as an exercise in creating a game from the ground up using as few libraries as possible. The game uses the following
@ -14,37 +15,42 @@
| [Nuklear](https://github.com/vurtun/nuklear) | In-game and editor UI |
| [GLAD](https://github.com/dav1dde/glad-web) | OpenGL Extension Loading |
## Building
- ## Building
The game uses the [GENie](https://github.com/bkaradzic/GENie) build system. The game can be build by following steps:
- ### Windows
Execute the following command in the project's root directory by opening a visual studio developer command prompt:
```
> cd build
> ..\tools\genie.exe vs2017
```
This will generate a visual studio 2017 solution in the *build/vs2017* folder which can be opened in visual studio and built and run as ususal.
- ### Linux(Ubuntu)
Execute the following in the project's root directory
The game uses the [GENie](https://github.com/bkaradzic/GENie) build system. The game can be build by llowing steps:
-**Windows**: Execute the following command in the project's root directory by opening a visual studio veloper command prompt:
```shell
cd build
..\tools\genie.exe vs2017
```
> cd build
> ../tools/genie gmake
This will generate a visual studio 2017 solution in the *build/vs2017* folder which can be opened in sual studio and built and run as ususal.
-**Linux(Ubuntu)**: Execute the following in the project's root directory
```bash
cd build
../tools/genie gmake
```
This will generate makefiles in the *build/gmake* directory. Then,
```
> cd gmake
> make all
```bash
cd gmake
make all
```
## License
- ## License
All the code in this repository is under GPLv3, see LICENSE for more information
- ## File format specifications
## File format specifications
- ### Entity
```
```bash
# Comment, Sample entity definition in file, paremeters left out are set to defaults
# Empty line at the end specifies end of entity definition
entity: "Something"
@ -58,43 +64,36 @@
specular: 0.55
```
- Add to_string functions for major structs like transform, model etc to ease in conversion?
- ### Configuration Variables a.k.a cfg-vars
```
```bash
# Comment
render_width: 1024
render_height: 1024
debug_draw_enabled: true
fog_color: 0.5 0.2 0.2 1
# There can be comments or empty newlines in between unlike entity definitions
ambient_light: 0.1 0.1 0.1 1
msaa: true
msaa_levels: 8
```
- ### Keybindings
```
```bash
# All keys are parsed by comparing the output of SDL_GetKeyname
# Each line represents a keybinding
Move_Forward: W
# Multiple keys to a single binding are specified with commas
Move_Backward: S,Down
# Combinations are specified with a hyphen/dash
# When specifing combinations, modifiers(shift, alt, ctrl) always come before
# the hyphen and the actual key comes afterwards. At the moment modifier keys are
# forced to be on the left side i.e. Left Control, Left Shift and Left Alt.
Quit: Left Ctrl-Q
# Single modifier keys are allowed but multiple modifier keys without corresponding
# non-modifier key are not allowed
Sprint: Left Shift
```
- ### Level/Scene
@ -122,63 +121,12 @@
file are immutable.
- In each level there going to be mutable entites i.e player and player's position/orientation, objectives
cleared/remaining, doors opened and puzzles solved etc. Instead of handling all of these in the
scene file, we save all the mutable state in the savegame files. When restoring game's state from a save game we will need
scene file, we save all the mutable state in the savegame files. When restoring game's state from a save name we will need
to handle loading of a scene and then applying the mutable state to entites after loading.
- Entities can have (a fixed number of?) properties. Each property has a name and a corresponding
variant value like, health or ammo etc. But, how to save/load all of that?
- ### Materials
*TODO*
- ### Mesh/Geometry
- ### Notes on entity Systems
- Fat entites with all related properties, i.e. position, mesh etc in them. Easy to serialize, memory friendly, simple to implement but would require significant changes to the current codebase, for example:
```C
struct Entity
{
int type;
char* name;
struct Transform {....};
struct Camera {....};
// Separate properties unique to entity types by using unions
struct Renderable
{
struct Model {....};
union
{
struct Player
{
int score;
int bullets;
};
struct Enemy
{
int target;
};
}
}
};
```
- Change component implementation by using anonymous unions to simulate interfaces. e.g
```C
struct Component
{
int type;
union
{
struct Transform {....};
struct Model {....};
struct Camera {....};
}
}
```
- Use handles for assets
- Use something similar to Variant to use as entity, not sure what or how
- Don't forget to think of the actual use-case and usage when coming up with a solution, don't build castles in the air!
*TODO*

Loading…
Cancel
Save