shell we decorate banner

shell we decorate

18 devlogs
35h 39m 36s

A mini game where you have to decorate shells for your crab customers :D

Demo Repository

Loading README...

vishalya

Shipped this project!

Hours: 35.66
Cookies: đŸȘ 932
Multiplier: 26.14 cookies/hr

I built a small crab dress up game! i made this project to practice my core coding skills by practicing concepts of loops, functions, dictionaries, etc through this game. i wasn’t expecting this project to take as long, but i’m glad i got to solve many problems and learnt why and how to fix them in godot :’)) it was definitely challenging figuring out how to initially set up the random order generation with the random crabs all in a single animation player, but it ended up working really well for my game! i’m really proud of my game overall, and can’t wait to keep adding more features to make it better. this game isn’t complete and there may be a few bugs(pause button menu only works on second press TT) or glitches, but please do leave some feedback for me to keep improving this game!

vishalya

last devlog for this game woohooo. i added another animation player on the home screen so now the crab’s shell changes every few seconds, giving it a more dress uppy feel before you even start the game. then i wanted to add an overlay menu when the pause button is pressed, it displays 2 buttons, one to go back to the home screen and one to view the credits. so i created a new canvas layer for the credits scene and decorated it with different shells and the robber crab >:)) that would be visible when the credits button was pressed, but i was facing some issues with the input process mode when paused. even though i set my area 2d inputs process mode to “when paused” or”always” it wouldn’t register the mouse clicks to the area 2d cryign so then to avoid that mess i created a new scene that it would direct you to, which isn’t ideal for mid gameplay, but it is what it is for now. i may change it in the future to have the credits on the home screen for less resources and just easier navigability.
once that was done, there came a new issue! on the first press of the pause button, the collision shapes didn’t disable! cryign i’m not really sure how to fix this, i used multiple methods like setting using deferred() to wait a frame, then enable it, using .input_pickable == true to let mouse clicks work in a paused game state, but it didn’t work out TT. i’ll take a break from this game, study for exams and come back to this and debug it properly
lastly, i fixed the glitch where the crab spawns on the screen briefly, then spawns again when the game first starts by resetting the animation track player position to the beginning of the track!
but yeah the core gameplay and necessities are all done!
i’l create the readme and upload to itch next before shipping later :DD

0
vishalya

yesterday i added a probability array to receive a special crab event, then i thought maybe we could apply that to the extras upgrades during shell orders and place them with dynamic pricing! so i modified the pool, the extra is chosen depending on what day the player is on. if the player is on day 7, they have a 50% chance to use their upgrade on a crab order to get a few extra pearls vs on the first 4 days the player has a 25% chance of being able to use their extra upgrade for extra pearls on a crab order. I also added more singular extras to each specific extra pool. so instead of the stars being a fixed set amount, the number of stars on the order increases your pearl count! but to keep it less of a chance to get that, i added more singular stars and barnacles to their respective build pool function.
then, i animated the wave on the menu and game page so it gives more life to it lol. i think i will try to animate the fish the crab is on or make the crabs claws on the menu move a little so theres a little more to look at.
after, i was updating the shop prices previously everything was under 600. but with the addition of bonus pearls from achievements, special events like rich crab, and pearls from correctly placed extras, it was too easy to get all the extras before day 10. so i increased prices from(100,600) to (150,1800), and it works! the last shop item is unlockable on day 8 or 9, and if you’re lucky and get visited by rich crab multiple times, even day 7 is possible!
i’m facing a few annoying bugsss, like the crab doesn’t leave when at the end day or the previous extras are showing on top of the robber crab, and achievements aren’t updating in the achievements tab anymore

hopefully i can get all the bugs fixed up before flavortown ends and ship cryign

0
vishalya

achievements are now working!! 3_neodog_cute i used 2 array indexing to set the .text property to the correct display text in the global script. I removed my 2nd anim track to fade the achievement pop up and just added those key frames into the enter achievement popup to reduce code lines and keep it simpler lol. I also added if else statements when you click on the achievement toggle to check if you have unlocked an achievement, to set the text context of each achievement to unlocked based on the global script.
i ran into a few issues, for some reason my continue button to close the achievement panel isn’t workinggg TT. it works when i test it by itself at the start of the game, but when i test it mid game, the close button doesn’t work. I’m thinking some inputs are not allowing to click it, which doesn’t really make sense, as the collision shapes behind it have the process mode set to inherit, which shouldn’t be clickable when paused
. so i have to do a little digging to figure out how to fix that issue.
next, i added the 2 new crabs! i created a new export var @export var special_crab_textures: Array[Texture2D] to hold the rich and robber crab as not to mess with logic of the normal crab. then i created a probability array [0,0,0,0,0,0,1] with 1 being the chance to receive a special crab event. and if it lands on 1 then it randomly picks if its a robber crab or rich crab. i made the rich crab give out 60/30 pearls, and the robber take 25 pearls. i also started setting up the robber crab stealing purchased extras, but i’m just too tired to actually code it rn lol, will finish this up tomorrow morning! lastly, i took the anim player from the menu screen with the bubbles, edited the positions a little and placed them in the game screen!
this game is almost done, just a few more additions and tweaks, and it’ll be ready to ship!

