🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Concept for player movement and controll [2.5D game]

Started by
7 comments, last by Aelexe 6 years, 4 months ago

 

I'm working on a small concept for a game and have a question about a concept I want to try out.

So its top down (2.5D pokemon perspective I think they call it), I want the user to be able to walk with W,A,S,D and aim to the cursor. With a 100% top down perspective this would be easy and  I could simply rotate the sprite to the mouse location. But with 2.5 it's a little harder since the sprite has a body that has different from each side.

Another problem is the movement of the legs. When a player moves down he could either be walking backwards (when the mouse is above him), sideways when the mouse is to the left or right of the player. or forward when the mouse is below him.

I added a simple gif down below that demonstrates the concept (without the leg movement) because that's gonna take some work

Now my question. are there any games out there with the same mechanics. I know there are a lot 3D games that do this (battlerite for instance) but I cant find any 2d game. And do you guys see this work?

 

Greetings,

Merijn

 

ding.gif

Advertisement

Landstalker:

 

Ys:

 

CrossCode

 

Landstalker and ys Both use different methods where the player is Just facing the way they move. 

 

Crosscode is a bit closer but still different. I havent watched the whole video but from what I saw they fixed the issue where you need a shitload of different walking animations by locking the player on a possition and only then the player faces the mouse. So thanks for the effort but not really what I ment!

 

That video for CrossCode was an early demo and doesn't get into other situations.  Though I haven't paid much attention to how they implement their animation blend trees.

Most 2D games of the 3/4ths view type usually create animations for 8 directions (4 really, and then mirror them).  You can generate more if you'd like, but end up with a lot of animations; which seems to be what you're trying to avoid.  Some games go about it by pre-rendering a 3D model into a 2D sprite.  A single animation rendered as many different views (or half of the different views as you can usually mirror).

There may be some methods of scaling the sprite to fake the angles in between the 8 cardinal directions, but that's as far as I can guess you can reduce animations.

If the tricks to get the different views aren't enough, have you considered moving to 3D instead?

Apologies if I'm misinterpreting what you're trying to do.

 

 

No problem for the misinterpertation. My fault I cant explain the problem clearly!

But ill give it another shot ;).

So the problem is not with the animation 8 directions. See it this way: In most games with the perspective I want to try out. Players can move 8 directions (up left down right and 4 directions in between those 4) The directions a player is walking is also the direction a player is facing. So if the player pushes left and up. The player will move that way and the up-left.png animation sprite will be rendered.

 

What I want to achive is different: I dont want to face the player the way he is walking but I want the player to face the mouse instead. So if the player is walking to the left and the mouse cursor is above him. His body will face up (the direction of the mouse, so you would see the back of the player) But his legs will go sideways. Now obviously You cant just let the legs do the leftside run animation because that would look like his body is facing upwards and his legs are rotated 90 degrees to the left running to the left. So for this position there would need to be a leg animation where they would face upwards (like te body towards the mouse so you would also see the back of the legs) and sidestepping to the left. Now when the mouse would also rotate to the players left the player would just run to the left with his body turned left and his legs so that would be a different leg animation.

Now as you can see there is probably a reason not many 2d games use this method because it is a bit of a hassle to create all those diffrent leg position animations. And this is probably the reason 3d games use it more often since its easier to animate those legs. 

But I wanna try to stick to the concept and see if I can figure something out!

Hope this makes is somewhat more clear!

EDIT: so my question if there are any other games doing this is purely to see some examples and could save me time making all those animations when it might not really work

17 hours ago, merijndk said:

EDIT: so my question if there are any other games doing this is purely to see some examples and could save me time making all those animations when it might not really work

No, there is no game that I know.

The problem is that you would need 360 sprites just for turning. Then if like you said the body and leg can each turn so if you just cut them in half you get 360*2 = 720 sprites.

Now lets say your character has a walk animations, that is 4 sprites every step. 720*4 = 2880. Also add a simple attack animation of 12-16 sprites = 360(Upper body only)* 12 = 4320. That means for the most simple game you can make you will need 7200 sprites per character. Player + Enemy = 14400.

Imagine drawing 14400 sprites for only two characters; so they can walk and attack.

 

Normally I would say look into 2D bone animation, but it won't help here.

 

You need to do it from top down, flat so that you can turn the character by rotating the sprite; or move to 3D. There are lots of tricks to make 3D look 2D.

Project Zomboid uses 2D and 3D for there characters. 3D when near 2D when far. You could do something like this.

On 2/15/2018 at 4:31 PM, merijndk said:

I dont want to face the player the way he is walking but I want the player to face the mouse instead.

It's still 8 directions, is it not? Going for more than 8 directions is asking for trouble. 

-- Tom Sloper -- sloperama.com

I think Enter the Gungeon has a similar perspective to what you are suggesting. The art style is very minimalist in some regards though, so the distinction between animations is hard to make out.

This topic is closed to new replies.

Advertisement