For tutorials and more info, visit The Proton SDK wiki
License: BSD style with attribution required
Seth's GL/GLES messy multi-platform C++ game SDK. Can output to Windows, Linux (including the Raspberry Pi), HTML5, OS X, iOS, Android
A component based toolbox of useful things built up over the last ten years. Instead of a giant .lib you link only the .cpp files used when possible to simplify multiplatform support as well as keep code size down.
It's kind of an SDL-like on steroids (while also being able to target SDL2 for setup/input/audio itself when needed) but generally gets the best results with its own native implementations of things. For example, it can target the following audio subsystems: SDL2_mixer, Audiere, FMOD, FMODStudio, Native iOS, Native Android, Denshion, Native Flash
It's designed with a "Write stuff in Windows with Visual Studio 2017, then compile/export to other platforms as needed" mentality.
Deprecated platforms no longer actively supported: Flash, BBX, WebOS
I had to make a breaking change - I updated the Boost library to the latest for proper C++20 support and it doesn't support signal anymore, just signals2.
If you're updating an old project, When you get this error:
1>c1xx : fatal error C1083: Cannot open source file: '....\shared\util\boost\libs\signals\src\connection.cpp': No such file or directory 1>named_slot_map.cpp 1>c1xx : fatal error C1083: Cannot open source file: '....\shared\util\boost\libs\signals\src\named_slot_map.cpp': No such file or directory 1>signal_base.cpp 1>c1xx : fatal error C1083: Cannot open source file: '....\shared\util\boost\libs\signals\src\signal_base.cpp': No such file or directory 1>slot.cpp 1>c1xx : fatal error C1083: Cannot open source file: '....\shared\util\boost\libs\signals\src\slot.cpp': No such file or directory 1>trackable.cpp 1>c1xx : fatal error C1083: Cannot open source file: '....\shared\util\boost\libs\signals\src\trackable.cpp': No such file or directory
Remove references to those files, they don't exist anymore, signals2 is header-only, no source needed.
If you get errors like "1>D:\projects\proton\UGT\Source\App.h(132,9): error C2039: 'signal': is not a member of 'boost'" in your code, you'll need to change it.
From this:
boost::signal<void(void)> m_sig_target_language_changed;
To this:
boost::signals2::signal<void(void)> m_sig_target_language_changed;
Some things written with Proton:
- Growtopia - 2D MMO, a good example of using Proton's GUI for many screen sizes.
- Dungeon Scroll - A word game. (HTML5 version)
- Dink Smallwood - Good example of porting old code to Proton to add touch controls and multiplatform support. Open source. HTML5 version
- Mind Wall - 3D puzzle game
- Tanked - 3D multiplayer tank combat game including four player split screen support as well as internet match making.
- Arduboy Simulator - Allows you to write and debug Arduboy apps with MSVC as well as output HTML5 playable versions (included with Proton SDK) HTML5 Example game
Credits and links
- Proton SDK wiki/tutorial site
- Seth A. Robinson ([email protected]) (Wrote most of Proton SDK) (Codedojo, Seth's blog)
- Aki Koskinen (Contibutions to Linux support, SpriteAnim, documentation)
- Clanlib team (Some math functions were taken from Clanlib)
- Dan Walma (contributions to SoftSurface)
- Fatalfeel's Proton SDK forks for GLES 2 support and Cocos2D integration
- Vita platform support by @NabsiYa
- Mateus Sales Bentes (@mateusbentes) (Mac support improvements)
The following demo apps have Xcode projects under their OSX/ folder:
| App | Xcode Project | Audio | Notes |
|---|---|---|---|
| RTBareBones | RTBareBones/OSX/RTBareBones.xcodeproj |
Dummy (no audio) | Simplest starting point |
| RTSimpleApp | RTSimpleApp/OSX/RTSimpleApp.xcodeproj |
SDL2_mixer | Basic app with SDL audio |
| RTLooneyLadders | RTLooneyLadders/OSX/RTLooneyLadders.xcodeproj |
SDL2_mixer | Full game with gamepad support (game controllers not yet working on Mac) |
All projects target macOS 11.0+ and build as universal binaries (arm64 + x86_64).
RTSimpleApp and RTLooneyLadders require SDL2 and SDL2_mixer. RTBareBones only requires SDL2 headers (no audio).
The Xcode projects look for both frameworks in ~/Library/Frameworks/ automatically.
Option A — Universal DMG (arm64 + x86_64, recommended):
# SDL2
curl -L -o /tmp/SDL2.dmg https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.dmg
hdiutil attach /tmp/SDL2.dmg
cp -r "/Volumes/SDL2/SDL2.framework" ~/Library/Frameworks/
hdiutil detach "/Volumes/SDL2"
# SDL2_mixer (needed by RTSimpleApp and RTLooneyLadders)
curl -L -o /tmp/SDL2_mixer.dmg https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.8.0/SDL2_mixer-2.8.0.dmg
hdiutil attach /tmp/SDL2_mixer.dmg
cp -r "/Volumes/SDL2_mixer/SDL2_mixer.framework" ~/Library/Frameworks/
hdiutil detach "/Volumes/SDL2_mixer"These are universal frameworks (arm64 + x86_64) so the resulting
.appruns on both Intel and Apple Silicon Macs.
Option B — Homebrew (native arch only, not suitable for universal binary):
brew install sdl2 sdl2_mixerNote: Homebrew on Apple Silicon only provides arm64 libraries. Use Option A if you need a universal binary.
RTSimpleApp and RTLooneyLadders require .rtfont files generated from source assets. Run update_media.sh from each app's media/ folder (requires RTPack — build it first from RTPack/linux/ on Linux or use the Windows version):
cd RTSimpleApp/media && sh update_media.sh
cd RTLooneyLadders/media && sh update_media.shNote: Without this step the apps will still open but text/fonts will not render.
LIBPNG=shared/Irrlicht/source/Irrlicht/libpng
cp "$LIBPNG/pnglibconf.h.prebuilt" "$LIBPNG/pnglibconf.h"Open the desired Xcode project and build (⌘B):
# RTBareBones
open RTBareBones/OSX/RTBareBones.xcodeproj
# RTSimpleApp
open RTSimpleApp/OSX/RTSimpleApp.xcodeproj
# RTLooneyLadders
open RTLooneyLadders/OSX/RTLooneyLadders.xcodeprojNote: The SDL2 frameworks are automatically embedded into the
.appbundle at build time via@executable_path/../Frameworks, so the final app is self-contained and does not require SDL2 to be installed on the target machine.
Feel free to submit a pull request! At this point the goal is that all changes be non-breaking to existing projects.