A rather powerful C Graphics library
I’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!
It just shows what you can do in 38,000 lines of code.
There are some subtle differences between it and Visual Studio Code. The main one is the not having access to the VisualStudio market place. The C/C++ template isn’t there but instead is installed by default.
I played with a couple of free packages today. I can recommend hardinfo. (sudo apt install hardinfo to install then hardinfo to run ) though less about the benchmarks than the information it gives on your system.
It was very easy. This was onto my Pi 4 running 64-bit Raspberry Pi OS.
Yesterday’s post reminded me of one of the joys of my youth. The Creative Computing magazines’ “BASIC Computer games” book and it’s sequel “More BASIC Computer games.” . I bought these in 1982, and they weren’t cheap then- about £20 each.
There is one case for using goto when you have nested loops and you’d like to jump all the way out. The goto statement was very popular in BASIC but often resulted in programs being like spaghetti with gotos all over the place.
As they say