Movement template

Posted By: 3run

Movement template - 03/31/15 13:27

I've been working on this movement template recently, and wanted to hear some feedbacks.

It currently supports:
Quote:
-crawling (C or CTRL to toggle)
-jumping (SPACE)
-ladder climbing
-different movement on slopes (slow down when moving up)
-handle movement on moving platforms (they are moving on path)
-different footstep sounds of surfaces (wood, metal, dirt, concrete)
-some oldschool camera bob effect
-state machine for each movement state (sub state machine for walking/climbing)

Here are some screens (for those who too lazy to give it a try):
Quote:


And here you can download the first version (no open source, sorry, it's for my own project):
Download link

Maybe you will find some bugs, or you may have some suggestions, I'll be glad to hear your opinion!

Best regards
Posted By: Kartoffel

Re: Movement template - 03/31/15 14:11

really nice but I'd leave the camera's roll at 0.. feels weird if the screen is rotating all the time.

Edit: another thing I noticed: when jumping on the moving platform you stop. in your example this doesn't make a huge difference but once you use faster platforms you will notice it very clearly.

uhm, may I ask 2 questions..
are you using a physix character controller, and do you have any advice on movement across stairs?
Posted By: Wjbender

Re: Movement template - 03/31/15 14:15

I like it , my first dislike was the camera rotation/tilt,pan not being smooth ,second dislike is the buttons for up / down need to swap depending on the tilt angle when on the ladders.

sorry I meant the direction and not the buttons
Posted By: 3run

Re: Movement template - 03/31/15 14:40

Originally Posted By: Kartoffel
really nice but I'd leave the camera's roll at 0.. feels weird if the screen is rotating all the time.
That's just a matter of taste I guess, but to be honest, after you said that I don't like it any more, so I'll probably remove it grin

Originally Posted By: Kartoffel
Edit: another thing I noticed: when jumping on the moving platform you stop. in your example this doesn't make a huge difference but once you use faster platforms you will notice it very clearly.
No, you actually don't stop at all, that's just landing 'slow down' mechanism.
When player lands (after jumping, or after flying downwards specific amount of time) he does three tings:
Quote:
- plays landing sound
- creates landing effect on camera
- makes player move slower (depending on the time you flew in the air)
The amount of 'slow down' factor probably needs to be tweaked, but try to jump down from the high, you'll notice this effect too. Plus particularly about those platforms, allowing player to jump on it from a high place is a type of things, that I would like to avoid when making a real game with this template.

Originally Posted By: Kartoffel
uhm, may I ask 2 questions..
are you using a physix character controller, and do you have any advice on movement across stairs?
No, I don't use physX CCT (I hate native one.. it's not suitable for advanced, good looking movement code in my opinion).
For movement on stairs, I would recommend to keep a little distance between player and the surface bellow, plus to increase MIN.Z, so the lower part of the bbox doesn't hit each step, but moves over it.



Originally Posted By: Wjbender
I like it , my first dislike was the camera rotation/tilt,pan not being smooth ,second dislike is the buttons for up / down need to swap depending on the tilt angle when on the ladders.

sorry I meant the direction and not the buttons
I've done that swap thing in the past, but it can't simply depend on the tilt angle. You'll have some strange situations, f.e. imagine player moving up on the ladder and he looks almost completely to the sky, then as he comes closer to the upper end of the ladder, he starts lower TILT angle (moving down), and cause player is higher than the end position of the ladder, at the end when he will look at the surface where he will walk on, TILT angle will be about -20 or -30 decrease, so that will make him move down.. You can tweak those numbers (degrees for swaping the keys), but to my taste it wasn't looking good enough.. Maybe I'll give it another shot laugh


Best regards!
Posted By: EpsiloN

Re: Movement template - 03/31/15 17:29

I'm currently building a Multiplayer movement system, which I will release for the newbies with a full explanation and tutorial. (Its for my own project, but will serve as a tut also).

If you like, we can combine the two and release a template for shooters.

Its currently for Top-Down and without prediction, but I will make several versions with 3-rd (Z) Axis movement, camera tilt and crude prediction, so people will have a (hopefully simple) base to build on top of.

After that its just a matter of send_skill and on_client for all other features that a game has laugh
Posted By: 3run

Re: Movement template - 03/31/15 17:33

Originally Posted By: EpsiloN

If you like, we can combine the two and release a template for shooters.
That's a great offer, EpsiloN! laugh I'll PM you.

Greets!
Posted By: Superku

Re: Movement template - 03/31/15 18:17

I like it a lot! Probably the best 1st person movement code I've seen in acknex thus far. The ladder feels pretty smooth and natural now, as well as all the other modes.

Now you only have to find a game surrounding it. wink
Posted By: 3run

Re: Movement template - 03/31/15 18:19

