Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

One of my favorite games I´ve played so far in this jam! Love the simplicity of it, the perspective mechanics feel smart and the level design is diverse. The soundtrack sets the mood perfectly and reminded me of Untitled Goose Game ost, wich is great.

How hard it was to implement the swipe mechanic? how did you do it?


(+1)

That's so nice to read! Glad you liked it!

There are a few steps to the tracking. It was a little trickier than I expected it to be, but if I were to clean it up, it's probably not so bad now that I know how. There are two main parts: The in-progress foliage swipe and setting the foliage cursors (the starting fall colour vs the in-progress summer colour).

To set cursors:

  • When the player clicks on fall-coloured foliage, I set that as the start cursor
    • I have a "Foliage" script on the object. When I get a raycast hit, I look for this script. It has a status variable to tell me if the foliage is fall, summer, in-progress or  returning to summer colour.
  • With the mouse click still down, I then RaycastAll to look for overlaps (without any blocking colliders)
    • If I find the start cursor and summer-coloured foliage, the summer foliage is marked as the in-progress cursor
  • When the in-progress foliage is complete. I mark it as fall-coloured, set it as the start cursor and repeat.

The  in-progress foliage swipe:

  • I find the position where the player entered the foliage and the current mouse position (All using raycasts and colliders.) and the direction they're moving (from the mouse coords, translated to world space).
  • I then determine the opposite side of the tree (using the bounds of all colliders on the tree)
    • The swiping can be a little wonky. I think it's because I didn't use accurate colliders and the "opposite" side only moves across faces of a cube. It's not the true opposite side.
  • I enter that information into a custom shader that draws the progress. I do the same for the gameplay.
    • When it's complete, I mark it as Fall-coloured
(+1)

Thanks for taking your time to explain!