0
vishalya

i set up the musiccc! i think the track i chose fits the vibe perfectly. i have to search for sfx for like ambient ocean noise or bubble noise and maybe when we earn pearls lol. i learnt how to use preload() when i was working on b4 i fade, my other game, and i had the chance to use it here for the music implementation 3_neodog_cute . it was kinda confusing setting the music to loop since the audio stream played doesn’t have a loop property in the inspector, but allows music.loop = true in code xD
i also started setting up an achievement panel, animations, and a global dictionary for unlocking the achievements. at first i set the achievement unlocking with classes, and i would create a new object for each achievement, but i’m lowk just learning classes in c++ at my college and don’t wanna confuse myself with gd script classes, so i just stuck to what i know best, dictionary. i created the name, desc, reward count, and unlocked for each achievement. maybe if i pass my next cs exam i’ll implement a class as tribute in my next game3-grook
since i didn’t implement classes, i wanted to see if there was a thing like dynamic memory allocation like in c++, but after researching a little, i found out that godot manages it memory and cleans up whatever is not being used!! i plan to use some of the variables for the achievement unlocking functions and set them to null when i’m done with it so it frees up the resources it’s holding. this way is wayyy easier than c’s dynamic memory allocation with malloc and calloc happi
i also created 2 animations a fade in + bounce achievement popup and a fade out achievement leaving. i was tracking time on lapse for the ifrst time today but i had some issue and it didn’t let me save the time :(( but anyways i made 2 new crabbiess, a robber crab and a rich crab! i plan to make the robber crab attack and steal your collected pearls maybe every couple of days and the rich crab will also randomly bless you with pearls!

0
vishalya

all order requests are OFFICIALLY not broken when hiding TT. last time i fixed the stars and barnacles, but i guess whatever i did to the bow didn’t apply. i set up the bow variable 3 different ways, through a bool, convert it to an int, and use a string to verify if it was a bow. i wasn’t really sure where exactly it was breaking, so i just changed all instances of a bow to rely on ints, 0 for false and 1 for true. that wasn’t really the source of the issue, but it did make it easier to debug! then i was searching through my code and was wondering why do i have 2 huge if else visibility control blocks for showing the order requests
 and that’s where i saw the problem, i didn’t have an else: block for not showing the ribbon if it wasn’t true cryign. so no matter what, if i had a ribbon at the start, it wouldn’t hide later.
after i fixed that, i noticed a small bug with the collision shapes on the panel select, briefly enabling after a crab left, then re-enabling itself, so i added some code to disable the collision blocks so it wasn’t pressable when the crab was exiting and before a new crab came onto the screen.
lastly, i was fixing up the ending screen. i added 2 crabby dance anims! :DD and created new labels to show the final stats at the end of the game. but for some reason, when i was previewing the game, it kept placing the label where it wasn’t supposed ot. i found out my label didn’t have an anchor on it?!? TT idk how it didn’t have an anchor, but i found that you can set a custom anchor to where your current text is so it doesn’t mess with the formatting you have. i plan to ship soon so i can gather some feedback on the initial stage of this game!!

0
vishalya

omg i finally fixed the visibility issues with the crab order. thank you, past me, for writing detailed devlogs, because i just re read them and figured out how to fix the issue XD. in the last devlog, i created anim tracks for each shell type and deleted my huge code block for position, rotation, and scale of each object. after some testing today
 i realized i needed that block back TT. because after the animation plays, there’s no way to reset the position in the anim player itself, so i used that code as a behind the scenes kind of reset for the next crab. now i need to go back and clean up some of the code where i’ve pasted the same function in different places ot try to target the problem cryign .
I also started implementing a ending screen, i plan to display the stats like total pearls earned, longest streak etc. i created new global vars for the streak and crab sales 3c.
the core gameplay system however is done!!
now i just need to make this game feel more dynamic rather than just a linear flow of crab spawn -> order -> recieve pears -> new day. but i’m not sure if that would be doable for a ship as flavortown ends in 9 days
 we shall see :’))
but i’ll just add my ideas here for future reference:

  • Add achievements
  • Crab stay as long as want, can make crabs stay certain length then be angry instead of sad
  • Streak multiplier for pearls
  • ADD MORE ANIMATIONS, MAKE IT FLASHY
  • Rank system based on pearls, accuracy and streaks
Attachment
0
vishalya

