I plan on using some of my own libraries for the upcoming LD at the end of the month, so by the rules I’ve got to share them before then, so others can use them. Wouldn’t want to give myself an unfair advantage! Haha.
The first of these I’ve just finished a major overhaul on and have set it up on github. Before I ramble on, the github repository.
This first library really isn’t anything special; it just collects all the foundation code, including window creation and the entry point functions main and WinMain, into a set of static libraries, allowing an application to simply subclass one of the library’s application classes and go.
Included features, beyond basic window creation:
Event management – Uses a listener model, allowing objects to listen to by event type and, optionally, only from a particular sender. System events are translated into application events inside the concrete platform classes, so apps can handle external and internal events the same way.
Simple but effective, allows assets to loaded and referenced by name; extensible system allows new loaders to be defined and associated by file extension. Out of the box currently only includes a primitive bitmap loader, supporting 24 or 32-bit bitmaps, but other libraries to come later will introduce more.
this needs a bit more spit and polish, but included and demonstrated in the test app is a simple text console. Takes keyboard input, generates ConsoleCommand events on enter, and provides putstr() and printf() methods for displaying text. Protects input from being clobbered if text is displayed while a user types.
Libraries to come:
a set of classes for serializing/deserializing objects using Property and Descriptor classes; supports reading and writing in text and binary formats. Just define a few simple methods and a ScribeFactory will automatically convert your objects into Descriptors that can be saved to disk or sent over the wire, and just as easily reconstruct the objects on the other end. Hardly revolutionary stuff, but an essential component for any content-driven projects.
My socket libraries, currently only including UDP support, but TCP stockings are to come. Out-of-the-box, ready to start exchanging objects using the Scribe library. Event interface allows messages to be sent and received between remote nodes as if they were local. Includes support for sending packets reliably, but continues handling other messages out-of-order while any issues are resolved. Automatically tracks ping time and maintains clock synchronization.
Also includes a collection of synchronization classes: mutexes, semaphores, timers, and some thread-safe containers; these may be moved to the Foundation libraries, but that will likely wait until my next big rebuild of the stockings libraries.
A set of simple classes that make it easier to quickly throw together a 2d opengl application; includes classes for loading, manipulating, and rendering tilemaps and animated sprites, along with a few other things. A few of these are actually in FoundationCommon, as they are used by the GLConsole class.
A set of GUI classes implemented natively for OpenGL; rather powerful, but not yet very robust or polished, I haven’t even updated this to work with the previous version of my foundation library, much less the new one. Missing some key classes, but includes buttons, text boxes, images, scroll bars, and a scrolling grid container, and includes support for data bindings. Really quite slick, I’m quite proud of these classes, just not sure when I’ll get around to updating and finishing them.
phew. If you read all of that, I owe you a beer. For everyone else…
tl;dr: releasing engine base code I’ll be using in the next LD. Source link.