Game
Rogue Cadet
8 years ago

Day 59


Day 59: Today I got stuck on a problem. You know the kind of stuff you think should take 5 minutes but ends up taking most of your day? That was really frustrating, so describing this will most likely take a major part of today’s post. And since it’s Friday and I can’t wait to play Skyrim, let’s get this done quickly. Today I:

  • Did a screen shake feature. Coding it was fun. Using it not so much. It’s hard for me to do this kind of stuff. It’s too visual, I can code a script that enables you to tune the screen shake super easily. But tuning it myself so that it feels good, that’s not what I’m really good at. But I still managed to get something good enough. The script has a list of different screenshake settings. so that I’m sure each shake is good and I don’t have hundreds of different shakes because each call sends a different parameter. The configuration includes: duration, intensity and a tween curve. They are ordered in a dictionary by a type enum. The shake script then listens for events that calls for a shake and launch the appropriate one.

  • Got stuck on updating enemies in the rooms. In Unity there is no nested prefabs. So since I save enemies in rooms, all connection to the original prefab is lost. But I thought it was no big deal. During the tool sprint, I did a tool to iterate on all the rooms and update by code the enemies. And it worked well. So today, I thought all I had to do to fix a bug was to enable multi selection with this tool. I was wrong, so wrong. I did multi selection. Then since I was sure of me I ran it. It fucked up all the enemies configurations. That was two days worth of work that was ruined. Thankfully I use git and revert the changes didn’t took long. But the problem remained there. WHY does this script that worked perfectly now fucks up my whole project? Naturally I thought this was because of the multi selection. After all it was the only thing that changed… But no, it wasn’t that. I have no idea why but today the script that work perfectly before got Unity completely mental. I encountered so many weird things. Like a difference between the Scene inspector and the assets inspector. And of courses crashes. A lot of crashes. So after struggling in incomprehension for two hours, I did what any sane man would do. I started doing big changes hoping the problem would be comprised in the things changed. And it was. I rewrote all the custom Tiled importer. I did this because I use Tiled2Unity. I have the possibility to modify the imported prefab. The problem is that any modification on the prefab after triggers a re-import. It’s slow and not useful in many cases. So I modified my custom code to create a copy of the Tiled object and put it in my intended prefab in another folder. It was only this that I understood what drove Unity crazy. It was because to modify a prefab, I destroyed and added GameObject directly in the asset. What I do now instead is I create the appropriate object in the scene. Then I replace the prefab with that object (PrefabUtility.ReplacePrefab). Once I understood that. All I had to do was to completely rewrote the enemy update tool. And it works now! I beat this satan-level bug! It’s awesome right? No. It takes way too long… replacing each enemy in every room is awfully long. There’s like 5000 enemies… So maybe it’s just a bad idea to hack my way toward “nested” prefabs. I think I need to get back to the previous solution for the enemies configuration: Storing a ref to the enemy, a position a rotation. And instantiate them at start. This is more complicated, but the solution I have now is not efficient enough. Anyway, it works for now. I just spent almost all my day doing something absolutely invisible for the player. And that, while I only have 4 work days left before showing it to IndieCade…



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…

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

Another house i made long time ago.

In the quest for accessibility, I'm adding Resurrection Shrines for players on the 'novice' end of the platforming spectrum.

In order to unlock the power of a Shrine, you must collect 3 'Souls' from your dead corpses! (the floating blue orbs)

Hi everyone! I started to create some environment props for my new video game, here is a cozy house in the forest. I'm planning to switch from Unity to Unreal... Let's see what new challenges I have to face. Made in Blender and Substance Painter.

Very ambitious construction going on in Planet Zoo on Plays today. We're tryin'. LIVE: www.twitch.tv/dreamhackplays

If you’ve played the Vault demo and enjoyed it, please consider ‘liking’ the game page here on Gamejolt and/or leave a comment!

Also please consider tossing Vault on your Wishlist, I really appreciate your support!

https://store.steampowered.com/app/1251800

Annie of the stars

Sonic The Hedgehog style Super Smash Bros 4 Pixel art Gif.

I just wanted to introduce you to my latest musical production and hear some opinions about it. Thank you very much.