← Home About Archive Photos Replies Also on Micro.blog
  • Bad Thoughts - Dev Log #3 - Bugzzzzzzzzz

    Nothing interesting to show. Been slogging through bugs as I integrate features from the pre-setup isolated test scene into the actual scene with Bad Thoughts spawning.

    • One bug that was tricky to figure out was caused by things being called in the wrong order. It seemed like it should be working and the variables would be assigned correctly since the functions that assigned them would get called, just not in the order I thought it was.
    • I’d scream and the Bad Thoughts would go into their Running Away state, but they wouldn’t run away!
    • Fixed that one and now they ran away, but they’re running in the wrong directions!

    I think I figured out all the bugs so far and can now continue with implementing object pooling for the Bad Thoughts and VFX. Object pooling is when you pre-load all the objects you might want to use when the level loads. That way there aren’t any hitches by loading/unloading during runtime. Then it’s onto implementing the Died state when they run into traps.

    → 1:05 PM, Jun 4
  • Bad Thoughts - Dev Log #2 - State Machines and Visual Debugging

    Implemented a finite state machine to handle the AI behaviors. Even though there won’t be too many states, having a bunch of if/else statements will get unwieldy pretty quick. I’m happy with how it turned out. Now all that’s needed to add a new state is to create a class for the state that inherits from BaseState and add one extra line to BadThoughtStateMachine.

    I almost added state changes within the states themselves, for example, when RunningAway is finished it could auto change back to the Following state. Instead, I opted to keep all state changes in the BadThought script, which is also where all the Bad Thoughts' settings are located. That way if I need to find out why it’s not reaching a certain state, I don’t have to dig through various state scripts and only need to look in one place.


    So far I’ve been diligent with adding visual debugging to everything I’m implementing. It adds a bit of time, but I’ve worked on projects in the past that didn’t do this and it can make things more complicated than they need to be further down the road.

    I’ve been using ALINE from the Unity Asset Store to create the visual debugging shapes. It’s much easier to use rather than Unity’s built-in Debug.Draw and Gizmo drawing functionality. Here’s an example of the arrow beneath the cube and the text to show which state it’s in:

    → 11:19 AM, May 26
  • Bad Thoughts - Dev Log #1

    First time trying to upload a video to micro.blog. It’s a WIP prototype of my game where your bad thoughts follow you around and you can only scream to scare them away.

    It became blurry as hell after uploading, so I’ll explain what’s going on. The white blob is the player and the red blob represents a bad thought. So far I got the basics of run away/come back working. The red blob that appears over the white blob is the scream text I’m using to replace the scream audio cause I’m tired of hearing the scream audio as I test it.

    → 8:53 PM, May 23
  • RSS
  • JSON Feed
  • Micro.blog