Logic of Farming System

0 favourites
  • 4 posts
From the Asset Store
10 Retro songs ideal for platformers or farming games
  • Hello everybody,

    I was thinking about making a farm system similar to Harvest Moon or Stardew Valley, but I have no idea how to do it well. I think it can be very complex.

    That's not what I want, because it doesn't look nice.

    I imagined it that way...

    This is just a small preview, but it can happen that the field is 100 cells (32x32) tall. How can I implement this system with high performance? Thanks for every suggestion.

  • Use TileMap object, it would be perfect for the task. You can find a few tutorials here:


  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • dop2000: Sorry, that's too inaccurate for me.

    Of course, I could also use individual sprites for every "field" (like this: If player is overlapping + Press Button = Change Sprite Frame to "1"), but I can not handle hundreds of sprites with this solution. Actually, each individual field needs to know if the field next to it has already been digged. It's a bit hard to explain, but I hope you understand I was mine.

  • You don't need hundreds of sprites, you only need one TileMap.

    It's not straightforward, but doable. Create different tiles for different situations -

    1. dug (or digged ) tile and no other dug tiles around

    2. dug tile and one dug tile next to it

    3. dug tile and two dug tile next to it - on right and below

    4. dug tile and two dug tile next to it - on left and right

    5. dug tile and three dug tile next to it

    6. dug tile and all tiles around also dug

    7. grass tile

    You can use these 7 tile types to form any kind of landscape.

    When player digs a tile, check the state of neighboring tiles and select the correct tile type. Rotate it if required.

    Then update the neighboring tiles the same way.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)