« first day (3593 days earlier)      last day (1410 days later) » 

user92578
12:15 PM
@genaray For reference, EnTT uses std::vector for component storage behind the scenes, which means that adding or removing components might invalidate references to items in the containers inside EnTT
 
user92578
1:32 PM
This is probably fairly controversial but I've been really digging the ranges-v3 library, a superset of the ranges coming in C++20: pastebin.com/x9NvhuBd
 
user92578
I feel like it nicely allows declarative programming with very little mutable state
 
user92578
Biggest annoyance is the almost mandatory auto return type, there is a type erasing range wrapper, but I think that has some overhead I'd like to avoid
 
user92578
But the auto return type is required since the ranges are lazily evaluated; I could convert it into a vector and return std::vector<Display> explicitly, but I also kind of like the idea of not even evaluating the displays incase my using loop happens to break early for an example
 
Sounds fascinating!
 
user92578
We're slowly getting nice things in C++! LINQ has been around since, what, 2007 :D
 
1:41 PM
I should probably use more LINQ... I just feel more confident about what's going on when I can actually see the iteration. XD
 
user92578
Yeah I think the tradeoff is the not-so-explicit types
 
user92578
I'm a fan of immutable functionalish (:D) programming though, which is probably why I enjoy this kind of stuff
 
user92578
No need for a mutable container where you push stuff based on some conditions
 
5:33 PM
1
Q: Why is my texture spilling?

iQewI'm trying to create a 3D Sword Slash VFX and created the model for the effect in blender. It's basically a wedge or ufo-shaped mesh. I proceeded to paint a simple test texture to see how it would look in Unreal. Now, the UVs are setup correctly for the effect itself (bottom of the texture is out...

 
 
3 hours later…
8:17 PM
Hey
How would I do something like a projectile system in unity?
Like
I did one already, but I feel it's a bit messy, by copying a gameobject 'bullet' then instantiating copies. I see some people like to use prefabs. I've worked with prefabs before and I feel like they're a bit messy, like, they can get deleted all of a sudden
 
user92578
I'm not a Unity user but this is a performant implementation by a great programmer & might help a bit perhaps: github.com/jongallant/Unity-Bullet-Hell
 
looks good, I'm just worried about working with prefabs
I've also heard it's bad practice but I don't know if the context applies
 
user92578
IDK what the alternative would be?
 
user92578
Setting object properties in code after instantiation?
 
Me neither. If I'd do it in C++ I'd work with plain classes which saves all the data I need
 
user92578
8:31 PM
I use the prefab pattern for particles in C++ for an example
 
the concept of prefab in itself is probably a good one
I've just worked with them a couple times before and they often end up getting lost when working with them
in Unity
If this was just me I wouldn't be too worried and say I'm probably using them wrong, but I also heard Brackeys say prefabs should be avoided in some cases
 
Prefabs are standard practice. If they're disappearing you are doing something very wrong.
Don't program by superstition and hearsay. Test. If your test reveals a concrete problem, find or ask for a solution.
 
8:48 PM
Alright. It's not superstition though, Brackeys is fairly estabilished in the community
 
There are plenty of established people who say things that are incorrect.
 
Then who are beginners supposed to take advice from?
But fine, if you say prefabs are standard practice in a professional case, then I'll believe you.
 
Take advice from anywhere, but recognize that it's just words. Use it to guide your practice and testing when uncertain, and throw it out when evidence contradicts it.
 
user92578
Bunch of established people are against everything in C++
 
Hahaha. XD
 
8:50 PM
established fools
 
I've found the Unity community is particularly prone to recycling questionable information.
 
user92578
They have their reasons & experiences; I write very different C++ at work as I do at home
 
I've seen a lot of questionable answers in Unity community but some people give very sound advice aswell
Unity attracts both beginners and professionals that's probably the reason why
 
9:02 PM
I think that mix is a big part of it. You'll have an expert say "be careful with X" or "I tend to avoid X" with a very specific use case in mind for which that's important.
But a beginner who doesn't know these particulars hears "NEVER use X! Expert said it's BAD!" ;)
See e.g. our recurring Q&A about singletons. ;)
 

« first day (3593 days earlier)      last day (1410 days later) »