Irrlicht 3D Engine for PureBasic! *Official Thread*

Developed or developing a new product in PureBasic? Tell the world about it.
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

The first time the debugger halted the execution at line 18, "InitKeyboard() "

The second time, the Windows 2000 "blue screen" appeared ... (with associated reboot, disk check, etc.)

I'm using PureBasic 3.92 (latest) and the official Irrlicht demos work fine.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Shesh people are having a lot of issues. Which is odd since it runs perfectly on my machine >.<

[edit] It's working now, disable your debugger and make sure you are running the example in the directory with the example files.
[/edit]

I'm running:
2.4ghz P4
128mb Radeon 9800 Pro
PureBasic 3.92

It does seem to be related to the keyboard functions of purebasic though...
Last edited by dracflamloc on Tue Jan 11, 2005 4:34 pm, edited 1 time in total.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Okay on my clean install of PureBasic it crashed running the tester initially.

To get it to work: I used jaPBe and set the working directory for IrrlichtTester.pb to the "\Examples\Irrlicht Tester" directory and hit compile and run and it worked fine.

[edit]
To get it to work with the regular IDE just disable the Debugger for now.
Last edited by dracflamloc on Tue Jan 11, 2005 3:56 pm, edited 1 time in total.
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

Hmm, strange. the exe file works, but it tries to load a dll called pb_irrlicht.dll

cya dige
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

dracflamloc wrote:Using the default IDE I couldn't get it to compile and run from the IDE. However if you create an EXE in the examples directory it should work. I'm not sure why it would work with jaPBe and not the normal PureBasic editor unless it has something to do with the working directory and accessing files.
I'm not sure if I got you right but you'll have to put your dll into the /Compilers/-directory
(or system-dir) because the exe gets started from there.
Good programmers don't comment their code. It was hard to write, should be hard to read.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

No I have the PB_irrlicht.dll in the Compilers dir. it goes there by default so thats not the problem with the original IDE.

Dige:
Copy PB_Irrlicht.dll from \Compilers to your windows system directory or your \Examples\Irrlicht Tester directory.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Ok I found that this lib doesn't work if you run it with the debugger turned on. You can use the original PureBasic IDE just fine if you turn off the debugger.
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Yes, it works with the the debugger turned off ...
I'm a bit worried of doing so... If the debugger calls, something is not good... right?
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Blade, the problem seems to be that InitKeyboard and the other keyboard functions use Directx to work. PB tried to initialize DirectX when these are called and in the debugger when dx isnt initialized via openwindow yet, it causes an error to be throw because it doesn't think pb has a window open, when in reality it does via i3D. I will fix this issue by making the i3D event receiver handle keyboard input as well as GUI stuff. It should solve the problem. Look back for another update sometime this week, until then just work without the debugger.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

A quickfix update to the DLL has been uploaded as marked 0.03b. It adds error-checking so that the engine won't crash if it can't find or add a node for manipulation, etc...

This should cut down on some of the errors 0.03 has been giving people, and as long as the debugger is off, you should be able to use this library with no problems.
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Too early for a whish-list ? :)

- The lights are of "point" type. Good for many purposes, but I need to simulate the sun light. Should exist a "distant" type

- Apply a texture to an object. i3D_Node_SetTexture should accept some UV coordinates.

- Actual KeyboardPushed() can't handle multiple keys (need to move the spaceship diagonally!) But this is a PB issue...
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Blade wrote:Too early for a whish-list ? :)

- The lights are of "point" type. Good for many purposes, but I need to simulate the sun light. Should exist a "distant" type

- Apply a texture to an object. i3D_Node_SetTexture should accept some UV coordinates.

- Actual KeyboardPushed() can't handle multiple keys (need to move the spaceship diagonally!) But this is a PB issue...
A distant light type is just a point light with infinite radius, I'm sure you can figure out a way to create one on your own until I implement one.

UV coords *should* be on the model you create, but I'll look into programmer-specification.

The keyboard issues should be fixed when I put keyboard events into the event handler.

(And it's never too early for a wish-list, because it helps me know what features are most important to people and what to prioritize...)
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

dracflamloc wrote: A distant light type is just a point light with infinite radius,
Yes, it was my idea too, but when I used 10000 for the radius, ALL the objects inside the sphere appeared white :evil:
That's because the light intensity decreases when the distance increases. (so a big spere makes a big light)
Great to simulate a candle, a lamp, an explosion, but not the sun...
bye
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Ah, i see...
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Shooter Demo

Post by Blade »

Here is a small demo for a shooter game using this engine.
Well, actually you can't shoot, just move the ship with arrows...

Move in the center of the screen to see the "point light" issue talked above...

http://www.omiod.com/dl/IrrlichtShooter.zip
Post Reply