Before I Fade banner

Before I Fade

29 devlogs
64h 41m 42s

A 2D visual novel where you wake up exactly 1 month after you died. Find out what happened to you and who killed your ghost before you fade away.

Demo Repository

Loading README...

vishalya18

worked on a few things~ some of the buttons in diary entry scenes weren’t hoverable. turns out, the didn’t have sprite textures loaded into the onready var cryign. then i had to manually reconnect signals to each script, i must have forgotten back when i first started working on this game lol.
and since all the bugs are fixed… i’m starting to add extra features to make the games even more cooler. since the player is a ghost i wanted to add a fade in fade out effect on the player to give it a more ghostly feel. i never thought i would be using actual math in this game, but i used a sin func TT, which is used to oscillate values between -1, 1, making it perfect for the ghost modulations even though i’m not planning to use -1 for opacity lol. i used var alpha = 0.95 + sin(ghost_t * 2.0) * 0.07 in called in the process() to update every frame. i didn’t want it to be TOO dramatic so i set the base value to 0.95 opacity of the ghost and let it vary from +- 0.07 from 0.95 opacity over a 2 second interval! lmk if you think this looks cool or i just make it less variation in opacity ^^ i’m thinking of adding this sin() to other areas to make things slightly scale or grow without having to rely on anim players, just to give the game a little more life :3

0
vishalya18

more bug fixes doneee
I adjusted some of the static body 2d collision shapes in the living room to make it easier to walk and also so you don’t have multiple floating e’s at once. i also moved all the canvas modulate items in a canvas layer to just canvas modulate and used a for loop with .modulate property to change the colors!
i also figured out how to make the interact label less buggy! before i was using a await get_tree().create_timer(2.0).timeoutto manually show label then change it. but this led to problems when multiple items were being pressed fast and delay of labels visible due to creating a new timer each interaction. to solve this i created a physical timer node in the scene and set it to 2 sec and one shot (to only run once and not reset). then i connected my timer var with the node using reset_timer.timeout.connect(_on_reset_timeout). i also created a bool flag is_interacting = false to lock items when interacting for a one label show on same objects. at the very end of my on_object_clicked func, i reset the timer by reset_timer.start() if you hadn’t pressed every object so the label would update back to the instructions.
but im really happy with this feature and have implemented it all the explore scenes! :3
i think my next goals are to fix some puzzle music reset states and fix the credit scene formatting and hopefully that will fix all the bugs! doing that will basically clear all my todos and hopefully i can start adding features from my nice to add list to take this game next lvl!!

0
vishalya18

still working on fixing bugs! I worked on the kitchen scene first and also had to restructure the canvas modulate furniture out of the canvas layer. i’m trying to stop relying on canvas layers entirely because they’re such a pain to change. my e interact bubble was inside a node so it wasn’t showing up on top of the furniture in a canvas layer. so i had to move things out of the node into separate layers and doing so broke some of my animation player tracks… TTT. whenever this happens i always just remake the animation from scratch, but today I figured out how to restore the animation 🙏🙏. since animation players create their anim tracks relative to the scene roots layers, just deleting one canvas layer can affect the root structure. you can edit each anim track’s path to the anim players name.property:bool flag to fix this! i really wish i had known this sooner. oh the hours it would have saved me…
I was also editing the bedroom4 diary entry and fixed some ui visibility bugs <3 and corrected the anim tracks to play the right things.
I was playing through the 2nd ending, and i think it still needs to be longer… idk what i should add though, but i dont want it to feel too rushed.

1

Comments

_d3f4ult._.cracka_
_d3f4ult._.cracka_ about 20 hours ago

No way, I love it

vishalya18

worked on a LOT of bug fixes these past 3 hours. i wanted to fix all these before working on anything new or else i may forget about it and i want this game to have areally good experience for the users too! :D
starting off, in bathroom 3, i fixed the white tile puzzle reset state, before it was only visually changing the colors, now i reset the tile string state in the code itself. and i added the exit arrow after the scene was done, as well as changing the labels to use interact with rather than click, and fixing ui visibilities in some spots!
i had to restructure some of my other scenes to stop relying on the canvas modulate to change the color because it didn’t have a canvas layer to stop the modulations affecting the ghost. i did this by creating an array of the sprites and using a for loop to access each item to modulate it. previously, i was using .color to change the canvas color which affected each children. but since some of the children were tilemaps which only have a .modulate property, so i used that instead!!

