MAJOR FISHING UPDATES, READ NOW
Hello everyone, today is the best day for me! So many things happened and I can’t wait to share it. So please watch the video added below because it is basically all I did today. If you would like to know what I did yesterday, im on Vishy Labs on Youtube and Instagram, with that said lets get into todays progress.
Fishing Logic
I basically am done with the fishing game, but there were major things in the logic that had to be changed, and I would like to talk about it. So first I have different rarity fish. At the beginning I just made it so it pulls a random fish, but that doesn’t really aid the term rarity, and in the last devlog I was talking about how a fish was chosen, by the randi function. So to actually turn it into a rarity I just made the randi range longer, from 1-3 to 1-7, so the first fish takes number 1 2 and 3, the second takes 4 and 5, the third takes 6, the golden takes 7. Alot of places in my code, I forgot to change it because in the original code I had made it so there were only 1-3 so then in the new code when a number past 3 came, it didn’t know what to do and it ended there. I would also like to learn about this new thing I learned, clamping. $Outside/Slider.position.x = clamp(
$Outside/Slider.position.x,
0,
$Outside.size.x - $Outside/Slider.size.x this is clamping. There are 3 inputs, value, minimum, and maximum. You might be wondering how did I use it in my game. Well for the slider, I need to make sure that the slider does not go past the barrier/border/past the edge of the outside panel. Because if it does, it decreases the value of the game (by the value I mean it doesn’t look good for the user). So I just made the value the position of the slider, and the minimum is 0 and the maximum is the big bar, subtract the slider size (all x values). This all makes it so the slider can not escape the barrier, because I am changing the position with tween, so it moves, and since the position is manually changed it doesn’t mean that it can have contact with the collision body. I would also like to take about tween. Tween is built in godot, and there are many ways to use it, I just used it so that when I change the position of the slider it is smooth and I do not have to use an animation player ( animation player would not work because then in is all predictable). So for the tween I put what I want to smooth, and what duration, and then in the code I set the distance. All theses little features is what makes my game look better and more playable. And that is it for the logic.
Fishing Visuals
If you saw the video, I think you will be very pleased with the visuals. All of this is being made in figma, as it is much easier to make than libre sprite. So the waves are just the waves from the first scene, but just stacked. Then the brown stuff is not a dock, it is the ship (like you are on the edge fishing). Then everything else is pretty much self explanatory. So to make it replaced from last time, the only thing I did was add a background, change the bobber, and scale the fishing line to be attached. And because of this, in my code I am resizing the button, so the user can not press on the dock when fishing but when clicking for the actual game part, they can. That is it for today, by tomorrow I am pretty sure the whole fishing mini game will be done, with the fish popping up with a banner, and I will most likely be starting the next game.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.