Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411491 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 03:26:40 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperArt (Moderator: JWK5)2D platformer with perspective tileset - worth it?
Pages: [1]
Print
Author Topic: 2D platformer with perspective tileset - worth it?  (Read 3567 times)
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« on: July 29, 2017, 03:01:23 AM »

I'm working on a prince of persia/flashback style of platformer and I'm having a hard time deciding on whether it's worth making the tileset with perspective, like the original PoP did.

Just plain grid with sprites like Mario is the easiest but might look too flat for the look I'm going for. It's good for readability, useful for games that are 'off the grid', like regular platformers. But on the grid games can afford to look less clear because movement is standardized. There is never any doubt you can make a jump when you can simply count how many cells there are between here and there.

I think the Flashback solution is nice. The camera is oriented in a way the horizontal surfaces are hidden and the vertical surfaces have an angle. To achieve that I need to break the sprites into background and foreground types, which is not too painful. In the image below you can see how the right corners of platforms are entirely on a different layer.


(images taken from Flashback Case Study)

However, the prettiest solution would be the pseudo 3d look of prince of persia. Even the horizontal surfaces are at an angle. I quite like that visual! But it means some tiles have to be broken into background and foreground parts. I can't think of a painless way of achieving that. Either some clever code separates the sprite (clever code is usually painful) or dumb code and I have to make the tiles in layers (also painful).

Come to think of it. I don't see many modern pixel art games adopting this kind of tileset that requires careful occlusion very often. I guess it's easier to avoid it.

Anyway, if anyone has any thoughts to offer I'd appreciate it Smiley
Logged

Polly
Level 6
*



View Profile
« Reply #1 on: July 29, 2017, 08:12:28 AM »

But it means some tiles have to be broken into background and foreground parts.

Here's how it's done in Prince of Persia ..



Each cell can basically consist of 5 elements ( background + wall + floor + object + foreground ) with the render order going from left to right per row, and bottom to top between rows. Alternatively you can use a skewed projection / shader to "host" your tiles and rely on the z-buffer. Here's a quick demonstration ..

Orthographic:


Perspective ( behind-the-scenes ):
« Last Edit: July 29, 2017, 08:54:58 AM by Polly » Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #2 on: July 29, 2017, 09:27:59 AM »

 Shocked that's really clever! No clever code required and I don't have to break the sprite into parts.

« Last Edit: July 29, 2017, 12:34:47 PM by diegzumillo » Logged

Papich
Level 0
**



View Profile
« Reply #3 on: August 04, 2017, 06:41:31 AM »

Hi,

I'm making a 2D platformer too and i chosed the flashback's kind of perspective.
Here's the tileset of a level i built in the early process:





A few indie games chosed this kind of perspective, i think it's a good compromise and it increases the readability of your level.
If you have any question, please ask.

Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #4 on: August 04, 2017, 03:39:24 PM »

Yep! I'm also on team flashback. Tried playing around with 3d models for perspective and decided it was not worth the extra trouble. This way we get a little flare of perspective and all it needs is for one corner to be on the foreground.

my mockup:


A bit off-topic but since you're here I might as well ask. What are you making this in? I just gave up on unity for 2D games. After many years using it exclusively I finally got tired of fighting it to make 2D games and I'm looking for a simpler workflow. Looking into Godot right now.
Logged

Papich
Level 0
**



View Profile
« Reply #5 on: August 05, 2017, 12:27:48 AM »

I'm using Unreal Engine 4. If you got tired of unity, i guess it's not a better solution ^^
I never used Godot so i can't help you. I'm surprised because i heard a lot of good things about unity and 2D development. What are you struggling with?
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #6 on: August 15, 2017, 02:42:45 PM »

Hey there, my gmail account decided to throw everything TIG related in the spam box, so I just now saw this reply.

I'm a huge Unity fan! I never encountered anything that's impossible to achieve with it. But some things will be easier/harder. The easiest thing to do with unity would be a 3D game that relies on the physics engine. A 2D game with pixel art will require jumping through hoops to get it working. Unity doesn't have a native 2D renderer, so you work with textured quads and an ortographic camera, and it's more challenging than it looks to get everything to align properly and not deform your sprites. Then if you want to use the recommended animation tools in Unity because of the convenience of it, you'll realize it was meant for smooth animated 3D models and it will fight you. After making my animations I wanted to offset the sprite after the last frame, but this animation system doesn't see 'frames', it sees a continuous timeline with discrete sprite changes. That proved to be another challenge because I need precise control over the animation, to trigger an offset between the last frame of this animation and the first of the next.

Anyway, as I said, these are all things you can totally do with Unity, it's just not convenient. Hell, you can even make your own 'pseudo native' 2D renderer by directly putting pixels on a texture and rendering that on screen. I rather use the appropriate tool for the appropriate job though. Smiley
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic