PDA

View Full Version : Irrlicht module: first unofficial preview release



ErosOlmi
04-05-2007, 16:13
Hi all.

Roberto just sent me something I couldn't bealive when I first execute the sample script: first unofficial preview Irrlicht module wrapper for thinBasic.

Get attached file and unzip in thinBasic directory maintaining directory structure.
Then go under thinBasic\SampleScripts\Irrlicht\ andexecute thinBasic script sample to see with you eyes. Hope you will be able to see what I saw. If not working let us know.
You should see what reported as "1.HelloWorld" tutorial here: http://irrlicht.sourceforge.net/tutorials.html

Attention:

irrlicht.DLL MUST be located into thinBasic.EXE executable folder in order to work. We are thinking how to avoid this but for the moment that is the way


Some info:

thinBasic module wrapper is under development using thinBasic SDK for MS C/C++
module is developed using MS C/C++
irrlicht.DLL is compressed using UPX 3.00w original is about 1.4Mb while the one we distribute is about 510Kb
due to under development status and dll size, we will not deliver this module with official thinBasic release but we will keep a parallel temp project.
Later, when quite stable, we will decide how to go on


Here the list of functions already created by Roberto. No documentation for the moment but we will do in next weeks.

Have fun and please let us know if all is working fine on your box.
If not working, please tell us your OS and hardware config.

Ciao
Eros

_________________________________________________

Irr_CreateDevice
Irr_Run
Irr_DrawScene
Irr_DrawGUI
Irr_EndScene
Irr_Drop
Irr_GetFPS
Irr_GetPrimitiveCountDrawn
Irr_SetWindowCaption
Irr_BeginScene
Irr_IsWindowActive
Irr_CloseDevice

Irr_GetMesh
Irr_CreateMesh
Irr_RemoveMesh
Irr_GetMeshIndexCount
Irr_GetMeshIndices
Irr_SetMeshIndices
Irr_GetMeshVertexCount
Irr_GetMeshVertices
Irr_AddAnimatedMeshSceneNode

Irr_AddStaticText

Irr_SetNodeMaterialTexture
Irr_SetNodeMaterialFlag

Irr_GetTexture

Irr_SetNodeFrameLoop
Irr_SetNodeMD2Animation

Irr_AddCameraSceneNodeFPS
Irr_AddCameraSceneNode


---Equates DRIVER TYPE
%IRR_EDT_NULL
%IRR_EDT_SOFTWARE
%IRR_EDT_BURNINGSVIDEO
%IRR_EDT_DIRECT3D8
%IRR_EDT_DIRECT3D9
%IRR_EDT_OPENGL

---Equates MATERIAL TYPE
%IRR_EMT_SOLID
%IRR_EMT_SOLID_2_LAYER
%IRR_EMT_LIGHTMAP
%IRR_EMT_LIGHTMAP_ADD
%IRR_EMT_LIGHTMAP_M2
%IRR_EMT_LIGHTMAP_M4
%IRR_EMT_LIGHTMAP_LIGHTING
%IRR_EMT_LIGHTMAP_LIGHTING_M2
%IRR_EMT_LIGHTMAP_LIGHTING_M4
%IRR_EMT_DETAIL_MAP
%IRR_EMT_SPHERE_MAP
%IRR_EMT_REFLECTION_2_LAYER
%IRR_EMT_TRANSPARENT_ADD_COLOR
%IRR_EMT_TRANSPARENT_ALPHA_CHANNEL
%IRR_EMT_TRANSPARENT_ALPHA_CHANNEL_REF
%IRR_EMT_TRANSPARENT_VERTEX_ALPHA
%IRR_EMT_TRANSPARENT_REFLECTION_2_LAYER
%IRR_EMT_NORMAL_MAP_SOLID
%IRR_EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR
%IRR_EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA
%IRR_EMT_PARALLAX_MAP_SOLID
%IRR_EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR
%IRR_EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA
%IRR_EMT_ONETEXTURE_BLEND
%IRR_EMT_FORCE_32BIT

