Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Very charming game! Sweet story and nice ideas for the minigames (I especially liked the first one and being the chef). Unfortunately the sound didn't work (windows) :-/

Anyway, great game!

Hi! Thanks! Yeah, about the audio issue..... I had it disabled in the editor and forgot to enable it before making the exports! I've fixed it and it should work on all platforms!

Music is working! Very cool!

One thing I wanna ask is how you made the slicing of the fruits/ vegetables? I feel like this could be sooo useful for a fighting game with swords...

The source code is in the page if you want to check it out (cooker/Fruit.gd) but, basically, each fruit is a Polygon2D (it doesn't need to be one but it's easier this way) and the knife has a polygon too. Then you need to clip those two polygons to get the parts with Geometry.clip_polygons_2d(fruit_polygon, knife_polygon) that will give you 2 or more polygons. After that you need to set the correct UVs for those polygons with:

        var poly = splitted_fruit.get_poly()
        poly.polygon = points
        poly.texture = Poly.texture
        var half_size = poly.texture.get_size() / 2.0
        var uvs = []
        for j in points.size():
            var vec = (points[j] + half_size)
            uvs.push_back(vec)
            
        poly.uv = uvs
Which basically moves all the UVs to the correct position in the splitted polygon.
This way you have them splitted, you can add them to a RigidBody2D and apply some forces (like I did in the game) so they fly out of the screen.

Thanks for the detailed answer! Wasn't expecting this...

Very cool!!!