« first day (3939 days earlier)      last day (30 days later) » 

12:03 AM
Hahaha. Maybe one day I will be in a place to ponder such questions.
 
12:22 AM
@DMGregory woa
 
Mm?
 
 
2 hours later…
2:16 AM
@DMGregory the math pic up there
 
I mean it's just some circles and lines...
 
 
10 hours later…
11:56 AM
1
Q: ItemManager / Creating Managing Item Instances

Pheonix2105I am looking for advice on how to proceed, currently in my project all items extend from a base ScriptableObject called BaseItem, this class has a property that holds the ItemPrefab for when the item is spawned in-scene. [CreateAssetMenu(fileName = "BaseItem", menuName = "Item/New BaseItem")] pub...

 
 
3 hours later…
2:28 PM
Morning
 
Good morning!
Hmmm.... thinking again that we might want to create a canonical Q&A for "Why don't collisions work as expected when I move objects with their transform? [Unity]" - we get variants on this regularly and it would be convenient to have a common duplicate to refer them back to.
The individual questions are usually very wrapped up in "Why doesn't [this specific physics setup] work?" so they usually aren't clear dupes of each other, even if they share a common cause.
 
2:52 PM
oh right
Sounds like a good idea
 
Like everything else here that is outside of my wheelhouse.
 
That's why it's good to have lots of different folks around here, so we can cover more ground with our different wheelhouses. 😁
 
True.
 
How would you describe your wheelhouse currently?
 
2:54 PM
I wasn't complaining. I love this room. But most of the game dev stuff is beyond me.
The only thing I would consider myself competent in is SFML
I guess I have a background in storytelling before I ever got into gamedev. So probably that a little as well but less so as it is specifically nuanced for the gamedev world.
 
Oooh, that reminds me, I saw an upcoming talk from Emily Short for this year's GDC that looks intriguing: Sigmoids for Storytellers: Mathematical Solutions to Narrative Problems
 
That looks fun
 
3:35 PM
My greybox prototype is coming out... boring. :(
 
@Wasabi yay! it took you 1 week to figure this out instead of 1 year!
 
They often start that way. That's why it's so important to prototype early.
 
It's very unlikely prototypes are immediately fun
 
My brother is like: "GET CHAPTER ONE DONE IN 1 WEEK! I KNOW IT DOESN'T TAKE TOO LONG!!" And I'm like: "Did you know that it might take me up to 5 years to make the entire Chapter One? And you're demanding that I do it in a week? Did you also know that I am still learning how to script c#?"
 
Dead by Daylight's early prototypes did not have the Terror Radius
the Killer just popped in from around a corner and grabbed you
 
3:40 PM
Aww
 
was not fun
no suspense
 
Yeah
 
they added the TR and boom there it was
 
Yippee!!! For me, that be like: " It's no fun hopping into, and fling, a big grey box! " Then the B-29 shows up and it be like: " Yaaaaaay! The game is actually fun now!!! "
 
Folks without game development experience usually underestimate how long game features take to make.
 
3:41 PM
yeah
 
Folks with game development experience are usually amazed that games ever get finished at all.
 
understandably so
 
Yeah
 
3:56 PM
im working on a rapid fire gun - 100 bullets per second. The audio clip is for a regular single shot weapon. These are factors i cannot change

it sounds like crap. I tried increasing the pitch by (1.0 / weaponFireRate), and its a little better, but still not right. Does anyone have better ideas?
 
You need multiple channels
 
i have multiple channels
 
ok then!
 
each burst of fire (100 per second) has its own channel
the sound effect is about 1 second long (or 0.01 second long after my above pitch change)
 
I just don't think you're going to get good results at 100 per sec
for a single shot sound
probably play 1 every 5 shots or something
 
3:59 PM
not my choice. User generated content
wondering if there is any trailing effect or something that would make it sound better. Ive never run into this problem before
 
I don't think sound systems are meant to play a sound every 0.01 of a sec
it's just going to sound bad
 
You might want to pre-build a sound clip that "sounds like 100 per seconds" and just play one sound as long as the trigger is pressed.
 
That would be ideal, but he says he can't do that
he's stuck with the one sound
 
I think Vaillancourt meant preprocessing the user provided sound into a longer clip
 
Not really, but that would do too ;)
 