---Equates MATERIAL FLAGS
IRR_EMF_WIREFRAME
IRR_EMF_POINTCLOUD
IRR_EMF_GOURAUD_SHADING
IRR_EMF_LIGHTING
IRR_EMF_ZBUFFER
IRR_EMF_ZWRITE_ENABLE
IRR_EMF_BACK_FACE_CULLING
IRR_EMF_BILINEAR_FILTER
IRR_EMF_TRILINEAR_FILTER
IRR_EMF_ANISOTROPIC_FILTER
IRR_EMF_FOG_ENABLE
IRR_EMF_NORMALIZE_NORMALS
IRR_EMF_TEXTURE_WRAP
IRR_EMF_MATERIAL_FLAG_COUNT

---Equates ANIMATION TYPE
%IRR_EMAT_STAND
%IRR_EMAT_RUN
%IRR_EMAT_ATTACK
%IRR_EMAT_PAIN_A
%IRR_EMAT_PAIN_B
%IRR_EMAT_PAIN_C
%IRR_EMAT_JUMP
%IRR_EMAT_FLIP
%IRR_EMAT_SALUTE
%IRR_EMAT_FALLBACK
%IRR_EMAT_WAVE
%IRR_EMAT_POINT
%IRR_EMAT_CROUCH_STAND
%IRR_EMAT_CROUCH_WALK
%IRR_EMAT_CROUCH_ATTACK
%IRR_EMAT_CROUCH_PAIN
%IRR_EMAT_CROUCH_DEATH
%IRR_EMAT_DEATH_FALLBACK
%IRR_EMAT_DEATH_FALLFORWARD
%IRR_EMAT_DEATH_FALLBACKSLOW
%IRR_EMAT_BOOM

---Equates OTHERS
%IRR_WINDOWED
%IRR_SHADOWS
%IRR_IGNORE_EVENTS
%IRR_GUI_BORDER
%IRR_GUI_WRAP
%IRR_GUI_NO_BORDER
%IRR_GUI_NO_WRAP

Petr Schreiber
04-05-2007, 16:34
Hi,

thanks for nice script,
from the equates list it is easy to make character walk, run, crouch...

Perfect,
Petr

ErosOlmi
04-05-2007, 16:36
Petr, does it work for you?

Petr Schreiber
04-05-2007, 16:37
Sure !

I have tried default software and OpenGL render.
OpenGL takes few seconds to start but then it works ( and looks ) perfect.


Bye,
Petr

matthew
04-05-2007, 16:49
I've just tried it and it works on my Computer. ;D

ErosOlmi
04-05-2007, 17:18
OK, thanks gui.

Roberto is working to create a complete Irrlicht wrapper.
Irrlicht is quite massive so it will take some time to have a professional wrapper but it seems we are on the right road.

Thanks again.
Eros

ErosOlmi
04-05-2007, 17:24
Forgot to say,

there are 2 scripts in demo: one is thinBasic Gui (extension .tBasic) and one is thinBasic Console (extension .tBasicc) that just include the first one.

Difference is that if you execute the Gui version you just get the graphic window.
If you execute the Console version you get the graphic window plus a console window that is used like a sort of debug window where to look in case of problems.

Ciao
Eros

Michael Hartlef
04-05-2007, 19:20
Great job Roberto!

kryton9
05-05-2007, 02:02
Wow, came home tonight and it works great! Thanks Roberto!!

Here are some more md2 models and skins I had used in Aurora while making a model viewer with it.
I downloaded these and didn't make them.

kryton9
05-05-2007, 06:33
Ok, having fun looking at the code and studying the thinBasic code compared to the c++ code sample for hello world.

I am seeing how the pointer(pIIP) is taking the place of the class, but am confused in how it seems to replace 2 classes, the device class and smgr class? Did Roberto sort of unite the 2 classes.

I noticed he simplified a lot of the startup initialization for us and maybe he did the same with these 2 classes?

Very interesting to study, this is going to be really cool to learn and use.

ErosOlmi
05-05-2007, 07:36
Ken,

I'm not aware of the inner details, maybe Roberto will give you more details on Monday (he is out for 2 days).
What I know is that we always try to give functionalities easy to use and understand, al least we try. This means that many times a thinBasic function does what other languages do in many lines of code. The main reason is because thinBasic is an interpreter so the less lines of code, the better in terms of execution speed. But also because an interpreter must give results immediatelly with few lines of code because, as a user, if I'm working with an interpreter one of the reasons is that I want to see some results quite soon :)

Ciao
Eros

kryton9
05-05-2007, 07:56
Yep, so far it is doing that Eros. I looked in the include file and there is a user type that has smgr, and other values returned from the device class to irrlicht. It seems Roberto combined numerous device returned values from methods within Device class and those values are either structures or classes themselves, I am not sure, but in thinBasic IRR, it knows how to handle each one by using the one pointer. SO it is neat coding that I can sort of see, but I don't understand and would like too. Will wait for Roberto to comment on it when he gets back.

Irrlicht has lots of what we need. Maybe Petr can get in with Roberto and make it happen. There is ODE and other physics engines that work with it, they have tools for creating levels and light maps. I guess we should not try to reinvent the wheel when such a nice one exists as irrlicht and Petr can evaluate it and tell us what it might still need.

To make games we need tools, and maybe we won't have to create so many as we thought if any now. I guess Petr and Roberto should go over what all will be in this new great addition and how we should proceed.

If you look at the irrlicht site, he has tools for xml, sound and many more things. I will do some reading tonight and brush up. I looked at irrlicht seriously a while back and liked what I read. Well will study it more in detail that is for sure now.

Petr chime with your thoughts as well as Mike and of course you too Eros and any other guys on the forums into this stuff.

ErosOlmi
05-05-2007, 08:22
Ken,

please attention to not compare Petr work on TBGL with Roberto work with Irrlicht. They are compete different things not in competition.

TBGL is a OpenGL wrapper that let use OpenGL functionalities inside thinBasic. More, TBGL simplify and add unique fucntionalities to OpenGl allowing users to experiment with OpenGL in a quick and easy way but at the same time it remain very close to the main spirit and logic of OpenGL.

Irrlicht wrapper is another thing. It is a specific module wrapping a specific 3D engine specifically designed for games (and other aspects).
Of course with Irrlicht you will have a lot of new options because it is a 3rd party library used by many people that have developed a lot of material during those years. So, if your target is to try to create games, now you will have a new options.

As thinBasic developers, Roberto and I have to remain open to all opportunities. Roberto think that with Irrlicht module there is the possibility we will be able to bring more attention to thinBasic community. Well, I hope so especially because I know Roberto is a master in C and C++ development and because he wants to make a quite complete wrapper and not just few functions and equates. So, the more users here, the better for all of us I hope.

Ciao
Eros

Michael Hartlef
05-05-2007, 09:08
Kent, Irrlicht is just the graphic part. There is no sound or physics or whatever. This stuff is added via other libs, that would need to be converted/modulized too.

kryton9
05-05-2007, 21:12
Eros, I didn't mean my post that way if it sounded like that, sorry.

Mike, I thought once we had the irrlicht engine it could hook up to those modules, but I see now it can use them, but they still need to be converted. Thanks for pointing that out.

RobertoBianchi
07-05-2007, 13:29
Hi Kryton9,

in order to handle multi device but in the same time keep easy the module use and speed up the calls I choose to create a structure that holds device, video driver, scene manager, GUI environment and event receiver and pass a pointer it during module API calls.
The side effect is that for each device you can have only one video driver, scene manager, GUI environment and event receiver, but actually this seems not be a limitation.
Please let me know what you think.

Regards,
Roberto