https://github.com/benjitrosch/blocs
https://github.com/benjitrosch/blocs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/benjitrosch/blocs
- Owner: benjitrosch
- License: mit
- Created: 2022-10-12T13:04:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-11T20:14:14.000Z (about 2 years ago)
- Last Synced: 2025-02-14T01:37:00.528Z (3 months ago)
- Language: C
- Size: 191 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## blocs game engine
[](https://en.wikipedia.org/wiki/C%2B%2B14)
[](https://isocpp.org/)
[](https://en.wikipedia.org/wiki/C%2B%2B17)
[](https://github.com/benjitrosch/blocs/actions)🚧🚧🚧 UNDER CONSTRUCTION! USE AT YOUR OWN RISK! 🚧🚧🚧
[Graphics](/include/blocs/graphics/README.md)
|
[Entity Component System](/include/blocs/ecs/README.md)
|
[Debug](/include/blocs/debug/README.md)
### Quick start
In `main.cpp`:
```cpp
#include
using namespace blocs;void Game::start() {}
void Game::update() {}
void Game::render() {}int main(int argc, char* argv[])
{
return Game("my cool game", 1920, 1080)
.run(60);
}
```### Installation
Requires C++20 and [CMake 3.8+](https://cmake.org/)
Add the `blocs` repository as a git submodule or use CMake's `FetchContent` module. To reference the library use `target_link_libraries(${CMAKE_PROJECT_NAME} blocs)`.
Alternatively, you can use the [hub](https://github.com/benjitrosch/blocs-explorer) for easy install.
### Build
To compile and build external dependencies run:
```bash
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
```To build for [WASM](https://en.wikipedia.org/wiki/WebAssembly) using [Emscripten](https://emscripten.org/) run:
```bash
# for OSX and Linux
source ~/emsdk/emsdk_env.sh
# for Windows
emsdk_env.batemcmake cmake . -B wasm-build
cmake --build wasm-build
```---
### Library Dependencies
Platform:
* [SDL 2.26.0](https://www.libsdl.org/)Graphics:
* [OpenGL 3.3](https://www.opengl.org/)
* [stb_image, stb_truetype](https://github.com/nothings/stb)---
### License
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/benjitrosch/blocs/blob/main/LICENSE) file for details.