Jump to content

I want to make a sidescroller with a bit of depth so up and down, in and out of the screen (2d) I can easily do up and down with stairs or ladders and in with doorways on the wall I can see but I don't know how to do out. It feels really weird to even be able to go that way because you can't see it...

 

Here's a picture for reference to the going in direction http://prntscr.com/3jak5e

Link to comment
https://linustechtips.com/topic/152397-game-design-help/
Share on other sites

Link to post
Share on other sites

I want to make a sidescroller with a bit of depth so up and down, in and out of the screen (2d) I can easily do up and down with stairs or ladders and in with doorways on the wall I can see but I don't know how to do out. It feels really weird to even be able to go that way because you can't see it...

 

Here's a picture for reference to the going in direction http://prntscr.com/3jak5e

Since this is working with depth, why don't you just scale the sprite? (i.e. the farther away it is, the smaller it gets, but the xy position doesn't change).

[spoiler=My Current PC]AMD FX-8320 @ 4.2 Ghz | Xigmatek Dark Knight Night Hawk II | Gigabyte GA-990FXA-UD3 | 8GB Adata XPG V2 Silver 1600 Mhz RAM | Gigabyte 3X Windforce GTX 770 4GB @ 1.27 Ghz/7.25 Ghz | Rosewill Hive 550W Bronze PSU | Fractal Design Arc Midi R2 | Samsung Evo 250 GB SSD | Seagate Barracuda 1TB HDD | ASUS VS239H-P | Razer Deathadder 2013 Partlist

 

LTT Build-Off Thread: http://linustechtips.com/main/topic/35226-the-ltt-build-off-thread-no-building-required/

Link to comment
https://linustechtips.com/topic/152397-game-design-help/#findComment-2035623
Share on other sites

Link to post
Share on other sites

Since this is working with depth, why don't you just scale the sprite? (i.e. the farther away it is, the smaller it gets, but the xy position doesn't change).

This, or use doors that open, the player 'steps in' by moving 2 pixels up and back in z-order and then the doors close.

Link to comment
https://linustechtips.com/topic/152397-game-design-help/#findComment-2036319
Share on other sites

Link to post
Share on other sites

Similar concept to the others, but you make the walking away animation (similar to walking left and right, depending on the game you might only need a few frames).  You then play that animation and move the character up by y pixels (where y pixels is the distance from the "ground" to the dark portion of the door.  You do this over x time, and you shrink your character linearly. (So you find the starting point size, the ending point size...determined before hand, and then just scale as you get closer the the end point so your character looks like they are walking away).  If you set it over the x time, you can play around with the time to see which looks most natural for your walking animation (perhaps it plays 10 times before you reach the end point).  The last thing would be if you have a black shadowy area, slowly change your character to fade into the darkness...that way at the time you reach the end point you will no longer be visible anyways...you will appear to fade into the shadows.

0b10111010 10101101 11110000 00001101

Link to comment
https://linustechtips.com/topic/152397-game-design-help/#findComment-2039767
Share on other sites

Link to post
Share on other sites

Similar concept to the others, but you make the walking away animation (similar to walking left and right, depending on the game you might only need a few frames).  You then play that animation and move the character up by y pixels (where y pixels is the distance from the "ground" to the dark portion of the door.  You do this over x time, and you shrink your character linearly. (So you find the starting point size, the ending point size...determined before hand, and then just scale as you get closer the the end point so your character looks like they are walking away).  If you set it over the x time, you can play around with the time to see which looks most natural for your walking animation (perhaps it plays 10 times before you reach the end point).  The last thing would be if you have a black shadowy area, slowly change your character to fade into the darkness...that way at the time you reach the end point you will no longer be visible anyways...you will appear to fade into the shadows.

Thanks having the character shaded is a good idea. But what I was trying to say in the op was how to make a hallway that I move backwards into, so how would I get back to this area after going down that shadow hallway. The only thing I've seen so far in 2d games is a small indent in the floor that would indicate a path to be there. Here's my concept art I worked on since yesterday: 

Link to comment
https://linustechtips.com/topic/152397-game-design-help/#findComment-2040587
Share on other sites

Link to post
Share on other sites

Thanks having the character shaded is a good idea. But what I was trying to say in the op was how to make a hallway that I move backwards into, so how would I get back to this area after going down that shadow hallway. The only thing I've seen so far in 2d games is a small indent in the floor that would indicate a path to be there. Here's my concept art I worked on since yesterday: http://prntscr.com/3jjtbq

Yea, that is a good approach...it looks visually good anyways.  There are two other options that I have been in games before (sorry I don't have references on this, I just remember them).

 

Option 1:

Very similar to your solution, but instead of an indent you would make a very transparent door appear...that way it doesn't get in the way, but is still visible.

 

Option 2:

Make the door on the same side of the wall.  This isn't a good option, but I think by far this is the most popular one.  It doesn't cut into the field of view, and it means you can use the same animation function to handle going through the door.

 

If you can make the indent look as your mockup image though, I think that is a good solution

0b10111010 10101101 11110000 00001101

Link to comment
https://linustechtips.com/topic/152397-game-design-help/#findComment-2040989
Share on other sites

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

×