< Welcome back to my devlog series on fixed, my little indie game. So in this I don't know how long I made multiple things for the MVP of the game:
- Perlin noise generation
- A rough base for the creature system
- Player movement First I am going to talk about the Perlin noise algorithm that I use to generate water and trees for the cover of this article. So basically if you don't know what Perlin noise is, it is the smoothing of white noise which looks like TV static, random values. You can also add a bunch of layers of this together with a higher frequency but a smaller overall effect to get something called octaves which i did do to make everything feel more natural but that is beside the point, there are much better explanations of how everything works elsewhere. But anyway, what I did was really simple, I got the Grid index of that point, and found its height. Then if it was over a certain value then it's a tree, if it is below a certain value it is water, and otherwise it is grass. The next thing that I worked on was my creature system, while not being that good yet it is a good base for me to build up different creature types. The way that It works is that all creatures have 2 states, active and recharging. When the creature is active, it walks around looking for food and when it is recharging it stays in one place getting energy. That's it. Finally, the player movement, this is the least complicated part. So when the player moves, the environment actually moves so that the player never actually goes off screen. But when the player moves the background so that It is at the edge of the background, the player starts to move. If the player is on the edge of the screen plus some value then the player stops. Well folks, that's all! Thank you for reading and have a great rest of your day :)
Top comments (0)