Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

R. A. G. E. - A Free 2D Game Engine

RAGE - Ruby Awesome Game Engine

Hi guys. Haven't been here for a while.

So I want to show the current thing I'm working on. It's a game engine made using C++ in which games are fully scripted by Ruby Language simliar to LÖVE game engine (which uses Lua for scripting). For game library I used Allegro Game Library instead of SDL since it because it's less hassle to work with things and I can have everything easily and neatly compiled in one executable.
So currently I intend it to be an 2D game engine for everything, not just RPG's, but I plan to make a specialized RPG Maker version (either trough ruby scripts or directly as a separate build)

Current Version - 0.0.3-beta

You can get it here: https://github.com/ArekX/RAGE#api

Or go see it online!
http://www.rage2d.co/rage-doc/

Changes from 0.0.2-beta:
- Events are automatically unregistered from RAGE::Events when their dispose function is called.
- Screen event processing now checks whether or not RAGE::Events.processScreen is turned on when changing fullscreen modes.
- Removed RAGE.getEnvVar function. You can use ENV[varString] to get same result.
- Added RAGE::Graphics.holdBitmapDrawing
- Added RAGE::Graphics.getBlendingModes, RAGE::Graphics.getBlendingModesAlpha
- Added RAGE::Graphics.isBitmapDrawingHeld?
- Modified keycode constants added more key constants
- Fixed error with RAGE::Draw.setColor where it would not calculate color correctly for the red component.
- Added: RAGE::VertexArray class for making vertices.
- Added: RAGE::Draw.indexedPrim() for drawing vertices.
- Added: RAGE::Draw.prim() for drawing vertices.
- Added: RAGE::Joystick class
- Added: RAGE::JoyEvent class
- Added: RAGE::Input.reconfigureJoysticks()
- Added: RAGE::Input.getMaxJoysticks()
- Added: RAGE::Graphics.getOpenGLVersion()
- Added: RAGE::Graphics.getGLSLVersion()
- If boot.rb does not exist a message is displayed.
- Changed conf.rb. If conf.rb does not exist default configuration is loaded.
- Changed RAGE.configure. Now accepts a hash value representing game configuration.
- Added: RAGE::Shader class for VERTEX and FRAGMENT GLSL SHADERS
- Added: RAGE::Graphics.setMaximizedWindow(truefalseval)
- Added: RAGE::Graphics.setShader(shader)
- Added: RAGE::Graphics.getDisplayModes(),
- Added constants for cursor index
RAGE::Graphics.setMousePosition(x, y), RAGE::Graphics.setMouseBitmap(bitmap, focusX, focusY), RAGE::Graphics.setMouseCursor(cursorIndex), RAGE::Graphics.setMouseGrab(truefalseval)
- Added constants RAGE::Graphics::BLEND_SRC_COLOR, RAGE::Graphics::BLEND_DEST_COLOR, RAGE::Graphics::BLEND_INV_SRC_COLOR, RAGE::Graphics::BLEND_INV_DEST_COLOR
- Added RAGE::Bitmap.getParent and RAGE::Bitmap.isSub?
- Keyboard and mouse events are not processed by default, use RAGE::Events.processKeyboard, RAGE::Events.processMouse to set their processing.
- added RAGE::Events.isRegistered?(event)
- updated to Allegro 5.0.10 and Ruby 2.0.0-p247
- fixed RAGE::IniFile.create, no argument needed.
- RAGE::Bitmap.setPixel now accepts alpha.
- Added RAGE::FS which implements PhysicsFS
functionality.
- Your whole game can be packed into one single file which is called game.rage using supported file formats.
- You can combine file with game.rage together in one exe.
- Using RAGE::Bitmap.lock and RAGE::Bitmap.lockRegion puts that image as drawing target.
- DL ruby extension is integrated. Now you can load dll functions using this addon.
- Zlib ruby extension is integrated, now you can use Ruby's Zlib class.

Download (without API documentation):

Windows Vista/7/8 Version:
https://www.dropbox.com/s/vhfs0eiqvbt9m ... 03-beta.7z

Windows XP/Vista/7/8 Version:
https://www.dropbox.com/s/uwfp02ifliio7 ... support.7z

Updated documentation is coming soon. Old one is available here: https://github.com/ArekX/RAGE#api

Game Examples

Pixel Effect - Fragment GLSL shaders example [RAGE 0.0.3-beta]:
https://www.dropbox.com/s/p7nk41m08w67v ... example.7z

