Week 4.B Devlog: Fixed the Missiles! | Escape From the M'lon Factory


Welcome to 4.B. Been very busy!
By Cailean Treloyn


This week (4. B)  will go over my Enemies and Missiles, expect Week 5 to have a big content drop!

Many things have been happening under the hood, I've successfully made missiles and fully implemented the spawner. Let's talk about it.
 

Why did the missiles goof?


One of the key features that occurred from the 4. A is that missiles didn't work. I believe I have successfully found the cause. To explain it I will reiterate how the game is built.

The majority of the game is run through the camera object. Most objects including the player and the spawner are tied to this. Now a feature of the spawner, is that when it spawns an object as it currently stands, I cannot send information about the player to a missile it spawns. How I discovered this, was when doing some debugging to figure out why the missiles did not track.

I found that the current  assumption I had, that assigning values, via passing in objects in the Prefab menu. (For non-unity peeps, connecting two objects basically.) 

This did not persist for the spawned missiles, for reasons I don't know. But I recalled a similar project called Rocket Pong, which you can play right now!
https://ee3eee.itch.io/rocket-pong

In rocket pong, I made an AI bot, that closely followed the player, by having the object constantly update the variable that holds the position of Ball. 

Now I applied this to the missile but ran into another problem, the object was unable to locate the object that held the player's postion. To fix this, I needed to explicitly assign the connection between the player and the missile. (through a proxy). And this seemed to work!


(Enjoy the sneak peek of the character)



What's next for "Escape From the M'lon Factory!"?

Now, these last two devlogs have been a bit all over the place, but fret not. I shall return to a bit of normalcy with a formal devlog, going game testing, and the final bits of development!

See you there!

Leave a comment

Log in with itch.io to leave a comment.