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.

AppGameKit Classic Chat / Using PhysicsRayCast() as a steering mechanism for Autonomous Agents in purely Physics Games ....

Author
Message
ProfVersaggi
12
Years of Service
User Offline
Joined: 6th Apr 2012
Location: Maastricht Netherlands / Chicago, USA
Posted: 26th Feb 2013 22:31
I'm curious if anyone has managed to use the PhysicsRayCast() as a mechanism for the steering of (AI) enemies in a purely Physics game (along with SetSpritePhysicsImpulse() perhaps)?

Given the command structure in AppGameKit I don't see any other way it can be done, but if I've overlooked something pls point me int the right direction.

I'm referring to the theoretical steering behaviors referenced here: *Steering Behaviors For Autonomous Characters*
http://www.red3d.com/cwr/steer/

There is also excellent references to this issue in Mat Buckland's book 'Programming Game AI by Example in chapter 3 - Autonomously Moving Game Agents.

Finally, O'Reilly's book AI for Game Developers in Chapter 4 discusses "Flocking" which is also at the heart of this discussion.

Anything anyone can say about the subject would be greatly appreciated.

Many thanks in advance....

----
From the Desk of Prof Versaggi ...
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Feb 2013 11:57
I did this using DBPro and the box2d plugin but not yet in AppGameKit although my tank game will require a certain amount of this kind of steering behaviour. I could try to dig out my DBPro code for you but I have a feeling you are purely an AppGameKit user right?


this.mess = abs(sin(times#))
ProfVersaggi
12
Years of Service
User Offline
Joined: 6th Apr 2012
Location: Maastricht Netherlands / Chicago, USA
Posted: 27th Feb 2013 12:02
I've gone through the DarkBasicProfessional DVD series and the 2 Volume Book Series From Alistair Stewart so I have some DBPro education. My primary platform is the AppGameKit though ... for deployment on the Android Tablets.

Any help I can get would be appreciated .... I'm developing some ideas on the concept now but they are in their infancy ....

----
From the Desk of Prof Versaggi ...
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Feb 2013 13:40
I've just been through my old projects folder and can't see it but I'll try to look again soon or maybe make a quick demo of how I got it working. It's pretty much a case of raycasting two or more rays to test what is in front of the vehicle and turning the vehicle away from any obstacles. I think I used one long distance ray and two shorter rays to check what was to the left and right of the vehicle. I think I also checked for moving vehicles and used their velocity to decide which way to go to avoid them.


this.mess = abs(sin(times#))

Login to post a reply

Server time is: 2024-05-02 00:34:28
Your offset time is: 2024-05-02 00:34:28