ARGSS: Remaking of RGSS Player and Library

Introduction
I am working right now on this new project called "ARGSS". ARGSS aims to replace the RGSS Player and Library, namely Game.exe and RGSS102E.dll. (And also RGSS202E.dll from RMVX)
I am working on C++ embedding ruby on it and using some opensource libraries for graphics loading and audio playing, and for rendering I'm working with OpenGL. I am using right now ruby 1.8.6 embedded, but I plan to use ruby 1.9 which is faster, however I can't make it work right now and I haven't tried that hard yet.

Website, forums, svn
http://argss.com.ar/
http://argss.com.ar/forums
http://sourceforge.net/projects/argss/


The ARGSS Icon/Logo
Image
Thanks and credits to grafikal009 from rmrk.net.

Why doing something that is already done?
  • RMXP is shareware, this will be under a custom free bsd license.
  • RMXP library is slow, this may be faster and be able to run games with more fps.
  • RMXP library has a limited version of Ruby and only include some basic things, this will include full ruby support and maybe latest version.
  • Being able to modify the hidden classes in c++, what improves performance compared when rewritting hidden classes in ruby.
  • New functions and less limitations, for example changing window resolution, better audio support, more graphical methods, portability to other OS.
  • And even more.

Progress List

Downloads
ARGSS Alpha Test Fix - Rev 31.rar
ARGSS Alpha Test Fix - Rev 31.7z
ARGSS Alpha Test Fix - Rev 31.zip

It is included the VC++ 2008 runtimes instaler for x86 with the downloads. If you have a x64 machine, you can download the runtimes from: http://www.microsoft.com/downloads/deta ... laylang=en

Old SDL Demo 12/11/09(d/m/y) Show

Old SFML Demo Show

Old SDL Demo Show


Notes
Please, give me your opinions, thoughts, advices, ideas, suggestiong about this project. All constructive comments are welcomed.

Special thanks
Trebor777 for his RMXP Ruby SDL project and his help on msn.
Grafikal009 for the ARGSS Icon.
And all the people who are supporting this!
Well I think this project sounds very promising , it'll more than likely require a lot of effort to do which is a good thing because it means that it'll be hopefully worth it. I've got a few questions though, will this replace our current scripts database or will this simply load them into a new Game.exe file while utilizing your new methods? I mean I'm not exactly sure on what this is for at the moment but I assume it'll make things like framerate and such a thing of the past? I'm just going to ask a few questions, silly they may sound but I'm very curious to what this would make possible.

Changing the resolution without an ingame script, would this be a possibility?
Increasing preformance, i.e. lots of events and scripts running would run smoother than the original Game.exe?
The Game.exe always being active and not just the BGM?

I'm fairly excited by what this can do in my head and hope that it is as good in reality, best of luck with the project and I look forward to hearing what you've got to say.
weeee ouh!!! finally someone doing what i've always wanted >_<!!!

-> look at rgss/sdl :p in the archives, and to that http://hors-sujet.net/svn/rmxp-ruby-sdl/ ( repository of the code )
Hum
Then -> if you're going to embed 1.8.6 then yes use MSvc 6.0
but if you're going to try to embed 1.9.1, then you should definitely do it with MIngw ( a linux environment for windows, with gcc and all that kind of stuff ) because, the one click installer of ruby 191 will be build with Mingw.

I'm going to follow this with a lot of attention!!

You know where to contact me if you have any questions :p^^

ANd because you're building something that might only interested windows user in the 1st place, you might want to choose something windows specific like directX ....
there is also a few libraries out there very powerful for gaming.

