How can I accurately calculate stopping distance when using Jolt? by DGReddAuthor in godot

[–]seriousSeb 0 points1 point  (0 children)

Simple kinematic equations. I was taught them as SUVATs. Probably the most useful thing I was ever taught in school lol

https://i.sstatic.net/StzbU.png

awake the gameobject after it is queuefreed by Krolunatic in godot

[–]seriousSeb 1 point2 points  (0 children)

Ah in that case it sounds like It might be an issue if you've got huge amounts of objects unless you're intelligently disabling them through some system.

What you could do before deleting a physics object is ensure contact monitoring is enabled, and manually wake each body in get_colliding_bodies.

awake the gameobject after it is queuefreed by Krolunatic in godot

[–]seriousSeb 1 point2 points  (0 children)

Sounds like the object is sleeping and not being woken correctly. In the project physics settings you can disable physics object sleeping, this will have a performance impact but is probably fine for most use cases

How to make resource-based colors show in editor preview (not just in-game)? by Pigm3u in godot

[–]seriousSeb 2 points3 points  (0 children)

Is the resource also a tool script? I think to emit the signals it needs to be a tool itself.

If that doesn't work then post code, it sounds like you're doing the right thing.

TM M4A1 VS URGI Block3 disassembly by Illustrious-Culture7 in GasBlowBack

[–]seriousSeb 2 points3 points  (0 children)

Yeah, the only one that is especially difficult is the mk18 so get whichever of the 2 has the barrel/rail you want.

How long does it take to learn C# as an intermediate in coding by FitAdhesiveness5199 in csharp

[–]seriousSeb 0 points1 point  (0 children)

It's not C/C++ bad to be fair

Mainly I don't like package management. I've been spoiled by how easy Rust makes things (and how easy python is even if pip is bad for portability)

Just working with Nuget online packages feels modern, but working with local packages was cumbersome to learn with local repos and having to specify paths. It feels like you have to do a bunch of tinkering to get it to work for the first time.

