10/10, best spaghet
Hyperspace Wizard
Creator of
Recent community posts
👀 Wow, that's insane. You clearly win, haha. I can see what you mean, I set it up that way so -% upgrades would have diminishing returns and not go negative but I'd like to take my time and redo the whole upgrade system. I've uploaded a new build where the camera shake is clamped 👍 Thank you for playing and your feedback!
The sound effects were generated using sfxr: http://www.drpetter.se/project_sfxr.html
And yeah, a shader was used to invert the colors when gravity changes.
Pastebin Links:
GrapplingHook.cs: https://pastebin.com/Dy88kMMG
Grapple.cs: https://pastebin.com/f393s7Cb
Hey there, Lauritz. Thank you so much for checking out my game, I appreciate the feedback.
Regarding the grappling mechanic, I'm actually utilizing the physics system in Unity rather than raycasts. The code is a little messy but I'll add some links to the grappling system on pastebin anyway. I'll try to explain what I'm doing as that may be a little more helpful than digging through my spaghetti code.
The grappling hook system consists of 2 main components, the "GrapplingHook" (I sort of think of it as the gun) and the "Grapple" (the projectile fired by the grappling hook). You could certainly do the "Grapple" part with a raycast instead of shooting out an actual physics projectile. When the grappling hook is fired the grapple projectile gets shot out and has a GameObject variable for storing what it is attached to initially set to null. When the grapple collides with something it checks to see if it is in the "grapplable" layer specified in the GrapplingHook script, and if so it sets its attachedTo variable equal to whatever it has hit. Otherwise, if it has hit something not grappleable or goes beyond a maximum range an UnGrapple() method is called to reset the grappling hook.
At this point we can fire the grappling hook and tell if the grapple has hit anything. Now I messed with a distance joint attached to the player object to get the physics behavior I wanted whenever the grapple actually did hit something. The details of this are in the Grapple.cs OnCollisionEnter2D() method. On the DistanceJoint2D I was sure to check Max Distance Only so that there isn't an unnatural feeling pole vault behavior where the grappling hook cannot reduce it's length.
Did you make the graphics? It looks pretty beautiful and the calm music adds to the atmosphere. the progression of difficulty was pretty nice. I found that sometimes my ducks would wander off a bit or not follow me immediately but it kind of added to the experience of feeling like a mother duck. The delay between actually pressing the jump key and jumping was kind of weird at first but it grew on me. Very well done.