Skip to content

A SDL2 and C++ framework to build experiments and games easily!

Notifications You must be signed in to change notification settings

seberydev/CLab-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLab-Framework


A SDL2 and C++ framework to build experiments and games easily!

Dependencies

  • SDL2
  • SDL2_image
  • SDL2_ttf
  • SDL2_mixer

Main Application

#pragma once

#include "clf.h"

class Game : public clf::Engine {
protected:
	void OnStart() override {

	}

	void OnInput(const Uint8* keystates) override {

	}

	void OnUpdate(float deltaTime) override {

	}

	void OnRender() override {
		clf::Render::Clear(clf::Utilities::Color::PORTAFINO);
	}

	void OnFinish() override {

	}
};

int main(int argc, char* args[]) {
	Game game;
	if (!game.Build(
		"Game Title - CLab Framework",
		600,
		400,
		SDL_INIT_EVERYTHING,
		SDL_WINDOW_SHOWN,
		nullptr))
		return -1;



	return 0;
}

Examples

Snake

Pong

Rpg Movement