All Projects → jarreed0 → ArchGE

jarreed0 / ArchGE

Licence: Apache-2.0 license
A 2D and 3D C++ Game Engine using SDL2 and OpenGL

Programming Languages

C++
36643 projects - #6 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to ArchGE

sdl stb font
Renders text using STB_Truetype in pure SDL
Stars: ✭ 40 (+166.67%)
Mutual labels:  sdl, sdl2
Driftwood
Driftwood 2D Tiling Game Engine and Development Suite
Stars: ✭ 23 (+53.33%)
Mutual labels:  sdl, sdl2
binocle-unity
Binocle is a simple 2D code-based framework for Unity
Stars: ✭ 23 (+53.33%)
Mutual labels:  2d, 2d-game-engine
nox-decomp
Unofficial Nox (2000) port to Linux using decompiled code from https://playnox.xyz
Stars: ✭ 21 (+40%)
Mutual labels:  sdl, sdl2
guisan
A C++ SDL2 user interface library based on guichan. ~~~~ Nov, 2021 - This project is not abandoned, just not under active development. Pull requests will be accepted and new releases will be generated for new features / bug fixes.
Stars: ✭ 54 (+260%)
Mutual labels:  sdl, sdl2
gnuboy
latest version of original laguna source, with a handful fixes for modern compilers and systems
Stars: ✭ 70 (+366.67%)
Mutual labels:  sdl, sdl2
ffi-sdl
PHP FFI SDL bindings
Stars: ✭ 23 (+53.33%)
Mutual labels:  sdl, sdl2
Div Games Studio
Complete cross platform games development package, originally for DOS but now available on modern platforms.
Stars: ✭ 168 (+1020%)
Mutual labels:  sdl, sdl2
nodesnim
The Nim GUI/2D framework, based on OpenGL and SDL2.
Stars: ✭ 127 (+746.67%)
Mutual labels:  sdl2, 2d-game-engine
Fairtris
Clone of the official classic Tetris® game for the NES console, intended for Windows and Linux systems. It implements the original mechanics and includes many regional versions and several RNGs (all in one executable).
Stars: ✭ 30 (+100%)
Mutual labels:  sdl, sdl2
combatris
A "perfect" implementation of an old classic
Stars: ✭ 20 (+33.33%)
Mutual labels:  sdl, sdl2
tnt
A 2d Game Engine written in C++20.
Stars: ✭ 30 (+100%)
Mutual labels:  sdl2, 2d-game-engine
Haskanoid
A breakout game in Haskell using SDL and FRP, with Wiimote and Kinect support.
Stars: ✭ 242 (+1513.33%)
Mutual labels:  sdl, sdl2
OCamlSDL2
OCaml interface to SDL 2.0 (for Linux, Windows, MacOS, and ChromeBook)
Stars: ✭ 42 (+180%)
Mutual labels:  sdl, sdl2
Gwork
Skinnable GUI with useful widget collection. Fork of GWEN.
Stars: ✭ 179 (+1093.33%)
Mutual labels:  sdl, sdl2
RawSalmonEngine
A game engine utilising "Tiled" map files
Stars: ✭ 15 (+0%)
Mutual labels:  sdl2, 2d-game-engine
Serpent
Cross-platform gaming kit in the D programming language
Stars: ✭ 140 (+833.33%)
Mutual labels:  sdl, 2d
Ffmpeg Video Player
An FFmpeg and SDL Tutorial.
Stars: ✭ 149 (+893.33%)
Mutual labels:  sdl, sdl2
Py3ODE
Port of PyODE for Python 3
Stars: ✭ 29 (+93.33%)
Mutual labels:  2d, 2d-game-engine
sdl12-compat
An SDL-1.2 compatibility layer that uses SDL 2.0 behind the scenes.
Stars: ✭ 99 (+560%)
Mutual labels:  sdl, sdl2

ArchGE as of now has been scrapped. A completely rewritten version will replace this soon.

ArchGE 0.2 - A 2D and 3D Game Engine written in C++ and using SDL2 and OpenGL

Created by Archeantus Games