Tic-Tac-Toe Example [RAGE 0.0.2-beta]:
https://www.dropbox.com/s/dq3s5m0osczr2 ... cTacToe.7z

Minesweeper Example [RAGE 0.0.2-beta]:
https://www.dropbox.com/s/ewtfkn90gxuyi ... sweeper.7z

Github Source Code Site: https://github.com/ArekX/RAGE
 
Rockstar Advanced Game Engine


I like that you used Allegro, that game library needs more attention from the game development community.
 
This sounds amazing! I'll definitely give it a look soon - I've been using the SDL but packaging it is a nightmare if you only know Ruby :P
 
Are you planning to use the opengl integration of Allegro, and if so, what versions of opengl will you be primarily working in? I've also noticed that you appear to be somewhat starting to emulate the base setup provided by the RM* series, which would be both a blessing and a curse. It's a blessing because it allows a great deal of simplicity on the bits provided to the user, thus making it easier for them to build games. That said, it's also a curse because, with the way they implemented it, there was no proper separation of ticks and frames, (in other words, rendering and processing), and there were other poor design choices that resulted in RM* games running significantly slower than was necessary, especially when manipulating graphics.

I would like to note that one thing RM* did correctly in terms of simplifying things for the end user was providing a frame buffer for reading input. That said, I would always recommend that if you do that, you also provide direct hooks to the events, as that will typically be more effective for those who use them.

Edit: I would also like to note that, if possible, update your .gitignore file to keep the rest of the compiled binaries out of your repository. Over time that causes it to slowly inflate due to git keeping a history of everything that gets committed. (Which means that, if you keep working on this for a long time, you'll start wondering why your source code is approaching a gigabyte of space for no apparent reason) (I'm referring to the .idb and .pdb files. Ideally, you would keep it from even adding the directories those get dumped into.)
 
Glitchfinder":3jm98v7w said:
Might want to drop the mobile tag from your Wikipedia link.
Mobile is the future!
Also is this a game engine in the sense that it provides physics and data loading along with tools or is it a ruby wrapper for allegro?
 
Xilef":19xmw02z said:
Glitchfinder":19xmw02z said:
Might want to drop the mobile tag from your Wikipedia link.
Mobile is the future!
Also is this a game engine in the sense that it provides physics and data loading along with tools or is it a ruby wrapper for allegro?

Thus far it's looking to be a Ruby-based game engine implemented in Allegro. It doesn't have much of Allegro wrapped yet. Based on his initial post, it will either be distributed with plugins implementing different game archetypes, or will be distributed with packages that achieve the same goal. As it stands, I'm leaning toward this being at least partially a learning project, which means that if he gets it far enough to warrant things like physics packages, they're likely to be implemented anyway.

I'm still disappointed that there are compiled binaries in the repository, since those will cause the repository filesize to balloon over time.
 
Glitchfinder":3v0ecm81 said:
Are you planning to use the opengl integration of Allegro, and if so, what versions of opengl will you be primarily working in? I've also noticed that you appear to be somewhat starting to emulate the base setup provided by the RM* series, which would be both a blessing and a curse. It's a blessing because it allows a great deal of simplicity on the bits provided to the user, thus making it easier for them to build games. That said, it's also a curse because, with the way they implemented it, there was no proper separation of ticks and frames, (in other words, rendering and processing), and there were other poor design choices that resulted in RM* games running significantly slower than was necessary, especially when manipulating graphics.

I would like to note that one thing RM* did correctly in terms of simplifying things for the end user was providing a frame buffer for reading input. That said, I would always recommend that if you do that, you also provide direct hooks to the events, as that will typically be more effective for those who use them.

Edit: I would also like to note that, if possible, update your .gitignore file to keep the rest of the compiled binaries out of your repository. Over time that causes it to slowly inflate due to git keeping a history of everything that gets committed. (Which means that, if you keep working on this for a long time, you'll start wondering why your source code is approaching a gigabyte of space for no apparent reason) (I'm referring to the .idb and .pdb files. Ideally, you would keep it from even adding the directories those get dumped into.)

I plan on using OpenGL implementation. As for versions i primarily want to go below 3.0 to support older graphics cards since. In emulation i do think about making a proper separation of drawing part and update part, but as for I'm currently working on making Allegro work with Ruby and I'm not concentrated on making those (yet). This is still a work in progress and it will change a lot before first stable version comes out. :smile:

Glitchfinder":3v0ecm81 said:
Xilef":3v0ecm81 said:
Glitchfinder":3v0ecm81 said:
Might want to drop the mobile tag from your Wikipedia link.
Mobile is the future!
Also is this a game engine in the sense that it provides physics and data loading along with tools or is it a ruby wrapper for allegro?

