Current Events > I've been working on a 3d platformer game (in unity)

Topic List
Page List: 1, 2, 3, 4, 5
kirbymuncher
04/16/24 11:52:44 AM
#201:


TheGoldenEel posted...
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

---
THIS IS WHAT I HATE A BOUT EVREY WEBSITE!! THERES SO MUCH PEOPLE READING AND POSTING STUIPED STUFF
... Copied to Clipboard!
TheGoldenEel
04/16/24 12:25:13 PM
#202:


kirbymuncher posted...
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
that's a good call

I still haven't decided what the final layout will be for controls. I'm leaning towards there should be a jump button, and action button (for talking + others), and an attack button all mapped separately. I think that's the most common setup these days

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
04/17/24 5:07:03 PM
#203:


Dialog achieved

https://youtu.be/dOxO2xAS-zw

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
04/18/24 10:53:46 AM
#204:


Im trying to shift back over to more creative stuff now that Ive got a solid foundation of the mechanics built out

so far Ive just used painting solid colors on UV to design characters and such, but I want to get better with shaders and texturing, etc

trying to find a decent tutorial on how to create things like grassy ground, rock walls, trees, etc

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
04/18/24 5:26:47 PM
#205:


before:
https://gamefaqs.gamespot.com/a/forum/d/d2b8fc95.jpg

after:

https://gamefaqs.gamespot.com/a/forum/b/b95fd14f.jpg

obviously it's just the ground at this point, I still have to build up all those rock structures. but I'm getting the hang of texture editing so it should be a little more straightforward as I continue

https://youtu.be/ZDBYgM24wbI

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
04/19/24 4:25:57 PM
#206:


came across sort of a cheat code to drawing multiple materials onto objects

there's a node to split out your vertex paint into RBG values, which can then be used as the input to the mixer. Usually one would have to make an alpha layer that has black and white only, and stack those on top of each other--this makes things a little quicker (if you're using fewer than three materials on an object
https://gamefaqs.gamespot.com/a/forum/d/dd497d80.jpg
https://gamefaqs.gamespot.com/a/forum/8/8a1b7ab6.jpg
https://gamefaqs.gamespot.com/a/forum/7/7633f2e3.jpg

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
04/19/24 5:52:26 PM
#207:


here I am, painstakingly moving vertices to make a rock wall look random, when it turns out there's a tool for that

https://gamefaqs.gamespot.com/a/forum/8/8bf60351.jpg

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
kirbymuncher
04/19/24 6:38:12 PM
#208:


TheGoldenEel posted...
when it turns out there's a tool for that
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 unrelated

---
THIS IS WHAT I HATE A BOUT EVREY WEBSITE!! THERES SO MUCH PEOPLE READING AND POSTING STUIPED STUFF
... Copied to Clipboard!
TheGoldenEel
04/19/24 8:49:08 PM
#209:


kirbymuncher posted...
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 unrelated
This 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

been trying to avoid using third party plugins as much as possible for my purposes here. Id rather do everything from scratch (outside of using the engine itself)

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
04/21/24 12:54:29 PM
#210:


Bumping this so it doesnt get deleted but my wife just had a baby yesterday

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
Tyranthraxus
04/21/24 12:55:58 PM
#211:


TheGoldenEel posted...
Bumping this so it doesnt get deleted but my wife just had a baby yesterday
Congrats

---
It says right here in Matthew 16:4 "Jesus doth not need a giant Mecha."
https://i.imgur.com/dQgC4kv.jpg
... Copied to Clipboard!
TheGoldenEel
04/21/24 3:33:34 PM
#212:


Tyranthraxus posted...
Congrats
Thanks!

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
04/23/24 1:16:53 PM
#213:


Built out some more platforms and some foliage

https://gamefaqs.gamespot.com/a/forum/9/99ab6152.jpg

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
04/25/24 5:31:51 PM
#214:


Looking into building a rope bridge to connect those bigger platforms. I'm not trying to do anything fancy with physics, just have something that looks decent and maybe bounces a little when you jump on it

came across this tutorial that (somewhat poorly) shows how to use geometry nodes in blender to build a rope bridge, something I hadn't used before but which seems pretty powerful.

https://www.youtube.com/watch?v=5hFdgNllC98&t=250s

end result looks good too

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
04/26/24 12:44:30 AM
#215:


and now we have a bridge

https://gamefaqs.gamespot.com/a/forum/4/44ccb7af.jpg

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
04/27/24 11:43:20 PM
#216:


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 be

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

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
RetuenOfDevsman
04/28/24 1:52:15 AM
#217:


TheGoldenEel posted...
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 be

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.

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.

---
There's a difference between canon and not-stupid.
... Copied to Clipboard!
TheGoldenEel
04/28/24 1:31:48 PM
#218:


RetuenOfDevsman posted...
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.

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.
Yeah one option is something like Mario where theres coins everywhere but also power stars as major rewards

Im trying to do something closer to banjo Kazooie where each level has a set number of one thing (used as a currency for upgrades) and then also the jiggy/power star equivalent for platforming challenges

i suppose I could do a split where some are easy and obvious to get along your path, with more hidden for those that search

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
Fluttershy
04/28/24 1:34:53 PM
#219:


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.

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.

---
https://imgur.com/a7zbPmp.gif
... Copied to Clipboard!
TheGoldenEel
04/29/24 2:31:06 PM
#220:


Fluttershy posted...
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.

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.
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

and I dont want to have a bunch of different currency collectibles, that would just be annoying

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
05/01/24 12:51:49 AM
#221:


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.

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

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
RetuenOfDevsman
05/01/24 8:32:49 AM
#222:


TheGoldenEel posted...
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.

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.

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.

---
There's a difference between canon and not-stupid.
... Copied to Clipboard!
kirbymuncher
05/01/24 10:14:24 AM
#223:


Unity has a built-in function for comparing floats
https://docs.unity3d.com/ScriptReference/Mathf.Approximately.html

---
THIS IS WHAT I HATE A BOUT EVREY WEBSITE!! THERES SO MUCH PEOPLE READING AND POSTING STUIPED STUFF
... Copied to Clipboard!
TheGoldenEel
05/01/24 11:56:01 AM
#224:


RetuenOfDevsman posted...
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.

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.
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

kirbymuncher posted...
Unity has a built-in function for comparing floats
https://docs.unity3d.com/ScriptReference/Mathf.Approximately.html
Thanks, thats good to know. There are lots of utility functions I just have no reason to know about until I come across them

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
Topic List
Page List: 1, 2, 3, 4, 5