Skip to content

Tuhkis/thicc-pixel-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thicc Pixel Engine

A header-only C/C++ framework for making games with thicc pixels.

Building

WARN: WASM build doesn't work.
NOTE: In C++ you need to add -fpermissive and use a C++ compiler.

On Linux and C:

gcc -lX11 -lXcursor -lGL -ldl -lm -pthread myfile.c

On Windows and Mingw the following should work:

gcc -lkernel32 -luser32 -lshell32 -lgdi32 -ladvapi32 -lopengl32 myfile.c

Inspired by (/steals code from)

Usage

There's examples in the demo folder. You need to generate the assets with he python script in there.

Post-processing shader

You can do something similar to this:

#define TPE_FRAGMENT_SHADER myShaderSource
#define TPE_IMPL
#include "tpe.h"

...

int main() {
 ...
 myShaderSource = "#version " TPE_SHADER_VERSION "\n" // + The rest of your source.
 tpe_Context ctx;
	tpe_init(&ctx, "Game Window");
	...
}

The default shader looks like such:
out vec4 FragColor;
in vec2 texPos;
uniform sampler2D screen;
void main() {
 FragColor = vec4(texture(screen, texPos).rgb, 1.0f);
}

About

A C/C++ engine for making pixelart games.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published