Game
Rogue Cadet
8 years ago

Day 120


Day 120: Today, I thought I didn’t have much work. I was wrong. So wrong. I didn’t even managed to finish the sprint on time. I think it’ll take one or two more days. I only worked on the tracking AI. But I end up rewriting it once again… Anyway, I’m hungry, it’s riday and I can’t wait to lay back.

Daily interesting stuff:

Tasks done:

  • Worked on the tracking AI. Yesterday I was happy with the result. I thought It worked really well. But then I implemented a way for the AI to go left or right to avoid by default. Before it was only right avoidance. And It worked okay. It was kinda hard to do since it involved a big refractory of the code. Then I tested it and realized that the behaviour with the walls was horrible. It worked only for one side. The other would get inside without a second thought. I thought it would be relatively easy to fix this. I was wrong again. I tried so many things. From distance check to fake collisions. I read articles online to how the heck does collisions actually work. I mostly found physics exercises that were much to complicated. Then I stumbled onto a game dev article. I didn’t understood everything, mostly because I only read like a third of it, scattered across the whole. But it gave me an idea. Maybe Unity has an API to find the normal of a collider. Then, a few more web searches after, I found what I wanted. The RayCastHit actually has a normal property! And it returns the normal of the object exactly where it intersects! So what did I do with this information? Yep, you guessed it I rewrote the code to use that instead of my Quaternion offsetting lerp. And it’s pretty cool. But I still have a problem with the walls. I tried and I tried but nothing was satisfying enough. And it’s not that no change was working no. It’s that every changes had drawback! In the end I had the idea to do a Box Cast instead of multiple raycasts. That’s because I want to be able to cast from the center, while still making sure the size of the enemy is taken into account for the avoidance. And it worked. The box cast works well with every enemy type. It’s also better to handle walls. And more importantly it simplifies the code a lot. But there’s still so many edge cases u_u. I think I’ll never get rid of this feature. There’s still weird things that happen. Enemies end up into walls, and other pleasant things. I think that if I don’t manage to resolve the wall problems, I’ll just make the tracking enemies dynamic colliders. It takes much more perf but at least I will be sure that they can’t get into those fucking walls!

  • Looked at the assets one of the graphists sent through the slack channel. It looks good. Soon the different ship types will be handled other than with a bad color change. I try to respond instantly when someone talks on the slack channel. But I end up always saying that the assets “look cool”. And it’s true! But I feel like I should say more diverse stuff.



0 comments

Loading...

Next up

Smile! Here, take some happy pills! ✨💊 #Blender #3DModelling #3DArt Buy me a Ko-fi: https://ko-fi.com/barbarafb_

Chiaki Nanami!

Here's a peaceful little forest scene for this #screenshotsaturday, from the beginning of the game.

Protege el conocimiento, salva la historia. Guardian of Lore es un platformer 2D en el que debes luchar para mantener viva la memoria de la mitología latinoamericana. El juego llegará a Steam el 18 de mayo: https://steam.pm/app/1211740 #ScreenshotSaturday

Family band complete!

Finished work on the emotions of a new character for the tank universe

An infected room from the second part of Cybel ! Are you up for some cleansing?

Alone Together....

I made a small jungle house.

Among us_into Madness