• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0

Implementing a 2D Side Scrolling Perspective like in Golden Axe/Streets of Rage?

2 posts in this topic

Just been thinking about this today... how does implementing a perspective for a side scroller like in Golden Axe or Streets of Rage or Final Fight etc. differ from normal 2D side scrolling?

The difference being that there's a sense of depth by allowing the player to walk up the screen and therefore backwards into the scene up to a certain point rather than being viewed entirely side-on.

At first it seems a mostly relatively trivial difference... just allow movement along the y axis to a point etc. etc. but there are some aspects that might be troublesome and I wanted to see what people think on this kind of game...

My main questions are:
1. How should the ground/terrain be defined?
In a normal side-scroller you'd probably have a grid of regular square tiles that are sufficient for whatever you'd likely want to do. A top-down game would be the same, but here it's not immediately as obvious, unless I'm overcomplicating.
The view is almost similar to isometric games and, rightly or wrongly, that immediately makes me think of thinner rectangles rather than squares, as though top-down squares were seen from a sidewards angle and appeared squashed vertically. Given the usually lower amount of screen space to work with as opposed to a top-down view, and the fact that the skewing of the view means that a smaller amount of screen space and fewer pixels are effectively representing more terrain than the same amounts in a a top-down view, I'm inclined to think my assumption about rectangles is probably correct.

Also, given the perspective, should the edges of the tiles form a grid aligned with the screen (as in top down games) or be skewed into a diamond shape with diagonal left and right sides? The cliff edge in the following diagram can be followed quite closely by the player, suggesting either diagonal edges or some kind of trickery with rectangular tiles to give that impression.

2. What about jumping onto higher terrain in this system?
Maybe it's easier than I first might assume, but I'm having trouble fully grasping it.
I've made a diagram to make this easier:

The rectangles represent where I think tiles might possibly lie. If the player wants to jump from the lower level onto tiles A or B, then he must begin jumping from a tile at the screen height of tile 1. The tiles marked X are impassable, whereas a player jumping from 2 and 3 should never be able to land on A or B, even if their character can jump as high as tiles A and B.

I'm assuming a few variables are probably at work here. Such as:
- The player's current screen position.
- Possibly whether or not a character is jumping.
- The position the player was at before jumping.

Now, while that might seem to solve it... on closer inspection it's still not clear.
A and B are "aligned" with 1 horizontally. If this was in 3D and you were standing on 1 facing the cliff, you'd be standing just underneath A. But A could have just as easily been higher on the screen but still aligned with 1 in that way. Or it could have been lower.
How then 2 and 3 be tiles that A and B can't be reached from, but 1 can reach?
Is there some formula at work that manages to work out that 1 in the game world is meant to be in line with A and B or is it much simpler than that?
Maybe there's some kind of height variable on tiles too?

I really can't quite figure those cliffs out...

Share this post

Link to post
Share on other sites
I haven't done anything like this before, but I would suggest adding a z component to your players and your tiles.
So, your player has an x (horizontal) y (vertical on the 2d plane), and z (height). You use x and y for just moving a player around with the joystick.

When a player is just walking on the lowest level (ie, not on the cliff), they are at z of 0. When they jump, you increase the Z value, which, for screen coordinates drawing purposes matches the screen's Y value.

Your tiles would also have a z component, where the "lowest" would have 0, and the cliffs might have a z of 60 (I just picked some number). Again, in screen coordinates, it'd match Y of 60. When a player tries to walk over that cliff, you could check he's feet's y coordinates against the tile, and if the tiles have a higher z, then thet cannot walk on it; however, if the player jumps towards the cliff, and you increase the z, you would check if z >= cliffs z (60), and if so, you stop him ther, and draw him on the cliff, with his feet's z of 60.

Just a thought on how I'd probably do it.


Share this post

Link to post
Share on other sites
Yeah, I suppose you'd need to keep track of z positions in some way for best results.

For the character, what about x and y for the ground tile position, then while on the ground, z is 0 but on jumping z gets gradually raised to the height of the jump and falls down again to 0 in line with the character's vertical movement? Whereas then each terrain tile would also want to have a z value (not sure how exactly that should be defined or assigned), and the character's z would always be [z of current tile] + [extra z from jumping up/falling off].

I think I might actually try and make at least some kind of prototype of this sort of engine, but probably at first without bothering with allowing jumps or multiple terrain levels. That could work fine for some kind of adventure maybe in the style of point and click.

Anyone else have any ideas or did this before? I wonder if anybody really makes games like that anymore. I probably haven't been paying attention but I can't remember seeing any recent Flash or indie games with this kind of terrain. Don't Look Back by Terry Cavanagh has the same kind of perspective, but you'd restricted to moving along a straight line.
I just think it might be an interesting way to make a sidescroller but allowing a bit more exploration and more characters etc. on the screen at once without having to put it a lot of jumping (which might not be appropriate to the feel of some themes).

Share this post

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
Sign in to follow this  
Followers 0