Jump to content
Eternal Lands Official Forums
Entropy

Missile implementation on the client

Recommended Posts

Ok, now that we have the collision detection done on the server, we need some client support for it.

 

This is how I see it working:

1. You equip the bow

2. You click on a monster/animal/player as if you were to normally attack that entity.

3. The server will send one of the two messages: 1. OK, 2. Not OK

4. If the answer from the server is OK, the server will also tell the client to execute the extend the bow animation and rotate to face that actor.

5. You click again on that entity, and the server again sends OK or not OK.

6. If the server says OK, the server will issue one of the 4 messages to you and the players around you:

a. Fire missile type from player a to player b

b. Fire misisle type from position x,y,z to player b

c. Fire missile type from position x,y,z to position x1,y1,z1

d. Fire missile type from player a to position x,y,z

7. The clients that get the information: fire from player a to player b, then the client will execute the fire bow animation frame, and somehow detach the arrow from the bow and make it go to it's destination.

 

Any questions or ideas?

Anyone volunteering to implement this?

Share this post


Link to post
Share on other sites

Any questions or ideas?

 

From a user-interface point-of-view I believe one click would be best. You click and if the server says it's OK you turn and fire. If the path is blocked, you could turn and not fire. If it requires multiple clicks people will simply get used to clicking a bunch as fast as they can to (hopefully) get the attack. It would be much better if it is one click per shot. That also makes it easier to keep track of how many arrows you've fired (one per click as long as the path is clear).

Share this post


Link to post
Share on other sites

Some notes for the visuals:

 

You have to have 2 objects equiped: a Bow(weapon position), and a Quiver of arrows(shield position).

 

I am able to animate the arrow on the bow string up until the point the arrow must leave. In the code somehow you must match the height of the arrow as close as possible & the position so it'll leave the bow at about that point. Also the frame the arrow leaves at must be matched.

Share this post


Link to post
Share on other sites

A quiver at shield position (right hand)?

 

How would you be able to expand the bow and aim on a target, the quiver and the arrows in it will slap you right into your face.

 

Whats about a quiver on your back, where it should to be? Technically impossible? (if yes, i would shut up right now).

 

Piper

Edited by The_Piper

Share this post


Link to post
Share on other sites

I guess that what Roja was trying to say was that INSTEAD of a shield (so you wont be able to use a shield and the bow at the same time).

Share this post


Link to post
Share on other sites

That's not how you do it IRL.

First you aim, then you fire.

 

Very true. Sometimes it's best for a game to emulate RL, and sometimes it's best to optimize for the sake of ease-of-use. IMHO I think this is a case where the UI should take precedence.

 

Besides, it's been repeatedly pointed out that EL does not make a strong attempt to be accurate to RL in all things. You do have wiggle room to adjust as will be best for the game.

Share this post


Link to post
Share on other sites

This is not about the UI, it is about that you can't, in 250 MS, to turn around 180 degrees, load the bow and fire the arrow to the destination.

Share this post


Link to post
Share on other sites
You have to have 2 objects equiped: a Bow(weapon position), and a Quiver of arrows(shield position).
A quiver at shield position (right hand)?

How would you be able to expand the bow and aim on a target, the quiver and the arrows in it will slap you right into your face.

Whats about a quiver on your back, where it should to be? Technically impossible? (if yes, i would shut up right now).

I guess that what Roja was trying to say was that INSTEAD of a shield (so you wont be able to use a shield and the bow at the same time).

The bow instead of the shield indeed. So shouldn't that be:

- bow at shield position (left)

- arrow at weapon position (right) (or nothing until you grab an arrow for aiming)

?

That's how I (right-handed) did it. :P

 

You should even be able to fight with a sword (right) while wielding the bow (left); the bow gives negative defense though, and is subject to breaking fast in hand-to-hand combat...

 

Verrry excitink developments!

 

 

Oh and don't mind the smileys.. :icon13::devlish: .. they're both left-handed. :)

Share this post


Link to post
Share on other sites

A quick note about the animation of the arrow heading to the target.

 

I did some calculations on longbow arrow velocities when the server-side implementation was being discussed here and it showed that the time taken for an arrow to hit a target at the maximum range (for this game) should be about 0.15 seconds. If there is to be an animation of the arrow heading from the source to the target (in addition to the animation of the bow on the player) then realistically it should only be present for a handful of frames and resemble a fairly indiscrete blur.

 

Calculation Detail:

Speed of arrow			   = 60m/s  (ish)
Time for arrow to travel 1m  = 1 / 60 = ~0.0166 seconds
Maximum Range of arrow	   = 9 meters
Time to target			   = 9 * 0.0166
						 = 0.15 seconds

Human perception rate		= 25 fps (frames per second)
Time for single frame		= 1 / 25 = 0.04 seconds

# Frames for distance covered by arrow =  0.15 / 0.04 = 3.75 frames

Share this post


Link to post
Share on other sites

I think that the "muzzle velocity" of arrow is slightly higher than 60 m/s.

On this site: http://www.martinarchery.com/faq/facts.php it says it's about 270 fps which is about 80 m/s.

 

So it would be like more around the 100 ms mark.

 

It may well be higher as there seem to be a lot of factors that need to be taken into account. I found quite a few conflicting sources when I was looking last time. The site I chose gives a pretty good account of the physics involved in medieval archery which is why I used it. It just happened to put it closer to 60m/s.

 

To be honest though, choosing 60 or 80m/s is pretty mute when you looking at the result over the nine meters or so we are talking about. I was merely showing the numbers so that whoever comes to do the animation doesn’t attempt to render the arrow in detail at every step of the path.

 

