Simple 2D game framework.
Lame2D is a C game framework based on SDL2 with the use of SDL_ttf, SDL_image and SDL_mixer.
Lame2D is directed towards pixel art game developers. It handles drawing on a small canvas which then gets upscaled to fit the window, keeping pixels sharp and square.
At the first glance, it may look like an another fantasy console—but it’s not the case. Although I don’t discourage anybody from utilizing it in such a way!
To be more precise, size of the canvas is not imposed in advance, so it is up to a programmer to specify it. The same goes to setting a frame rate and whether game should start in fullscreen. Not to mention there’s no limitation on a color palette size or a level of sophistication of music and sounds.
As for resources, Lame2D can handle:
The last being compatible with maps exported directly from Tiled.
To start writing a game with Lame2D, you only need a few lines of code:
#include "Lame2D.h"
int main(int argc, char* argv[])
{
lmInit("Empty window", (lmSize) { 320, 240 }, 0xFF000000,
(lmSize) { 64, 56 }, 20); //initialization
//load your resources
//play music
while (lmWindow_IsOpen()) //game loop
{
lmScreen_Clear(0xFFFFFFFF);
//draw scene
//handle controls
lmScreen_Refresh();
}
//destroy resources
lmQuit(); //termination
return EXIT_SUCCESS;
}
Rest of the API isn’t much harder than that, you can find whole documentation on the wiki.
A short game which makes use of almost every aspect of Lame2D. You can check it out here.
If you want to manually setup everything by yourself, the installation process is described on the installing page. However, you may just want to download a premade Visual Studio 2017 project with everything configured and ready to use!
Kotziauke—initial work.
This project is licensed under the MIT License—see LICENSE.md for details.