Do you intend to add new features?
Desecration wrote:
Well I think this project sounds very promising , it'll more than likely require a lot of effort to do which is a good thing because it means that it'll be hopefully worth it. I've got a few questions though, will this replace our current scripts database or will this simply load them into a new Game.exe file while utilizing your new methods? I mean I'm not exactly sure on what this is for at the moment but I assume it'll make things like framerate and such a thing of the past? I'm just going to ask a few questions, silly they may sound but I'm very curious to what this would make possible.
Thanks Desecration :).
Regarding your questions: At a first moment I plan to make a copy of the Game.exe plus RGSS102E.dll(And also RGSS202E.dll for RMVX), so games previously made with RMXP/VX will be able to run as normal with this. For doing this I will define all hidden classes from RGSS(Bitmap, Sprite, Rect, Tilemap, Viewport, Window, Audio, Input, Graphics, and so on) in the new .exe written in C++. And then it will load the current scripts from the game database. So, ARGSS.exe will be able to run equaly as a RMXP game. That's only for making it compatible with already created RMXP games. After that(Or maybe while that) I will add new functions, like more fps, more resolutions types, better fullscreen, better Audio, Input, more graphical methods and effects and more. For that I think I will have to rewrite some default scripts, for making things better. I think that it would be good to combine efforts with RMXP - Scripter's Edition. Also, I am still working on my RPG Advanced Editor project and if I finish it it along with ARGSS, it will be a really good freeware combo for making RPG games(And even more).

Desecration wrote:
Changing the resolution without an ingame script, would this be a possibility?
Yes, SDL is capable of that, so yes.
Desecration wrote:
Increasing preformance, i.e. lots of events and scripts running would run smoother than the original Game.exe?
Yes. RMXP use GDI+ for displaying sprites in the screen, what is a really slow method. SDL is faster and plus Ruby 1.9, which is faster that the used along with RMXP, the game will be able to run even faster.
Desecration wrote:
The Game.exe always being active and not just the BGM?
The demo test actually is always active, I will make so that you will be able to choose if you want it to be always active(Good for online games) or to be frozen until you resume the proccess(Including BGM and other audio effects).
Desecration wrote:
I'm fairly excited by what this can do in my head and hope that it is as good in reality, best of luck with the project and I look forward to hearing what you've got to say.
Thanks for the support

trebor777 wrote:
weeee ouh!!! finally someone doing what i've always wanted >_<!!!
Hehe, I ever wanted to do this after you started your project, so thanks to you I making this.
trebor777 wrote:
-> look at rgss/sdl :p in the archives, and to that http://hors-sujet.net/svn/rmxp-ruby-sdl/ ( repository of the code )
Hum
Thanks trebor! That will really help me for developing it faster! I will analize it better when I come home, but as I see now that's actualy more code than what I have done until now.
trebor777 wrote:
Then -> if you're going to embed 1.8.6 then yes use MSvc 6.0
but if you're going to try to embed 1.9.1, then you should definitely do it with MIngw ( a linux environment for windows, with gcc and all that kind of stuff ) because, the one click installer of ruby 191 will be build with Mingw.
Mmmm, I don't like much mingw, but if that is neccessary... However, I will have to wait for my new computer for installing mingw, cause in mine only left about 120mb space in disk...
trebor777 wrote:
You know where to contact me if you have any questions :p^^
Thanks trebor, I will try to find you in msn.
trebor777 wrote:
ANd because you're building something that might only interested windows user in the 1st place, you might want to choose something windows specific like directX ....
there is also a few libraries out there very powerful for gaming.
Tell me more, but I wanted to extend the project to linux and mac also. However, doesn't SDL work in windows with DirectX? http://en.wikipedia.org/wiki/File:SDL_Layers.svg
trebor777 wrote:
Do you intend to add new features?
Of course!
from the look of the test, this is pretty cool. So this will run faster, allow you to stop sound effect when the window is inactive, and all that stuff? Cool. :shades:

Two questions:

1. Will this pause the game when the window is inactive, as an option?

2. Will we need ruby installed on our computers for this?
:p I said crap about the use of mscv or mingw... that's only if you wanna build an extension for ruby from c that would then be used in ruby. ( creating .so ) which was the original idea of rgss/sdl.

So use whatever you want to embed ruby in your program.


Near:
1.
Quote:
The demo test actually is always active, I will make so that you will be able to choose if you want it to be always active(Good for online games) or to be frozen until you resume the proccess(Including BGM and other audio effects).


2. nope you will not need to install ruby, the interpreter is embedded in the exe ( or one of the dll ), like it is with rmxp or vx.
@Near, yes I plan to add all that cool things. About question 1, yes, you will have an option for that, and quetion 2, no that won't be neccessary. The demo uses ruby right now, and you can test it in a PC without ruby.

Also, I have made a simple script for testing the demo with lots of balls bopuncing everywhere and not just arshes:
  1. BALL_NUMBER = 250
  2. p 'Testing ARGSS'
  3. sprites = []
  4. xxs = []
  5. yys = []
  6. for i in 0..BALL_NUMBER
  7.   spr = Sprite.new
  8.   spr.bitmap = Bitmap.new('ball.png')
  9.   spr.x = rand(640-spr.width)
  10.   spr.y = rand(480-spr.height)
  11.   sprites << spr
  12.   xxs << (1 + [rand(5), 1].max) * (rand(1) == 1 ? -1 : 1)
  13.   yys << (1 + [rand(5), 1].max) * (rand(1) == 1 ? -1 : 1)
  14. end
  15. loop do
  16.   for i in 0..BALL_NUMBER
  17.     spr = sprites[i]
  18.     spr.x = spr.x + xxs[i]
  19.     spr.y = spr.y + yys[i]
  20.     xxs[i] = [1 + rand(5), 1].max if spr.x - xxs[i] <= 0 and xxs[i] < 0
  21.     yys[i] = [1 + rand(5), 1].max if spr.y - yys[i] <= 0 and yys[i] < 0
  22.     xxs[i] = -[1 + rand(5), 1].max if spr.x + spr.width + xxs[i] >= 640 and xxs[i] > 0
  23.     yys[i] = -[1 + rand(5), 1].max if spr.y + spr.height + yys[i] >= 480 and yys[i] > 0
  24.   end
  25.   Graphics.update
  26. end
