A single-header C++ library for making simple 2D games

Related tags

Game playbuffer
Overview

A single-header C++ library for making simple 2D games

  • PLATFORM: Windows
  • LANGUAGE: C++
  • ENVIRONMENT: Visual Studio

Why?

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!

Legal

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!

Example Projects

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).

Error Reporting

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?

    Yes.

You might also like...
C++ Library to connect games with Game Jolt

Game Jolt API C++ Library Game Jolt is a host for free independently developed computer games. As a gamer you are able to play every game on this site

C library for Wordle-like games

libwordle Open this project in 8bitworkshop. This is a C library for making Wordle-like games for 8-bit systems. Platforms supported: C64 (cc65) Wordl

RPC Network Library for Multiplayer Games
RPC Network Library for Multiplayer Games

Game NET - A Simple RPC Network Library (C++11) Write a simple server / client RPC system in just 10+20 lines of code. Write a multiplayer game with c

Open-source, cross-platform, C++ game engine for creating 2D/3D games.

GamePlay v3.0.0 GamePlay is an open-source, cross-platform, C++ game framework/engine for creating 2D/3D mobile and desktop games. Website Wiki API De

3D games console based on RP2040 and iCE40 UP5k
3D games console based on RP2040 and iCE40 UP5k

PicoStation 3D This is an unfinished, untested project to develop a 3D games console based on an RP2040 microcontroller and an iCE40 UP5k FPGA. Quick

A set of libraries and tools to make MSX games using the C programming language.

ubox MSX lib This is a set of libraries and tools to make MSX games using the C programming language. There are three main components: ubox: thin wrap

Enfusion Artifical Intelligence for DayZ and future Bohemia Interactive games.

Enfusion AI Project (eAI) This mod adds headless player units under the control of a script on the server. Although the script is very rudimentary now

Game engine behind Sea Dogs, Pirates of the Caribbean and Age of Pirates games.
Game engine behind Sea Dogs, Pirates of the Caribbean and Age of Pirates games.

Game engine behind Sea Dogs, Pirates of the Caribbean and Age of Pirates games.

Recast is state of the art navigation mesh construction toolset for games.
Comments
  • DrawLine does not draw diagonal lines

    DrawLine does not draw diagonal lines

    The function DrawLine refuses to draw diagonal lines, this for example does not draw anything when it should. It seems to occur for every diagonal direction (45 degrees) and it's still doable on the latest version (1.1.21.10.11).

    Play::DrawLine(Point2f(100, 100), Point2f(200, 200), Play::cWhite);

    opened by CoolJWB 1
Owner
Sumo Digital Academy
Sumo Digital Academy
Cute Framework (CF for short) is the cutest framework available for making 2D games in C/C++

Cute Framework (CF for short) is the cutest framework available for making 2D games in C/C++. CF comprises of different features, where the various features avoid inter-dependencies. In this way using CF is about picking and choosing which pieces are needed for your game

null 314 Dec 26, 2022
A flutter package for making game levels map like candy crush or similar games using flutter with ability to be horizontal or vertical

Game Levels Scrolling Map A package for making game levels map like candy crush or similar games using flutter with ability to be horizontal or vertic

Mohamed Sayed 12 Oct 26, 2022
This is a list of different open-source video games and commercial video games open-source remakes.

This is a list of different open-source video games and commercial video games open-source remakes.

Ivan Bobev 173 Jan 2, 2023
VE Font Cache is a single header-only GPU font rendering library designed for game engines.

VE Font Cache is a single header-only GPU font rendering library designed for game engines. It aims to: Be fast and simple to integrate. Take advantag

Xi Ma Chen 340 Dec 7, 2022
🚀 Making multi-player gamedev simpler since 2017

Making multi-player gamedev simpler since 2017. Single-header cross-platform world replication in pure C99. Built with love using zpl • Brought to you

ZPL | Your C11 Powerkit 1k Jan 4, 2023
Dragon's Dice Roller aims to be a lightweight, simple, reliable and easy-to-use dice roller for RPG games.

Dragon's Dice Roller is the first and (so far the only) open source RPG dice roller written in C available on GitHub. It aims to be a lightweight, simple, reliable and easy-to-use dice roller for any kind of role-playing game.

Michael Kolesidis 10 Apr 22, 2022
VERY simple cross-platform C++ analytics for games (using Google Analytics)

Tiniest Analytics is a very simple to use, cross-platform (tested on win/osx/linux/ios/android) and basically very tiny analytics system written in C++ (less than 100 lines of code), made specifically for games. It uses libcurl to post events to your Google Analytics account.

Mihai Gosa 96 Oct 11, 2022
noclip is a single-header backend for a developer console

noclip Many computer games have a developer console or in-game console which provide a command-line interface for executing commands, changing game va

Kevin Chin 10 Oct 28, 2022
A C math library targeted at games

Kazmath Kazmath is a simple 3D maths library written in C. It was initially coded for use in my book, Beginning OpenGL Game Programming - Second editi

Luke Benstead 506 Dec 31, 2022
A multi core friendly rigid body physics and collision detection library suitable for games and VR applications.

Jolt Physics Library A multi core friendly rigid body physics and collision detection library suitable for games and VR applications. A YouTube video

null 2.5k Dec 31, 2022