A single-header C++ library for making simple 2D games
- PLATFORM: Windows
- LANGUAGE: C++
- ENVIRONMENT: Visual Studio
Learning C++ is often seen as dry and difficult, partly because the examples used in teaching are usually text-based and uninspiring. PlayBuffer was designed to try and limit the demands of learning C++ while increasing the payoff for the learner by allowing them to make simple, 2D games.
A Learning Scaffold
The PlayBuffer is a beginner's game-development framework, and is intended to be used as a temporary "scaffold" to be discarded once the learner has outgrown it. The library code is simple enough that that a learner could reasonably expect to understand how most of it works for themselves before moving on to a more sophisticated framework. It uses the simplest native Windows libraries (no DirectX/OpenGl/Vulcan) and implements sprite rendering in software, making it an interesting platform for studying basic C++ code optimisation too!
Copyright 2020 Sumo Digital Limited. Spyder™ is a trade mark of Sumo Group plc.
The PlayBuffer code is made available under the Creative Commons Attribution-No Derivatives 4.0 International Public License: https://creativecommons.org/licenses/by-nd/4.0/legalcode.
The PlayBuffer tutorial assets are derived from the original Spyder™ game by Sumo Digital Ltd (© 2020 Sumo Digital). Permission is granted to use these resources for educational use only.
What will you need?
- A Windows-based PC (age and performance isn't too critical)
- A free copy of the "Community Edition" of Visual Studio (click Download)
C++ Game Development Taster Workshop
The Sheffield Women in Computer Science (SWiCS) Society helped to organise some of the first workshops using the PlayBuffer and students from those workshops have helped to deliver an online taster session aimed at A-Level students.
From "Hello World!" to Spy Wire
It's traditional for programming tutorials to begin by displaying "Hello World!" to the screen. This project is a useful starting point for any PlayBuffer application, but also includes a pdf manual which will take you from Hello World to your first complete shoot-'em-up game!
The other branches on the PlayBuffer repo are all different projects branched from the basic Hello World example. You can select a different branch from the dropdown in the top left corner of the main project page (where it currently says HelloWorld).
If you find any problems with the PlayBuffer framework then please report them to [email protected]
Can I make a game using the PlayBuffer and sell/distribute the executable?
Yes. Provided that you're not selling or distributing anything containing the tutorial assets or the PlayBuffer source code then what you do with your executables is entirely your business!
Can I modify the PlayBuffer code and sell/distribute it?
No. This would be prohibited by the licence as a derivative work. Obviously we're not keen on someone else selling something we're giving away for free, but we also don't want dozens of variations of PlayBuffer out there. It would be very easy to expand the PlayBuffer and make it more advanced, but that's not the point of PlayBuffer: we want it to stay simple for newcomers. If you've outgrown it then there are lots of more sophisticated frameworks out there for you to move on to.
Can I modify the PlayBuffer code in my game so long as I don't release the source code?