Thus far it's looking to be a Ruby-based game engine implemented in Allegro. It doesn't have much of Allegro wrapped yet. Based on his initial post, it will either be distributed with plugins implementing different game archetypes, or will be distributed with packages that achieve the same goal. As it stands, I'm leaning toward this being at least partially a learning project, which means that if he gets it far enough to warrant things like physics packages, they're likely to be implemented anyway.

I'm still disappointed that there are compiled binaries in the repository, since those will cause the repository filesize to balloon over time.

I will work on providing everything I can (including physics - probably Box2D Engine).
 
Loads of updates happened :D

- Completely rewritten RAGE::Events system, separated it into RAGE::ScreenEvent, RAGE::KeyEvent, RAGE::MouseEvent, RAGE::JoyEvent (still working on this), added more Event constants.
- Added more checks in RAGE::Input, keyDown?, keyUp?, keyRepeat?, mouseDown?, mouseUp?, mouseRepeat?
- Added all keyboard constants, mouse too.
- Separated RAGE::Audio to RAGE::Music (Audio is loaded using streaming loading) and RAGE::Sfx (Audio is loaded completely in memory), also added audio seeking, pause, stop, pitch, volume, speed changing functions.
- Added RAGE::IniFile for reading and writing Ini configuration files
- Done some basic font loading and text writing in RAGE::Draw module
- Added soem basic primitives drawing in RAGE::Draw
- Rewritten RAGE::Bitmap so that now it can draw rotated, stretched and tinted bitmaps.
- Changed RAGE::Timer to RAGE::TimerEvent so that it can be added to event queue.
- Upgraded from Allegro 5.0.8 to Allegro 5.0.9
- Upgraded Ruby from 2.0.0-p0 to 2.0.0-p195

Current WIP/Beta version is really stable and can actually be used to develop lots of 2D games. :D
You can check it out here: https://www.dropbox.com/s/b46mm2u06spwa ... 4062013.7z

I will post API Documentation as soon as I finish it. I am writing it in CHM format so it will be downloadable and available offline. :D

I expect some feedback. :D
 
Beta Version 0.0.2 is out!

Changes:
· Set drawing font now resets to builtin default if instance of RAGE::Font is disposed.
· Fixed color setting for RAGE::Graphics.setBackgroundColor, now is using float values instead of integer ones.
· Added constant RAGE::Input::SPACEBAR
· Added RAGE::Draw.roundRect which draws rounded rectangles.
· Added RAGE::Draw.fillRect which draws filled rounded rectangles.
· Added RAGE::Graphics.setBackgroundColorO to set color from an instance of RAGE::Color.
· RAGE::Graphics.setBackgroundColor now also accepts an alpha component.
· Updated documentation.

Download:

Windows Vista/7/8:

https://www.dropbox.com/s/g8o0zckf8h2h5 ... 02-beta.7z

Windows Vista/7/8 and Windows XP:

https://www.dropbox.com/s/dfr3xgn8ieblp ... support.7z

Also another example! A Minesweeper game!

https://www.dropbox.com/s/ewtfkn90gxuyi ... sweeper.7z
 
RAGE 0.0.3-beta is out in the world!

Windows Vista/7/8 Version:
https://www.dropbox.com/s/vhfs0eiqvbt9m ... 03-beta.7z

Windows XP/Vista/7/8 Version:
https://www.dropbox.com/s/uwfp02ifliio7 ... support.7z

Updated documentation is coming soon. Old one is available here: https://github.com/ArekX/RAGE#api