Linux: Build Status Window: Build status (I can't figure out how to display this...)

alt tag

Check out our NEW PDF documentation for ArchGE!

Check out the NEW online docs

git clone https://github.com/jarreed0/ArchGE.git && cd ArchGE && chmod u+wx configure && ./configure

Download:

Linux: git clone https://githib.com/jarreed0/ArchGE.git && cd ArchGE

Build:

Linux - Build engine and all sample games with ./configure

Windows and Mac Build Tuts Coming Soon.

Under Heavy Development

Next Update: (will include)

  • Object coordinate system
  • Object movement
  • Adding Objects (and there children) to a Level
  • Have screen follow a specific Object (the player).
  • Set up Camera/Lens movement
  • Fix bugs
  • Sound!!!
  • New Input class/method - Done
  • Splashscreen fix - In Progress using Gamestate class
  • And....
  • Much, much more

News


OpenGL Support!

The engine now supports OpenGL and will soon have support assimp (or something similar) to load in 3D models.

New Version of ArchGE

After several long hours we finally released a new version of Arch Game Engine. The new engine implements the coordinate system, map, tilesets, and levels differently. Because of this the old sample games are no longer supported with ArchGE 0.2.

Update MANAGE now and never have to remember to update again!

The newest version of manage can check for updates! and let you know about them and update without distubring your current manage process.

Update with: ./manage -s

alt tag

Tutorials!!! Finally!

Just below this news section we have some tutorials on how to set up a game using ArchGE 0.2

Docs!

Along with the tutorials we have tons of docs generated with doxygen from the incode-comments.

Check out the PDF or the website

Problems

Currently ArchGE 0.2 has a few minor bugs.

The known bugs include the following:

  • The splashscreen no longer works. We are currently working on this right now! Bypass it with the debugMode() feature.
  • Input! Input! Input! The input class, sadly didn't have any sort of overhaul in the latest update. Because of this there is a few bugs from the previous ArchGE version. Update on the way!

Know of any other bugs? Let us know!

alt tag

Tutorials


Check out test games for more examples.

Currently there is only two (and they don't do much) because the older games aren't supported on this engine version. More sample games on the way!

Setting Up The Engine

The Engine has a few simple steps to setting it up and creating a window.

Declaring the Engine

Engine e;

Setting in debug mode (required as of now because of broken splashscreen)

e.debugMode(true);

Currently the debug mode is only used to bypass the splashscreen, eventually is will have more tools for debuggers.

Creating the window

string NAME = "Window Title";
int WIDTH = 750; //Window width;
int HEIGHt = 530; //Window height;
e.init(NAME, WIDTH, HEIGHT, 0);

0 is for SDL_WindowFlags.

This is the simplest way to create a window. Check out ArchGE's new docs for other functions to create more advance windows.

Setting the background color

e.setColor(0x00, 0xf8, 0x99);

Just uses simple RGB colors.

Setting the background

e.setBackground("background.png");

(ArchGE 0.2 currently supports PNG and BMP images)

Automatically close on Quit and Esc

e.exitOnEscape(true);

COMING SOON: Set frame rate

e.setFrameRate(30);

Frame rate is automatically set to 60.

Setting Up A Game Loop

Here is a samle game loop:

void Game::loop() {
  while(e.getRunning) {
    input(); //user defined
    update(); //user defined
    draw(); //user defined
    e.loop();
  }
}

Creating A Level

Currently Levels stores tilesets and maps. The will store Objects in the next update.

Declarations

int TILE_SIZE = 24;
int TOTAL_TILES = 60;
Level level;
Stage stage;
Map map;
Tileset tileset;

Loading them in

tileset.create("tiles", "res/tiles.bmp", e.getRenderer(), TILE_SIZE, TILE_SIZE, TOTAL_TILES/12, 12, TOTAL_TILES); //Name of tileset, file for tiles (BMP or PNG), renderer, width of a tile, height of a tile, how many rows there are, how may tiles per row, how many tiles.
map.loadMap("res/1.level");
level.setPrecise(true); //Precision makes it so that the coordinates at the end of a map file are either per pixel instead of per Tile
stage.createStage(map, tileset);
level.setStage(stage);
level.create();
level.setScale(40, 40);
level.setScreenSize(WIDTH, HEIGHT);

There are other ways to do this. Check out the docs for them.

Draw the Level

e.draw(level)

Move the Level

level.move(mx, my)

Creating an Object

Declaration of an Object

Object chest;
chest.setImage("chest.png");
chest.setFrame(0, 0, 55, 35); //x, y, width, height of source to parse from image
chest.setDest(100, 200, 55, 35); //x, y, width, height of where to display the object
chest.setPos(250, 350, 55, 35); //x, y, width, height of where the object is relative to the Level

Declaration of an Entity

Entity character;
character.setImage("player.png", e.getRenderer());
character.setFrame(0, 0, 25, 45); //x, y, width, height of source to parse from image
character.setDest(100, 200, 25, 45); //x, y, width, height of where to display the object
character.setPos(250, 350, 25, 45); //x, y, width, height of where the object is relative to the Level
character.setMaxHealth(100);
character.setHealth(90);

You can also damage and heal the Entity

character.damage(10);
character.heal(15);

Drawing the Object

e.draw(character);
e.draw(chest);

You can also draw vectors of Objects

vector<Object> objects;
objects.push_back(chest);
objects.push_back(character);
e.draw(objects);

Playing Sound Files - WAV

Create an instance of Audio Audio sound-effect;

Load the sound sound-effect.load("hit.wav");

Play the sound sound-effect.play();

Build The Game

g++ *.cpp -larch -lSDL2 -lSDL2_image -std=c++11

or (if you have the build.sh and ebuild.sh files)

manage -g GAMEDIR/

Makefile generation coming soon.

alt tag

Troubleshooting

If you get this error:

/usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status

This error usually occurs when you have a video card and its drivers installed but are missing the 32 bit drivers for it. I would recommend installing the 32 bit drivers so that manage can find the Libgl library. If you don't want to install 32 bit drivers, for whatever reason, follow the steps below.

First, You need to find out which libGL library you have so first....

do ls /usr/lib/

find a library that will/might look like libGL.so.VERSION_NUMBER_HERE

In the ebuild.sh file that every game has, change the -lGL flag to -l:libGL.so.VERSION_NUMBER_HERE

Viola! You have now fixed that error.

This is a quick fix, however you must do this to every game that has a ebuild.sh if you want it to work. That's why I recommended installing the 32 bit drivers for your video card just to save you time and sanity.

Manage


Try out manage:

chmod u+wx manage

./manage -s (or setup)

manage -i (or install)

Update now and never have to remember to update again!

The newest version of manage can check for updates! and let you know about them and update without distubring your current manage process.

Update with: ./manage -s

Build engine with manage:

manage engine (or -e)

Build game with engine:

manage game (or -g) GAMEDIR (the game needs a ./build.sh, just copy it from the snake one and edit it a bit)

Test engine/game with the newest version

manage test GAMEDIR

Push back to main branch

manage push (all for everything -or- specifiy file)

Find out more:

manage -h (or help)

And yes I know it is a little cluttered and keep in mind it has a few errors.


Archeantus Games

Website

alt tag

Stargazers over time

Stargazers over time

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].