Irrlicht/Bullet demo! - now with the source code

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Post Reply
killsto
Posts: 10
Joined: Sat Mar 28, 2009 6:30 pm

Irrlicht/Bullet demo! - now with the source code

Post by killsto »

I made a simple demo with Irrlicht and Bullet. There is an invisible floor because I never visually added it and I want to move on to my new project.

Code: Select all

Controls
Arrow keys to move
Left click to shoot a cube
Backspace to add tower. The towers change their X position every time they are made so they do not spawn inside each other.  
'N'  prints the amount of cubes in the world
Mouse to look
If you don't have the irrlicht.dll:
http://www.mediafire.com/file/mcqffyizjzz/Irrlicht.dll

The demo:
http://www.mediafire.com/file/z5dizwmte ... etdemo.exe

I have not posted the code because it is sloppy and I do not want to cause problems for new coders.

However, I would be glad to help anybody who wants it. Feel free to ask how something works.

If enough people want it, I will tidy the source and post it.

Edit: I uploaded the source. Look down a couple of posts.
Last edited by killsto on Tue Jun 09, 2009 2:52 am, edited 3 times in total.
DtD
Posts: 264
Joined: Mon Aug 11, 2008 7:05 am
Location: Kansas
Contact:

Post by DtD »

lol, I spent like 20 minutes playing with this. Of course, I am ammused easily. :lol:

I don't really care if your code is sloppy, it'd still be interesting to look at.

~DtD
GameDude
Posts: 500
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

I'd also be interested in looking at your code as well.
killsto
Posts: 10
Joined: Sat Mar 28, 2009 6:30 pm

I commented some more so....

Post by killsto »

http://www.mediafire.com/file/yjwmyitmi ... etdemo.zip

I tried to point out most things that should not be done, but I forgot one. The collision shape for the boxes only needs to be created once and probably should be passed to the objectwithnode constructor.

I've added the dependencies (irrlicht, bullet) so it should compile right away.

Sorry Linux users. I love Liux too, but it isn't agreeing with my graphics card so I only supplied a VS solution.
psychophoniac
Posts: 101
Joined: Wed Dec 03, 2008 5:33 pm
Location: ger

Post by psychophoniac »

this is great!
can you explain me (or anyone), how to create an working code::blocks project with the libs and all this stuff?? i'd really like to use it, although it only supports cubes... :/
will there be support for spheres in the future? i'd be interested in it!

performance was good on intel centrino 2 8400(core2Duo, 2.26ghz), even with 2500 moving cubes.
its nasty that bullet only uses one core, at the ressource manager i saw that one was about 98% load and one about 5 :/
i love skateboarding!
killsto
Posts: 10
Joined: Sat Mar 28, 2009 6:30 pm

Post by killsto »

psychophoniac wrote:this is great!
can you explain me (or anyone), how to create an working code::blocks project with the libs and all this stuff?? i'd really like to use it, although it only supports cubes... :/
will there be support for spheres in the future? i'd be interested in it!

performance was good on intel centrino 2 8400(core2Duo, 2.26ghz), even with 2500 moving cubes.
its nasty that bullet only uses one core, at the ressource manager i saw that one was about 98% load and one about 5 :/
This was just a simple demo on combining bullet and irrlicht, not a library and I do not intend on continuing it.

Code::Blocks should be fairly easy to set up, especially if you want to use Microsoft's compiler. If you want to use gcc then you will have to do some recompiling of irrlicht and bulllet.

You can add spheres yourself by changing the createPhysicsInfo method in the ObjectWithNode class. Of course, you will also have to change the shape for irrlicht too. It isn't too hard so I think you can get it to work ;).

I can help if you can't figure it out.
Post Reply