RMXP - HBGE (0.0.4)

RMXP - HBGames.org Edition
Version: 0.0.4


Introduction

The idea of this project is we, the hbgames.org community, come up with our own scripting engine. Now we will still be using RMXP because it does have a database & map editor, and all those neat little hidden classes we can still get use from. Other than that, we are re-scripting anything we want. Think of it as a new MACL and SDK, but the next step.

As of now, we will be working on "core" classes and modules. We will not be working on windows or scenes and such, this will not be "usable" for some time other than serving as a library. The current demo only includes basic layout and documentation. I am currently adding the MACL library and other collectible classes for this.

At this time, feel free to share any thoughts or additions you wish to make. I will be updating this regularly with any additions anyone has added.

The project will utilize loading .rb files making adding new additions even simpler than ever. This also lets us generate a RDoc for our HBGE library. In the demos (0.0.4 or greater) the RDoc will be present.

Latest Update
- Included RDoc in demo
- Moved all library classes into .rb files
- Additions to library (See document heading)

Demo
Version 0.0.4

Credits and Thanks

If you submit anything to the HBGE and it is approved, your name will be listed below and within the documentation.

Terms and Conditions

The engine will be free for non-commercial and commercial projects alike as long as they credit the HBGE Engine. The HBGE cannot be redistributed anyplace. For more, check the Documentation. (Feel free to add anything here guys).

Side Projects

DSG
Along with this, I am creating another database editor, that will allow people to create objects like you could with the RMXP Database editor. It is merely an extension of that, where scripters can create new library classes and the editor will read them and create new tabs with fields for users to create. It is 99% complete and only being fine tuned at this point.
I really like the idea of this, and how you're getting the community together to use and make ideas for a new engine, great stuff!

I'd honestly love to help with this, but the problem is that my scripting is very limited. I can, however, offer morale support, if that's anything to go by, maybe share some ideas, but sadly won't be able to put anything to practical use.
I'm in. Just downloaded. Will have a good look tonight.
Not a lot there. I was working on my own re-write but it seems there is just a lack of interest in scripting so I figured make it a community project.

The demo as is is pretty empty and blank. However I plan to throw in lots of parts from what I was working on to get a base going for this. I'll be out of town all weekend, but early next week there should be a couple thousand lines of code in the demo.
Definately loving the idea. I'd started doing this myself but found I didn't have a clue how things such as tilemaps even worked. With a team all working on the things they do best I think this could do wonders.
I'll be checking this out. I have been working on a really nice Game module and way awesome Auto and Scene classes that do everything. Also have a rewritten Window class with widgets if you want, but that's not done yet (rewriting it from Netplay+ 2.0 scripts, would have just been easier to start from scratch imho)
Well, I posted an earlier version of my Array class additions, but I guess this could be useful for you if this becomes a community project.

Once an Array is created, it lets you track it's current index position or its respective value (the next or previous one). It makes the use of things like...

@index = 0
for n in some_array
# code
@index += 1
end

...pretty useless in comparison to my methods.

Array class Add-on Show
  1. class Array
  2.   def now; return if @pos.nil?; return self[@pos] end
  3.  
  4.   def now=(value); @pos = value end
  5.  
  6.   def index_now; return !@pos.nil? ? @pos : 0 ; end
  7.  
  8.   def next
  9.     @pos = (@pos.nil? or @pos == self.size-1) ? 0 : @pos+1
  10.     return self[@pos]
  11.   end
  12.   alias :succ :next
  13.  
  14.   def reset_pos!; @pos  = nil if !@pos.nil?; end
  15.  
  16.   def next=(value); return self[@pos] = value; end
  17.  
  18.   def previous
  19.     @pos = (@pos.nil? or @pos == 0) ? self.size-1 : @pos-1
  20.     return self[@pos]
  21.   end
  22.   alias :prev :previous
  23.  
  24.   def prev=(value); return self[@pos] = value; end
  25. end
Expand to see the code.
Would there be any use in me modifying a short script I had, that inverts colors? I could easily turn it into a method for the Color class, such as colorvariable.invert. Just throwing that out there.
Wouldn't that just look like...

  1. class Color
  2.   def invert
  3.     Color.new(255 - red, 255 - green, 255 - blue, alpha)
  4.   end
  5.   def invert!
  6.     red = 255 - red
  7.     green = 255 - green
  8.     blue = 255 - blue
  9.   end
  10. end
Expand to see the code.


