Game
Rogue Cadet
8 years ago

Day 119


Day 119: Today, it’s been two days since the last work day. I’m sure you’re thinking, oh yeah this must’ve been the weekend! Well no. Not at all. A little while ago, I applied for a job at Ubisoft. They sent me a mail saying I need to take a quick online test. This was much sooner than I thought. And I didn’t have the time to raise my C++ skills. So I desperately tried to learn as much in as little time as possible. I gave up on that around noon of the second day. I was learning a lot of stuff, and it was super interesting but I was sure it wouldn’t make any difference. So I took the test and it went horribly. It was basic questions, but I still wasn’t able to do it correctly. That depressed me, and I couldn’t work that day. I mostly spent it staring blankly at walls, pondering about my life. But I got back on track today. Even if it started slowwwwly I still managed to do some cool things.

Daily interesting stuff:

Tasks done:

  • When I was working on my C++, the artists asked stuff on the slack channel. So I responded. I ended up trying to manage different tileset size to match the repetition. I tried a lot of things to be able to use any kind of asset they would give me. It was complicated to handle the tile asset size, the tiles size in Tiled, the number of tiles in a room, the ratio import to Unity. All that while being limited by my dungeon procedural generation that need precise room size.
    I forgot to write this in day 118 but the name of the guns was wrong. So I changed them. Easy easy.

  • Greatly improved the tracking AI. As you may know, I chose to use a raycasting based collision avoidance. It works well and it’s super light in term of performance. But it had some major problems. The Ai would get stuck on obstacles. It would appear janky. And honestly I didn’t think I could really improve it since, I already tried so many things. But I worked on it anyway. I played the game and noted all the problems I could find. Then I tried other ideas I didn’t try before. Some were really bad. Like I thought having the rays change their angle to do a “sweep” would help the detection. I was horrible. But after an absurd amount of messing around with the same 20 lines of code, I end up fixing most of the problems. First I solved a big problem when in a lot of cases, the enemy would decide to go right then the next frame left and the next right again. This happens a lot due to the fact that I use the actual position and not the next. So when the enemy moves it changes the situation and suddenly it’s better to change direction. To fix it I didn’t worked with the next pos it would have been too big to do. I just save the last avoidance strategy (right, left, or none) as well as the time when it was changed. Then I added condition so that the direction can be updated only if the strategy remains the same or if the last time it changed is old enough. This helped, but the behavior was still weird. The second thing was that to avoid an obstacle, I offset the direction by an angle. The closer you are to the obstacle the more offset you had. And if you were too close for this to work you would do an emergency “break”. The idea was ok. But the implementation was exactly doing what I wanted. I found this almost at random. But now the offset is calculated based on the length of the rays. This meant that no matter what the “eyes” length the behavior would not change. This made miracles. It works so much better. Plus I was able to get rid of this “emergency” thingy. Now the offset is just a lerp between 10 and 180 degrees based on the ratio of the current dist vs the eyes length. Oh and lastly I changed the behavior of the wall collisions. Before I just made the enemies “bounce” on it by setting their position to 5 times the current dir. That made them get blocked and shake. To fix this I just offset the dir by 90 degrees instead. I wasn’t sure about this at all. But it works really well. If you look closely you can see that the enemies sometimes get a bit on the walls. But it doesn’t look weird. I still have a few things to do, but it’s getting alright.



0 comments

Loading...

Next up

Just as Pecaminosa's musicians #improvise this rendition of #LittleSunflower 🌻, so do we improvise with this post you're reading. 😂

What's coming out of your own improvs? 🤔

#Pecaminosa | #IndieDev | #OST | #Jazz

We are under attack!

I have added rewards for quests so that villagers can give you something in return for your hard work helping them. 🥳

I want to know - what's your favourite quest reward?

Quantum precognition is one of the most powerful cards. End game cards & equipment. Demo/alpha build boss is no match for this deck.

Updated the chest in the maze, adding sound, particles and better animation. But what's in the chest?

Werehog transformation process. #sonicunleashed

What you all think

A house I've built a while ago. :)

It nicely separates the snowy biome from the grassy one.

It's built with painted Ebonstone.

Today I tackled drawing different variations of facial expressions for one of the main characters in Eden. What do you think of it? :) Eden: https://gamejolt.com/games/Eden/592698

Alone Together....