Game
Rogue Cadet
8 years ago

Day 51


Day 51: Today, I had trouble to wake up. Maybe it’s related to fact that I spent the night before playing Skyrim… Other than that, it was a pretty standard day. I took taks to do. Did them, did some other tasks. Realized I could actually improve stuff. Did those improvements and poof end of the day. But you want details I suppose. Well okay, but it really because it’s you. Today I:

  • Implemented seven enemies. At first I aimed for four. Then I thought six. And then at the end I had time for one more. So seven new enemies:

    • “Turret like”: stays fixed shoots three bullet in cone toward the player. Then at a longer interval it shoots two fast bullets toward the player. I realized while doing this enemy, that I don’t have any dedicated script to make the enemy look at the player. It’s directly in the TargetMovement. So I added a target movement to this enemy. But then I thought that a lot of calculation was done for nothing. So I added a check at start that start the movement routine only if speed > 0.

    • “Popcorn”: really weak just goes left/right and shoots the player from time to time. Nothing particular happened during the creation of this enemy.

    • “Melee”: goes toward the player at medium/high speed. Doesn’t shoot. I had to tweak the TargetMovement variables to have a correct collision avoidance. I shouldn’t have to tweak it. It feels like stitching decomposing zombie limbs. It kinda works but it’s not really a permanent solution.

    • “Square”: has a “square” waypoint patrol. Shoots four bullet in cross (✚). Funny thing, the enemy is named “Square” but the sprite is a circle. (you dare to call that “funny”? Man you really have low joke standards).

    • “Base”: doesn’t move. Shoots a circle of bullets. Called “Base” as in rebel base. No llama were hurt during the creation of this enemy (at least not by me).

    • “Spiral base”: Like a base but shoots in spiral. This means there’s a delay between each bullet. Also it shoots continuously.

    • “Turret”: Just a turret in the wall. It shoots forward. I used the new distance switch to activate it before you enter a room. Right now it’s destructible. But I’m not sure I’ll keep this.

  • Did some cleanup. Stuff like deleting old enemies prefab or minor script fixes.

  • Separated the enemy weapons from the player weapons. Because I was alway putting the same thing in the enemy weapons. I just put an absurd amount of max fire time (over 9000). And it used the same code than the player who has stuff like cool downs. So I separated it into two distinct scripts.

  • Modified the way enemy behaviours are switched. Before I used the “enabled” variable that allowed me to disable the Update method. But that didn’t work well. There was too many side effects. Like when a script needed a player reference. It would then disable itself, wait for the event and enable itself. But with a switch active, it woud fucked up everything. I had little control and I didn’t like it. So instead I implemented a simple Interface that forces classes that want to be switched to have a SwitchState method. Within that method I can do whatever I want. In particular I can have an internal bool that says if the script can be activated at all. It works well but the Unity inspector can’t serialize my interface type. So I have to still use a Behaviour variable and cast it to my interface. I should do a custom inspector but laziness took over. Plus, nothing like a big red error to catch my attention right?



0 comments

Loading...

Next up

Short intro of us 💕✌️

We're an eletro duo based in Seoul 🇰🇷 Heavily influenced by the 90s.

Our new album #Xennials is all about the nostalgia of that era 💽 CD listenin 📟 beeper beepin 💾 floppy disks floppin days 😎

Stream now! 🎧

https://open.spotify.com/album/3YwWhnHWVy5cA8XOpbaGRA?si=8E9awqU…

"Our work is never over" they said.

The whole squad is here!

Interested? Follow me!

I-Buki

Mio-Da!

Ibuki Mioda!

Microsoft Windows XP Unprofessional (windows logo prototype)

Horror WIP A track that will be featured in a future horror game soundtrack! Stay tuned!

Likes appreciated ✌️

#gamedev #composer #horrorgame #indiegame #IndieGameDev #soundtrack

Showing off player 2 😎

What do you think?

Only true badasses may pass! #conceptart #art #gamedesign

The Authority decided to investigate the Basement and leads to recovering classified documents Fun fact: The building has 928 doors and not 1000 doors. #horror

ooh yes..