XP Irrlicht

Started by hansiec, November 05, 2012, 01:10:10 pm

Previous topic - Next topic

hansiec

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#

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

Blizzard

So basically this allows you to run custom Irrlicht stuff within RMXP?
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

hansiec

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.

G_G

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.

hansiec

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.

G_G

November 05, 2012, 07:39:22 pm #5 Last Edit: November 05, 2012, 07:40:31 pm by gameus
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.

hansiec

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?

LiTTleDRAgo

This application has failed to start because MSVCR100D.dll was not found. Re-installing the application may fix this problem

Blizzard

November 06, 2012, 07:24:10 am #8 Last Edit: November 06, 2012, 07:25:41 am by Blizzard
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.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

Try this one. I built it under "Release" instead.
https://www.box.com/s/7j0nukeqec8r291pd1ha (It's just the DLL file)

hansiec

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...