Jump to content

A little question about projectiles


Nexusgot
 Share

Recommended Posts

Hi guys, I'm studying the game cause I have the idea to help with something in the future if I can, and I have a couple of questions about projectiles.

The first question is: where is specified what kind of projectile the weapon, or the unit, will throw? I checked the various files in actors and templates and I didn't see anything like that.

The second question is: is it possible to adjust the starting angle of the projectiles? Cause I noticed that arrows go straight horizontal instead of having a nice flying trajectory.

Thanks and have a nice day :)

Link to comment
Share on other sites

I haven't look thoroughly, but quickly, I found this in the XML (for example, in binaries/data/mods/public/art/actors/units/athenians/cavalry_javelinist_a_r.xml):

<prop actor="props/units/weapons/jav_projectile.xml" attachpoint="projectile"/>

I'm guessing the game uses the prop at the "projectile" attachpoint to determine what to throw.

Link to comment
Share on other sites

Yes you are right thanks for answering :) I watched but I didn't noticed that string...

Ok for that, but anyone can tell me something about the trajectory?

I can't find now, but i'm sure I've seen a discussion some months ago about the trajectory. I guess they didn't implement yet, but the ideas were very solid. I'll try to find it later, my class is starting shortly.

Link to comment
Share on other sites

The trajectory of the projectile uses accurate physics (in a vacuum) based on the speed of the arrow. Check out source/simulation2/components/CCmpProjectileManager.cpp for details. Our units have unrealistically short max ranges which probably contributes to this effect. Maybe we should increase gravity. You can tweak that in public/simulation/components/Attack.js line 443.

Link to comment
Share on other sites

Hmm... That made me think... Are we going to implement real world physics?

Bullet sounds a nice open-source solution.

http://bulletphysics.org/wordpress/

There are no plans to implement full physics in the game. It is unlikely that we would want physics tied to the gameplay, there isn't much benefit compared to the performance cost of requiring it. If someone implements it as an optional graphical effect it would probably be ok, but this is really low priority.

Link to comment
Share on other sites

Well real world physics would be nice I think but maybe a lot of work for a minimum result, but anyway could be cool. My idea was only to fix the arrow trajectory cause I find the actual unrealistic. I'm not sure I can do it so if someone else is interested and has the ability, give it a try. I noticed that ballistas projectiles fly in the right way, and I think the same should be for arrows.

Link to comment
Share on other sites

Well real world physics would be nice I think but maybe a lot of work for a minimum result, but anyway could be cool. My idea was only to fix the arrow trajectory cause I find the actual unrealistic. I'm not sure I can do it so if someone else is interested and has the ability, give it a try. I noticed that ballistas projectiles fly in the right way, and I think the same should be for arrows.

As I said previously arrows use exactly the same physics as ballistas, it is simply the case that arrows fly fast and so take a flat trajectory. For aesthetic reasons it might be worth making this more fake by making gravity stronger which will make the arrows take a more curved path. Alternatively the arrow speed could be reduced.

Link to comment
Share on other sites

Well... Rag-dolls could really be nice to see, specially in sieges... And having real-world physics would make everything a little bit more real and accurate.

Just saying... maybe in a future, who knows? - We got spec and normal map which weren't even planned for alpha - I remember proposing it last year (I guess) at the staff forums.

Perhaps someone will join in and add it ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...