Incidentally, the site you chose is talking about a modern (circa 1960's) compound bow which is an entirely different beast to the medieval long bow.

Share this post


Link to post
Share on other sites

I think that the "muzzle velocity" of arrow is slightly higher than 60 m/s.

On this site: http://www.martinarchery.com/faq/facts.php it says it's about 270 fps which is about 80 m/s.

 

So it would be like more around the 100 ms mark.

 

It may well be higher as there seem to be a lot of factors that need to be taken into account. I found quite a few conflicting sources when I was looking last time. The site I chose gives a pretty good account of the physics involved in medieval archery which is why I used it. It just happened to put it closer to 60m/s.

 

To be honest though, choosing 60 or 80m/s is pretty mute when you looking at the result over the nine meters or so we are talking about. I was merely showing the numbers so that whoever comes to do the animation doesn’t attempt to render the arrow in detail at every step of the path.

 

Incidentally, the site you chose is talking about a modern (circa 1960's) compound bow which is an entirely different beast to the medieval long bow.

 

In case it makes any difference for folks, from someone who builds bows.....and measures FPS to help determine design efficiency...a reasonably efficiently built selfbow estimate is actually near enough: bow weight +100 fps, so a 50 pound longbow should come in around 150 fps. Medieval 100 lb longbows around 200 fps and so forth. recurves are more complicated.....

 

(edit: sp)

Edited by Tigs

Share this post


Link to post
Share on other sites

instead of showing an arrow 'object' hurling through the air, maybe it would be more practical (due to the insignificantly short time the arrow would be in the air, plus problems with matching arrow height [on actor and 'airbourne' arrows]) to have some kind of 'Matrix' esque effect..showing some kind of air disturbance where the arrow has flown...just an idea. perhaps the vapour trails could linger and dissipate...not what happens in RL...but hell there aint no dragons or leprechauns neither.

Share this post


Link to post
Share on other sites

Yes, that is a possibility. The arrow won't really be very visibile anyway.

Then maybe we can have a new perk: "When you will be ready you won't have to", which allows you to stop the arrows :P

Share this post


Link to post
Share on other sites

Yes, that is a possibility. The arrow won't really be very visibile anyway.

Then maybe we can have a new perk: "When you will be ready you won't have to", which allows you to stop the arrows :P

 

i tihnk that would fit in quite aptly next to 'There is no fork'. :P

Share this post


Link to post
Share on other sites

How about if u click the "eye" button and click on some 1 you turn and face them. then u can click the attack command and fire at will. 1 question. Will there have to be a batch of arrows in your inventory or will you just keep firing until its dead or kills u or you chose to run?

Share this post


Link to post
Share on other sites

Ok I was just making sure because if you didnt then it wouldnt make sense. Now another question. How will exp be determined and will the arrows me makable? and under what skills will the experience come?

Share this post


Link to post
Share on other sites

instead of showing an arrow 'object' hurling through the air, maybe it would be more practical (due to the insignificantly short time the arrow would be in the air, plus problems with matching arrow height [on actor and 'airbourne' arrows]) to have some kind of 'Matrix' esque effect..showing some kind of air disturbance where the arrow has flown...just an idea. perhaps the vapour trails could linger and dissipate...not what happens in RL...but hell there aint no dragons or leprechauns neither.

 

I think this is an excellent idea, some form of disturbance rather than an arrow, this means you won't need to alter it if you introduce other missile weapons...

 

Crossbows, the different type of arrows - I imagine Steel, Bronze, Titanium, Iron and maybe plain wood and possibly other missle types (slings + stones perhaps :P bolt guns, throwable javelins, the ability to throw a single stone...) exciting times ahead!!

 

:P

Edited by neildog

Share this post


Link to post
Share on other sites

Entropy, you mentioned that they should be forced to aim. Good idea.

If they want to fire without aiming, they should get a -30% to hit.

Just like shooting a gun or throwing a basketball, it helps to pay attention to where you shoot.

The delay length between their clicks could be counted as aiming time. The longer they aim (up to a point), the better the shot should be. If they aim for half that amount of time, it could be a -15% to hit.

Share this post


Link to post
Share on other sites

Yes, aiming is neccesary for technical reasons and also for game ballance. If you could shoot a bow at a [semi]automatic rate, then the bows would be too powerful (and look stupid).

 

Oh, and one more thing: When you aim, you will automatically turn to face the target. You will have to fire while you are still facing the target, or else you will need to aim again (makes sense, no?).

Share this post


Link to post
Share on other sites

I was thinking mybe the arrow could be a slow projectile which homes in on a target which wen it hits it sort of makes a explosion animation like wind being pushed out and the arrows falling to the ground as bag at their feet which also becomes their death bag or they could dissapear and wen u kill it they r in the death bag, it could be very useful for things like wood sprites and giants as u dont have to have the arrows shooting directly at them due to their difference in height.

Edited by Sinohie

Share this post


Link to post
Share on other sites

Yes, aiming is neccesary for technical reasons and also for game ballance. If you could shoot a bow at a [semi]automatic rate, then the bows would be too powerful (and look stupid).

 

Oh, and one more thing: When you aim, you will automatically turn to face the target. You will have to fire while you are still facing the target, or else you will need to aim again (makes sense, no?).

 

I don't thinki you'll find it necessary for game balance to require a target click plus a fire click on the target. It's hard enough to click once on a moving target to initiate melee - it's really unlikely you'll be able to keep any target on-screen long enough to click on it twice. IMO it should be the character doing the aim/fire sequence not the player. I have no problem with watching the character nocking an arrow, turning to face the intended target, drawing the bow and taking aim - these things will all take time and the character may lose sight of the target during this process and fail to release the arrow. I'd rather see 5-10 second cooldown between shots than having to click twice on the target.

 

Alternatively I guess we could get a message box: "Target acquired. [shoot][Abort]" - that way the second click wouldn't have to be on the targetted actor. The actor's movement might cause your aim to be lost and the shot not fired.

 

I imagine that once an AI is hit by an arrow it will either attempt to engage the shooter in melee or will attempt to flee, right?

Share this post


Link to post
Share on other sites

Have you ever played, say... Tie Fighter, or X-Wing?

If you fire missiles, you need to home on the target for like 5 seconds before the target is aquired.

I actually liked that system, since it gave you time to evade a missile lock, and required some skill.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×