Irrlicht 3D Engine for PureBasic! *Official Thread*

Developed or developing a new product in PureBasic? Tell the world about it.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Pretty cool :D. To fix the point light for now, try moving the light somewhere off to the outside of the left of the screen. Are you going to develop that into a functional game? That'd be a great engine demo.
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

If I move the light too far everything gets darker, and if I increase the radius, everything goes white...

I'll use this kind of light for explosions for sure, using red/yellow colors (and many particles). Should give a good effect.

Right now I consider it a workbench to test the engine...
No time to make a fully featured multi level game just for a test, but a small demo with all the needed elements (enemy waves, bullets, collisions, explosions) will be made!
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Sounds cool. I know what you mean regarding the light don't worry.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

In case you were wondering what I've been doing lately... I've created a 3d programming scripting language thats simple, and very fast. In fact the demo app runs just about the same as PB_Irrlicht.

You can check it out here: http://www.dracsoft.com/viewdownload.php?id=27

Don't worry about PB_Irrlicht though, because this is a good thing for it too! the i3D Scripter shares the same code-base with PB_Irrlicht so anything I add for one, the other gets too :o

Enjoy, expect some updates in the near future.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Ok theres a new update for both PB_Irrlicht and i3D Script.


New in 0.04:
Dynamic Shadows.
More robust event system.


Still Todo:
Fix i3D_Camera_SetRotation
Other stuff...


Download links:
http://www.dracsoft.com/viewdownload.php?id=27
http://www.dracsoft.com/viewdownload.php?id=26
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Strange... your new demo shows the ship, the planet, but not the gui, and doesn't respond to the keyboard... seems freezed, but if you press esc it quits (so it's not crashed)

Moreover you say that's not backward compatible, but instead my game demo still works nicely...
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Did you remember to update the DLL?

Thats very strange. Please post your hardware, and as far as the event system goes, look in the readme, the structure has changed so I can pretty much guarentee that your GUI won't work as originally planned. Also, try running the demo without the AddDynamicShadow command in there, and you can also try using #DirectX9 or #8. Here's the new structure:

Structure I3D_GUI_EVENT ; holds the event data passed from the dll
eventType.l
flag1.f
flag2.f
flag3.f
flag4.f
flag5.f
EndStructure

Depending on eventType (which isn't used for the type of GUI event anymore, but for mouse/keyboard/gui.), flags are used for different things.

eventType=
#I3D_EVENT_GUI ; A gui event has been received by the handler - flag1 = guiID,flag2 = guiEventType
#I3D_EVENT_MOUSE ; A gui event has been received by the handler - flag1 = MouseEventType, flag2 = X, flag3 = Y, flag4 = Wheel Delta
#I3D_EVENT_KEYBOARD ; A gui event has been received by the handler - flag1 = KeyCode, flag2 = PressedDown, flag3 = Shift, flag4 = Control, flag5 = CharCode
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Now works. I changed the driver from OpenGL to DirectX8...
Problem with the library or the 3D engine?

I use an "old" Matrox G400 on an Athlon2400, enough to play Jedy Knight II at full speed :-)
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

Post by Dreglor »

sounds like your video card doesn't surport the latest opengl as it is very old
~Dreglor
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Dreglor wrote:sounds like your video card doesn't surport the latest opengl as it is very old
Yes, in fact I never managed to use "stencil" (usually used for shadows) correctly, in a 3D engine in OpenGL I made many years ago...
Anyway the behaviour is strange, I would expect some strange shadow instead to hang the application.
FloHimself
Enthusiast
Enthusiast
Posts: 229
Joined: Wed May 14, 2003 3:38 pm
Location: Lüneburg - Germany

Post by FloHimself »

dracflamloc wrote:I've created a 3d programming scripting language thats simple, and very fast.
maybe i am wrong, but as far as i can see, this is Lua with exported functions from irrlicht.
if so, please don't say you have "created a 3d programming scripting language".

if you have used the pblua lib, be carefull with copyright notices please.
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Sorry for being annoying...

The following isn't right to detect keypresses. What's missing?

Code: Select all

ProcedureCDLL EventHandler(*EventData.I3D_GUI_EVENT)
  If *EventData\eventType=#I3D_EVENT_KEYBOARD
    If *EventData\flag1=#PB_Key_Left
        ; do  something
    EndIf
  EndIf 
EndProcedure

Second point:
I didn't managed to use Milkshape to edit UV coords, I've used many 3D editors before and it really looks a very crap software.
I wish to access directly to the internal 3D objects structure to make my own UV calculations. Is it possible?
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

eventually. i just need to put that in. i don't think it'll happen for a while though. gotta get the basic functionality in.

The event system has a problem accessing variables because i think the library is being executed in a separate memory space. So unless you call things directly from event system (like SetPosition), it won't know the values. Try putting a messagerequester in the event so you know exactly what was pressed etc, maybe I messed up one of the enumerations
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

No good news with the keyboard issue, anyway I wanted to enhance the demo with enemies and bullets...
Almost 75% of the code was ready but wait!Isn't there a command to remove a mesh that was added with "AddAnimatedNode" ?
You know, when a bullet hits someting or goes out of the screen I need to kill it... :)
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

So here is the second demo if my "3d" shooter:
(source+3d objects)

http://www.omiod.com/dl/IrrlichtShooter2.zip

- you can fire (left CTRL)
- you can move diagonally (it was my fault)
- one blobby enemy will try to catch you.
- no textures :(
- no proper light (I now use 2 colored point lights. I like the effect btw)
- basic collisions (rectangle type)
- variable flying speed
- hitting bullet stay freezed on the screen. just waiting the proper command (I know, I could move them out of the screen 8) )

Do not take care to the coding quality, please, I'm just testing the Irrlicht commands...

important:
The movement is not time-based, that is, on slower (or faster) computers the game will run at different speed.
I know how to do it by myself, but I just wonder if the engine can do this internally.
Post Reply