An inverted Collision boxes (for 2.5D like stages)

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
D0NM
Party member
Posts: 201
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

An inverted Collision boxes (for 2.5D like stages)

Post by D0NM » Fri Nov 09, 2018 7:39 pm

Hey everyone!
We make an open source game and we use Tiled as the stage editor.
It is used to set up sprites and collision polygons.
Now, I think that the approach when you have an unlimited walking area with obstacles is a complex thing to do in Tiled.
e.g. you should add more and more shapes to strict your units movements and keep the on the road.

Some pic of the Castle Crashers where they use polygons for both obstacles and walkable areas.
Image


My idea is to leave only walkable areas polygons. All the rest space is an obstacle.
(Ofc, I want to keep some platforms and slanted places in the game, too)

I need your ideas and help on how to make it more easy with existing collisions libraries: HC, Bullet...
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Follow @Zabuyaki.
Twitter @FaMeSoft / GP32 Free Platformer: SUPER PLUSHA
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:

User avatar
pgimeno
Party member
Posts: 1343
Joined: Sun Oct 18, 2015 2:58 pm

Re: An inverted Collision boxes (for 2.5D like stages)

Post by pgimeno » Wed Nov 14, 2018 2:49 pm

D0NM wrote:
Fri Nov 09, 2018 7:39 pm
My idea is to leave only walkable areas polygons. All the rest space is an obstacle.
I can see why they have polygons for obstacles too. If you have, say, a column in the middle of a rectangular walkable area, in order to turn that column into an obstacle you have to subdivide the walkable area into at least four parts, in order to leave an unwalkable hole where the column is, while from a map designer perspective, it's easier to add a rectangular obstacle where the column is.
D0NM wrote:
Fri Nov 09, 2018 7:39 pm
I need your ideas and help on how to make it more easy with existing collisions libraries: HC, Bullet...
Bullet? Do you mean Box2D?

I'd say Box2D doesn't adapt very well to 2.5D. You could perhaps create it as a top world view, without gravity, and make the slopes sensors, applying forces to the objects that pass through them depending on the angle.
Thrust II Reloaded - GifLoad for Löve - GSpöt GUI - My NotABug.org repositories - portland (mobile orientation)
The MS-Github repositories I had have been closed after the acquisition announcement and will be removed in the near future.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests