Cross-platform sandbox RPG game written in C++ with OpenGL and SDL2.

Forradia

test Forradia is a cross-platform sandbox survival/RPG game written in C++ with OpenGL and SDL2. The engine loads 3D models in Wavefront-format as well as textures and fonts. The maps are tile-based and fully randomly generated.

Motivation

The purpose of this project is mainly that I use it to improve my knowledge and experience in these technical areas, and eventually find collaborators.

Build status

Build status

Code style

MegaLinter

Screenshots

Forradia Screenshot 1! Forradia Screenshot 2!

Tech/framework used

Built with

  • Qt Creator
  • CMake

Features

  • Engine allows representation of world map as planets instead of regular flat maps
  • Open-source under MIT license
  • Cross-platform
  • Only dependencies are SDL2-libraries and OpenGL-libraries

Code Example

Engine implementation example

ObjectsContent.Add("ObjectTree1", DescObjectTree1 );
ObjectsContent.Add("ObjectTree2", DescObjectTree2 );
ObjectsContent.Add("ObjectCaveWallBlock", DescCaveWallBlock );

Scenes.Add("SceneGameStart", MakeUPtr<CSceneGameStart>(Engine));
Scenes.Add("SceneMainMenu", MakeUPtr<CSceneMainMenu>(Engine));
Scenes.Add("ScenePrimary", MakeUPtr<CScenePrimary>(Engine));

WorldMap->GenerateWorldMap(DefaultMapGenerator);

StartingInventory.Add(0, "ObjectWoodaxe");

Engine.Run(move(Scenes), GetId("SceneGameStart"), move(WorldMap), StartingInventory, ObjectsContent);

Installation

Windows

Dependencies

Download:

Note:
The project is configurated to locate headers and libraries in subfolders at C:/, if you change these locations, please change the paths accordingly in CMakeLists.txt.

Run in PowerShell to unpack and relocate the dependencies

tar -xf .\SDL2-devel-2.0.20-VC.zip
tar -xf .\SDL2_image-devel-2.0.5-VC.zip
tar -xf .\SDL2_ttf-devel-2.0.18-VC.zip
tar -xf .\glew-2.1.0-win32.zip
tar -xf .\freeglut-MSVC-3.0.0-2.mp.zip

xcopy .\SDL2-2.0.20\include C:\SDL2\include\SDL2 /E /H /C /I /Y
xcopy .\SDL2_image-2.0.5\include C:\SDL2\include\SDL2 /E /H /C /I /Y
xcopy .\SDL2_ttf-2.0.18\include C:\SDL2\include\SDL2 /E /H /C /I /Y
xcopy .\glew-2.1.0\include C:\GLEW\include /E /H /C /I /Y
xcopy .\freeglut\include C:\freeglut\include /E /H /C /I /Y

xcopy .\SDL2-2.0.20\lib\x86 C:\SDL2\lib\x86 /E /H /C /I /Y
xcopy .\SDL2_image-2.0.5\lib\x86 C:\SDL2\lib\x86 /E /H /C /I /Y
xcopy .\SDL2_ttf-2.0.18\lib\x86 C:\SDL2\lib\x86 /E /H /C /I /Y
xcopy .\glew-2.1.0\lib\Release\Win32 C:\GLEW\lib\Release\Win32 /E /H /C /I /Y
xcopy .\freeglut\lib C:\freeglut\lib /E /H /C /I /Y

Clone the repo anywhere

git clone https://github.com/Eknah/Forradia.git
cd Forradia

Run in Developer PowerShell for VS: Build project with CMake and NMake

cmake -G "NMake Makefiles" src/game
nmake

Note: The above will not work in a regular PowerShell, it has to be a Developer PowerShell for VS.

Hopefully everything was successful and you now have a compiled binary.

Linux

To add
Dependencies
To add

API Reference

To add

Tests

To add

How to use?

To add

Contribute

To add

Credits

Thanks to Bly7 for the OBJ_Loader repo which I have used and modified in this project.

License

MIT

Owner
Andreas Åkerberg
C# Development Student
Andreas Åkerberg
Similar Resources

A tiny evolution simulator, which uses SDL2 and is written in C

evosim Evosim is a small evolution simulator. Evosim uses the SDL2 library for graphics. The program can be compiled by simply running make in the evo

Nov 20, 2021

Multi OS Platform Wallpaper Engine using SDL2

MOWE MOWE is 'Multi OS Wallpaper Engine'. This is Wallpaper Engine for any OS like MacOSX, Windows, Linux. This Project use SDL, WinAPI, X11 API conte

Dec 26, 2021

Firmware-agnostic PS4 sandbox escape