Or is it more complicated than that?
Well, yeah. But nobody's bothered to do it, which is why I offered.
It's a nice idea in general, especially since it seems to be an evolving project, rather than Enterbrain's "out it out and leave it there"-philosophy. The part that I totally don't get is: Why on earth would you name it RMXP? I mean, I definately get the 'RM' part, as it's going to be an RPG Maker. Naming it RMXP suggests that it'll be a slightly enhanced version of the current RPG Maker XP, as well as just as incompatible to VX as the current XP is. In my opinion, that says "We support RMXP, anything else doesn't matter"... which totally collides with "HBgames.org Edition" imho - if you make it anew, make it fucking right, don't do some slightly enhanced version of XP that isn't really worth using for 80% of the users.

Other than some sense of perfectionism, the only things I could contribute are my signature scripts (pun intended ;) ), mainly the Multiple Language and Database Flag Reader script (though you'll probably include the latter some way of your own anyway, I figure alongside the Database customization?). I also have some scripts in the making for VX atm which might be cool to have, as they have some engine character (like my signature's, I guess... only stuff I ever release ^^), so they should fit in a project like that.

So yeah, I guess call me if you need any of my special abilities (which are... finding flaws in perfect scripts, finding bugs in bugtested scripts, making sure perfectly working scripts are rewritten because they're badly scripted, and of course, simplifying (expect some input regarding that whenever I can actually look at the demo ;) ). Other than that, I'll make you a kickass startup splash screen for the price of having my dA account link on it :p )

Good luck with this, and yeah... please get rid of the XP...


EDIT: Btw, I don't really see the necessity of making people who're ('who are', you dirty minds!) using the engine credit everyone who worked on it... You're not crediting anyone working on Enterbrain's when you release a game now, do you? Neither do people credit Enterbrain at all, since it's the engine you bought, and therefore are allowed to use. Since this is a non-commercial project, I see where you're coming from with the credit, but I'd rather say credit the team or something (as in "RM HBGE DevTeam, located at hbgames.org"), but anything else is just overshooting the target IMO... (as people would most likely credit more people working on HBGE than working on the rest, considering the kind of the project - community-developed).

Also, might I be hitting the bullseye when I suppose this is what you are talking about in your signature?
SephirothSpawn wrote:
I do not plan on using the current XP mapping system.
If so, I'd be interested in what's planned for this maker's mapping system (other than the infinite-or-at-least-less-restricted layers that you add if you have any sense for usefulness :p ).
BlueScope wrote:
It's a nice idea in general, especially since it seems to be an evolving project, rather than Enterbrain's "out it out and leave it there"-philosophy. The part that I totally don't get is: Why on earth would you name it RMXP? I mean, I definately get the 'RM' part, as it's going to be an RPG Maker. Naming it RMXP suggests that it'll be a slightly enhanced version of the current RPG Maker XP, as well as just as incompatible to VX as the current XP is. In my opinion, that says "We support RMXP, anything else doesn't matter"... which totally collides with "HBgames.org Edition" imho - if you make it anew, make it fucking right, don't do some slightly enhanced version of XP that isn't really worth using for 80% of the users.


I only came up with the name with 3 seconds of effort. It uses the XP game maker so essentially it is a enhanced version of RMXP. Then again, I'm completely up for a new project name, I just wasn't going to sit idle while we came up with something like a name.

BlueScope wrote:
...

So yeah, I guess call me if you need any of my special abilities (which are... finding flaws in perfect scripts, finding bugs in bugtested scripts, making sure perfectly working scripts are rewritten because they're badly scripted, and of course, simplifying (expect some input regarding that whenever I can actually look at the demo ;) ). Other than that, I'll make you a kickass startup splash screen for the price of having my dA account link on it :p )

Good luck with this, and yeah... please get rid of the XP...


Of course we will be needing your help. Your's was one of the names that came to mind when I was thinking about making this open forum.

BlueScope wrote:
EDIT: Btw, I don't really see the necessity of making people who're ('who are', you dirty minds!) using the engine credit everyone who worked on it... You're not crediting anyone working on Enterbrain's when you release a game now, do you? Neither do people credit Enterbrain at all, since it's the engine you bought, and therefore are allowed to use. Since this is a non-commercial project, I see where you're coming from with the credit, but I'd rather say credit the team or something (as in "RM HBGE DevTeam, located at hbgames.org"), but anything else is just overshooting the target IMO... (as people would most likely credit more people working on HBGE than working on the rest, considering the kind of the project - community-developed).


Fair enough. I just didn't want scripters to dedicate themselves to working on this project, and not feel like they aren't even getting a name in the credits.

Quote:
Also, might I be hitting the bullseye when I suppose this is what you are talking about in your signature?

If so, I'd be interested in what's planned for this maker's mapping system (other than the infinite-or-at-least-less-restricted layers that you add if you have any sense for usefulness :p ).


