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 GDK / Auto Movement

Author
Message
Alphaman1101
15
Years of Service
User Offline
Joined: 1st Aug 2009
Location:
Posted: 5th Aug 2009 07:04
Im trying to build an "On Rails" game here. How should i go about making the auto movement? i only want to move so fast and the user has control of the angle of the camera. i just want to specify where the cameras xyz cords are. and i only want it to move to the position at a certain speed. Ideas?
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 5th Aug 2009 12:29
I was interested in developing a Rail Shooter at one time and considered a few approaches:

1. Cam XYZ Recorder
2. Waypoint
3. Waypoint w/ Pathfinding

With the Cam XYZ Recorder technique you perform a walk-through in the level with First-person camera, recording camera position and angle data every so many frames. You can store the orientation data in a array and replay by simply iterating thru the array to orientate the camera.

With the waypoint system you can create a special editor to place waypoints that point from one to another. In the play loop, you simply point and move your camera towards the `target` waypoint. When the camera reaches the waypoint (collision check) you set a new target for next waypoint - repeat point & move. Since your not concerned with the camera angle this method might suit your needs better.

For a more advanced waypoint set up you could include pathfinding and obstacle avoidance. To go even further you could probably include some type of physics in handling movement.

As simple as it may sound, you may not need anything fancy and just move the camera forward.

prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 5th Aug 2009 13:44
What I would do is what TechLord says about waypoints, but instead of pointing the camera at the next one, use dbCurveAnlge and dbCurveValue and check whether the point is <200 away from you, go to the next point


Your signature has been erased by a mod
Alphaman1101
15
Years of Service
User Offline
Joined: 1st Aug 2009
Location:
Posted: 6th Aug 2009 07:09
sorry. but i just cant wrap my head around the dbCurveAngle stuff. i don't under stand it, looks as if there is a good bit of math involved. i really need a code example. usually i learn really well from them. like now with dark gdk. i know alot of commands with only two days of using it.

Login to post a reply

Server time is: 2024-10-06 07:30:15
Your offset time is: 2024-10-06 07:30:15