Home > Framework

Framework

Framework is a project mainly written in C++ and C, it's free.

C++ SDL/OpenGL/FTGL Framework WIP

A C++ SDL/OpenGL/FMOD?/Box2D? Framework Started by Luka Horvat (redreaper132(at)gmail.com) Framework start date: April 2011

Currently works on Windows/Linux(sound not tested).

-----FILES----- Luka.h -> framework header file Luka.cpp -> framework file Main.cpp -> main game loop for testing the framework

For compiling you need folowing libraries: SDL, SDL_image, OpenGL(probably already on your OS) FONT: freetype2, ftgl SOUND: irrKlang

Linker dependencies: Visual Studio: SDLmain.lib; SDL.lib; SDL_image.lib; opengl32.lib; glu32.lib; ftgl.lib; freetype.lib; irrklang.lib

GCC/Mingw(not tested): -lSDLmain; -lSDL; -lSDL_image; -lopengl32; -lglu32.lib; -lftgl; -lfreetype; -lirrklang

NOTE: Make sure you have a font ("FreeMono.ttf") in you project or the program will crash. If you don't want to use fonts remove font loading and renderText() function. Remove anything irrKlang based to work without sound. You can set FONT or SOUND to 0 in Luka.h if you don't want to compile with those things.

-----TODO-----

->Global: -Make better sprite rendering function (2D sprites) -Ask people what to add -> profit? :D -Add Box2D?!?

->Up next: -Don't know yet

-----CHANGELOG----- -->25.11.2011<-- +Increase & decrease functions for RotRect +Better rotate function for RotRect +FPS_I and setFPS_I() for turning build in frame independent movement on/off +All moving, rotating, size increase/decrease functions now have build in FPS independent handling (no more *frm::getFps() when calling them) +Added irrKlang library into the framework, sound works +loadSound() function for loading sounds/music +irrKlangs main "engine" is part of frm namespace

-->24.11.2011<-- +Set functions for classes, so that you can set them after construction +Increase and decrease function for Rect, usefull this is

-->20.11.2011<-- +Comments

-->8.9.2011<-- +Fixed calculateAngle function, works now

-->4.7.2011<-- +Added loadImage function to Image class, so that you don't have to load images when constructing

-->29.6.2011<-- +Added Image class +Image class loads image +Changed the rect class so that you can bind an image to it, a rect with an binded image to it will always be textured NOTE: Image class is still MUCH WORK IN PROGRESS, it's super simple for now and only works with normal rects

-->9.6.2011<-- +FTGL library added, set #define FONT to 0 in "Luka.h" if you don't want to use it +Change in scaleScreen() +Added testing for VisualStudio (isn't tested yet) +renderText() function for rendering text using a pre-loaded font. Even if the functions has a size parameter, it's recommended that you use 1 font for 1 size because changing the font size every frame drops the framerate below 30 +Temporary FPS display

-->3.6.2011<-- +Added rendering functions for rect,rotRect and Point +Added border rendering functions +getRect() function for RotRect +rotate() function for Rect (that way the angle is normalized) +Render rotation for rect and screen, also scaleScreen funciton +Color structure

-->26.5.2011<-- +calculateSpeed() function change type from float to void

-->23.5.2011<-- +Added collision detection for rotated rectangles +Small fix in angles

-->2.5.2011<-- +Moved function definitions to Luka.cpp

-->27.4.2011<-- +Removed gfx namespace, everything is now under frm namespace +Added point and rotatabel rectangle stuctures +Added different consturctors for sturctures -Canceled the line sturcture, not really needed now, will add them later +Minor changes in older code +Rotation and movement now works for rotatabel rectangles

-->17.4.2011<-- +Initialization (size of window, fullscreen) +Normal rectangle collision detection +Angle calculation function for 2 Box-es +X and Y speed calculation function for a given angle +Loading texture function (using SDL_image) +Rendering a frame from sprite function (works only on 1D sprites- for now) +Box structure +Event are now globalized ( frm::event ) +Functions for dinamic FPS -> setFPS(), getFPS(). delayFPS() -> is for caping at 60 FPS

Previous:bsn_rel