In order to add a 'talk to npc' feature, I'm doing an OverlapSphere check to find if there's any NPC object near the player, then if there is checking if the player is facing them. If so set them as the interactable NPC, and change the function of the jump button to talk. but idk it seems like I could come up with a better/more efficient way to do it.I dunno for sure what the best way to do this is but I recommend renaming SwitchToJumpState since somewhere down the line you will definitely be confused why a function with that name sometimes switches to talk state
I dunno for sure what the best way to do this is but I recommend renaming SwitchToJumpState since somewhere down the line you will definitely be confused why a function with that name sometimes switches to talk statethat's a good call
when it turns out there's a tool for thatI just planned out how I was gonna make my dialogue system and etc, but then the day before actually implementing anything I found a really good plugin for it while looking up something totally unrelated
I just planned out how I was gonna make my dialogue system and etc, but then the day before actually implementing anything I found a really good plugin for it while looking up something totally unrelatedThis isnt even a plug-in, theres literally a built in option in blender to highlight vectors and add some amount of randomness to their position
Bumping this so it doesnt get deleted but my wife just had a baby yesterdayCongrats
CongratsThanks!
Ive been sick and also have a newborn at home so havent been able to make much progress. Still working on the bridge to make it a little more specific to what I want it to beThe handful of collectathon games I've played had a few different types of collectibles: one type that's freaking everywhere, one type that's about puzzles, one type that's about defeating tough enemies, etc. You could always have types that reward exploration or challenging platforming but still have some coins or whatever right there where nobody can miss them.
trying to decide how I want collectibles to be. I want them to be more hidden/off the beaten path but also it feels kind of empty if there arent some along the main pathway
The handful of collectathon games I've played had a few different types of collectibles: one type that's freaking everywhere, one type that's about puzzles, one type that's about defeating tough enemies, etc. You could always have types that reward exploration or challenging platforming but still have some coins or whatever right there where nobody can miss them.Yeah one option is something like Mario where theres coins everywhere but also power stars as major rewards
You can tutorial this one pretty easily by having an obvious lock (locked door, cliff too high to jump, obvious X on the ground, etc) blocking the obviously blocking the path to the goal and hiding the key (along with the collectable) around a corner somewhere.
i think the game that did collectibles best was donkey kong country 2, but that's primarily because they were implemented in such a way that once you got a feel for what the dev was doing you got an expectation as to where to look.See the thing is in DKC the bananas are there to give you extra lives, and thats kind of obsolete nowadaysbut it also leaves a void where theres not really anything to replace that mechanic of having fairly useless little collectibles that you can use as breadcrumbs or reward going down a certain path or whatever
mark clever ideas you have in terms of hiding things and skill demands with collectibles. leave breadcrumbs for the players that are trying to get into your head, not busywork for players looking for a dopamine hit.
so I was recording a video of a problem I was having where the player would get all jittery on slopes instead of just standing still, and in the process of recording the video I realized what was wrong.Yeah there are very few cases in which you ever want to check a floating point value with an equality operator, for multiple reasons. For example, if you add 1/3, 1/3 and 1/3, this isn't going to be equal to 1, because of rounding error. It had to round the 1/3 to get it into a register to perform math on it. This is also the reason most people advise you to use double-precision floating point values over the standard ones, even if you're not using teeny tiny numbers.
In order to calculate if I have to change the direction the player is facing, I was comparing the components of the velocity to 0--if x and z movement components were zero, player standing still, don't have to change the face direction.
But on any degree of slope, the actual velocity can be some teeny tiny number that is slightly greater than 0. so the player was trying to face that direction on slopes
anyway, now it works the way it should
https://gamefaqs.gamespot.com/a/forum/6/6c9dc5ea.png
and here's a video of the first area of my level built out with better geometry than the basic shapes I had been previously using
https://youtu.be/coEq5ERkrgg
Yeah there are very few cases in which you ever want to check a floating point value with an equality operator, for multiple reasons. For example, if you add 1/3, 1/3 and 1/3, this isn't going to be equal to 1, because of rounding error. It had to round the 1/3 to get it into a register to perform math on it. This is also the reason most people advise you to use double-precision floating point values over the standard ones, even if you're not using teeny tiny numbers.Yeah its a dumb mistake, I should have known. Im doing the same check for very small float values in other places including the controls themselves
What you should almost always do instead is check if the absolute value of the difference is less than some small number. So instead of x == 0, you should be checking abs (x - 0) < 0.001 or something similar.
Unity has a built-in function for comparing floatsThanks, thats good to know. There are lots of utility functions I just have no reason to know about until I come across them
https://docs.unity3d.com/ScriptReference/Mathf.Approximately.html
Do you haveI have a double jump
1: a grapple
2: double jump
I have a double jumpthis is the way
I'm Considering some form of grapple as an unlockable ability but it would probably be something you can only use in specific points
I'm Considering some form of grapple as an unlockable ability but it would probably be something you can only use in specific pointsmight be worth trying to make a grappling system even if it doesn't make it to the game.
This is really awesome stuff that you're doing.I will probably need music and sound effects eventually but as my hope would ultimately be to release this in some way I'm trying to not involve anyone else until I have more of a long-term plan
And congrats.
Need original music? I've got a ton of material.
might be worth trying to make a grappling system even if it doesn't make it to the game.thanks
probably the most fun i've had with game dev was building a grappling system when I was building my generalized character framework.
you're making really solid progress. totally blowing my early days of gamedev out of the water in terms of consistency and progress.
I also remember trying to build a grapple system in one of my first games (2D) and it drove me totally insaneyeah see above about the swinging rope haha. The physics can get real wonky