Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sprite/Tile YSort effect and Camera Movement
#2
Hi!
I've moved this question to "Game development topics" because its topic is more about gameplay implementation than tilengine specific.

What you're attempting is not the easiest of gameplay mechanics. Unlike pure 2D games (either sidescrolling or top-down), you're dealing with 3/4 perspective here, that's a form of pseudo-3D, or 2.5D. Here the Y axis combines both height and depth.

Usually you have to split your map in two layers:
  • A regular priority layer with elements that are behind player ("front" part of walls)
  • A high priority layer with elements that are in front of player ("back" part of walls).
You have to design your map in a way that the same tile can't be both in front and behind the player, all extruded elements must have a minimum height so spriteas can't overlap in both sides.

Perspective in Earthbound is even trickier, as the x axis is also affected with this front/back scheme depending on which side of an extruded object your player is (left is back, right is front).

In broad sense, Tilengine is a graphics engine, not a game engine, so it doesn't feature gameplay-domain abstractions such as actors, player/level collisions, and so. The same concept as 2D graphic chipsets, they didn't provide these features (they just provided graphic output), it was the game code that implemented them. However Tilengine provides necessary tools to build these features on top of it. Tile-based gameplay don't usually require external collision data, as the collision information is stored in the tile itself, either in its ID or in its "type" standard property. Tilengine can already load "object" layers from Tiled (introduced in release 2.5.0), albeit it only loads "Tile" objects because it's the type of entity that Tilengine uses to draw object layers. Consider if free-form collision objects are the right tool for you task.

As always, if you put code and assets, I can take a look at them Smile
Reply


Messages In This Thread
RE: Sprite/Tile YSort effect and Camera Movement - by megamarc - 05-07-2020, 02:25 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)