An open API service indexing awesome lists of open source software.

https://github.com/jacob-c-smith/g10

Multithreaded game engine
https://github.com/jacob-c-smith/g10

api c game-engine json systems-programming vulkan

Last synced: 11 months ago
JSON representation

Multithreaded game engine

Awesome Lists containing this project

README

          

# g10
[![CMake](https://github.com/Jacob-C-Smith/g10/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/g10/actions/workflows/cmake.yml)

**Dependencies:**\
[![array](https://github.com/Jacob-C-Smith/array/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/Jacob-C-Smith/array/actions/workflows/cmake.yml) [![hash-cache](https://github.com/Jacob-C-Smith/hash-cache/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/hash-cache/actions/workflows/cmake.yml) [![CMake](https://github.com/Jacob-C-Smith/circular-buffer/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/circular-buffer/actions/workflows/cmake.yml) [![dict](https://github.com/Jacob-C-Smith/dict/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/dict/actions/workflows/cmake.yml) [![http](https://github.com/Jacob-C-Smith/http/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/http/actions/workflows/cmake.yml) [![json](https://github.com/Jacob-C-Smith/json/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/json/actions/workflows/cmake.yml) [![log](https://github.com/Jacob-C-Smith/log/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/log/actions/workflows/cmake.yml) [![queue](https://github.com/Jacob-C-Smith/queue/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/queue/actions/workflows/cmake.yml) ![socket](https://github.com/Jacob-C-Smith/socket/actions/workflows/cmake.yml/badge.svg) [![stack](https://github.com/Jacob-C-Smith/stack/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/stack/actions/workflows/cmake.yml) [![sync](https://github.com/Jacob-C-Smith/sync/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/sync/actions/workflows/cmake.yml) [![tuple](https://github.com/Jacob-C-Smith/tuple/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/tuple/actions/workflows/cmake.yml) [![parallel](https://github.com/Jacob-C-Smith/parallel/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/parallel/actions/workflows/cmake.yml) [![web](https://github.com/Jacob-C-Smith/web/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/web/actions/workflows/cmake.yml)

A cross platform, multithreaded game engine written in C.

> 1 [Download](#download)
>
> 2 [Build](#build)
>
> 3 [Example](#example)
>
> 4 [Tester](#tester)
>
> 5 [Definitions](#definitions)
>
>> 5.1 [Type definitions](#type-definitions)
>>
>> 5.2 [Function definitions](#function-definitions)
>>
>> 5.3 [Macro definitions](#macro-definitinos)
>>
> 6 [Manual](#manual)
>
>> 6.0 [Table of contents](#topics)
>>
>> 6.1 [instance](#instance)
>>
>> 6.2 [user code](#user-code)

## Download
To download g10, execute the following command
```bash
$ git clone https://github.com/Jacob-C-Smith/g10
```
## Build
To build on UNIX like machines, execute the following commands in the same directory
```bash
$ cd g10
$ git submodule update --init
$ cmake .
$ make
```
This will build the example program, and dynamic / shared libraries

To build g10 for Windows machines, open the base directory in Visual Studio, and build your desired target(s)
## Example
**NOTE: If you are running the tester program on Windows, you may have to copy example files to the ```Debug``` or ```Release``` directories.**
The example program parses the input file, and writes the parsed tokens to stdout. To run the example program, execute this command.
```
./g10_example
```
[Source](main.c)

## Tester
**NOTE: If you are running the tester program on Windows, you may have to copy the ```serial test cases``` and ```parse test cases``` directories to the ```Debug``` or ```Release``` directories.**

To run the tester program, execute this command after building
```
$ ./g10_test
```
[Source](g10_test.c)

[TODO: Tester output](.)
## Definitions

### Type definitions
See [gtypedef](./include/g10/gtypedef.h)

### Function definitions
See [g10 manual](./manual/manual.md)

### Macro definitions
Macros change G10 at the build step.

#### Debug
| name | description |
|---------------------------|------------------------------------------------------|
| BUILD_G10_WITH_ANSI_COLOR | true for color coded logs, false for no color coding |

#### Version
| name | description |
|---------------------------|------------------------------------------------------------------|
| G10_VERSION_MAJOR | Different major versions introduce incompatible API changes |
| G10_VERSION_MINOR | Different minor versions add backward compatible functionality |
| G10_VERSION_PATCH | Different patch versions introduce backward compatible bug fixes |

#### Window System Integration (mutually exclusive)
| name | description |
|---------------------------|----------------------------------------|
| G10_BUILD_WITH_SDL2 | Use SDL2 for window system integration |
| G10_BUILD_WITH_GLFW | Use GLFW for window system integration |

#### Graphics API (mutually exclusive)
| name | description |
|---------------------------|-----------------------------|
| G10_BUILD_WITH_OPENGL | Use OpenGL for graphics API |
| G10_BUILD_WITH_VULKAN | Use Vulkan for graphics API |