Jump to content

Working on prone sniping in singleplayer JKA


Recommended Posts

Posted

I'm currently working on a "Sniper mode" for the disruptor .

 

http://imageshack.us/photo/my-images/42/0mgt.jpg/

 

I'm having some troubles with the coding part ,but here is what i have so far.

 

http://www.youtube.com/watch?v=jR8JxAfLjmw&feature=youtu.be 

 

The animation took me 14 hours to get right LOL.

 

If any coders have done this before and can give me some tips ,please pm me 

 

any help/advice or tips from any animators or coders would be appreciated.

Posted

This is in the wrong section. If you're asking for coding help, you should be posting in the Coding & Scripts section.

 

That animation looks pretty cool though. I'm really digging the way you animated that.

As far as prone is concerned, unfortunately it isn't going to be so easy due to the way bounding boxes work. Essentially, bounding boxes cannot physically rotate. This is a problem with prone because when in a diagonal position, it makes the bounding box incorrect in all kinds of ways.

@@Scooper suggested making a bmodel and using that as the player's bounding box, and then in turn rotating the bmodel, which can be done, albeit it requires engine modifications to work properly.

Posted

This is in the wrong section. If you're asking for coding help, you should be posting in the Coding & Scripts section.

 

That animation looks pretty cool though. I'm really digging the way you animated that.

As far as prone is concerned, unfortunately it isn't going to be so easy due to the way bounding boxes work. Essentially, bounding boxes cannot physically rotate. This is a problem with prone because when in a diagonal position, it makes the bounding box incorrect in all kinds of ways.

@@Scooper suggested making a bmodel and using that as the player's bounding box, and then in turn rotating the bmodel, which can be done, albeit it requires engine modifications to work properly.

 

Its more of a W.I.P  with code and animation difficulties as opposed to a code question alone.But feel free to move it to a different location in the forums if its more appropriate.

 

As for a bmodel ,my first response is damm these ideas always seem simple when im dreaming them up.

 

Im currently working on getting up from prone animations.but there still all really crap as for a firing and idle animation im just going to take 1 or 2 frames from the last 2 ,throw them in dragon and make a wobble/recoil so it looks like hes shooting.

 

Still along way to go.

 

These bigger tasks normally take me a few weeks to finish, animations 2/3 weeks,  coding can take ages (depending on what walls i hit)..

 

If anyone,s interested ill post report when i have something worthy. 

Posted

Reminds me of when i tried to implement prone sniping in Halo CE lol.  Had a lot of fun making animations for that but i wasn't a coder so i didn't know how to make it work in game xD  Well it did work in game but it needed key binds and such.

Posted

Heck yeah that's a good animation! Which program? I know you said Dragon for the recoil, but did you use it for this too?

 

 

Hi Katanamaru, You probably don't remember this but about 4 years ago i sent you a pm (on another forum) asking you for advice about using dragon to make singleplayer blocking animations without changing code.

You gave me invaluable information , pointed me to tutorials and other forums where i could get started with Dragon.

 

 Now 4 years later i can comfortably create new animations and implement them into the GLA using GLAMerge.

 

Every new animation ive done in EoCIII was made in Dragon and i can say "Thanks to you".

 

Ok OK i know its not as good as your stuff but i consider myself competent and confident enough to take on this task

 

I use Dragon for all my animations . I find it slow and laborious but precise and simple to use...... 

katanamaru, Circa and Futuza like this
Posted

I do remember that post! About having to make block and walking animations. That really racked my brain.

 

I've done ok with animations mainly because I use base animations and edit them to what I want. Brand new animations still throw me for a loop. So in this case I can say:

"The learner has become the master."

 

This is a great example of helping others and making the community grow.

Posted

That looks awesome man!

 

I won't move the topic if you show progress over time.

 

Thanks.

Feel free to move the post to the appropriate place is it is more suited, My bad for posting here, sorry.

 

But i digress ..

 

So ive made 2 button slots , 1 for getting down and 1 for getting up ( cant think of a simpler way ...yet) i just want to get the animations working in game for now.

for standing up i basically reversed the animations 

 

http://www.youtube.com/watch?v=JwnIKbYnLOs&feature=youtu.be

 

so i need to do a firing position next 

 

my first attempt for the idle and firing went wrong (see bad coding example)

 

http://imageshack.us/photo/my-images/708/qejd.jpg/

 

but im getting there now 

 

http://imageshack.us/photo/my-images/28/e0ht.jpg/

 

now its time to get my head into some code. DOH

 

 

 

Here is the results so far

 

 http://www.youtube.com/watch?v=8_nf-_2V1FE&feature=youtu.be

katanamaru and Circa like this
Posted

Very cool! @@eezstreet what about flattening and expanding the bounding box horizontally in a smooth way? If it can be changed on the fly (I dunno - could it?) then you wouldn't need to rotate it.

Posted

You still have to rotate it, because think about it. If you flatten the bounding box, you would have to account for when the player is facing a diagonal, and a simple flattened bounding box isn't going to cover things correctly and result in lots of collision issues.

Posted

I'm getting the warm fuzzies from this thread. What a strange feeling, that.

This thread has inspired me to work on JKG code more.  I love this thread.

 

 

 

You still have to rotate it, because think about it. If you flatten the bounding box, you would have to account for when the player is facing a diagonal, and a simple flattened bounding box isn't going to cover things correctly and result in lots of collision issues.

So just curious as to why bounding boxes do not rotate?  Seems like it would be an immensely useful thing to have aligning the top of the bounding box with the players head and all.

JKG Developer

Posted

Hmmm okay.  So what if we changed it to only use rotation in specific circumstances?  Like when going prone, doing a flip, being held upside down, etc...?  Obviously engine changes would be necessary, but it would keep the cost down, since circumstances like that don't happen too often, right?

JKG Developer

Posted

@@Scooper suggested making a bmodel and using that as the player's bounding box, and then in turn rotating the bmodel, which can be done, albeit it requires engine modifications to work properly.

I didn't suggest that, at least not how you're explaining it. Don't pull fake facts out of thin air =p

I explained how the Axis Aligned Bounding Boxes are actually used for collision in the engine; as a 6 sides brush model that gets reshaped to fit whatever bounding box settings you use. And when performing collision on this type, it disables rotation. So the way to do it isn't replacing it with a bmodel, it's enabling rotation for the bounding box bmodel that is already being used when the collision test is on a proning player.

 

Programming steps:

1) Reshape the bounding box to fit an axis aligned person proning

2) When the collision system checks the player collision, make it apply the rotation portions of the code if the player is currently proning.

3) ...

4) profit

Posted

I would just use oriented bounding boxes for prone. The collision code already checks for when the bounding box is rotated but falls back immediately to using axis aligned boxes (at least I think this was the case). If you replaced this with the appropriate code then there's no reason why you can't use rotated bounding boxes for collision :)

Posted

So ive done some fiddling in the code ,looked at a few examples of bbox structure ,made some changes  etc.

At the moment im concentrating on the disruptor (sniper) only. If i can get this working ok ill do prone for the other long barrel weapons.

This is defiantly a W.I.P. I need to do some more animations work for the weaponready and i still need to do more (better) code work.

This is just a rough sketch

 

 http://www.youtube.com/watch?v=x26auYiGjRY&feature=youtu.be

Futuza likes this

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
×
×
  • Create New...