Originally Posted By: Superku
I like it a lot! Probably the best 1st person movement code I've seen in acknex thus far. The ladder feels pretty smooth and natural now, as well as all the other modes.

Now you only have to find a game surrounding it. wink
Thank you very much, Superku! laugh I'm really happy to hear that you like it!

Best regards!
Posted By: Iglarion

Re: Movement template - 03/31/15 19:08

Originally Posted By: Superku
I like it a lot! Probably the best 1st person movement code I've seen in acknex thus far.
I just wanted to say this. Smooth, fluid,... simply, simply, perfect! Great work 3run - really, nothing more to add.
Posted By: 3run

Re: Movement template - 03/31/15 19:19

Originally Posted By: Iglarion
Originally Posted By: Superku
I like it a lot! Probably the best 1st person movement code I've seen in acknex thus far.
I just wanted to say this. Smooth, fluid,... simply, simply, perfect! Great work 3run - really, nothing more to add.
Guys, I'm really happy to hear this! Thank you so much for your kind words!


My best regards for all of you! laugh
Posted By: alibaba

Re: Movement template - 03/31/15 21:43

Really some smooth movement system you got there laugh
But I need to point out one thing:
Quote:
different movement on slopes (slow down when moving up)

It also slows down when moving slopes down. Is this intended?
Posted By: 3run

Re: Movement template - 03/31/15 21:55

Originally Posted By: alibaba
Really some smooth movement system you got there laugh
But I need to point out one thing:
Quote:
different movement on slopes (slow down when moving up)

It also slows down when moving slopes down. Is this intended?
Yes laugh It's faster than moving up, but still slower than moving on flat surface. It maybe needs to be tweaked to make it a bit faster, or maybe even doesn't needs to be there, those things are going to be adjusted under particular project. Player can walk up and down on slopes without any affect on the movement speed (as if he was walking on a flat surface), but I just wanted to play around with this demo. Thank you for your feedback man, I appreciate it! laugh

Best regards!
Posted By: DLively

Re: Movement template - 04/01/15 02:30

Very Good work 3run laugh I like the sounds at the beginning. when you jump it sounds like you're squishing bugs ^_^ Very smooth gameplay.
I am in love with your ladders and am very much inspired laugh Keep up the good work!

Edit: only thing I would complain about is the mouse_sensetivity. I feel its a bit low, and i have to drag my mouse across my living room XD
Posted By: 3run

Re: Movement template - 04/01/15 08:07

Originally Posted By: DLively
Very Good work 3run laugh I like the sounds at the beginning. when you jump it sounds like you're squishing bugs ^_^ Very smooth gameplay.
I am in love with your ladders and am very much inspired laugh Keep up the good work!

Edit: only thing I would complain about is the mouse_sensetivity. I feel its a bit low, and i have to drag my mouse across my living room XD
Haha, nice to hear that you like sounds tongue About the mouse sensitivity, it's of cause adjustable, but only from script for now tongue

Best regards!

Edit: about EpsiloN's offer to use this movement code for multiplayer tutorial, I have to say that it's not going to happen right now (maybe in future, who knows), cause I'll keep the source code private while working on my current project for a client (it's too complex and not user friendly to be used in tutorial anyway), but I'll help him out to create a good movement for those tutorials hopefully! For those who like the movement, it's just very advanced version of my older contribution Fake AABB, so check it out, it's more user friendly and will help you to start! laugh

Edit2: btw, Kartoffel check that Fake AABB out, you'll see pretty good and basic example of gravity code, which handles movement on stairs, slopes and jumping.
Posted By: DLively

Re: Movement template - 04/01/15 15:37

Also If anyone is interested in this movement type, I had starting an online tutorial series that involves it.

https://www.youtube.com/playlist?list=PLr0pTKloXmUFp93qrYsA8PClcI_gRwFcf
Posted By: JibbSmart

Re: Movement template - 04/02/15 01:44

Great work, 3run! Feels really good. As others have said, the ladder stuff is particularly slick. I often feel it's a battle to be sure I'm gonna go down a ladder rather than fall off the edge in other games, but everything felt really solid here laugh
Posted By: 3run

Re: Movement template - 04/02/15 08:03

JibbSmart@ thank you! laugh my main goal wasn't making solid ladder code (it's actually the one we've made with Progger back it 2010, it's available on Free Resources) grin but avoiding those 'problems' I was always facing while using OBB ellipsoid for movement, mainly related to stepping on too high steps, I wanted to be able to adjust the step offset, so player don't just walk on something that's almost equals to half of his own size, or don't allow player to jump on something higher than his own size, without placing invisible models all over the place. And at the same time I wanted to be able to walk on stairs without any problems. I'm was just too tired of having workarounds for almost everything in order to get basic movement. I'm pretty happy with the results so far, but it could be much better if jcl just listened to us and added different shapes for OBB.. at least capsule smirk

Best regards!
© 2024 lite-C Forums