A game engine written in Nim, optimized for making cool games fast. Made for convenience while coding and better performance than all-in-one solutions like Godot.
Note: As of June 2021, I'm not longer actively working on rapid. I'm still going to accept pull requests, but I'm not willing to add or fix any code myself. If anyone contributes often enough to the repository I can give them contributor status to make working on the project easier.
chipmunk– General-purpose physics engine, using Chipmunk2D
simple– Simple and fast AABB-based physics engine
mouseButtonJustPressed+ callback support
rapid/ui– Fidget-style UI framework for games and applications
rapid/audio– Sound mixer with real-time effect support
Note that the new version of rapid (2020) is still under development, so you will have to install a specific commit from the master branch. The current release version is not supported anymore.
To install rapid, use the following command:
$ nimble install "[email protected]#3e831cb" # change the commit hash to the latest commit
Pinning to a specific commit rather than
#head is recommended, because
doesn't name a specific point in development. This means that two different
packages may end up requiring
#head, and the
#head that's installed locally
may not match the
#head that's required by the package. Thanks nimble,
you're the best.
On Linux, the development headers for the following libraries must be installed:
sudo apt install \ libgl-dev libx11-dev libxrandr-dev libxxf86vm-dev libxi-dev libxcursor-dev \ libxinerama-dev
sudo dnf install \ mesa-libGL-devel libX11-devel libXrandr-devel libXxf86vm-devel \ libXinerama-devel libXi-devel libXcursor-devel
sudo zypper in \ Mesa-libGL-devel libX11-devel libXrandr-devel libXxf86vm-devel \ libXinerama-devel libXi-devel libXcursor-devel
For examples, look in the
Meshrather than rapid's
--opt:speed. Nim's rather primitive stack trace system can slow programs down by quite a bit, so compiling with speed optimizations enabled can be quite important to maintain playable performance. Though if your game's so CPU-heavy that it becomes unplayable without
--opt:speed, you're doing something wrong. Go fix your code.
When contributing code, please follow the coding style guidelines.
Fast incremental compilation when