Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: hansiec on November 05, 2012, 01:10:10 pm

Title: XP Irrlicht
Post by: hansiec on November 05, 2012, 01:10:10 pm
XP Irrlicht


Version: 1.0

Description:

This is a port from Irrlicht to Rpg Maker XP, just like what DemonFire did except mine is open source (not the dll though)

Features As of Now:
3D models (.md2, .obj, ect.) Any models that Irrlicht can support by default
Model Textures (.png, .bmp, ect.) Any Texture that Irrlicht can support by default
Custom BG color (No explanation needed really)
Model Transformation (scaling,rotation,transformation)


Notes:
For now the only help you get is that of which is exampled in the Scene_Irrlicht
I shall in the next release add camera viewing and 2D GUIs
Do not use unless you have some scripting knowledge, otherwise you'll get lost easily
Yes, I know a second screen pops-up (The one is the old game window and the other renders Irrlicht, I'll try to fix this so only 1 window pops up)

Finally:
You can vouch that this is mine for 2 reasons 1 the build of mine is very much different than DemonFire's and secondly I added a dll function which the sole purpose is to return my username (Hansiec)

Downloads:
#1.0# (https://rapidshare.com/files/568540691/3d%20project.zip)

Credits:
Hansiec -- Creator of the DLL/Ruby Scripts
Irrlicht -- Creator of Irrlicht and the model (with the texture) used for the example
DemonFire -- Of course for giving me the idea for using Irrlicht with RMXP
Title: Re: XP Irrlicht
Post by: Blizzard on November 05, 2012, 05:19:30 pm
So basically this allows you to run custom Irrlicht stuff within RMXP?
Title: Re: XP Irrlicht
Post by: hansiec on November 05, 2012, 05:29:38 pm
Quote from: Blizzard on November 05, 2012, 05:19:30 pm
So basically this allows you to run custom Irrlicht stuff within RMXP?


Yep, but it's very very limited in features as of now, but I'll add some more customization soon. (Maybe in a month or so I'll release another version) but for now there is only basic 3D model rendering, Also the fps is greater than 100 (usually) so there shouldn't be any real lag.
Title: Re: XP Irrlicht
Post by: G_G on November 05, 2012, 06:02:01 pm
All it's really doing is calling upon Win32API calls. You'd be better off using you're code in pure Ruby 1.9 rather than using the RGSS engine. I looked through your code, the only RGSS calls you're making deal with the Graphics module and the Input module. Running this in plain Ruby would get rid of the second screen problem and run much faster than the RGSS engine. Even if the rendering is running at 100 FPS, the input you'd be getting from the RGSS engine is still limited to 40 FPS just for the fact that Enterbrain programmed it that way.

Also, might I suggest you leaving the DLL as open source? All it is is just a wrapper to communicate between Ruby and the Irrlicht library. Leaving it open source can bring a lot of good things. Such as improvements from the community. Giving an understanding of how Irrlicht works to other people. Plus, if you ever decide to stop working on the project, it wouldn't be completely dead as there is still opportunity for someone to pick it up.
Title: Re: XP Irrlicht
Post by: hansiec on November 05, 2012, 06:45:12 pm
Quote from: gameus on November 05, 2012, 06:02:01 pm
All it's really doing is calling upon Win32API calls. You'd be better off using you're code in pure Ruby 1.9 rather than using the RGSS engine. I looked through your code, the only RGSS calls you're making deal with the Graphics module and the Input module. Running this in plain Ruby would get rid of the second screen problem and run much faster than the RGSS engine. Even if the rendering is running at 100 FPS, the input you'd be getting from the RGSS engine is still limited to 40 FPS just for the fact that Enterbrain programmed it that way.

Also, might I suggest you leaving the DLL as open source? All it is is just a wrapper to communicate between Ruby and the Irrlicht library. Leaving it open source can bring a lot of good things. Such as improvements from the community. Giving an understanding of how Irrlicht works to other people. Plus, if you ever decide to stop working on the project, it wouldn't be completely dead as there is still opportunity for someone to pick it up.


I am using the RGSS engine as it's more easier to use than pure Ruby (In sense of maps and events not in programming) people also use XP more than they would with a new engine, and if I decide to make my own I'd write it in c++ as it would be faster.

There is a setting to set the frame rate (Graphics.frame_rate = x) so again no problems there. I'll add the source in the next release as you are right (I was intending it but I forgot to add the source in the end)

Anyways, I might consider making this out of pure Ruby 1.9 instead just depending on if I feel like creating an editor for managing everything.
Title: Re: XP Irrlicht
Post by: G_G on November 05, 2012, 07:39:22 pm
The Graphics.frame_rate = xx only works up to 60 FPS (If I'm correct. I believe Blizzard was the one who discovered this), but that's most games nowadays. Anyways, nice job on this. I say if you can figure out how to either A) render directly to the RGSS Window or B) get rid of the window, you'll be good to go. Looking forward to the source, I always love peaking at code in hopes to learn something.

EDIT: Also, you can still keep RMXP as the editor and the engine as a separate ruby script. RMXP saves data using Ruby's serialization method. So all you'd need to do is have your engine load up the default classes (which can be found in the help manual) and you can load/save RMXP data.
Title: Re: XP Irrlicht
Post by: hansiec on November 06, 2012, 01:12:23 am
Quote from: gameus on November 05, 2012, 07:39:22 pm
The Graphics.frame_rate = xx only works up to 60 FPS (If I'm correct. I believe Blizzard was the one who discovered this), but that's most games nowadays. Anyways, nice job on this. I say if you can figure out how to either A) render directly to the RGSS Window or B) get rid of the window, you'll be good to go. Looking forward to the source, I always love peaking at code in hopes to learn something.

EDIT: Also, you can still keep RMXP as the editor and the engine as a separate ruby script. RMXP saves data using Ruby's serialization method. So all you'd need to do is have your engine load up the default classes (which can be found in the help manual) and you can load/save RMXP data.


Alright, I think I found out how to hide the RGSS window. But I decided to go into pure ruby, as I already did convert this completely.

Also, here is the source (it's more updated than the dll found in my zip)

https://rapidshare.com/files/1184194783/XPIrrlicht.zip

If you can find out how to fix the error when loading a block, could you tell me so?
Title: Re: XP Irrlicht
Post by: LiTTleDRAgo on November 06, 2012, 07:16:02 am
This application has failed to start because MSVCR100D.dll was not found. Re-installing the application may fix this problem
Title: Re: XP Irrlicht
Post by: Blizzard on November 06, 2012, 07:24:10 am
Quote from: LiTTleDRAgo on November 06, 2012, 07:16:02 am
MSVCR100D.dll


This also means that you compiled your DLL as debug instead of release.
Title: Re: XP Irrlicht
Post by: G_G on November 06, 2012, 08:38:42 am
Try this one. I built it under "Release" instead.
https://www.box.com/s/7j0nukeqec8r291pd1ha (It's just the DLL file)
Title: Re: XP Irrlicht
Post by: hansiec on November 06, 2012, 09:32:44 am
Quote from: gameus on November 06, 2012, 08:38:42 am
Try this one. I built it under "Release" instead.
https://www.box.com/s/7j0nukeqec8r291pd1ha (It's just the DLL file)


thanks, I forgot that I am using debug...