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 did a lot of work! As you can see, I added a nice background. I imported it from GDevelop Asset Store. Then I implemented the health of the player. Last night I figured out how to do that. I just had to add the "Trigger once" condition. The way I figured it out is by making a test project. It is a good trick to test some functionality. Then I changed the snake image. I also added 2 new pixel fonts. One cool thing I built today is flipping the snake facing the boy. First I tried to use the action "Flip horizontally". It didn't work properly so I added another animation and changed the animation according to the X position of the boy and the snake.
Comments
Post a Comment