4:02 PM
Arguably the solution as to how to bake that clip would probably solve this issue too maybe
 
Yes, generating a stream out of a clip could be the solution.
Because if it's user generated content, will there be "more entities" that produce that stream of bullet? If so, you could end up having multiple entities that produce that many sounds, I don't think it would end well to play 1000 sounds per second... :P
 
I did learn from a sound designer that there's a limit to our perception of synchronicity between sounds and visuals. Show a video of one person walking, the footsteps have to match 1-1 perfectly. Same for 2-3 people walking. But a crowd larger than that, our brain's audio processing just gives up trying to assign specific steps to specific people and goes "close enough"
I wonder if you could take advantage of something like that for your weapons. Can the player meaningfully discern whether exactly 100 copies of the sound have played in this second?
 
4:21 PM
woa that's interesting
man the mods dominate chat here sometimes. :D
 
these are clever solutions. Thank you. I am going to try a bit of both

I'll put a max speed on a bullet sound clip. So lets say 0.1 seconds. Then you will only have 1 sound per 10 bullets, but as @DMGregory said, they might not notice. And as @Almo said, that fixes the issue of sounds not meant to play that fast
 
@Almo 😅 Sorry, don't mean to take up too much space...
 
@Evorlor Increasing the speed changes pitch, so unless you're using a time stretching algorithm, a pitch change is required. Not sure about the math on the stated pitch change, but it may require some experimenting to dial that part in.
 
ive been intentionally changing the pitch, because i think it sounds better - faster = higher pitch
so i said i was increasing the speed, but that wasnt true - i was just increasing the pitch (and speed as a bi-product)
 
You might also try playing with the volume too. Increasing the volume on the first shot for instance.
 
4:29 PM
A little random variation in pitch can also make rapid-fire replays sound s bit less like one clip on loop.
 
@DMGregory One time I tried making applause using the MIDI clap. My initial attempts sounded awful. When I added some variety to the duration & volume it got a lot better.
 
one thing i was going to try is keeping the full sound play for the full second, but having it fade out very rapidly
ive got minor pitch variation, but ill try bumping that up
 
What format is the sample in?
 
4:44 PM
Also, if possible, you might want to cross check your result against something that can actually fire at that rate, like the M134. It's possible that it sounds bad because were making assumptions based on weapons that have a much lower rate of fire. Most rapid fire weapons that aren't vehicle mounted fire at around 10-20 rounds per sec.
 
the sound effect was designed to be fired at a rate of about 10-20 rounds per sec. Im trying to manipulate that sound effect to make it sound like its supposed to be fired at a rate of 100 rounds per second
format is .wav
 
5:04 PM
@DMGregory hahaha it wasn't a complaint :)
 
I will make an effort to talk more so there are less blue names.
I've been meaning to update my name
 
5:20 PM
Why did I think Physics was going to be easy?
 
What kind of physics?
 
Physics 101 Which means Newtonian Physics
I have picked up a lot of surface level knowledge of it over the years and it was easy for me in HS, but I'm not as sharp as I was 20 years ago. I'll do okay, I just went into it thinking it would be a no effort class.
 
:D
 
I have a tendency to make foolish assumptions.
 
I bet it'll flow smoother once you get some time practicing it. 20 years ago you were doing this stuff more regularly, so it's natural to be rusty at first.
 
5:27 PM
You're probably right
 
yeah :)
 
When my player rotates using arrow keys, the more I rotate up and then rotate to the side, the more it screw itself up. It starts turning on the Z axis even though the script is supposed to detect that and fix it. But the point is that it isn't rotating on Z axis, it is rotating on what it thinks is the new X axis, which is the equivalent of a rolling turn on the Z axis.
I rotate on world rotation, should I be rotating on local?
 
51
Q: I'm rotating an object on two axes, so why does it keep twisting around the third axis?

DMGregoryI see questions come up quite often that have this underlying issue, but they're all caught up in the particulars of a given feature or tool. Here's an attempt to create a canonical answer we can refer users to when this comes up - with lots of animated examples! :) Let's say we're making a fi...

☝🏻 This question comes up a lot, so I made a post all about it. 😉
 
