Chaos Project

Game Development => General Discussion => Topic started by: ForeverZer0 on August 02, 2014, 09:28:47 am

Title: The Resurrection of the Zer0 Division Engine
Post by: ForeverZer0 on August 02, 2014, 09:28:47 am
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.
Title: Re: The Resurrection of the Zer0 Division Engine
Post by: Zexion on August 02, 2014, 02:46:33 pm
This sounds amazing f0. Does it fix the screen tearing issues that are standard in xp.
Title: Re: The Resurrection of the Zer0 Division Engine
Post by: ForeverZer0 on August 02, 2014, 02:52:51 pm
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.
Title: Re: The Resurrection of the Zer0 Division Engine
Post by: whitespirits on August 02, 2014, 03:01:07 pm
Exciting stuff! An rmxp upgrade is definatly needed!
Title: Re: The Resurrection of the Zer0 Division Engine
Post by: Zexion on August 02, 2014, 03:07:32 pm
Wow this completely replaces the need for xpAce lol
Title: Re: The Resurrection of the Zer0 Division Engine
Post by: KK20 on August 02, 2014, 04:59:53 pm
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 :)
Title: Re: The Resurrection of the Zer0 Division Engine
Post by: ForeverZer0 on August 02, 2014, 05:16:39 pm
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()



Title: Re: The Resurrection of the Zer0 Division Engine
Post by: Moshan on August 03, 2014, 05:32:23 am
 All hail the Cookie Monster!

Now...back in my corner....crying....I can't script...
Title: Re: The Resurrection of the Zer0 Division Engine
Post by: G_G on August 04, 2014, 10:17:38 am
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/).
Title: Re: The Resurrection of the Zer0 Division Engine
Post by: ForeverZer0 on August 04, 2014, 11:02:31 am
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


Title: Re: The Resurrection of the Zer0 Division Engine
Post by: G_G on August 04, 2014, 01:43:39 pm
I can't wait to play around with this. Since it is XNA, I'll have hardly any work incorporating Tiled into this.
Title: Re: The Resurrection of the Zer0 Division Engine
Post by: Spaceman McConaughey on August 04, 2014, 02:23:45 pm
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