Expand to see the code.
Just open the scripts.rb file in the demo with notepad, replace the contents with this, and add this new ball sprite: Image
:p Works quite nicely actually ^^
It would be good to be able to measure the fps :p at the end of the test, though it can be done in ruby directly, would be maybe better (having less consequences on the ressources used ) to do that in your C code:
(basically at each frame you measure the time elapsed from the last frame, convert it to an fps ( like a percentage but on the frame_rate wanted, so let's say 60, and store that result into an array for each frame. Then at the end of the of the test, you display the min & max value of the array, and calculates the average/mean of the values) ^^

( ps: we need to talk :p )
Just played around with the new demo. I just gotta say, this is going very nicely. If I just edit the scripts.rb file I can run my own tests, right?
Nice job! This is something I've been interested in for a long time. SDL is a good choice, I personally would go with hardware rendering via OpenGL and maybe Audiere or Fmod for audio as SDL audio libraries were limited last time I checked. Corona is good for image handling, I prefer it to SDL_img anyway (and it's more versatile than just libPNG), but that's mostly just personal preference and doesn't matter much.

What I would suggest, however, is to write generic wrapper classes (or even an abstract base class) to be implemented with different APIs. For example, you could define a unified interface to graphic rendering (say, the Bitmap class), and then it could be implemented with different libraries like OpenGL, DirectX, SDL, or even Win32API. Hardware rendering with something like OpenGL tends to give better performance, but requires a decent video card which might put an extra requirement on your user. So your engine could have different video drivers for the user to choose from, and you could just start with SDL at first and then add more when you feel like it. That's what sphere and ika do anyway. The same could be done for the Ruby interpreter. It would be nice if you had the ability to plugin different versions of Ruby (such as 1.9), but that's just something nice to have and not so important.

I have only tried embedding Ruby 1.8 using VC++ so I'm not sure about 1.9. I'm pretty sure it's doable and will try to look into it. For INI files, SimpleIni looks good. You could also write your own INI reader.

I'd really love to help you with this if you don't mind. Would you be interested in setting up a project on Google Code or SourceForge so other people would be able to contribute?
embedding 1.8 and 1.9 is pretty much the same process, they changed a few methods but it the same on the overall ^^

Cowlol I was thinking the same for the Code repositery :p, not that i can really help right now with my own projects, but I might be able to later on:p
linux support ... GREAT!!!!!!!!!!!!!!!
@cowlol: The only problem I have with your suggestion is that my graphics card doesn't support OpenGL 2.0 or higher, and I am running a laptop, where to replace my graphics card I'd have to replace my motherboard as well...

But it is a good idea to allow developers to choose between OpenGL, Direct X and all them.
I left the ball bounce demo running for some 10 minutes while I was away from my computer, and when I came back it had crashed lol.
No implicit conversion from nil to integer.
Not sure how that could have happened though.
trebor777 wrote:
:p Works quite nicely actually ^^
It would be good to be able to measure the fps :p at the end of the test, though it can be done in ruby directly, would be maybe better (having less consequences on the ressources used ) to do that in your C code:
(basically at each frame you measure the time elapsed from the last frame, convert it to an fps ( like a percentage but on the frame_rate wanted, so let's say 60, and store that result into an array for each frame. Then at the end of the of the test, you display the min & max value of the array, and calculates the average/mean of the values) ^^

( ps: we need to talk :p )
I am going to add fps measure and limitation for Graphics module, and also displaying them in title screen like RMXP, and also is a good idea to add an average fps calc, I'll do that.

Near wrote:
Just played around with the new demo. I just gotta say, this is going very nicely. If I just edit the scripts.rb file I can run my own tests, right?
Yes, you can edit scripts.rb and run your own tests.

Cowlol wrote:
Nice job! This is something I've been interested in for a long time. SDL is a good choice, I personally would go with hardware rendering via OpenGL and maybe Audiere or Fmod for audio as SDL audio libraries were limited last time I checked. Corona is good for image handling, I prefer it to SDL_img anyway (and it's more versatile than just libPNG), but that's mostly just personal preference and doesn't matter much.
I will test them and see which is better, thanks.
Cowlol wrote:
What I would suggest, however, is to write generic wrapper classes (or even an abstract base class) to be implemented with different APIs. For example, you could define a unified interface to graphic rendering (say, the Bitmap class), and then it could be implemented with different libraries like OpenGL, DirectX, SDL, or even Win32API. Hardware rendering with something like OpenGL tends to give better performance, but requires a decent video card which might put an extra requirement on your user. So your engine could have different video drivers for the user to choose from, and you could just start with SDL at first and then add more when you feel like it. That's what sphere and ika do anyway. The same could be done for the Ruby interpreter. It would be nice if you had the ability to plugin different versions of Ruby (such as 1.9), but that's just something nice to have and not so important.
Good idea, I will see to do so after I finish with SDL, because I don't want to mess with many and different things right now.
Cowlol wrote:
I have only tried embedding Ruby 1.8 using VC++ so I'm not sure about 1.9. I'm pretty sure it's doable and will try to look into it. For INI files, SimpleIni looks good. You could also write your own INI reader.
I'll try SimpleIni, it seems good.
Cowlol wrote:
I'd really love to help you with this if you don't mind. Would you be interested in setting up a project on Google Code or SourceForge so other people would be able to contribute?
I have to think about this. I prefer working alone rather than working in a group, so I still don't know what to do. Let me think.

Quote:
I left the ball bounce demo running for some 10 minutes while I was away from my computer, and when I came back it had crashed lol.
No implicit conversion from nil to integer.
Not sure how that could have happened though.
I will see if I can recreate that error, or find what caused it. Thanks for reporting it.
Can you put the 'Win32API' class into the interpreter, pretty please? I needs it for key input. I'd like to test this out, but without button input a game kinda sucks ^^

EDIT: Wait, I reread the first post. How do I use the SDL Input?
i also have a question, well the whole reason i started with RMXP/RMVX Was to build my imagination up and do that in an easy way, yes my question is

1. are you planning to make this as easy as RMXP/RMVX or even easier ?

2. are you planning to make it like a newbies rpg generator ?

3. well i am not a scripting type of maker, but my question is, in this RGSS Remake, when i am creating a game will it like creating a game with RMXP/RMVX or like Unreal Engine, Game studio or even Torque ?

4. will the graphic style be high such as 3D Style of Graphic or will you still use the same old DS type of graphics ?

5. Is Tilesets a function in this generator ?

6. will i be able to create games such as well Kingdom Hearts Chain of Memories or even better ?

i am sorry for asking much, i just had to ask, i know some of my questions might be out of topic releated, but this is the questions i need to ask.

Also can you explain in an easier way to me, what your project is basicly pointing at is it pointing at Easier yet better game developing or just an update to the RGSS In RMXP
Akuma, this is a rewrite of the Game.exe for RMXP. It has nothing to do with RPGs or tilesets, and right now, to use this properly, you kinda have to be a scripting kind of maker. This only works with a script file(script.rb)and images at the moment, as far as I know. And besides, you have to learn programming at some point, or you'll never be able to make a professional quality game.

My question still remains, how do I get input processing, when there's no Win32API class?

EDIT: Two questions:
1. Can you compile those external DLLs into a single or even two DLLs?
2. What do you use to create DLLs? I've been looking at how to make
them, but I'm not sure what I should use...
Near wrote:
Can you put the 'Win32API' class into the interpreter, pretty please? I needs it for key input. I'd like to test this out, but without button input a game kinda sucks ^^

EDIT: Wait, I reread the first post. How do I use the SDL Input?
Near, you are really impatient, hehe. Remember that that was just a simply test. I will add more functions later, just wait a bit. However, if you have ruby installed, requiring "Win32API" may work.
  1. require 'Win32API'
Expand to see the code.
I haven't tested, but it may work.
About SDL Input, I haven't done it yet, I will see if I finish it for the next demo.

@Akuma209, as Near said, this is not a new game maker. It is just a game player, which will run games made with rmxp and rmvx.
Ok, but I already tried requiring it(with ruby installed)and nothing... and i know it was a test. i simply want to test it more 😀 .
There is an api to read the ini sections.
  1. char buf[256];
  2. GetPrivateProfileString("section","line",NULL,buf,256,"rel.path");
Expand to see the code.


regards

berka
what would be nice is support for 3d models on a 2d plane ie. the way FF7 and FF8 were designed. might be hard to implement though cause i would imagine you would have to add better support for directx, video cards and a much better movement system then whats already in rpg maker xp.
Wow, this is quite impressive. I understand how much work would be required for this, and having something like this would help me tremendously, as my game pushes RMXP a little further than it should be pushed. Having the ability to modify the C++ source, or the built in RGSS methods, such as battle animations (blech) would help me greatly.


Also, another thing that would help significantly, when the game crashes, in addition to just giving the line, and type of error, could you include the callstack too?
pidey wrote:
Having the ability to modify the C++ source, or the built in RGSS methods, such as battle animations (blech) would help me greatly.


You can already overwrite and modify them, although performance is still a concern for some methods. You could easily overwrite the battle animation code though, it's documented in the help file and you could easily copy and modify it.

pidey wrote:
Also, another thing that would help significantly, when the game crashes, in addition to just giving the line, and type of error, could you include the callstack too?


You can do this with plain old RMXP.

Just add an exception handler in the main script, e.g.:

  1.  
  2. # Built-in RMXP exception when F12 is pressed
  3. class Reset < Exception ; end
  4.  
  5. begin
  6.   # Default font
  7.   Font.default_name = 'Arial'
  8.   Font.default_size = 20
  9.   # Prepare for transition
  10.   Graphics.freeze
  11.   # Set scene to title screen
  12.   $scene = Scene_Title.new
  13.   # Process scene as long as it's set
  14.   while $scene != nil
  15.      $scene.main
  16.   end
  17.   # Fade out
  18.   Graphics.transition(20)
  19. rescue Errno::ENOENT
  20.   # If unable to open a file, display message and exit
  21.   filename = $!.message.sub('No such file or directory - ', '')
  22.   print("Unable to find file #{filename}.")
  23. rescue Reset
  24.   # Just reset (don't print exception message)
  25.   raise
  26. rescue SystemExit
  27.   # Just exit (don't print exception message)
  28. rescue Exception => ex
  29.   # Print exception message
  30.   print "-- #{ex.class.to_s} --\n#{ex.message}\n" + ex.backtrace.join("\n")
  31. end
Expand to see the code.


Not to say remaking the RGSS player isn't impressive, because it is. But there's still plenty you could do with the current player.
So any update? Any Win32API(hint)?

^^ Good job so far, though!
Thanks berka, I already know about that api, but I was searching for a multi-os compatible method for reading .ini, cause that won't work in linux or mac.

Hsia Nu wrote:
what would be nice is support for 3d models on a 2d plane ie. the way FF7 and FF8 were designed. might be hard to implement though cause i would imagine you would have to add better support for directx, video cards and a much better movement system then whats already in rpg maker xp.
I am using SDL and it is compatible with OpenGL, so in some future(by now I want to concentrate only in 2D) I may add 3D support.

pidey wrote:
Wow, this is quite impressive. I understand how much work would be required for this, and having something like this would help me tremendously, as my game pushes RMXP a little further than it should be pushed. Having the ability to modify the C++ source, or the built in RGSS methods, such as battle animations (blech) would help me greatly.
Thanks. About battle animations, just as cowlol said, they are handled in the hidden RPG::Sprite class, and you can see it on the RMXP help file. The same as RPG::Weather, Cache, or the other RPG data objects classes.

Near wrote:
So any update? Any Win32API(hint)?

^^ Good job so far, though!
I haven't done anything with Win32API yet, but I have worked further with the Sprite and Bitmap classes and the Graphics method. By now I am battling against the weird and yet unexplicable error BwdYeti metioned. I still couldn't find where it produces, so I am still debuging for it. I hate those errors really...

Edit: Just saw this old edit unanswered:
Quote:
EDIT: Two questions:
1. Can you compile those external DLLs into a single or even two DLLs?
2. What do you use to create DLLs? I've been looking at how to make
them, but I'm not sure what I should use...
1, for making things faster I will use those dlls by now, but I plan to make a simple .exe in the future. 2, you can use a C/C++ ide like MS Visual C++, there are freeware versions called express versions, or another ide around the web. There are lots of them. Also, look for tutorials, they help: http://www.google.com/search?hl=en&q=c%2B%2B+create+a+simple+dll&btnG=Google+Search. And also, here I have uploaded the sources of my AWorks.dll from my Input Script, maybe someone can find it useful.
Ah, cool. I never got that error... keep it up man, I expect an update soon! 😀
Looks like this project is still alive, haven't seen much from it lately, but then again I haven't been around these forums much lately either.

Oh and to help you read INI files in C++ you should look up something called AMS profile, it reads XML, INI, Registry, etc. I used it in C# and I'm pretty sure I saw that they have it working for C++ as well.
If this allows full use of ruby with RMXP than all I gotta say is awesome!
I always wondered why some functions in ruby didn't work in XP or even VX, this is nice. Maybe I should hold out on python and learn ruby.
Don't worry guys the project is still on^^.
Vgvgf went through some drastic change in the design, to make something better.
It's not my duty to tell you what have changed or so.. :p I hope he'll answer you guys!^^

And reading INI files is done since the beginning and work nicely...

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=64236