SIGIL stands for Sound, Input, and Graphics Integration Library. It is meant to be a mind-bogglingly simple alternative to other, more complex libraries when all you want is to make a small game, teach basic 2D graphics, or otherwise remove the complexities of media programming from your C or C++ code. It's also cross-platform!
It's designed to be really easy to use. Here is a simple example program demonstrating images, text, rectangles, and lines.
int main(int args, char *argv[])
{
// set up our window and a few resources we need
slWindow(400, 400, "Simple SIGIL Example", false);
slSetFont(slLoadFont("ttf/white_rabbit.ttf"), 24);
slSetTextAlign(SL_ALIGN_CENTER);
int tex = slLoadTexture("png/glow.png");
while(!slShouldClose() && !slGetKey(SL_KEY_ESCAPE))
{
// background glow
slSetForeColor(0.1, 0.9, 0.2, 0.4);
slSprite(tex, 200, 240, 300, 200);
// large text and fat line
slSetForeColor(0.0, 0.8, 0.2, 1.0);
slSetFontSize(24);
slText(200, 250, "SIGIL:");
slRectangleFill(200, 240, 100, 7);
// smaller subtext
slSetFontSize(14);
slText(200, 220, "Sprites, text, sound, input, and more!");
slLine(48, 210, 352, 210);
slRender(); // draw everything
}
slClose(); // close the window and shut down SIGIL
return 0;
}
What kinds of projects can I make?
Anything you want, as long as it's 2D! You handle the program logic, and SIGIL handles all of the rendering, audio, and input for you.
This is Robofort, built using SIGIL.
This was my submission to the 45th Ludum Dare Game Jam.
This is a prototype of an unnamed, unreleased experimental game.
This game is part of an ongoing school project for young students,
designed to teach programming. You can download the project here.
Want to showcase your SIGIL project? Contact Geoff at geoff@libsigil.com!
Cool! What platforms does SIGIL support?
At the moment, SIGIL supports MinGW-w64, MinGW32, MSVC 10 2010 (32- and 64-bit), MSVC 11 2012 (32- and 64-bit), MSVC 12 2013 (32- and 64-bit), MSVC 14 2015 (32- and 64-bit), Linux GCC, and the Raspberry Pi. Other platforms may work, but they are not officially supported (yet).
Note to Mac users: There have been some requests for a Mac version of SIGIL, but I don't have a Mac machine for testing. If you're a Mac developer interested in testing SIGIL, please get in touch!
Where can I download SIGIL?
The SIGIL header is available here. Precompiled libs are provided for the following platforms (the SIGIL header is also included in each of these .zip files):
- MinGW-w64 (recommended if you want to use CodeBlocks version 20.03 or later)
- MinGW32 (for users of the older MinGW32 compiler)
- MSVC 10 2010 32-bit or 64-bit
- MSVC 11 2012 32-bit or 64-bit
- MSVC 12 2013 32-bit or 64-bit
- MSVC 14 2015 32-bit or 64-bit
- Linux GCC
- Raspberry Pi
Wrappers for other languages
Thank you to Andy P. for providing SIGIL wrappers for the following languages. Links to their respective GitHub repositories are below. Please contact Andy directly if you have any questions.
Additional thanks are owed to Rabia Alhaffar, who has written SIGIL bindings for Boo, Lua, FreePascal, and FreeBASIC. Please contact Rabia directly if you have any questions.
I want source code!
Calm down! Source code is available on GitLab.
Separate build instructions for every supported compiler are also provided if you want to make changes and/or compile SIGIL yourself.
How do I use SIGIL?
Using SIGIL in your program only requires you to #include "sl.h" and link against the provided libraries. The SIGIL header file is available here. For more details, consult the documentation below:
- SIGIL API Documentation
- How to integrate SIGIL into your programs:
- using MinGW-w64 (with the CodeBlocks IDE, version 20.03 or greater)
- using MinGW32 (with older versions of CodeBlocks)
- using Visual Studio
- using Linux GCC (with the CodeBlocks IDE)
- on the Raspberry Pi, you can use the Linux CodeBlocks guide above, or start with a sample Makefile.
Note to Windows CodeBlocks users: As of version 20.03, CodeBlocks is available with the newer MinGW-w64 compiler instead of the original MinGW32 compiler. I'd recommend using the MinGW-w64 version of SIGIL for that reason.
Do you provide any examples?
You bet! There are several basic self-contained SIGIL example projects available on GitLab, for every compiler that SIGIL supports.
Is SIGIL still under development?
SIGIL is feature-complete and stable. Further development will only occur in the form of bugfixes or maintenance.
Efforts are made to ensure that SIGIL works with the latest versions of supported compilers, so please get in touch if you think something should work but doesn't.
I have a question/bug report/semi-helpful comment. Who do I pester about this?
I'm Geoff, the project developer, and you can contact me at geoff@libsigil.com.
You can also find me on Twitter and LinkedIn for non-SIGIL-related things.
Page last updated June 16, 2021.