Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / NG collision aint easy to use!!!................Or.............is it just me?

Author
Message
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 2nd Jan 2005 05:44
Hi.


I downloaded the NG collision demo today.
i Tried the examples and the collisions are very good!
but when it comes to use it in you OWN program i cant even figure out how to make an object moving!!!

And the manual aint good either i simply dont understand how to use NG in you own programs.



The Nerd


looking for Royalty free 3D objects?
then Check PanzerGames at this link : http://www.freewebs.com/panzergames
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Jan 2005 06:20
It is indeed very, very easy to use. The manuals tell you all you need to know when you compare the command usage and explainations with the small but effective example codes they give you.
Basically with NGC you have a certain layout that works with almost any code. It is formatted like this.

delcare constants for making NGC easier to read
turn sync on and set sync rate
start collision system (StartCollisionPRO)
start debug mode (if developing)
set exclusive mode for replacement commands (i use 0)
define the constants for your collision types (player, world, etc.)
setup how you want your objects to collide (SetCollisionsPro)
load your objects
set objects to a collision type (CollisionTypePRO)
set your objects size, radius, gravity, rotation and anything else affecting object
start your main loop
move, rotate objects
update the collision system (RunCollisionPRO())
update the camera to players position
use sync to show changes
end your loop

always follow this order and all should be well.

The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 2nd Jan 2005 07:52 Edited at: 2nd Jan 2005 07:52
errrr.... can you please make a very small example?



Thanks

The Nerd


looking for Royalty free 3D objects?
then Check PanzerGames at this link : http://www.freewebs.com/panzergames
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Jan 2005 08:33
I sure can what version do you have? V3.01 is seriously bugged ATM I would suggest V2.03

The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 2nd Jan 2005 10:52
I have the newest demo version...


The Nerd


looking for Royalty free 3D objects?
then Check PanzerGames at this link : http://www.freewebs.com/panzergames
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Jan 2005 11:41
Here is one slightly modified from the Forum here. It is setup for NGC V3.01 don't forget to inclue the NGCollision.dba in your project and put the NGCollision.dll in the same folder as your .exe



Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 3rd Jan 2005 22:03
Then how does the .x files work?
Me and The Nerd has so far this code:



but when we run it the screen just turns black, and nothing happens.
What´s the problem???

Spiderman, Spiderman
Does whatever a spider can!
Check out PanzerGames at http://www.freewebs.com/panzergames
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 4th Jan 2005 00:39 Edited at: 4th Jan 2005 00:39
This codebase entry of mine was made using the demo version. It's very basic, and well commented. Run it to see what it does (no media requred), then read the code and the comments, it should make sense very quickly.

http://www.thegamecreators.com/?m=codebase_view&i=6d99af4a5acc16df108236b718052d76

BatVink
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 4th Jan 2005 04:53
Try changing this line SetOctreeThreshold( 12 ) the this SetOctreeThreshold( 100 ). The smaller the value is the longer it will take NGC to load the octree and the program will seem to be locked up but will just be calculating. Also Octree is bugged in V3.01 so you may just want to turn it off until it is fixed. Change this



to this



It will load straight away. As far as .x models in general just change the make object command for load object command.

Also there is another bug with V3.01 you might want to know. When using SetObjRadiusPRO() make sure all 3 values are the same or you will fall/go through some walls/floors. Maybe they will fix these bugs soon.

Login to post a reply

Server time is: 2024-11-21 14:06:00
Your offset time is: 2024-11-21 14:06:00