DayOfWar: Camera targeting system.
by Bill Vee · 09/22/2010 (2:38 am) · 9 comments
I have seen this type of camera targeting style in a few games before, mostly flight sims.
Because of the size of the play field for this game it some times is difficult keep track of a fast moving target or a very small target.
I have often been playing around with this game and loose track of my target and take a couple of seconds too long to find it again.
So basically I decide to try out an exterior view of your ship with the camera locked onto a target while trying to keep both your ship and your target in view. I am pleased so far with the results. Controlling your ship while viewing it this way takes a little getting use too.
While you can fire when viewing from this outside view, it is really meant to be used to re-orient yourself to line up a shot then switch back to first person to fine tune your shot before firing.
Unfortunately I haven't got around to fixing my missiles from being able to hit my own ship when they are fired sometimes.
10 minute flight
Another 5 minutes.
On a different note.
I am in the process of setting up a method to allow people to help with a sort of Beta test.
I say beta test but it is more like a way of getting feed back on the way the game feels and what people think of it.
If you would like to help go to DayOfWar.com and register and drop me a message and say you would like to help with the "beta" test.
Because of the size of the play field for this game it some times is difficult keep track of a fast moving target or a very small target.
I have often been playing around with this game and loose track of my target and take a couple of seconds too long to find it again.
So basically I decide to try out an exterior view of your ship with the camera locked onto a target while trying to keep both your ship and your target in view. I am pleased so far with the results. Controlling your ship while viewing it this way takes a little getting use too.
While you can fire when viewing from this outside view, it is really meant to be used to re-orient yourself to line up a shot then switch back to first person to fine tune your shot before firing.
Unfortunately I haven't got around to fixing my missiles from being able to hit my own ship when they are fired sometimes.
10 minute flight
Another 5 minutes.
On a different note.
I am in the process of setting up a method to allow people to help with a sort of Beta test.
I say beta test but it is more like a way of getting feed back on the way the game feels and what people think of it.
If you would like to help go to DayOfWar.com and register and drop me a message and say you would like to help with the "beta" test.
About the author
#2
movies look really good. i would have to play it to be sure, but the controls look spot-on if you ask me.
09/22/2010 (1:54 pm)
Bill Vee, are you setting the "sourceObject" attribute of the projectile when creating it? thats supposed to prevent that from happening.movies look really good. i would have to play it to be sure, but the controls look spot-on if you ask me.
#3
09/22/2010 (5:02 pm)
Fantastic as always Bill. For future implementation, I'd recommend a "Match Target's Speed" functionality.
#4
The sourceObject attribute is being set but it still collides with the ship.
I think it is something I messed up with my custom vehicle class.
@Brian
I am looking into speed matching.
It is a bit tricky.
Unless you are pointed directly at your target you will always loose ground if you are going at the same speed and your target is moving away from you.
09/22/2010 (6:56 pm)
@Sean H.The sourceObject attribute is being set but it still collides with the ship.
I think it is something I messed up with my custom vehicle class.
@Brian
I am looking into speed matching.
It is a bit tricky.
Unless you are pointed directly at your target you will always loose ground if you are going at the same speed and your target is moving away from you.
#5
For speed matching, you can perhaps set it up to have your ship try to match a distance rather than a speed. When the player hits matchSpeedButton();, do a matchDistance$ = getDistance(target$); on the target, then set a timer to check the current distance, if it gets greater than the matchDistance$, increase speed by a small amount (not to exceed the player ship's max speed), or decrease by a small amount if they are closing on the target.
09/24/2010 (7:27 am)
@Bill VeeFor speed matching, you can perhaps set it up to have your ship try to match a distance rather than a speed. When the player hits matchSpeedButton();, do a matchDistance$ = getDistance(target$); on the target, then set a timer to check the current distance, if it gets greater than the matchDistance$, increase speed by a small amount (not to exceed the player ship's max speed), or decrease by a small amount if they are closing on the target.
#6
Now that is an outstanding idea.
I would not have thought of it that way.
I will look into this when I get time.
09/24/2010 (12:05 pm)
@BrianNow that is an outstanding idea.
I would not have thought of it that way.
I will look into this when I get time.
#7
Dealing with your missiles, it could very well be a mistake in your custom vehicle's DisableCollision() function which the projectile makes a call to mSourceObject->disableCollision(); A less likely result, your ship may be too large for the projectile's default SourceIdTimeoutTicks constant which is set to 7 ticks (231 ms). So depending on where the missiles spawn, the timer may be clearing your source object "protection" before it can fully clear the vehicle's area.
09/26/2010 (5:40 pm)
Outstanding. The camera is very "cinematic" for air battles, I like it. I'll be signing up for the beta/feedbacking for sure. Dealing with your missiles, it could very well be a mistake in your custom vehicle's DisableCollision() function which the projectile makes a call to mSourceObject->disableCollision(); A less likely result, your ship may be too large for the projectile's default SourceIdTimeoutTicks constant which is set to 7 ticks (231 ms). So depending on where the missiles spawn, the timer may be clearing your source object "protection" before it can fully clear the vehicle's area.
#8
Thanks for your support.
As for the missile problem it took me a while figure out what was happening. I have the datablock setup for the dropship to be very maneuverable and very fast for testing purposes. The acceleration is set very high and because of this what is happening is as the missile is fired the ships current speed is added to the missiles speed as it should but as the dropship can accelerate very quickly it is out running the missile and then hitting it after it gets armed.
09/26/2010 (8:55 pm)
@MorrockThanks for your support.
As for the missile problem it took me a while figure out what was happening. I have the datablock setup for the dropship to be very maneuverable and very fast for testing purposes. The acceleration is set very high and because of this what is happening is as the missile is fired the ships current speed is added to the missiles speed as it should but as the dropship can accelerate very quickly it is out running the missile and then hitting it after it gets armed.
#9
01/14/2011 (4:12 am)
Hi Bill, I was wondering if you could help me where begin implementing spherical terrain using T3D. Would I need to just edit the source for just the terrain source and implement ROAM or what. Your help is greatly valued. 
Torque 3D Owner Guimo
I was writing a Starcontrol clone once using the 3D engine. My solution for the missiles was to code a timeout so the missiles are basically inert for a while (while deploying, gaining speed or whatever), then they activate and will hit anything on its path, even yourself.