Irrlicht Wrapper for 3D games and applications

User contributed sources that have become inactive, deprecated, or generally unusable. But ... we don't really want to throw them away either.
Post Reply
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Irrlicht Wrapper for 3D games and applications

Post by Frank Dodd »

Hello Everyone

A Statement on Support
Due to pressures on spare time from my commercial activities I am unable to provide any further support for this project for the foreseeable future. I will still be making the package available and it is just as functional as it ever was, however anyone using it should be aware that naturally within the course of development they may run into issues with the software or their use of it and that there may be no support available for them.


My sincere thanks to everyone that has commented in this thread and particularly Eponasoft, John K, Daiwa, Alvaro, The Car, Agamemnus and Siskinedge for their help, advice and support and contributions that made this project possible.
Last edited by Frank Dodd on Dec 08, 2012 11:19, edited 33 times in total.
Thrawn89
Posts: 477
Joined: Oct 08, 2005 13:12

Post by Thrawn89 »

Woah, I just so happend to come back and see how the FB community was doing when...I saw this post...Irrlicht in FB?! This is amazing, Im so excited...

Well, I can say now, Im looking no further when I need a middleware engine now that a powerful and familiar 3D game engine is available for FB ^_^

This is monumental, Great work

~Thrawn~
v1ctor
Site Admin
Posts: 3804
Joined: May 27, 2005 8:08
Location: SP / Bra[s]il
Contact:

Post by v1ctor »

Fantastic work, i tried once to wrap Irr but using a pseudo-OO approach, what would be painful to use in BASIC (like people were complaining in QBE #19 :P), so i give up it. Your wrapper seems quite simple to use.

Just one change will be needed because in 0.15 there was a bug that allowed assignment of different UDT types, so now you can't do Camera = CameraNode, unless the types are redeclared as:

Code: Select all

TYPE irr_mesh as UINTEGER PTR

TYPE irr_texture as UINTEGER PTR

TYPE irr_node as UINTEGER PTR

TYPE irr_camera as UINTEGER PTR

TYPE irr_terrain as UINTEGER PTR

TYPE irr_selector as UINTEGER PTR

TYPE irr_particle_system as UINTEGER PTR

TYPE irr_animator as UINTEGER PTR

TYPE irr_font as UINTEGER PTR
I tried the Quake 3 map example, it compiled and run fine after the changes.

Be sure to announce it at the Irrlicht site so they can link to your page - you could also create a project at sf.net and put the files there, if your host can't handle the downloads.
JohnB
Posts: 236
Joined: Jul 22, 2005 3:53
Location: Minnesota Arizona

Post by JohnB »

First, thank you for some great code.

I am running FreeBASIC version 0.15b on Win98SE/Sempron2600+/ATI 9600. I made the changes to the TYPE's v1ctor suggested. I was able to compile and execute all the examples.

Thanks again for a GREAT job. Hope you continue the development, time permitting.

JohnB
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Post by Frank Dodd »

Thanks for your comments Thrawn & John B I hope it will be useful to you and it will be nice to see anything you create.

Victor thanks for pointing this out and supplying me with the correction, I did origonally try to delare them in the way you describe and although this did work it threw out a Warning level 0 error for each copy. I have changed the code to the way you described and included a union to get rid of some of the warnings. Many thanks for this.

There is an update available v0.2 already :) with this change (no more functionality) anyone that downloaded last night might like to download this update however I am hoping most people are running on version 0.15 of FB. (the version number can be found in the main.c file)
Nodtveidt
Posts: 484
Joined: Aug 24, 2005 0:32
Location: Camuy, PR
Contact:

Post by Nodtveidt »

I was wondering when someone was gonna do this...
JohnK
Posts: 279
Joined: Sep 01, 2005 5:20
Location: Earth, usually
Contact:

Error on IRR compile

Post by JohnK »

Dumb question here... I can't compile I get

C:\FreeBasic\bin\win32\ld.exe: cannot find -1IrrlichtWrapper