fixed a few things, broke a few things
 cryign! first off i fixed the mixed-up starfish and barncle swapped input. i had swapped the coll shape and the function signal it was emitting, and this was blocking input when pressing a starfish the barnacle would be disabled. next, i fixed the amount of time you can click on reset by creating a new var that stores the total upgrades when an order is generated. i also saw that i was setting my amount of bow to the total upgrades if the value was set to “none” which then that would always be true, setting even a “bow” from bow to 0, reducing the total extra upgrades by one. after fixing that, i then realized my hide extras on the customize panel functions was just hiding the colors and not the extras, so i edited that to actually target the extra upgrades lol. while testing, i was wondering why my extras weren’t animating with the crab leave when called. turns out if you set positions outside of the anim track it doesn’t create that smooth anim transition for move positions TT. so i deleted my huge setup for every rotation, position and scale for extra upgrades cryign and then i created a new anim player to not deal with any issues of calling the same player twice at the same time and created 3 separate tracks for each shell type. after i did that, i noticed the problem where stuff in the order request still shows up after the previous crab left again. ughhh i thought i fixed this bug, but i’ll take a look at it next time i work on this.

0
vishalya

today i started adjusting the ordering system for the crab when extras are unlocked by shop. i had it previously structured base shell -> colors. but now it’s not so linear if a extra is unlocked but color wasn’t asked in the order. so i created a few if else statements to identify these edge cases. the first was to check once the shell type was applied, if there was no color and no extras, then check the order. the second case was after the shell type was applied, and there wasn’t a color, then unlock the extras. and the last case was once the shell type applied, then applying colors becomes true!
i also had to restructure my customize panel script to account for the 3 new coll shapes i added. after that, i connected 3 functions to the main script _on_barnacle_selected(count), _on_bow_selected(enabled), and _on_stars_selected(count). these functions are a little different from my on color selected or on shape selected because those 2 relies on 1 number that would be chosen on random to choose what the shell type would be or the color. but with the extras, i’m displaying 3 extras on 1 screen with the possibility that you could have more than 3 extras on that crab at a single time. so instead of appending a string type, i used ints and bools!
in the video below, there are some visibility issues, i haven’t gotten there yet TT, but my next to-do will be to show the customize panel, which extra is supposed to be correctly displayed, and resetting the positions and visibility states once an order is done. i will also find some fitting music and put it on the game! :3

0
vishalya

pause button now works!! i added more @export variables for the paused and normal sprite textures and set the texture to the paused or unpaused button, depending if the tree scene is paused or not. this time, i set the process mode to “always” so that the pause button is always clickable, so that the button always works :DD i don’t really have a popup for pause for ingame settings, at least not yet since i have my 2 setting displayed already: pause and music. but maybe to display days done so far, or total perals earned? i’m thinking maybe adding achievements too! but maybe that’s too far fetched lol.
i also set up the toggle for my music pause and resume button, but haven’t loaded any audio in yet, i need to find the perfect one :3
I also started working on setting up the extra upgrades for the rest of the shop items! since last time, my problem was with the position of the starting shells not being visible in the frame, i worked on that first. usually i would do node.position.x and .node.position.y to define the location of the node, but i found that using Vector2() can contain both the x and y position at the same time, reducing my positioning code lines by half! i also found that adding rotation to each node. i found it interesting that the inspector changes the rotation in values of degrees, but when assigning the rotation of a node, it rotates in radians instead :0 so i had to add _degrees to the script to make sure it rotates in degrees only!

0
vishalya

raised crab upgrade shop item prices by 50% hehehe. i was testing a few of the features and found this edge case for the shell display. if you get something wrong, the old shell stays on the crab and a new shell is added on top :( i fixed this by creating a helper function hide_all_crab_upgrades() and calling it when the order entry was wrong to hide all the crab upgrades to eliminate ANY chance of future bugs lol. i also found another bug that made the order request shells stay even after the crab left. turns out i was only visually resetting it but not resetting the code values for the order request. since i didn’t reset it in the code, my crab_order() function automatically updated the ui and displayed the past order when it wasn’t supposed to. ohh i also finally fixed the crab respawning even when the hour count was 24!! i switched from using an if statement that relied on “hours” tracked to a bool flag that tracked if the day was active. since my process() runs every frame to update and track the hours passed, i set that to control wheter my day would end or not if current_hour >= 24 and day_active:end_day() and i toggled the bool blag to day active = false inside the end day function for added safety nothing else in the script tries to break it, and it worked!!
i’m thinking i’ll add the pause system next since i just learned how to implement it in my previous projct, before i fade :333

0
vishalya

omg guys i finally figured out what the problem was with the selected colors not applying 😭😭. i set up a starting position for the base shells so that when they exit using the animation player, the position can be reset every new crab order! i spent so much time printing statements and deleting and rewriting code to figure out why the colored shells weren’t appearing, but then the next shells didn’t show after pressing the colored shell for the first time because i moved the position keyframe in the animation player, but never reset it!! it was such an easy fix, but took me so long to figure out TT. but i guess it’s a good thing in it’s own way, i restructured some of my code to be more readable and work better, to be less buggy! i fixed a bunch of my collision shape mapping, and migrated some items into arrays and for loops for reusability later in the game!
next, i HAVE to figure out why the crab isn’t leaving when the day is done. it’s probably a silly fix like the colors not showing, but we’ll see! hopefully it’ll be easier to add the rest of the accessory addons know that i know i need to apply a saved position for those :’)
i’m thinking to increase the items in the shop by a lottttt, to make playing the game lasting so you actually play for 20 days. and maybe even incorporating special events?? like a royal crab that gives you extra pearls or a events like a shark attack that messes up your stand and takes away one of your purchased accessories? lmk if you have any ideas to make this game epikkkk :3