5:42 PM
Wow. All the GIFs are really helpful to better-understand the point.
Hmm.
Is it just RotateAround, or is it me? I added Space.Self to both of the RotateAround for vertical rotation.
But the compiler says "";" expected" right where my "," is, and it also says a whole bunch of this: "Unexpected "}"", "Unexpected ";"", and "Unexpected "{"".
 
It is 100% you.
 
Yeah, that is what I thought.
 
Want to share the piece of code causing the compiler error?
 
Here:
   if (Input.GetKey (KeyCode.UpArrow))
   {
       transform.RotateAround(target.transform.position, Vector3.forward, (37 + shiftAdd)  * Time.deltaTime), Space.Self);
   }
   else
   {
       if (Input.GetKey (KeyCode.DownArrow))
       {
           transform.RotateAround(target.transform.position, Vector3.back, (37 + shiftAdd) * Time.deltaTime), Space.Self);
       }
   }
 
extra parenthesis after deltaTime
 
5:57 PM
Oh
 
Your IDE probably has capabilities to highlight parenthesis-pairs to help spot these
 
Ha, yeah. Definitely 100% my error.
IDE?
I use...
Notepad.
 
Stop it.
 
well, it's time to stop using notepad
 
Yeah I think we've recommended that you use a proper IDE several times
 
5:58 PM
Use an IDE.
 
wasting our time because you're not using a real IDE is rude.
 
No helpful highlights, no Breakpoints, None of it.
 
You're not helping yourself.
 
that's not a badge of honor. It's a badge of "I'm making my life hard for no reason"
 
@Almo What kind of IDE should I use? I got one IDE, but it keeps asking me for a bunch of stuff and I can't use it because it never stops asking me for more stuff. It is Visual Studio Code. It sucks.
 
6:00 PM
VSCode does not suck
I developed Cognizer with it
 
VSCode is great and fairly light weight
 
Personally I prefer Xcode, but VSCode is very competent for being free
 
Not using an IDE is adding time and frustration to the development process. If you want to be hired as a dev, and you say you use notepad to program, the'll shred your CV as soon as the first interview is done.
 
I can't speak abot Unity integration but Visual Studio is also really great
 
VSCode's unity integration is mostly good
 
6:01 PM
But, it keeps asking me for Net core that I can't get because "Your computer already has this"
 
I ran into a few issues with weird shit like "space in file path to unity .dlls"
but once it was all set up correctly, worked very nicely
 
@Almo since when were you a moderator? Maybe I just never realized the gem until now.
 
I tell you what though, learning to use a debugger is such a huge benefit.
 
@Wasabi Investing some Googling time to resolve these will pay itself back really quickly given all the help you will get from the IDE
 
I hesitated at first, being used to printf debugging.
 
6:02 PM
Huh
 
but... when you're in C++ you really want breakpoints to check pointers and shit
 
But I can't get a Net core I already have
 
solve taht problem.
it cannot be insoluble
 
hmm.
 
Yeah in C++ adding the printf's and recompiling is so slow that a debugger is a must :P
 
6:03 PM
if it takes you a full week to solve it, it will save time in the long run
 
Right
 
coding with notepad just isn't an option
 
Good point.
 