What am I doing wrong? THX
Dr_D
Posts: 2451
Joined: May 27, 2005 4:59
Contact:

Post by Dr_D »

Really cool!
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Post by Frank Dodd »

Hi John K the IrrlichtWrapper.dll must be in the same directory as your program or in a directory that is in the path (I assume you are running on windows?) Please also make sure that you put your Irrlicht.dll into that directory too.

Thanks for the repl;y Dr_D good luck with your projects.

I have done a few stress tests on this also and it was running quite well on my old computer with 70 MD2 models rendered and animated on the screen, all good fun :)[/img]
Dr_D
Posts: 2451
Joined: May 27, 2005 4:59
Contact:

Post by Dr_D »

You said that the wrapper only exposes some of the engines capabilities. Would a full port let you access the gl matrices directly, access the model data or load a model by sending a pointer to an array holding the data? That way you could load models using a custom format, and just send a pointer to the required data for irrlicht to render... kinda like with gldrawelements... and having direct access to the glmatrices would allow you to use a physics library like Newton. So... are you planning to wrap the whole thing? I'd offer to help if I knew more about C++. :(
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

from what i've gathered from c++ programmers, writing wrappers isn't an extraordinarily hard thing to do (but then again, i dont have experience with irrilicht, it may be ocmplex beyond my imaginaion :P), its just very tedious. time consuming work. lots of extra function declares and getters and setters, i reckon.

basically, because you don't have access to the objects directly, you have to use c++ to access the objects, then return information about them through a simple 'wrapper', which can be accessed in c. you also have to write functions to take in data from c and send it to a c++ function that uses it to modify objects. you have to break them into pieces, in other words.

i say this fully admitting i dont know crap about c++. i've always heard people talking good things about this lib tho, i hope the wrapper gives enough functionality to make fb shine =)
JohnK
Posts: 279
Joined: Sep 01, 2005 5:20
Location: Earth, usually
Contact:

Post by JohnK »

Just a note--

First If using WIN Be sure to download the Irrlicht.dll from the bin/GCC not the /bin/Winxx folders. This is confusing and gives an entry point error with the wrong dll.

Second, the engine loop must be doing a GetCapture or some other mouse API. Usually this is an old OpenGL trick to get delta mouse movements because the algo is too stupid to let the mouse do what it wants to do normally. So running one of the demos resulted in texture load error -- infinite render loop-- no way to shut it down with TaskManager because there is no ReleaseCapture API -- resulting in having to totally shut down the machine an lose all your work crap.

Just thought you should know.
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Post by Frank Dodd »

Hi Dr_D and Chaos,
It could expose access to the mesh, that I believe would allow you to manually update mesh data.
There were a couple of more functions I was going to expose that dealt with collision detection and getting joints to attach items to an animated character, a couple of calls for creating and recovering mesh data should be no problem. Unfortunately I won't have time to expose the whole thing, just enough to get me working on my own project and also anything else that causes anyone else a serious issue.

Cha0s's summary of the wrapper is correct, most of the work is very simple but time consuming, having said that I think there is enough in there already to create a Quake like shooter, a flight simulator, even something more sophisticated.

Hi JohnK,
Thanks for the advice on the Irrlicht.dll I had just gone for the gcc one out of instinct I have updated the post at the top and will also update the package I may drop the Irrlicht.dll into the wrapper distribution. Hopefully you will have some fun with it now it is sorted out though.
Dr_D
Posts: 2451
Joined: May 27, 2005 4:59
Contact:

Post by Dr_D »

Hey, I went to look on the irrlicht ste and found this on the tutorials page...

http://irrlicht.sourceforge.net/tut_newton.html
Very cool! :D

Just out of curiosity... About how many polygons were being rendered per frame when you had 70 of those MD2 models loaded? Were you also rendering shadows and terrain? I'd like to see that stress test source, if you don't mind. ;)
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Post by anonymous1337 »

Wow this rocks. I have no use for it but it's nice to know that if I want to go 3d in FB I can do it with ease. Right? ;D
Post Reply