Gosu (library)
Developer(s) | Julian Raschke, Jan Lücker et al. |
---|---|
Stable release | 0.10.5 / January 1, 2016 |
Written in | C++, Ruby |
Operating system | Microsoft Windows, Linux, Mac OS X, iOS |
Type | Game engine |
License | MIT license |
Website |
www |
Gosu is an open source 2D game development library for the Ruby and C++ programming languages, available for Mac OS X, Windows and Linux. The C++ version is also available for iPhone and iPad.
Gosu is known for its ease of use and performance, being one of the preferred libraries on game development timed competitions.[1] It comes with extensive documentation.[2]
It is released under the MIT license.
Features
The library offers easy object-oriented interfaces to access common resources:
- Hardware-accelerated 2D graphics and text.
- Sound samples and music in various formats.
- Keyboard, mouse and gamepad input.
The library also offers extensive additional functionality including networking, advanced color operations, mathematical functions, locale operations and more.
As a game development library, it's completely adapted to the classic game structure, featuring separated steps for processing logic, user input, and screen drawing.
Gosu aims to contain everything that is necessary to write a game in clean C++ or Ruby code,[3] letting the user forget about low level and boilerplate code. For example, the minimum Ruby code needed to open a blank window consists of merely two lines of code:
require 'gosu'
Gosu::Window.new(640, 480, false).show
the C++ equivalent is nearly identical:
#include <Gosu/Gosu.hpp>
int main() {
Gosu::Window gamewindow(640, 480, false);
gamewindow.show();
}
Furthermore, a simple operation, like loading and drawing an image, that would take up to three different functions and two datatypes on SDL can be easily done with just one class and one of its methods on Gosu.
See also
References
External links
- Gosu's main website
- Gosu repository on Github
- Articles on Ruby game development featuring Gosu: part 1, part 2.
|