Posts
Search
Contact
Cookies
About
RSS

Raylib quick start templates (with and without GUI)

Added 17 Mar 2021, 4:36 p.m. edited 18 Jun 2023, 1:12 a.m.

Whenever I want to start a new project with Raylib I used to start from a simple template, which I've now dusted off revamped and added a second version with the addition of Nuklear to provide a GUI, I simply do a quick

cp -a Template MyNewProject

And I'm ready to start on my next mad idea adventure! The templates have the following features:

There is the least to say about the none GUI version as without the complication of a GUI it's far simpler, despite being reasonably compact it includes a good solid set of features that's nice or even essential to have in any project. I've spent a fair bit of time in making it both simple to use and not overly complex, while keeping an eye towards flexibility.

I have to say I was a little lukewarm about the look of Nuklear out of the box, I looked at the single theme provided and realised making my own would be a lot of pixel work and specifying lots of coordinates, so I shelved it. It was only when refreshing my previous work with Nuklear that I added a colour style and relied much more on dynamic layout, I hope you'll agree just from looking at the above screenshot it looks quite smart.

I've only used Nuklear in about 3-4 projects now, so it's not impossible I'm doing the layout wrong especially in regards to the padding, but how you layout a GUI for yourself is up to you, there is enough example use of different widgets that it should give you a solid start with Nuklear, at first it can be a little bit of an uphill struggle to get used to.

You would be forgiven for thinking that a "simple" template should be easy to throw together, and indeed my first take at a template was just thrown together, part of the motivation for doing this was repeatedly adding the same features from different projects and thinking "I really must update that template". I think it's also been worth all the extra effort I put in to make it both flexible and easy to use, with an eye towards what other people might find helpful. In the end I've ended up with something far better than what I started with.

Looking with scc, it thinks I'm giving away £10,000 of code between the two templates, I must be mad ! But if you want a shock look how much it thinks the cost of developing Nuklear would be, now that's expensive !

You might notice that there is a windows version of the make file, to be honest I don't use Windows very often at all and it may well be you could have issues with it. I'd appreciate feedback on this and for that matter generally too.

The template is available here

The GUI version is available here

Enjoy!