Here's the change-log:
- Modified keycode constants added more key constants
- Fixed error with RAGE::Draw.setColor where it would not calculate color correctly for the red component.
- Added: RAGE::VertexArray class for making vertices.
- Added: RAGE::Draw.indexedPrim() for drawing vertices.
- Added: RAGE::Draw.prim() for drawing vertices.
- Added: RAGE::Joystick class
- Added: RAGE::JoyEvent class
- Added: RAGE::Input.reconfigureJoysticks()
- Added: RAGE::Input.getMaxJoysticks()
- Added: RAGE::Graphics.getOpenGLVersion()
- Added: RAGE::Graphics.getGLSLVersion()
- If boot.rb does not exist a message is displayed.
- Changed conf.rb. If conf.rb does not exist default configuration is loaded.
- Changed RAGE.configure. Now accepts a hash value representing game configuration.
- Added: RAGE::Shader class for VERTEX and FRAGMENT GLSL shaders
- Added: RAGE::Graphics.setMaximizedWindow(truefalseval)
- Added: RAGE::Graphics.setShader(shader)
- Added: RAGE::Graphics.getDisplayModes(),
- Added constants for cursor index
RAGE::Graphics.setMousePosition(x, y), RAGE::Graphics.setMouseBitmap(bitmap, focusX, focusY), RAGE::Graphics.setMouseCursor(cursorIndex), RAGE::Graphics.setMouseGrab(truefalseval)
- Added constants RAGE::Graphics::BLEND_SRC_COLOR, RAGE::Graphics::BLEND_DEST_COLOR, RAGE::Graphics::BLEND_INV_SRC_COLOR, RAGE::Graphics::BLEND_INV_DEST_COLOR
- Added RAGE::Bitmap.getParent and RAGE::Bitmap.isSub?
- Keyboard and mouse events are not processed by default, use RAGE::Events.processKeyboard, RAGE::Events.processMouse to set their processing.
- added RAGE::Events.isRegistered?(event)
- updated to Allegro 5.0.10 and Ruby 2.0.0-p247
- fixed RAGE::IniFile.create, no argument needed.
- RAGE::Bitmap.setPixel now accepts alpha.
- Added RAGE::FS which implements PhysicsFS
functionality.
- Your whole game can be packed into one single file which is called game.rage using supported file formats (supported by PhysicsFS).
- You can combine file with game.rage together in one exe (use "copy /B RAGE.exe+game.rage" from command prompt to test it :))
- Using RAGE::Bitmap.lock and RAGE::Bitmap.lockRegion puts that image as drawing target.
- DL ruby extension is integrated. Now you can load dll functions using this addon. Also Win32API class is available.
- Zlib ruby extension is integrated, now you can use Ruby's Zlib class.


EDIT: Documentation is available!!!

You can get it here: https://github.com/ArekX/RAGE#api

Or go see it online!
http://www.rage2d.co/rage-doc/


EDIT2: New example - Fragment Shaders - download to see some cool Pixel Effects! :)

https://www.dropbox.com/s/p7nk41m08w67v ... example.7z
 
Haven't updated this in a while. There is a LOAD of stuff added since last post. Since I cannot write every thing which has been added/removed/changed i will post a summary of features and addons. :)

Please note that although it's been tested A LOT during coding process it might not be the perfect (at least perfect in my standards), but it IS a stable RC version.

RAGE 1.0.0 rc2

Currently available features (* means documentation is not yet available for this part):
- event handling
- audio playback (MP3 not supported, and will not be. Supported: OGG, FLAC, IT, MOD, S3M, XM)
- many types of fonts are supported for text display
- full keyboard input
- full joystick input
- ini files
- memory files (file I/O operations are completely done in memory.) *
- physicsFS filesystem (i.e. you can read stuff from zip,pak,7z...)
- Bitmap Images (PNG, JPG, PCX, TGA, BMP; transformations and many other features supported)
- Color conversions (from HTML, RGB to HSL, HSV, etc and vice-versa)
- Particle Engine *
- Fragment and Vertex shader * support
- Collision functions (box vs box, box vs bitmap box, bitmap box vs bitmap box) *
- TCP and UDP socket support (TCP client-server model) *
- Network functions - HTTP functions via GET/POST, inetPtoN, inetNtoP *

Included ruby extensions (with preloaded .RB files), including all core ones:
- date
- digest
- dl
- pathname
- stringio
- strscan
- thread
- zlib

Additional features:
- you can zip all of your data into one file and name it game.rage
- you can append your zipped data onto RAGE.exe using command prompt and writing
copy /B RAGE.exe+game.rage RageGame.exe
you get all-in-one game together with executable this way

Ruby Version: 2.1.0-p0
Allegro Game Library Version: 5.0.10

Documentation for Ruby extensions can be found on http://ruby-doc.org/stdlib-2.1.0/libdoc/
Documentation for RAGE API can be found on http://www.rage2d.co/rage-doc/

Last thing I want to do (and I've already started) is to write a complete wrapper for Box2D physics engine, and then make bunch of tests and examples on how this engine is awesome. :D

And also, here is a simple PokeDex made with RAGE so that you can test it (music not looping is NOT a bug, I forgot to set it to loop, if you want you can do it by writing @bgm.loop = true before @bgm.play inside boot.rb inside game.rage since it's a simple zip file which can be opened by any archive program). :D

Have fun! :)

https://www.mediafire.com/?rd0ib69oxd97md6
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top