Hacking sim game?
Go to file
Ritchie Cunningham fa7159587d [Add] Terrain lighting.
* Chunks are now rendered as solid, lit meshes instead of wireframe.
* The GLSL shaders have been updated to a directional lighting model.
* Chunkmes now calculates normal vectors for each vertex to enable the
  lighting.
* Shader class now has a 'set_vec3' method for sending lighting date to
  the GPU.

Bug Fix:
* Resolves visual artifacts and "seams" at chunk boundaries.

Next up:
* To calculate the correct angle for a vertex at the edge of chunk A, we
  need to know the height of the terrain in the neighboiring Chunk B.
Since it doesn't have that information, the GPU's making an appoximate
guess. We need to generate and send a small "border" of height data
along with each chunk, I'll do this by increasing the size of the
heightmap array in the network message so it can hold the 32x32 chunk
plus 1 vertex border all around. MAking it 34x34 for each chunk.
2025-09-16 23:58:03 +01:00
assets/shaders [Add] Terrain lighting. 2025-09-16 23:58:03 +01:00
libbettola [Add] Terrain collision and gravity. 2025-09-16 22:13:15 +01:00
src [Add] Terrain lighting. 2025-09-16 23:58:03 +01:00
srv [Add] Terrain lighting. 2025-09-16 23:58:03 +01:00
.gitignore [Add] Design doc to .gitignore. 2025-09-15 19:41:21 +01:00
CMakeLists.txt [Refac] Separate rendering, game and application. 2025-09-14 16:09:44 +01:00
Makefile refactor(math): Replace GLM with custom math lib. 2025-09-13 02:25:13 +01:00
README.org Initial commit of 2D RPG Engine. @dacav come help. 2025-09-11 23:07:38 +01:00

Bettola Game

A 2D RPG game and engine created with C++, SDL3, and OpenGL.

Dependencies

The following dependencies are requird:

  • A C++ compiler (e.g., clang, g++)
  • CMake (3.16 or newer)
  • SDL3 development libraries
  • GLEW development libraries

Installation (Debian)

You can install all required dependencies with the following command:

sudo apt update
sudo apt install build-essential clang cmake libsdl3-dev libglew-dev

Build Instructions

This project uses a top-level Makefile to simplify the CMake workflow. All build artifacts will be placed in the bin/ directory.

Run the following from the root of the project directory.

  • Build the project: The executable will be located in bin/bettola.

    make
  • Build and run the project:

    make run
  • Clean the project: This removes the bin/ directory.

    make clean