you might think it is, but it's not
I don't think I'm unique in this, but I lean very strongly toward "get things working so I can concentrate on developing, not other BS" because my #1 goal is to publish something, not to faff about with stupid shit.
Spending who knows how much time looking for mismatched ({[ is not a good use of my time
 
I'd say uninstall VSCode and reinstall it. Something probably just got messed up with your installation.
 
6:06 PM
Yeah
 
Good call
 
Or, the Community version of Visual Studio is free too - I use that with Unity.
 
Does VSCode need an extension to run c# it thinks it does.
 
I think most of the languages support in VSCode is provided as extensions
 
@Tyyppi_77 Prints are a great way to narrow down where a bug is located, though!
 
6:07 PM
it does, but it's easy as hell to install
 
I had to use prints over the weekend because I somehow managed to break the link between Unity and my debugger and I didn't have time to troubleshoot both that and my jam game. 😆
 
:O
 
Prints?
What is this?
 
Is hell easy?
 
Not only is it worth it to have a functioning IDE. But with most development tools you will often run into pesky configuration problems and spending the time learning to solve them will pay dividends the next time you need to run a different tool and it won't work.
 
6:08 PM
In Unity it would be Debug.Log("Something happened!");
This prints your message to the console when that line is run, so you can verify that the program execution reached that line, and you can use it to print out some of the internal state of the program at that point to figure out what's happening.
 
That seems troublesome
 
Programming is troublesome
7
 
You'd often do things like Debug.Log($"Target position is {target.position} and current state is {state}"); so you can look through the log to see how your variables were changing with each call.
You can also use Debug.LogWarning or Debug.LogError to categorize the messages as more important and alert you when something is going wrong in your code.
 
@Summer yep.
 
But as folks are pointing out, with an IDE you can do even better, by setting a breakpoint that automatically pauses execution of the program at a line, then you can inspect the current values of any variables at that moment, and step the execution forward line by line to figure out where the bug is happening and why.
 
6:17 PM
There are even conditional breakpoints that will break only if a certain value is set to a variable...
 
Or data breakpoints that break when a variable is changed anywhere
 
@Vaillancourt yea hthat's helpful
 
Yeah, e.g. when the memory location changes. Been using that at some point.
 
Hmm
 
It's a pain to set up because the location changes every time the program starts, but heh..
 
6:20 PM
It says "No overload argument for "RotateAround" takes 4 arguments."
 
@Wasabi since the moderator election 2 weeks ago
 
I see.
 
@Wasabi Google the function RotateAround and see what it wants and what you supply it.
 
The space of the rotation is implicit in your choice of axis.
For instance, to rotate around "this" object's pitch axis, you'd use transform.right as the axis. (Assuming your object is oriented in a conventional way)
 
@Pikalek So, another Moderator! Now that makes... 3 Moderation Wizards that I know, 1 Moderation Wizard that I haven't actually talked directly to ( @Evorlor ), and... how many more Moderation Wizards on GameDev SE?
 
Versus Vector3.right, which would rotate around the world x axis.
 
I see
I'm actually using Vector3.forward and Vector3.back
So in transformation, that would be transform.forward?
 
Those are more conventionally the roll axis.
If you're getting pitch rotation out of those, then you've probably set up your model facing left or right instead of facing forward.
 
what is the blue axis of transform? (If it has no blue axis, my question is embarrassingly stupid)
 
transform.forward
Unity axes follow the order R G B = X Y Z = right up forward = pitch yaw roll
 
6:30 PM
? I thought so, but the compiler says "[11:25:22] Assets\VerticalRotatorScript1.cs(28,80): error CS1061: 'Transform' does not contain a definition for 'back' and no accessible extension method 'back' accepting a first argument of type 'Transform' could be found (are you missing a using directive or an assembly reference?)"
 
6:53 PM
There's no such thing as transform.back, just use -transform.forward
 
Oh
 
Hi @Wasabi! Good to meet you :)
 
7:06 PM
:)
Do you develop games like DMGregory?
 
nobody develops games like DMG
 
what?
 
?
 
DMG is an original
 
What I meant, was if @Evorlor develops games that go on to be at least somewhat popular, like @DMGregory who made games that were... like, games that got sold at GameStop, etc.
Heh... computer at 6%. I forgot to charge it, so it is charging now. Why is it that I always notice that my battery is going to die when the battery icon has a red X on it and it is, like, about to turn off.
@DMGregory what is the DM for?
 
7:14 PM
You mean if Evorlor is a professional game developer? Like Almo and DMGregory and Tyyppi_77
 
Ubisoft makes games that go on to be popular. I just help. And make games about goofy procedural dancing or playing with weather goop or battling dominoes.
 
I bet it's for Death Match!
 
yeah. are you, @Vaillancourt ?
 
No, not anymore. Haven't been for like 10 years.
 
What games did you make, though?
 
7:15 PM
@Wasabi They're my first and middle initials.
 
1 or 2 flash games, 2 or 3 Nintendo DS games for kids (little girls). something like that, if I recall.
Or is it Dungeon Master? I forget.
 
I mean, Evorlor has a very useful user description. I mean, "Hello" is very detailed, so..... ;)
 
D is easy to find, and M well...
Oct 26 '20 at 13:40, by Vaillancourt
And M stands for Mystery :P
 
@Vaillancourt "Nintendo DS games for kids (little girls)" lmao.
Hmm
 
7:18 PM
D is douglas, I guess that is obvious, I mean DMG says it in his user description.
 
That's stuff I've worked on
 
G is last name?
 
@Wasabi Yes?
 
