Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Converting a match 3 game into a platformer

Discussion in 'General Discussion' started by cobaltBlue, Apr 9, 2016.

  1. cobaltBlue

    cobaltBlue

    Joined:
    Oct 25, 2011
    Posts:
    39
    Hi,

    For the past few months I've started working on a project which was originally made to be a match 3 game. However to add a unique twist to it a platforming character was added to the game. If you want a rough idea of this check out super puzzle platformer that was made by adult swim.

    Currently we have a world of match 3 tiles that uses an array representation of a match 3 board to do its collision detection. The platforming character on the other hand uses a specialized character controller that uses raycasts for collision detection, obviously to make this work the tiles all have kinematic rigidbodies and colliders so that the character controller can detect their geometry with raycasting.

    So far this has been ok... However the design team has been proposing new elements in the game which are more platformer oriented and quite frankly doesn't really work well with the current collision detection that uses the board array.

    I personally feel that it would be alot cleaner to just move the whole project to just using unity's 2d physics however there are certain things that work better with a grid, stuff like finding colored matches, swapping tiles, tiles that fall diagonally all work better using a grid.

    The solution that i came up with was to let unity physics do its thing but still plot the position of that object on the board as it moved. And only when I needed to do something grid like i would swap over to kinematic movement based on the grid.

    Quite frankly I don't know if this will work and I would really appreciate if i could get a 2nd (hopefully expert) opinion on the matter.
     
  2. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    I'm not an expert on 2d physics or match 3. But from the way you describe this project, I can't help but think your design arm is going to keep adding new features that move further and further toward the platformer approach (it'll be more fun almost certainly, and is way more interesting to design).

    As they add more platformer centric features the more costly a hybrid approach will be and the more confusing the code base will become as you layer cludges and weird mixes and hacks on top of one another.
     
  3. cobaltBlue

    cobaltBlue

    Joined:
    Oct 25, 2011
    Posts:
    39
    Hi frosted,

    Well it's already happening.... One of the reasons I'm reluctant to do this is I'm not the original author of the code, I'm coming into this half way and there are already existing elements that just don't exist in the board at all... There are already a few things in the game that have been hacked around the board array structure simple because the current system doesn't support it.... This things simply don't exist inside the board at all... so for things that do live inside the board they're pretty much blind to it.... it's a mess right now....

    But the whole board structure is so tightly coupled to all the older board objects in the game that replacing the current board is going to affect alot of things... I've argued about making the game purely a platformer but the design side doesn't want to loose the match 3 game mechanics that exist in the game because its a unique feature....

    The way I see it is i have 2 options, one is do what i just mentioned in the earlier post by making everything a dynamic object that uses in game physics for collisions and use the grid for stuff that just needs a grid to work properly or the other route is basically building a partial physics solver into the current grid system and trying to make all the future dynamic objects in the game exist in the current system. It's kinda obvious which one is simpler...

    Either way the solution that i come up with is going to be a hybrid because the game itself is inherently a hybrid of a match 3 game and a platformer. In the case of super puzzle platformer they opted to be more of a puzzler where everything in the game world fits nicely as a tile... But our game like you mentioned is moving more towards an action platformer....
    Sigh.....:confused: