Posted May 05, 2024 by Ee3eEe
Now the object also spawns the objects in random locations within the game world, although the way I've implemented this is a bit reppetive, I need to figure out a way to get it truly random, rather than seeded.
This is achieved by a public variable that sets the time interval, pretty good stuff. Now, seeing as this is endless there I needed a way to clean the obstacles up. If I just left them in the game world it would bog the game as it filled with clutter leading to performance issues.
How to solve this?
I thought up two options, one where obstacles are coded to check if they were off-screen, but I thought if they were spawned offscreen they would just fizzle into nowhere. (I'll need to workshop this at a later date and see if this isn't the case) as it might be a much better solution.
The solution I went with was a solid collider-based object also attached to the camera that followed behind and cleared the objects.
Changes from Feedback Last Week:
I did some tweaking and mucking about with how the physics works, and the force and thrust. Now there are a few issues here and there that need to get rounded out. I shall continue to try and check how it goes.
Feedback from this week:
A little quieter this week, a few things to note.
The player often catches on obstacles.
The player spins and wacks about rather than staying at a set angle, (the player can fall on their side)
I will attempt a fix this week for the obstacles and rotation. Stay tuned!
Next week:
Enemies, Interaction and Puzzles! I'm thinking about adapting new obstacle types and refining the spawner and player movement. Perhaps even a menu!