Ooh cool! No wonder you keep referencing Dead by Daylight! Were you lead scripter on that? (I've never played it, but it does seem cool. I'm just not into horror and stuff)
Oh, wow! Assassin's creed III! nice! That's really cool.
M stands for...
 
@Vaillancourt Really? My friends complain that good D is hard to find...
 
7:22 PM
🤣🤣🤣🤣🤣
 
@DMGregory Hmmm sorry I don't get it.
 
seems accurate.
 
It's just a tasteless joke about trying to find bedpartners. 😉
 
I told you, M is for mystery.
 
Ooooh, I like that!
 
7:26 PM
They even wrote a book that tells it :P
 
@Wasabi I'm game designer on dead by daylight
I switched from lead programmer to game design
forgot Love & Hip Hop, the game on that list
 
Hmm. @DMGregory M must be for Mystery. Because you never once mention your Middle name.
 
Perhaps it is for "Middlename"?
 
Your fixation on someone else's middle name is interesting.
 
Who?
 
7:39 PM
You
 
7:57 PM
pretty sure his first name is Danger
 
?
 
Douglas was his given name. But i think Danger is his real first name
Danger Mystery Gregory
and @Vaillancourt has a typo in his name. Its actually Villain
super hero duo
danger and the villain
super villain duo*
 
8:15 PM
Actually that's my middle name, Mega-danger. 😆
 
Well, I got the movement of the character done.
Now I need the MiG-15 to move.
 
8:56 PM
woot woot!
 
9:12 PM
How would I make an object create a line where it has been?
For editing purposes, I see this could be very useful.
It could warp to some crazy place far away and back so quick I wouldn't know it. If it did this, I would want to fix it. But how would I fix it if I didn't know the problem existed? Well, the trail would tell me, which would look like a red line shooting in some crazy direction.
And there are also multiple other ways this could be useful.
 
Are you looking for the TrailRenderer component?
 
Maybe. I'm looking for these: I want a trail to show direction. I also want a trail to show the direction(s) of force applied on the object.
 
For reference, here are the top hits when you just type "unity draw trail" into a search engine.
 
Oh
 
You can draw the force with Debug.DrawLine at the time that you apply the force.
 
9:17 PM
No no, I mean to show all forces. If something applies external force to the object and this isn't planned, it is useful to know. But If I draw the line when a planned event occurs, I am missing all the lines showing the unplanned force applied to the object.
So is it possible to do such a thing?
If it is possible, that'd be amazing.
 
You can handle OnCollisionEnter and record the impulses applied there.
 
That's a quarter-solution. But there's still other external forces like magnetism (not going to be in my game), gravity (definitely in my game), And friction resistance.
 
Gravity is a constant unless you script it, friction occurs in OnCollisionStay, magnetism doesn't happen unless you script it.
 
So... is gravity measurable?
Oh, and I found the trail render. Thanks.
Can I set the time to Infinity if I want the trail to las forever? (Will it even recognize the infinity symbol?)
 
You tried checking Physics.gravity ?
 
9:25 PM
No? I'll do that.
 
An infinite amount of data is not good for your game. Just set it conservatively high and that will be enough.
 
Like, 999?
Yeah, I see your point. Legit infinity isn't a good choice now that I think of it.
 
Even the past few seconds is usually enough to spot the kind of discontinuities you're talking about.
 
I see
Hmm. The line isn't showing up.
Do I have to use particle materials?
 
9:41 PM
What material are you using?
 
A Red material.
Because I want a red line
 
I did not ask "what colour is the material". Tell me what shader you're using and how you've configured it.
 
Standard Shader, Rendering Mode: Opaque, Smoothness of 0, Source: Metallic Alpha, Tiling 1, 1; no offset, UV set is UV0, Specular Highlights, Reflections, No GPU Instancing, No Double-Sided Global Illumination. That is about everything about the Shader itself. Configuration in the trail? Assigned to Element 0. Element 0 is the one and only material of the line.
Nvm I found the fix.
It was working all along, it just wasn't moving enough to be visible. Lol, sorry.
Oh. Wait actually, I pasted the values into a different object and it works fine
But it doesn't for the first object, which turns out to still be moving.
 
10:08 PM
Well, I got it working, so yay!
 
 
1 hour later…
11:50 PM
Congrats. Looks super cool.
 

« first day (3939 days earlier)      last day (30 days later) »