Today I completed the core game mechanic of my game! First I created a Snake object using a free image downloaded from the internet. I wanted to appear the snake at random positions. So instead of deleting and creating the object, I used the clever trick of changing the position of the object. Then I created 2 texts for losing ("Game Over!") and winning ("You Won!") the game. Then I added the events to hide and show these texts along with other actions. I haven't decided yet the number of apples the farmer should collect to win and whether the farmer has more than 1 life.
Today I started working on apples. They should be created on the scene endlessly and they should be deleted after a certain amount of time. To create apples, a timer should be used. I added a condition to reset a timer every 3 seconds and an action to create an apple at a random position. Then I previewed the game. The apples filled the screen in seconds!! 😂 The problem was I didn't restart the timer after creating an apple. Today I couldn't figure out the way to delete the apples the way I want.
Comments
Post a Comment