Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/caiolaytynher/block_game

Minecraft inspired block game in C
https://github.com/caiolaytynher/block_game

block-game opengl

Last synced: about 1 month ago
JSON representation

Minecraft inspired block game in C

Awesome Lists containing this project

README

        

# Block Game

A Minecraft inspired block game made in C. This is a project that I'm doing to
learn about game development and low level programming.

## Inspirations

- [WSAL Evan](https://youtu.be/v0Ks1dCMlAA?si=v0jOUZu_1p1F-fg1)
- [GamesWithGabe](https://youtu.be/sMs28KxbHiA?si=rJ3X3lwMY_I4FYOQ)
- [jdh](https://youtu.be/4O0_-1NaWnY?si=5rhs5OBzb1l-Ufy1)
- [Kofybrek](https://youtu.be/o_J-0p9uoSg?si=ejJdkLUbKQprxJYG)

# TODO

- [ ] OS layer
- [ ] Memory allocators
- [ ] Strings
- [ ] File handling

# Compiling

## Windows

Open the Developer Command Prompt for VS and run `build_{mode}.bat`. The
executable will be at `build/{mode}/block_game.exe`.

Inside of VSCode, you can press `Ctrl+Shift+B` to build and run and `F5` to
build and run from the debugger.

# Vendor

## [GLFW](https://www.glfw.org/)

Command used to build:

```
mkdir build
cmake -S . -B build -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
```

Then, I opened the solution file and built the Debug and Release versions for
x64. The extra option is to make sure it is using the same standard library as
my project, by default it uses /MD, and I'm using /MT.

The `src` directory is just a copy paste from the repo.

## [Glad](https://glad.dav1d.de/)

Options used to generate the files are in the header at `vendor/glad/include`.

```
OpenGL loader generated by glad 0.1.36 on Wed Oct 16 19:45:23 2024.

Language/Generator: C/C++
Specification: gl
APIs: gl=4.6
Profile: core
Extensions:

Loader: False
Local files: False
Omit khrplatform: False
Reproducible: False

Commandline:
--profile="core" --api="gl=4.6" --generator="c" --spec="gl" --no-loader --extensions=""
Online:
https://glad.dav1d.de/#profile=core&language=c&specification=gl&api=gl%3D4.6
```

I'm compiling the source code with my own to make the build consistent.

## [cglm](https://github.com/recp/cglm)

Tried to compile the library but it failed, so I copied the `include` directory
and I'm using it as a header only for now.