Skip to content

JHanna-2020/DurkGame

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DurkGame

DurkGame is an extension of SDL2. There will be different object types to inherit from in the future such as `CharacterSprite`, `StaticSprite`, and `PhysicsSprite`. Also, I plan to implement handy mathematical functions such as pathfinding and raycasting.

Documentation

I don't have a documentation page yet, but I plan on making one soon. In the very least, here is a basic window setup program using DurkGame:

#include <DurkGame.hpp>

const dk::math::Vector2 WIN_SIZE = { 800, 600 };


int main() {
    dk::init();
    dk::RenderWindow window(WIN_SIZE, "DurkGame App");
    dk::time::Clock clock;

    bool done = false;
    while (!done) {
        double deltaTime = clock.tick(60);

        for (const auto& event : window.getEvents()) {
            if (event.type == DK_QUIT) {
                done = true;
            } else if (event.type == DK_KEYDOWN) {
                if (event.key.keysym.sym == DKK_ESCAPE) {
                    done = true;
                }
            }
        }

        window.fill({ 40, 40, 40 });
        window.flip();
    }

    dk::quit();
    return EXIT_SUCCESS;
}

To view a more in-depth use of the library, I am working on a small tech demo in the example folder.

License

MIT @ Derrick Martinez

DurkGame is a non-profit, free, and open-source extended library for SDL2.

About

SDL2 Wrapper w/Extended Functionality

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 95.9%
  • Makefile 4.1%