libjbc This a firmware-agnostic implementation of the sandbox escape for PS4 homebrew apps. It operates by traversing the process list up to PID 1 (in

Nov 23, 2022

Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++, the architecture and usage like Cobalt Strike

Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++, the architecture and usage like Cobalt Strike

Khepri Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++ Description Khepri is a Cross-platform agent, the archi

Dec 3, 2022

Several GX2 test programs to compare it with OpenGL. (With additional GLFW+OpenGL implementation provided)

GX2-Tests Provided are GX2 test programs and samples for comparison with OpenGL and with additional GLFW+OpenGL implementation for test on PC. These s

Nov 15, 2021

The Leap Motion cross-format, cross-platform declarative serialization library

Introduction to LeapSerial LeapSerial is a cross-format, declarative, serialization and deserialization library written and maintained by Leap Motion.

Jan 17, 2022

A fully-featured, cross platform XO-CHIP/S-CHIP/CHIP-8 emulator written in C and SDL.

A fully-featured, cross platform XO-CHIP/S-CHIP/CHIP-8 emulator written in C and SDL.

JAXE (Just Another XO-CHIP/CHIP-8 Emulator) Brix Space Invaders (In Debug Mode) Black Rainbow DVN8 Super Neat Boy Chicken Scratch CHIP-8 was a virtual

Nov 12, 2022

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation. Output json reflection info and c++ header with your shaders structs, fx-like techniques and compile time branch evaluation via (uber-shader) "permutations".

Nov 16, 2022

Cross-platform, Serial Port library written in C++

Serial Communication Library (Linux and OS X) (Windows) This is a cross-platform library for interfacing with rs-232 serial like ports written in C++.

Nov 30, 2022
OpenGL Template Engine - a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects.
OpenGL Template Engine - a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects.

OpenGL Template Engine is a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects. This is the template I personally use for my own projects and provides me with the general OpenGL 3D render setup with model import and UI.

May 16, 2022
Chromium Embedded Framework with OpenGL Core or SDL2

Chromium Embedded Framework's cefsimple Off-Screen Rendering I needed to use a modifed version of cefsimple using either SDL or OpenGL Core. I tried t

Nov 8, 2022
A cross-platform,lightweight,scalable game server framework written in C++, and support Lua Script
A  cross-platform,lightweight,scalable game server framework  written in C++, and support Lua Script

Current building status Moon Moon is a lightweight online game server framework implement with multithread and multi-luaVM. One thread may have 1-N lu

Nov 15, 2022
A cross-platform,lightweight,scalable game server framework written in C++, and support Lua Script
A cross-platform,lightweight,scalable game server framework written in C++, and support Lua Script

hive Distributed game server framework based on CPP 17 && LUA 5.4 框架(hive)+逻辑(server) 支持跨平台开发(windows,linux,mac) oop模式的lua开发,支持lua热更新 protobuf协议 pbc修改

Nov 29, 2022
This repo includes SVO Pro which is the newest version of Semi-direct Visual Odometry (SVO) developed over the past few years at the Robotics and Perception Group (RPG).
This repo includes SVO Pro which is the newest version of Semi-direct Visual Odometry (SVO) developed over the past few years at the Robotics and Perception Group (RPG).

rpg_svo_pro This repo includes SVO Pro which is the newest version of Semi-direct Visual Odometry (SVO) developed over the past few years at the Robot

Nov 29, 2022
C++11 provides chainable and iterable object for uniform die casts. Useful for statistics or table top RPG simulations.

12/1/2018 Due to feedback about compile-time limitations, the api has been changed since release. The api now supports user-defined literals which mak

Sep 5, 2021
A Coding some basic rpg systems in C++ for practice and fun

demo_rpg A Coding some basic rpg systems in C++ for practice and fun. YT Playlist Designs Ideas Some quick theoretical lists that we will iterate on.

Sep 18, 2022
Sandbox binary and source code for the Siggraph 2017 paper "Water Wave Packets" by Stefan Jeschke (NVIDIA) and Chris Wojtan (IST Austria)

----------------------------- Manual for wave packet viewer ----------------------------- System requirements: Windows8/8.1/10 with DirectX runtime e

Nov 28, 2022
A RPG created for practice the C language
A RPG created for practice the C language

RPG em desenvolvimento Index and Languages / Índice e Línguas English Instalation Linux Windows Português Instalação Linux Windows Cooperadores / Coop

Jul 24, 2022
GameBoy emulator with debugger written in C++ using Win32 and SDL2
GameBoy emulator with debugger written in C++ using Win32 and SDL2

脳(のう)腐(ふ) DMG-01 emulator written in modern C++ using Win32 API and SDL2. It is intended as a hobby project to sharpen my C++ skills. The emulator is

Sep 21, 2022