for item in furniture:
    item.modulate = Color(0.0, 0.994, 0.816)
for item in doors:
    item.modulate= Color(0.094, 0.322, 0.278)

i changed the name input from a text in the bedroom puzzle to a tool tip because it was annoying to manually delete then type the name in. I also optimized some collision shapes in bedroomdiaryentry2plus to hit diary from the first click. i removed shape_idx == 0from the click input since it’s accessed from the e input. then, i changed multiple ifs to an if else and fixed shape_idx == 2 to shape_idx==1. idk why it was set at 3 coll shapes when there were only 2 TT.
lastly, i fixed some hallway bugs to hide some ui features in the end_dialogue()!

0
vishalya18

i went back and updated the explore part of the scenes to set label instructions for press with e on the floor level and click for desk level items.
i must have not checked the shake was working in bedroom 2 because i got a bunch of errors TT. apparently canvas modulate layers don’t have an offset property, which is what i was using to shake the scene nodes. only ui nodes have an offset property like control panels, labels, buttons, but gameplay nodes like node2d, sprite 2d, etc use position instead. i thought this was pretty interesting because i used the offset property for a sprite 2d to animate the arrow directions. turns out the offset in a sprite2d moves the texture itself not the actual node :0 so to fix my problem, i created an array of my items in the canvas modulate and used a for loop to access those items and apply the shake property on them with for item in furniture: item.offset = shake_offset
I didn’t want it to be too confusing to players because we don’t have any ui boxes for instructions. before, after you pressed an object, the “click on this” would just be lost. so i added a await get_tree().create_timer(2.0).timeout narration_label.text= 'Investigate the bedroom by pressing "E" to interact with objects.' so i can reset the label to show the instructions if they forgot what to do, because i’m using the same label and updating it with the object descriptions! i also added a label.text change when interacting with the desk area to let users know to click rather than press e. and while doing this i cut a really bad bug TT, the girl ghosts anim.play name was set to dairy instead of diary… if you played girl ghost before and encountered this bug i’m so sorryyyyy :((( it’s all fixed now though <3
also found so many bugs from playtesting the whole game:(( i thought it was almost done, but i’ll keep making it better. turns out i never actually reset the color of the tiles in bathroom 3, i only visibly reset it but not in the code.

0
vishalya18

did a few things today: adding hearts system into bathroom 3 puzzle, adding furniture to camera shakes, and adding a bedroom zoom and pan transition.
i had to restructure some of my scenes when adding the camera to stop relying on canvas layers and self modulate each furniture item itself since camera2d doesn’t affect any canvas layer children :(( but now the furniture shakes too in the modulating scenes, so it really does look like a shake! I also added zoom and pan transition to the bedroom opening scene, but since my player was in a canvas layer, i found a work around by placing a non animated player sprite over the player and turning the visibility off when the animation was done and resetting the player position in case someone tried pressing the arrow keys during the cut scene lol.
I did learn something new today. whenever i create a new script it always has a extends node at the top of it and i had no clue what it was until today. extends in script basically means it inherits all the base functions. this could be really helpful in the future where i can call functions from the base node without having to send signals to connect them! i’m also getting really comfortable accessing godot in editor documentation, and i love reading more about each function or object xD

0
vishalya18

i’ve finally finished adding all the puzzle lives systems in the remaining scenes!

  • attic 2 puzzle hearts
  • bedroom 4 puzzle hearts
  • attic puzzle hearts
  • living room puzzle hearts
    I also got to clean up some of the scenes and found some bugs that hopefully none of you experienced in the past ship :(( but they’re fixed now! a lot of my text formatting was really off, so i adjusted those too.
    lastly, i added the hearts puzzle info to the menu scene! so players can know a little about what they’re getting into lol.
    tommorow i’m planning on fixing up the camera shake as it doesn’t target some of the canvas layers where other furniture is one and repositioning the ui “e” cue around so it looks better in each scene!
0
vishalya18

3 scenes now officially have a working lives system woohooo! there are only 4 more to go, living room, attic, attic2, bedroom4.
today i learnt something so so so so useful and i WISH i had found out about this before, how to make animation players when copy pasted from another scene local. whenever i copy pasted animation players in the past and tried to edit a track or rename something, it would delete the keyframed tracks and give me a “this is only read me” warning. and i had no clue about what read only property even was until i added the linked scene for the arrow a few days ago. so when i tried copy pasting the anim player today and got that warning, i tried to find how to make it local and i found out how to! pressing manage animations on the anim player and saving it as a local anim does this trick! :33 i’m so so happy, this would have saved me so many hours in the past just making text animations but now it’ll save me hours in the future. 🙏
i added a fade in and fade out audio func when the little reset cutscene happens to add dramatic effects using the tween() function with tween.tween_property(MusicManager.music_player, "volume_db", 0, 8.0)! <- this means the audio will take 8 seconds to come back to normal sound levels again.
lastly i went through some of the text animations and cleaned up the formatting a little, so it looks nicer when playing through, all centered.

0
vishalya18

been working on a life system for the puzzles, so it’s not a free loop of just a try until you get it right kinda puzzle. I added a global variable to track if the puzzle has failed. if the puzzle has been failed then it’ll change scenes back to bedroom 2 and start it over, but this time with 2 extra additions. i added a linked scene (yipeee) animation that says “i need to know the truth, one more time…” so that plays if the global var bedroom failed is set to true! and the linked scene has modulation animationsss. i’m really having fun adding animation effects, and will plan on adding to more things in the game so it looks more professional! I also added hearts and broken hearts for a visual cue to know how many tries you have left until the puzzle’s failed state shows.
additionally, i edited the actual puzzle scene itself so it’s structured better for users to play. now, the timer only starts after you’ve read the little dialogue and seen a closeup of the bed to see the colors better! also i added a hint for this first puzzle to make it easier for players^^ and adjusted the player position after the dialogues ot move to the bed, so you have to walk a little to enter the code lol.
after that, i made a dictionary in bedroom 2 with a list of messages to display after the cutscene finished and used a .pick_random() to display random messages in the text animation by setting the text label to the randomized message. I also learned that you could use single quotes to hold a string if you want the quotation marks to show in the text label!
lastly, i also edited the music to only speed up the music using lerp() in the last 10 seconds. previously the music started going faster as soon as the continue was pressed but not the puzzle music is normal at 0.75 and then only speeds up when under 11 seconds :33

0
vishalya18

super great news with this devlog!! on the last devlog i was improving the bathroom puzzle because some comments said some of the clicks/collisions were buggy. I know the major source of these issues was from trying to read the diary entries and the play button at the very start. they have finally been fixed!! so sorry for not figuring out what was wrong before :(((
since i was using a counter and checking which coll shape was pressed it took 2+ clicks to press the actual diary entry when in the desk. i changed my if , elif structure to multiple if statments to constantly check input to correctly drop the correct overlay. alsoo, since we are now using interact with “e” in some areas only the second coll shape pressed matters, so i just made the first if to pass :D
i hope those were the big buggy parts of the game >< but all has been fixed now so moving onto more featuresss!

0
vishalya18

i spent this past hour debugging why some of my bathroom 3 puzzle tiles worked taking in input or only taking in input in some specific areas :’) since this was one of the first puzzles made for the games, none of the ui nodes, like color rect were set to mouse filter ignore. so the color rect was taking in some of the input area of the collision shape. another thing was that there was an active texture2dbutton right behind my collision shape😭😭 so that took some input from the area 2d as well. i disabled that and also redid the green tile script to rely on a color variable rather than a counter. the counter ver was making me have to click the tile twice to set it from green to white. but since i have a script for white and green i just set it turn on off based on the current color. some of the feedback from the last ship was to to fix the buggy interact or clicks so i’m def gonna work on that :)) edit: omg i attached the wrong video TTT here’s my commit if you’d like to check that out!

0
vishalya18

from the new read all votes feature, i saw feedback that many people thought it was a little confusing to move around. so i added arrows!! in a linked scene this time lol. i was struggling at first because i made an animated arrow with keyframes of position, but i found out that it locks in the position across the scene itself and using an offset keyframe could move the arrow around based on relative position instead!! i thought using linked scenes would just mean it would update all the linked scene instances when added to each scene, but i had to make each child node editable to rotate the arrows and put them near different doors. so i’m not too sure how the linked scene effectiveness still stands… i also learned how to use get_tree of the current scene if get_tree().current_scene.scene_file_path == "res://scenes/kitchen4.tscn": $ghostlayer/Node2D/arrow.play("arrow")
because some of my scenes have the same script so this was useful to add to show what arrow is at which door based on what scene is currently playing :) i have one more scene to implement this arrow when my partner is done adding in the interact with e in one last sceneee

0
vishalya18

been working on the pause menu featureee! and guess whatttt, it’s now incorporated in all the scenes! i had to manually add each element and copy the script components into each scene script and reconnect signals. Only halfway through did I think about adding them all in one scene and linking the 1 pause menu scene to all the other scenes…. but what’s done is done. if i have future implementations like that i’ll take the scene link path then :’))
one thing i did learn though, is why i had to disconnect and reconnect each signal for each scene. because signals are for individual scene instances, it doesn’t automatically copy scene signals when copying the nodes to new scenes :0 this was really annoying to implement but i do think a single scene link would have made this A LOT easier and simpler without having to reconnect each singal to its assigned script…
i did a little file cleanup too. moved some of the scripts from assets and scene folders to the proper script folder :’))
ALSO added more controls!! i got some feedback from my past ship to add in w/a/s/d for movement, so the assets have been added in the controls section. they haven’t actually been implemented in the game itself yet, but soon! also we are slowly adding in interact with “e”, so you have to move across the room to explore, otherwise it’s kinda a cheat to stand in the room and press each object during exploring.
but i’m this game is almost done! there are 7 more big changes that still needs to be implemented, so stay tunedddd :D

0
vishalya18

new update!! I added a blink text color when the timer on the puzzle gets closer to zero, starting from around 10 seconds till puzzle end for each puzzle! apparently since my text is being updated in the process node, i can’t simply use the modulate and. Color properties to alter the color. So, to solve this problem, I used add_theme_color_override("font_color" to manually change the color from the process function. I also had to restructure some of the puzzle’s timeout funcs because there was an issue with the timer not starting in the helper func of the timeout func soooo i just move the timer.start() back into the timeout func :)
oh btw, to change the colors from red to black originally i was gonna just do time left % 2 and do if it’s 0, set it to black, and if not, red. but since i’m using time in milliseconds, i had to use int(Time.get_ticks_msec() / 300) % 3 to access the time left in milliseconds and then divide by 300 ms to get a 1 decimal time value! and i did modulo 3 because it looked better than modulo 2 lolzz

0
vishalya18

today i worked on something big :0 i started adding a pause menu!! this is my first time incorporating a pause menu so i learnt a lot too! usually, i avoid using control nodes but I used them today because i learnt that they are specifically for ui. I used a detect inut event to find it i press ui cancel(the escape key) to trigger the pause menu. and godot already has an inbuilt pause system with get_tree().paused = !get_tree().pausedwhich is sooooo useful.
I also learnt about different godot processing today. when i tried to implement the buttons to work when paused, they failed because godot sets them to inherit process mode automatically pauses all the nodes of the parent node when paused game. howeverrrr, you can change these to process mode: when paused!! so that those nodes only work when the game is paused, which is exactly what a menu in a pause screen needs!! :DD
last thing, previously i’ve been creating multiple area2d scripts for input events but there is a pressed() signal for area2d in node, signals inspector TT. which makes me feel kinda dumb for not knowing this earlier but i’ll be using that from now on rather than creating 100+ scripts. i’m also gonna add a 2nd page to controls, now that i have new ones like:space to skip, esc to view settings

0
vishalya18

added shake function to hallway and fixed up some ui display bugs with labels showing up before the modulate done. i also made a few different script versions of the camera shake because each scene is structured different like the player is in one canvas layer and sometimes some of the furniture is in another canvas layer so to account for all those difference some of the cameras use different scripts. the contents of the script are the same just the nodes it triggers changes! i realize after recording this video i need to add the new script to effect the hallway furniture ooops :( i’ll do that next time.
alsooo maybe it would be cool to have a sfx for the transition?

0
vishalya18

this past hour i worked on trying to make the past message from ghost more interesting! i wanted to add some kind of grain filter and learnt that i could use godots control videostream player but then found out it only support ogv formats TT. I coverted the video type and played around with the opacity and was going to figure out how to use shaders because the video is green screen bg. but since my ghost color scheme is already a blue greenish color, i just lowered the opacity and it seemed to work!
also i changed some of the asset that’s gender specific to be neutral so i can use it for both chars! and lastly i added animation player for my record screen bg to make it look like its blinking recording so it adds some depth in that scene. maybe ill try adding character walking back and forth later? but for now that’s enough. alsoooo, we finally have kinda scary music for all the puzzles :DD

0
vishalya18

i finally fixed up the attic 2 puzzle scene. kinda forgot about it after trying to implement a bunch of other features lol. turns out i had 2 timeout funcs in the maid script and the area 2d will my phone coll shapes. i also had to re enable shapes during reset states so the phone would actually work. i have no clue how i missed that before LOL. but i added that and fixed some visibility issues after puzzle ended!
my current puzzle structure is keep going until timeout, and reset, or if it’s wrong, reset. but it gets kinda confusing which one you’re on and if you have to restart, so i’m thinking incorporating some kind of life system? idk yet but hopefully something to make it more distinct!!

0
vishalya18

adding some special effects to the scenes using camera 2d!! i had no clue how to use the camera as my partner did all camera related stuff for past games so this was pretty new for me :3
i used randf() to get a shake vars between the inputted args(strenght and length) and applied the offset on both the normal scene and the canvas layer for the player. because for some reason canvas layer blocks all camera ui input so i made that workaround! planning on adding easing in the next test so it’s not as sharp (?)
I also updated the idle anim assets because they looked a little too wonky and slowed down the idle speed for the characters as well.
lastly, i fixed some grammar mistakes in the text animations xD

0
vishalya18

revamped the start game section and added a title screen!! added animation player for ghost flickering and fading away and candle animations :D and a overall fade transition into next scene where it fades in. I replaced the menu card used in all the puzzels so the home screen could take up more space and not feel as cramped (?) lastly, i added few boxes as well so the controls and sub text could be more visible against the current background

0
vishalya18

created the last puzzle for this game!! previously, ending 2 just had a cutscene of the phone opening and went straight into the police and ending. now i’ve implemented interactive phone screens to dial the cops and then record on the phone using area 2d coll shapes and connection signals :3
need to clean up a few visibility issues and this scene will be done!

0
vishalya18

Shipped this project!

Hours: 19.13
Cookies: 🍪 450
Multiplier: 23.54 cookies/hr

I built a 2d pixel game for a game jam! the hours logged here are after the initial submission and when i found out about flavortown for improving and adding more features! one of the hardest things i worked on was creating a dialogue manager system with my text animations. it took forever to try to find a suitable way to implement that, but i found that using seek() in animation players and awaiting input can give the same output!! please leave me any feedback so i can keep making the game even better!! :33

vishalya18

now that i now exactly where to add and implement the skip text code snippets, it’s easier to put it in other scenes :) hopefully i can do it faster because there are soooo many scenes still left to edit

0
vishalya18

i fixed the dialogue issues!! turns out nothing was printing despite my numerous print statements because i had godot output disabled 😭
added some helper functions so that once the dialogue ends, it exits that function instead of doing it all in one. also added visibility flags in next index of animation and during end animation because if i did set it to false in the animation player, the last paused segment would be blank.

0
vishalya18

fixing up the base text animation code!
added some bool flags to turn animation to false and pause it regardless of whether a user presses ui accept or it reached the end of a segment. this works in my scene with 2 animation dialogues, now i have to transfer it to the scenes with lots of dialogues 🫠

Attachment
0
vishalya18

added the rest of the continue buttons and implemented more tracks in the music manager, so it doesn’t just loop on the same one over and over and over again :)
lastly, started adding in a skip text using seek() function. i’m running into a few bugs, but I think this might be the best way to use a skip text without having to completely restructure my whole game!

Changelog

Attachment
0
vishalya18

Added a few continue buttons to avoid relying on a timer to move between screens. Spent a LOT of time debugging why my area2d’s weren’t working and figured out how to filter input in texture buttons as well as color rects.

Attachment
0