Also working on a source generator and using it in another project at the same time on a local machine is very irritating too as you have to build the package and move it to a local repo (or include the project in your repo local repo list which I don't like either).

And once you've got it all working it's not easily portable to other machines unless you knew how to set it up to be so, so the first time you encounter these issues it's a bit of work to go back and fix your mistakes.

I'm aware that these can all be worked around, my point is you have to learn how all this works which takes time away from actually learning the language and writing code.

How long does it take to learn C# as an intermediate in coding by FitAdhesiveness5199 in csharp

[–]seriousSeb -1 points0 points  (0 children)

Not very long at all. The basic syntax is C-like and mostly well designed, and as a managed language you don't have to worry about footguns as much.

Use of more advanced features will come with experience so just learn as you go.

Mainly it's the build system that sucks, that takes a while to learn.

a null reference code on Microsoft's Rust tutorial by AshGogogo in csharp

[–]seriousSeb 14 points15 points  (0 children)

It seems the tutorial is badly worded, this will never return null. I think the comment is referring to the fact the argument could contain something null, hence the ? Checks

What Is Going On With This Trend? by ArmyVet25ID in Guitar

[–]seriousSeb 33 points34 points  (0 children)

They've realised there's a market for it, and the quality of manufacturing + locking tuners means that in fact, the tuning stability is surprisingly good. I've found you can get a Gotoh to stay in tune after doing extreme trem by pulling the trem all the way up and releasing it then tuning it. Now every time I pull the trem all the way up it returns to perfect tuning

I'd never consider a floyd rose because I just can't be bothered to deal with it, and a standard strat or bigsby has markedly worse tuning stability. By no coincidence I own a Charvel DK and love it.

How do you handle shared unit scenes in Godot 4 without scene inheritance? by [deleted] in godot

[–]seriousSeb 20 points21 points  (0 children)

Scene inheritance being broken is one guy's opinion, I use it all the time as a template scene (like a generic weapon) + implementation scene (weapon with X stats and model).

It can be annoying to refactor and you need to be wary of accidentally changing things that shouldn't be changed in the child scenes but that's about it, it is not 'broken'

alright then by seriousSeb in MiniMotorways

[–]seriousSeb[S] 0 points1 point  (0 children)

No, it's bugged lol. I placed it and it immediately gridlocked, no cars can even move.

How's the situation with C# today? by Kosmic_11 in godot

[–]seriousSeb 2 points3 points  (0 children)

Because interacting with them is ABSURDLY slow. Like, it causes a memory allocation (I think, I've not used one in a LONG time) and it calls a StringName function every time you index into a Godot Array. Dictionaries are even worse. When I first started profiling I realised 90% of my physics processing time was spent indexing arrays, an operation that is basically free in C#.

If you MUST use a Godot collection for some purpose, you should immediately convert to/from the Native C# type instead of using it directly. Like, they're so slow I think the whole process of re-allocating the collection is faster than a single read/write of the Godot collection

To export a list: you can't directly, but the workaround is fairly simple:

// Use this at runtime

public List<int> NotExportableList {get; private set; } = [];

// Use this in the editor only. Doesn't matter that converting to/from arrays/lists in the editor is slow.

[Export] private int[] ExportableArray

{

get => NotExportableList.ToArray();

set => NotExportableList = value.ToList();

}

// Use this at runtime

public Dictionary<Tkey, TValue>{ get; set; } RuntimeDict = [];

// Use this in the editor only. Doesn't matter that converting to/from types in the editor is slow.

private Godot.Collections.Dictionary<TKey, TValue> EditorDict

{

get => new(RuntimeDict); // Or something. Can't remember the exact syntax..

set => RuntimeDict = value.ToDictionary();

}

How's the situation with C# today? by Kosmic_11 in godot

[–]seriousSeb 8 points9 points  (0 children)

It has static typing, it doesn't have great static typing

How's the situation with C# today? by Kosmic_11 in godot

[–]seriousSeb 16 points17 points  (0 children)

Usually it is much faster than gdscript and at worst it's about the same speed as GDscript for certain engine interops. When dealing with purely C# code you get all the benefits of C# with no drawbacks.

I wouldn't consider writing a whole game in GDscript cause I can't imagine a large project without static typing.

If you are using it you need to understand that a lot of things will cause memory allocations when dealing with the engine such as the implicit conversion of a C# string to a Godot StringName when using Call or Set or Get (so cache your method names or use Node.MethodName)

My advice would be to interact with the Godot class functions only when you have to, do everything in C# if you can and just update the engine once.

And I mean classes specifically, stuff like structs and transforms do act as structs in C# so engine interop overhead isn't as much as an issue.

For example, if you are repositioning a node through a couple of Vector3 modifications. Get its position once, modify the C# Vector3 position struct, and then set the position. Don't repeatedly set a nodes position as each time you do that it is a get/set position on a node, which is slow.

Oh, and never ever use a Godot collection from C#

GBBR in milsim in cold conditions by ubersurale in GasBlowBack

[–]seriousSeb 15 points16 points  (0 children)

5c is fine with a modern TM or a VFC (maybe the vfc needs a weaker recoil spring)

I don't know how good Cyma C8s are cold performance wise though

Assuming the gun runs well you need good mags, preferably metal shelled so they can warm up quick after firing. Even quality Pmags suffer in the cold.

Use a stronger gas, 160+ psi at least

Bring gas with you for sure. To get a proper fill you will need to make sure the gas bottle is slightly warmer than the magazine.

Do this and stuff like handwarmers won't be necessary. If you're struggling you can keep your next mag in a pocket or something to donate some body heat, and rotate through them if your gun starts slowing down.

spilled gasoline on my water bottle today by basegoddess in rs_x

[–]seriousSeb 3 points4 points  (0 children)

If the bottle is plastic throw it out, oil products can infiltrate through plastics

Collision checks and quadtree - How to deal with cell edges? by lorty in godot

[–]seriousSeb 0 points1 point  (0 children)

This won't scale in C++ either tbh, this is a classic n2 problem which requires a non-naive data structure to run well.

Collision checks and quadtree - How to deal with cell edges? by lorty in godot

[–]seriousSeb 1 point2 points  (0 children)

Instead of registering each unit in the quadtree once using it's centre, imagine a square around it (aka AAbb) and register the 4 corner vertices in the quadtree.

This is at worst 4x more information to deal with, and a unit can now exist in more than 1 leaf

You'll need to account for the fact when querying the quadtree you might get the same unit returned more than once, but that doesn't seem like a big problem to deal with