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.

Dark Physics & Dark A.I. & Dark Dynamix / Dark AI Yrotate problem

Author
Message
GALACTUS
19
Years of Service
User Offline
Joined: 24th Apr 2004
Location:
Posted: 12th Sep 2006 07:40
I'm new to Dark AI so I'm not sure if I'm doing something wrong.

When I move my .x figure..


it starts moving towards its target location with its back turned toward it. I tried using the Yrotate but it just keeps switching back.

Please help..

Thanks

?..?..?..?
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 12th Sep 2006 11:50
Your model needs to be rotated 180 degrees and fixed. DBP is moving the model the way that it is facing, which is backwards.

Do this...

Quote: "yrotate obj, 180
fix object pivot obj"


That should do it for you


Come see the WIP!
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 12th Sep 2006 13:13
Yeah that fixed this problem for me too.

"Error at line 0 - Your game sucks. Try again loser..." (Cash Curtis II)
AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c, DBP 6.2
GALACTUS
19
Years of Service
User Offline
Joined: 24th Apr 2004
Location:
Posted: 12th Sep 2006 21:56
Thanks Cash that worked

?..?..?..?
GALACTUS
19
Years of Service
User Offline
Joined: 24th Apr 2004
Location:
Posted: 12th Sep 2006 22:00
I'm not sure if anyone uses NGC collision with Dark AI. When I configure my .x figure to the gravity option he doesn't move. When the gravity option isn't on it can move.

?..?..?..?
GALACTUS
19
Years of Service
User Offline
Joined: 24th Apr 2004
Location:
Posted: 12th Sep 2006 22:33
Oh, one other thing. I was wondering how you can set the speed using Dark AI

I'm using this but my figure isn't moving any faster.


Thanks

?..?..?..?
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 13th Sep 2006 16:11
Please use AI Set Entity Speed Entity Number, Speed#, this will change entities movement units per second, thus allowing you to make walk faster or slower. Set object speed instead works only on models animation speed and not the real movement speed and it is DarkBASIC core command. Every DarkAI command starts with AI prefix.

"Error at line 0 - Your game sucks. Try again loser..." (Cash Curtis II)
AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c, DBP 6.2
GALACTUS
19
Years of Service
User Offline
Joined: 24th Apr 2004
Location:
Posted: 14th Sep 2006 01:29
Oh geese. I over looked all that extra sub folder stuff under entitys in the docs.

Thanks Olby

?..?..?..?
GALACTUS
19
Years of Service
User Offline
Joined: 24th Apr 2004
Location:
Posted: 14th Sep 2006 01:30
I take it a lot people use Dark Physics instead of NGC nowadays.

?..?..?..?
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 14th Sep 2006 05:16
NGC and Dark Physics are both useful, but very different. It just depends on what you're doing. Right now, Dark AI works better with NGC. After they fix a Dark AI bug they should work about the same.

One thing though - I never used NGC gravity. It caused me too many problems. I used timer based gravity before the collision update, which works really well.


Come see the WIP!
GALACTUS
19
Years of Service
User Offline
Joined: 24th Apr 2004
Location:
Posted: 17th Sep 2006 06:57
I read the little caption at the bottom of the Dark AI instructions and it mentioned about the work arounds with Dark Physics. Is this what you're refering to? Are they going to make it so Dark AI and Dark Physics will be more compatible with each other?

?..?..?..?
GALACTUS
19
Years of Service
User Offline
Joined: 24th Apr 2004
Location:
Posted: 22nd Sep 2006 10:04
Well, I guess we'll find out.

?..?..?..?
entomophobiac
21
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 22nd Sep 2006 11:04
I guess problems like these occur when things are built as separate packages and aren't truly "dynamic" in their execution. But are there really no workarounds?

Hasn't anyone experimented with any blend of DarkAI and DarkPHYSICS?

And another thing: what happened to the range aspect? I know some people had problems with DarkAI entities running away when getting too close. And this is a pretty devastating effect for games that want to do close combat.
GALACTUS
19
Years of Service
User Offline
Joined: 24th Apr 2004
Location:
Posted: 23rd Sep 2006 07:48
I'm not sure about range yet as I'm just beginning to learn this but as far as a work around the instructions doc stated this:


Quote: "The main issue with combining DarkAI with a physics system, such as DarkPhysics, is that physics will also want to control the DarkBasic objects representing your entities to stop them moving through each other. If you link the objects with the AI system with the physics system trying to move them conflicts may arise between which position the object should be moved to. The solution to this is to give control of the object over to physics as normal and to not link the object to the AI system, instead using the Set Position and Get X/Z commands to change and retrieve the entities' positions.

If the physics system can detect when an object is re-positioned and update its internal values then the two systems should work together as long as AI Update is called before updating physics. This avoids the possibility that after physics has prevented collisions the AI moves the entity into a new collision. If this is not the case then you can remove the AI system from controlling the entity and use the physics system to position the entity where the AI wants it to go.

When not linked to an object DarkAI will use internal values that represent where it thinks the entity should be when AI Update is called, use AI Get Entity X and AI Get Entity Z commands to get these values. You should then use methods provided by the physics system to move the DarkBasic object to this position, for example using forces, velocities or positions whichever the physics system prefers, and let the physics system move the DarkBasic object. Then update the physics system so that it positions the DarkBasic object for you and adjusts for collisions, etc, automatically. Then get the new position of the object using the normal DarkBasic commands Object Position X and Object Position Z and use the AI Set Entity position command to set the new internal position for DarkAI to work with. This new value will then be used by the AI system in the next AI Update to work out where it wants the entity to move to, it stores these new values internally and the cycle repeats. It is recommended you always update the AI before you update the physics in your loop.

You can use AI Set Entity Collide to tell an entity when it is blocked by something it doesn't know exists (a physics object that is not an obstacle in the AI system) which the AI would constantly try to move through and physics would keep stopping it. This tells the entity to move sideways for a bit."


?..?..?..?
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 23rd Sep 2006 13:02
Quote: "AI SET ENTITY ATTACK DISTANCE"

That sets the attack distance to whatever you want.

Dark AI and Dark Physics work well together. Read my other posts and see my specific guidance for using them together.


Come see the WIP!

Login to post a reply

Server time is: 2024-04-12 13:10:04
Your offset time is: 2024-04-12 13:10:04