0
vishalya

so i got the color apply function to kinda work TT (it only works when it wants to cryign ) i had to change up my shell selected script that emits a signal to match the collision shape rather than relying on area 2ds. previously, my cutomization panel script emits a signal for shell selected in the main script in an array of 3 items only
 but now that i’m adding in upgrades like colors, i think i’ll just have to restructure the customization panel to an area 2d for each crab add on to make it easier to code TT. i replaced some of my huge blocks of code for turning visibility on and off with helper function calls and honestly, it makes it so so much more readable! now i’m running into an edge case for when the selected color is “none” but the game still expects you to input a color because “none” is in the color list.
when the colored shells do apply, some of them aren’t positioned properly, which i have to fix. but the color applies either when you press the shell correctly and the right color, or if you press the correct shell and the wrong color the color will appear when the crab leaves, orrrr it just won’t show at all. i really need to figure out how to fix this so i can move onto adding more features in this game 3c

0
vishalya

i started working on the crabs ordering shells with colors! i need to find out why the colored shell isn’t showing though when you press the color :’))
i modified my on_shell_selected func with an if else to check normal flow vs flow with colors then added 2 helper funcs to apply the colors!
today i also learnt you could set properties based on bool results of other vars than just true/false!
purplepanel.visible = Global.upgrades["purple"]
which is soooo useful i’ll def be using more of this in the rest of the game

there are a fdew bugs i’m encountering, im just writing them here so i can reference them later when trying to fix it :D

  • start button re enables after done purchasing from shop
  • crabs spawning when hour = 24
  • new crabs appear over the last spawned buggy crab, need to reset states of the last crab and make hidden
0
vishalya

created a functional shop system that subtracts total pearls earned when you buy something. i did this by creating a global variable that tracks your pearls earned per order and subtracting that peral amount when pressing an area2d in the shop overlay! I currently have 3 colors: purple, yellow, pink, starfish, seaweed bows, and barnacles available to purchase on the shop! I also implemented a pick random function for the colors only if you’ve purchased them, so they show up in the order request. next, i’m going to add the color showing on the crab shell and check order logic for the crab colors.

0
vishalya

Reordered the scene structures and moved nodes into canvas layers to add the shells into animation players, where they would still be behind the crab. Then I separated the happy and sad crab orders and only gave 5 pearls if the crab was sad. If you give the crab the wrong order, then instead of just leaving, it allows you to retry giving a good shell. Lastly, I also started setting up the end day screen with the shop and next day.

0
vishalya

I created texture arrays for my 3 types of crabs and arrays for my shells, and learned about pick_random() function to randomly choose which crab appears and which shell is being ordered. I set up enter and leave animations for the crab through an animation player with visibility and position tracks, as well as updating the global pearl count variable if the order is correct or incorrect, 10 if correct on first try, 5 if correct on 2+ tries. My next goal is to animate the shells so they drop and store the starting position in a variable to reset when a new crab arrives.

0
vishalya

I set up hover states using @export variables in the script for my area 2d buttons by loading in textures for the hover and normal states in the inspector. I also set up the game scene layout with 4 major sections: the crab. the order stand and accessories, the customize panel, and shop! Lastly, I added the scene changes from my menu screen to the game welcome screen.

Attachment
Attachment
Attachment
0
vishalya

hi guys! i created a tonn of assets for the game in figma and set up the menu screen in godot. i added little floating bubble animations to make it look a little cool! :3 also experimented with godot splash screen and kept it as the water background. hopefully, if my game isn’t too heavy, it can stay that bg so the loading doesn’t take too long, and it just looks like it starts on the menu screen!

Attachment
1

Comments

Vishy
Vishy 4 months ago

You made that! That’s crazy, since I started this week learning it has been a bit hard, good luck!