Tag: graphics

A rather powerful C Graphics library

A rather powerful C Graphics library

Raylib libraryI’m not going to be departing from SDL2 any day soon, but if I were starting from scratch, I would seriously consider raylib.  It ticks many boxes!

  • Written in C(C99). Tick.
  • Cross platform including Raspberry Pi desktop. Tick.
  • Open source and liberal licensing tick.
  • Full 3D support with animated models. Tick.
  • Extensive Sound support. Tick.
  • Very open license that even allows static linking with closed software. Tick.
  • Lots of examples. Tick.

There’s even a set of open source games on GitHub. including several that you can play in your browser (HTML5). Documntation is in the form of a 36-page Wiki. I took a quick glance through there and was impressed with some of the features. For example, OpenGl can be used directly and not through X11 though that is also available.

Plus full marks for including struct sizes on the data structures page. That’s not something you often see, nor is instructions for configuring Visual Studio, Visual Studio Cocde, Codeblocks, Eclipse and Sublime Text. The cheat sheet (which you can also download as a pdf) gives an idea of the number of functions in Raylib. They cover five pages!

I’m tempted to go Nuklear

I’m tempted to go Nuklear

Gallery Image of GUI developed with NuklearNuklear is a library that is a single-header ANSI C immediate mode cross-platform GUI toolkit. It lets you develop stylish and beautiful GUIs for your applications. It’s written in C but any programming language that can work with C such as C++ or Python can also use it.

Importantly, it also includes documentation so you can make use of it. The best software in the world is useless if you can’t use it and GUI toolkits tend to be a little bit more complicated than say a text editor.  This is nicely written, and though it’s just one document, it’s a long one!

It’s one thing to write a simple GUI as I did in that Empire game but mine was only 600 lines long and pretty rough looking. Nuklear is 18,000 lines long ie 30x as big.  If there’s one thing I’ve found from my software development experience, it’s that a nice looking piece of software will get away with having more bugs than something that looks not as nice.