You are browsing as a guest. Sign up (or log in) to start making projects!

5h 12m 1s logged

You can Finally Fix the map

Hello guys, we have spent another 5 hours on this game. I have got to say, I am starting to love this game. Day by day, the more I do the more I get drawn in. I have got to say at the beginning I didn’t really feel like doing this game. But now after I see everything I am amazed. As usual if you want to see yesterdays progress on the captains room you can see it on Vishy Labs or https://www.youtube.com/shorts/0w2feNxZQ5A

The Map

For the past few day’s I have been working on the map scene, if you see it, it may not look complicated but I have spent longer than the fishing minigame to create this, let me explain why. So there are 6 maps, and 6 panels. One panel for each map. If you place a map in the panel, either that is the right panel to place it in or the wrong one. There is over 40 variables for this scene, since there are 6 buttons, we have 6 of placed 1-6 and 6 of map 1-6, (now these are for dragging the maps) 6 offsets 1-6 6 dragging 1-6, 6 inzone 1-6 and for the panels 6 pan 1-6. So this makes it hard to keep track of all of them. And let me talk about the logic, so when you press a button like hold it down you have to change the position with the offset and the mouses position, but now we have to check if the piece of the map is intersecting with the panel, and if it is, which panel is it intersecting, then if there is already a panel there. And it gets ever more complicated, if there is a map intersecting or above 2 panels, then you have to subtract the values from all the panels and see which one is the closest from the center of the map, because in godot for some reason it likes putting its point in the top left. And I have made over 8 different functions not including the button up and down or godot made functions just for this. This has got to be one of the most complicated minigames yet but im glad I did it. We have function snap map which gets the center of the panel and places the center of the map there, and this only works if that panel doesn’t have a map and the map was placed there. We also have func_panel_taken you input the panel which in my case is closest because that is what I have put for the closest panel in the code, and you also input which map your moving, so it ignores that when it does the check for intersection. But the process_function is the most complicated to keep track of. Since it does 60 times per second, you have to make sure everything doesnt run more than once by having variables that become true when the condition is false. And you have to make sure what your doing is supposed to be checked, because if it is not and the values get changed, then you have to find a new way to implament it. If you guys saw the attachment I have showed a little of the sideview1 and I will get more into that tomorrow. Bye guys!

0
2

Comments 0

No comments yet. Be the first!