A Noise Platformer

 Developing an infinite platformer game has been a hugely rewarding journey. It all began with a simple idea: creating an endless world. Inspired by games like Terraria and Minecraft, my goal was to craft a dynamic environment that combined these games' best features while borrowing elements from classics like Mario.


The primary focus was on generating endless terrain using one-dimensional Perlin noise. This algorithm was crucial for creating varied, navigable landscapes, making each playthrough unique. Fine-tuning the noise parameters was challenging, as I aimed to balance flat and hilly terrains to ensure playability and visual appeal. The terrain was divided into chunks, with new chunks generated as the player moved forward, ensuring a seamless infinite world.


A significant milestone was integrating infinite enemy generation. I slaved for hours trying to make this happen consistently, and after at least 5 hours, a brainwave struck the shores of my prefrontal cortex. The enemies needed to spawn dynamically as the player progressed. I created a system that periodically checked the player's position and generated enemies off-screen ahead of them, ensuring a consistent challenge without overwhelming the player. The enemies' AI included patrolling behavior and line-of-sight detection to engage the player when in range. To increase the difficulty over time, each enemy eliminated slightly increased the enemy spawn rates. I used and learned from several game projects to refine the enemy behavior and make the noise generation as smooth as possible.


Scoring was another critical aspect. I implemented score increments based on the distance traveled and enemies defeated, motivating players to travel further and eliminate more enemies.


One issue in older or less performance-enhanced computers may arise: infinite terrain generation can load the computer. This can lead to battery drain and lag if the computer is really old. However, this problem's intensity is reduced by optimizing the generation: Only rendering the tiles in the player's view and also using 1D noise rather than 2D, which would have required even more processing power.


Something that a professional wrestler, Kofi Kingston, really resonated with my heart. He said: "A lot of people talk about video games as something nerds do. But we look at it as a way to connect with people. It's something that's positive, that brings people together." That is what I aim to do in the future. Implement multiplayer functionalities in this game so that this game can start to achieve what I set out to do in life: Bring people together.




Comments

Popular posts from this blog

Destiny

Hating on What's Popular

BMI Estimation from an Image