So remember a few years ago when I mentioned I wanted to build a new and improved game engine that holds compatibility with existing RMXP projects, using XNA and IronRuby? I dubbed it the "Zer0 Division Engine", and it was the inspiration that started ARC? In case you forgot. (http://forum.chaos-project.com/index.php/topic,8790.0.html)
Well, while working on Rpg.NET, I was still getting that feeling that all the shortfalls of RMXP were holding me back, so during the past few days, I have had some free time, and I decided to take a quick try at seeing what it would take to create my original idea, before it became ARC and changed to something completely different.
I just wanted to let you all know I have it running. There is still loads of things to do, but I have successfully re-created RGSS, and have a game running smoothly on the screen, with rewritten Graphics, Audio, and Input. The tilemap rewrite is superb, can can run any resolution smoothly, without any of the priority issues I ran into in my Ruby rewrite, and the Ruby interpreter puts RMXP's to shame.
I still have lots to do before I start posting anything up, namely font rendering looks like garbage at the moment, and I need to create a custom build of IronRuby to remove the "superclass mismatch" error we ran into with ARC, which was something added into later versions of Ruby.
Once I get this running stable, the sky is the limit with what can be done.
This sounds amazing f0. Does it fix the screen tearing issues that are standard in xp.
Yes, I was having some issues with that, but ended up all I needed to do was swap when I was drawing and when the Ruby thread were sleeping around.
Exciting stuff! An rmxp upgrade is definatly needed!
Wow this completely replaces the need for xpAce lol
If this is as truly good as you make it sound,
Quote from: Zexion on August 02, 2014, 03:07:32 pm
this completely replaces the need for xpAce lol
Looking forward to breaking it :)
Another neat feature, or more of a by-product of its nature: any .NET assembly can be loaded into Ruby's scope and used just like it is.
Example:
load_assembly('System.Windows.Forms')
# And then you can create a window as you see fit
form = System::Windows::Forms::Form.new
form.Show()
All hail the Cookie Monster!
Now...back in my corner....crying....I can't script...
Is this running XNA by chance? If so, do you plan on letting Ruby access the Graphics Device? I think this is pretty cool. I actually might be able to implement my own tilemap now using Tiled (http://www.mapeditor.org/).
Yes, I am using XNA to do the rendering. I started with an XNA Studio Project, but have since switched it to a WinForms project with XNA embedded. I find it way easier to work with it like this.
As far as using XNA directly within scripts, thats very simple. I exposed the GraphicsDevice as public, and its also accessible from any Bitmap instance, since the Bitmap class is inherited from Texture2D.
bitmap = Bitmap.new(32, 32)
device = bitmap.GraphicsDevice
And since IronRuby can interop with any .NET assembly, you can load it into it's scope quite easily:
require 'Microsoft.Xna.Framework.dll'
require 'Microsoft.Xna.Framework.Graphics.dll'
device = Graphics.device
texture = Microsoft::Xna::Framework::Graphics::Texture2D.new(device, 32, 32)
As I just stated, though, that's not really necessary, since the Bitmap class is technically a Texture2D, as well as other primitive types, you can use one in the same way as a texture:
rect = Rect.new(0, 0, 128, 192)
color = Color.new(255, 255, 255)
bitmap = RPG::Cache.character('001-Fighter01', 0)
batch = Microsoft::Xna::Framework::Graphics::SpriteBatch.new
batch.Begin
batch.Draw(bitmap, rect, color)
batch.End
I can't wait to play around with this. Since it is XNA, I'll have hardly any work incorporating Tiled into this.
Quote from: Zexion on August 02, 2014, 03:07:32 pm
Wow this completely replaces the need for xpAce lol
Psh, when RPG.net was announced, I thought the same thing.
You're a little late to the party, brah.
Anyways, fuck yes F0! :D