Nope. That's a completely separate project. I am not saying I don't plan to share things from it, but that's my baby. lol
After careful analysis of both of your posts (first and last), I realized what you're talking about really... I figured you were going for a new program to work with, instead of a script library/toolset/thing... which is why XP makes more sense ;) (though I'd heavily suggest supporting both VX and XP scripts natively, still ;) )

Okay, so that means it uses a non-modified version of RMXP as a basis, huh... guess that means no Database Flag Reader :( (which is the one and only reason I'll stick to RMVX forever XD But of course I'm willing to help you out all I can anyway) Other than that, I guess most people will like XP's mapping system more...


I wonder what other people think about the crediting... to me, it's like this:

bought software - no credit
free software - credit in a way that enables whoever wants to get in contact with the software creator to be able to do so, so that creator person is able to eventually make some money with it, build up a reputation, ...

Personally, whenever I request credit, it's because I think I made something noone else thought of before, which is cool enough to be known for... and because it's fun to see people confuse 'BlueScope' with 'The Third Man', or credit both XD No, but seriously... I've had about 1200 downloads of my multiple language script for XP, and if only 200 of those ended up using it in their game, and 100 actually credit me, there's 100 more chances for people to hear my name from... wouldn't be the first time I'd get an offer about working with someone because of what they saw me do (mostly the .org-regular indie developer, but also one very attractive paid project I unfortunately had to turn down :( ...but theoretically, it works!!! >_> )... guess you've had a million of those, considering the amount of stuff you've released compared to me ^^"
Bottom line: I think if someone wants to get in touch with you so bad he tracks your eMail address down, he'll input a developer's team name in google to find it. And he wouldn't really have trouble with it, considering that script should have HBgames.org written all over it ^^

SephirothSpawn wrote:
Of course we will be needing your help. Your's was one of the names that came to mind when I was thinking about making this open forum.
I feel honored, especially since I'm not really around too much these days. Seriously.
Nice initiative Seph :3
I will look more closely at this when I get the time ^_^

I can tell you that I would really want a test framework which allows to easily create automated unit tests. I am thinking of something similar to runit just catered to RM XP/VX

*hugs*
I am considering doing this for VX as well, since they do both use standard libraries, but I just don't see the point personally. I think everything that VX that they did, we the community already did for VX, and I just don't see anything that VX offered that was worth it. Now if someone wants to take the lead of converting this to VX and being responsible for it, I would be more than willing to work with them on it.

I should have a big update done by tonight.
I'm less talking about a seperate version than a supporting-both-version. I mean, this can't be too hard to do, as I've seen scripts made compatible to both makers (in shitty ways, but it happened), as well as threads being like "how to work with RGSS2 in XP"... while I haven't looked into it too much, I don't think it'd be that much of a troublemaker. In exchange, you'd get a script package where you could worryless add whichever script you wanted... sounds good to me.

And: VX offers Comments in the Database :D (for ages all the database add-on I ever needed...) But yeah, I see where you're coming from.
I just built an Input module, and was wondering if it could be included. It does not break the functionality of the original Input module, as it is a separate module named Keys, however, it IS updated by the original Input module, and it supports a full keyboard. I'm planning to go ahead and build a Mouse module as well.
Possibly, but I am currently planning on contacting Aleworks and seeing if we can use that rewrite. But feel free to share and we might possibly use it.
I am personally very content with the Keyboard module in MACL, and I have a Mouse module already which I made.
I was as well, but the AWorks Input module has a few more functions built in, and its actually faster from my experience. I even stripped the code in the MACL Keyboard module so it didn't check every key every frame, just independently with the .trigger?/.press?/.repeat? methods. I have already merged the 2 of them together and took what worked best for each of them.

Well, my job took quite a bit of time away from me past couple days (one job, 23 hours in 2 days plus working the other) getting ready and passing a review (97.7% oh yeah) so I am back on track to getting the next update pretty soon.
Well, if you want to take a look at my input modules, they're located here and here. They're definitely slower than AWorks, but they do everything Aworks Input did without an external .dll file and without breaking the default Input module. (Which means that you can still use the gamepad, if you want to check for that) They're also updated by the default Input module, so that if you're updating Input, you don't need to update them too. Please note that, if my input modules were used in this project, the versions made for this project would be subject to the project license and not my own.

As for Aworks, here's something I received a few days ago in response to some queries I sent vgvgf's way:

vgvgf wrote:
Glitchfinder wrote:
Actually, is it all right if I modify and re-release the Aleworks pack? I think I see other ways it could be improved upon. (Such as a fix to the write line script, so it gets accurate line measurements) It would keep the same name, and, if you chose, the same license. I would just continue to modify and add to the pack as time went on.
Yes, you can. My scripts haven't any license, so you can modify them at will. If you have any question about something in my scripts, don't hesitate to ask, I'll help you.
Sorry to stick my non-scripting nose in but I was just curious... in leymans terms, how much of a radical difference the final product would be for the game devs amongst us? I mean from using the RMXP's engine as it is to this?

What differences will there be? Will it improve the speed and fluidity etc? I assume the algorithms will be rewritten, is it just things like that?

Also, for obvious reasons I understand you won't want to quote a timespan here until completion but are we talkings months, years or decades?

Sorry I'm providing no answers, just questions! I'd like to have an input from a Game Developers point of view!
Ok first, here's the plan I have for the project to explain my answer:

Phase 1: Build our library - Our current phase is to build our library. Essentially, collecting as many tools as we can for the internal structure for this project.
Phase 2: Build our data structure - Once we get to this phase, I will be creating a topic for "elements of a RPG" topic where we will list all the different types of objects and such and then re-create those objects in Ruby classes.
Phase 3: Build session classes (Game_X) - Our next step will be to create classes that contain unique data for each session, like Game_ in RMXP.
Phase 4: Building graphics interfaces - this will be heavily customizable. The idea here is to separate the functionality from the visual appearance. I will hold a "build a GUI contest" where people can submit there own layouts for windows and scenes and the best will be made into the project.

Once this is done, a usable demo will be completed that can completely replace your default Scripts.rxdata. The project will still be under constant update. The idea here is to make one master script package that's like a test bed of all scripts released for it all tied into 1 project. Then makers who use this project will have all the tools for them at there disposal and won't have to search for a script to add. So as new scripts are added that comply with the standards and regulations of the project, they will be added to this demo.


So now to answer your questions:

Q: how much of a radical difference the final product would be for the game devs amongst us? I mean from using the RMXP's engine as it is to this?
A: This will be all optimized code that maximizes performance. It will also include a lot more to work with than the default XP database editor (via. expansion database editor this project will feature). For scripters, more tools than ya can shake a stick out, speeding up the scripting process.

Q: What differences will there be? Will it improve the speed and fluidity etc? I assume the algorithms will be rewritten, is it just things like that?
A: Performance will be optimized. As well, having the functionality of scripts separated from the visual, more customization. Algorithms will be also easier to be modified as these will be in configuration sections vs. placed within the rest of the code, having to hunt it down.

Rather than loading all these scripts and placing them in the editor, as that would create hundreds of sections to where the scroll-bar would just be a couple pixels, the only scripts placed within the editor will be the configuration. The scripts will be included from .rb files. This will allow us to add functions easier by simply dropping .rb files into a Scripts directory. All sections within the editor will just include categories for config. The idea here is to hide the scripts as much as possible while making setup easier.

Thanks for the questions. They help us all by making us look at our direction and planning and can only help us all move in the direction.

I would like to have Phase 2 completed by the end of April. Phase 3 will take the greater portion of May and phase 4 shouldn't take that long at all, considering its just laying out windows and scenes, and our goal is to put as much functionality in our top-level classes.
Hey Seph, nice to see you active here again!

Thanks for your answers, I think I am with you now. I'm actually just starting to try to get to grips with scripting languages so this will be interesting for me to follow. I'll definately try and lend my support from the end user perspective.

The only thing that sounds a bit worrying my end is will the average developer understand how to further implement scripts into this that may not be included in what you guys have done? This whole RB thing + Configuration in editor is foreign to me right now.

Timespan wise that sounds great, sooner than I was expecting! I really hope you see all your current projects I've noticed through!

Good Luck.
I'm probably making it sound more complicated than what it really is. You will basically add scripts in just like you always have. Just this core library will use .rb files (of course scripts can too). Say you have something like the following. I'll use my triple triad as its an example of a big script, uses a data structure and lots of constants for options. Normally, your code would look like this:
  1.  
  2. module TripleTriad
  3.   tons_and_tons_of_constants
  4. end
  5.  
  6. class TripleTriad::Card
  7.   blah_blah_blah
  8. end
  9.  
  10. hundreds_of_lines_to_make_cards_which_is_customized_hundreds_of_lines_away_from_top_of_script_or_another_section
  11.  
  12. class TripleTriad::Player
  13.   blah_blah_blah
  14. end
  15.  
  16. just_like_with_cards_make_player_objects_data_struct_hundreds_of_lines_away_from_top
Expand to see the code.


Now, instead I am aiming for something like this:
  1. HBGE.require_script('Scripts/TripleTriad')
  2.  
  3. module TripleTriad
  4.   constants
  5. end
  6.  
  7. now_card_making_is_here_any_methods_and_functions_in_TT_module_are_hidden_as_well_as_the_card_class
  8.  
  9. now_make_players
Expand to see the code.


It's basically just a way to "hide" as much information as possible so you can get to the setup. The require_script function is something I am working on that will pass through all files in the directory and include them.

Its with this require_script that will allow people to hide their scripts and allow developers to get to the setup easier. It also allows someone to make a new function for a class, like Array, just make a new Array_function.rb file and for me to add it into the project with ease.

On the subject, I tinkered with require for a second, but I couldn't get it to work for some damn reason. I have something like:
$: << Dir.getwd
require "Scripts/array_find.rb" and its saying I have a syntax error at line 0. I tried $LOAD_PATH in place of $: and still... am I doing something wrong here with this?

I have the 0.1 update just about ready. Been adding in all those old MACL stuff in there, made a new Graphics module (to support > 640x480), modified the Input module (via. AWorks), etc. I'll post the 0.1 once I get it all finalized and get the require thing fixed. Then will be starting on all the Data structure things and finalizing the DSG (hello unlimited database editor tabs). We will do that until the end of April. Then on to phase 3.
All sounds great mate, but I'd suggest making sure when you get to the end you spell out in very simple terms everything this baby will be capable of! I don't want any of your guys hard work to be missed out on for lack of knowing or understanding. I'm sure you have all your bases covered. This sounds like something that should replace 100% of all RM new games.

I'm very interested in this graphic module... I don't understand it, but I'm very interested! 640 x 480 limitation is my biggest turn off for using RM at the moment. Will this graphics module be relatively Plug and Play? So basically if I make higher resolution tiles I can display at 1024 x 768 by default, or am I way off here?

Quote:
On the subject, I tinkered with require for a second, but I couldn't get it to work for some damn reason. I have something like:
$: << Dir.getwd
require "Scripts/array_find.rb" and its saying I have a syntax error at line 0. I tried $LOAD_PATH in place of $: and still... am I doing something wrong here with this?


:o:
SephirothSpawn wrote:
On the subject, I tinkered with require for a second, but I couldn't get it to work for some damn reason. I have something like:
$: << Dir.getwd
require "Scripts/array_find.rb" and its saying I have a syntax error at line 0. I tried $LOAD_PATH in place of $: and still... am I doing something wrong here with this?


To require from the game directory I use
$LOAD_PATH << "."
require "Scripts/your_dir/script"

Is that what you want?
SephirothSpawn wrote:
I have the 0.1 update just about ready. Been adding in all those old MACL stuff in there, made a new Graphics module (to support > 640x480), modified the Input module (via. AWorks), etc. I'll post the 0.1 once I get it all finalized and get the require thing fixed. Then will be starting on all the Data structure things and finalizing the DSG (hello unlimited database editor tabs). We will do that until the end of April. Then on to phase 3.


One reason I was trying to avoid the AWorks input was because it completely destroys the original module. That means you can't use the original module for stuff like game controllers anymore. It also requires a patch to fix events. As for your Graphics module, do you know how to add to the default module without breaking it?
In my opinion, the whole thing with trying to change the way that scripts are included with one another is a bad idea. In your example, the TripleTriad script would have been just fine if it was broken up into multiple files. A card is not a player, and therefore they should not have occupied the same file, or in this case script entry. I hope you at least plan to not break the original way, right?

As for require, AFAIK Ruby just does an in-place evaluation. at the line that you put require. I think you'd get pretty close to what require does if you wrote it so that it loads the given file into a string and eval's it right there.

As for graphics, did you replace the RMXP renderer, or just put the functions to resize the window? RMXP's default renderer is just GDI, so it's using software rendering. On my old P4 3.06Ghz HT 1024 x 768 was like 15 FPS, even if there were no sprites or anything else in the scene. Even just clearing that many pixels is difficult for it (It has to clear pixels one by one). I'm sure most people have better processors than that, but it's still something to watch out for.
Alright, so I took a look in eval.c of the Ruby 1.8.6 source code, and for .rb files, require does just what I said. So you can emulate that aspect of require with just a simple eval() of the contents of the file you want to require. As for .so objects, I forget whether Enterbrain just undefined the ruby method "require" or whether they legit gimped the C function rb_require. I do not have RMXP installed, so I can't do it myself, but the first thing I would try is to write a DLL which redefines the ruby function require to call rb_require. If that doesn't work, then I would take a look at the rb_require file in eval.c of the ruby source code and recreate that function and define the ruby function "require" to call your recreated function.

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