|
I feel like I've hit an X instead of Y inside of an X instead of Y thing here which is going to frustrate me a little bit, but I wanted to talk shop about how much you've decoupled from Unity. I'm still pretty ingrained with GameObjects and MonoBehaviours and don't anticipate as a solo person that I'll start to hit performance burdens with them. If I had a new thing to do then I'd look more intently at ECS. As it stands, a lot of this logic is in subsystems already but I'd have to formalize entities and components. I can try to devise a better example later of something I have where I want to preserve the scheduling.
|
# ? Apr 7, 2021 18:54 |
|
|
# ? May 23, 2024 09:01 |
|
Rocko Bonaparte posted:I feel like I've hit an X instead of Y inside of an X instead of Y thing here which is going to frustrate me a little bit, but I wanted to talk shop about how much you've decoupled from Unity. I'm still pretty ingrained with GameObjects and MonoBehaviours and don't anticipate as a solo person that I'll start to hit performance burdens with them. If I had a new thing to do then I'd look more intently at ECS. As it stands, a lot of this logic is in subsystems already but I'd have to formalize entities and components. I can try to devise a better example later of something I have where I want to preserve the scheduling. A lot of my professional work has been writing and maintaining client side caches and display logic for server authoritative thin-client games. Also to a slightly lesser degree maintaining services and databases that store and mutate that data. Nothing in unity is real. It's all just there to make final vis to the user easier. I generally have to serialize data back and forth as matter of course. I've done this enough that I've more or less adopted it for my client authoritative hobby stuff as well. Maybe I'll use scriptable objects to house my data instead of excel or json, but I typically just treat it like a database. I've also used sqlite for storing data fairly effectively, though it's not something I'd recommend for data that changes at all frequently. If you want a small project that demonstrates the workflows pretty well, it's not terribly difficult to build a wrapper around libtcod (grid-based utility library for authoring roguelikes) and ultimately forwarding that to a tile manager/etc to vis the external data in unity.
|
# ? Apr 7, 2021 20:49 |
|
I trust your judgment on it but I'm also amazed how stuff like that would be considered so superior than Unity's own internals. I write that knowing I use Noesis for GUI stuff, a 3rd-party A* pathfinding library, and got FMOD for doing sound (since apparently Unity doesn't repeat music tracks seamlessly?). Okay I guess I shouldn't be surprised.
|
# ? Apr 7, 2021 21:25 |
|
Rocko Bonaparte posted:I trust your judgment on it but I'm also amazed how stuff like that would be considered so superior than Unity's own internals. I mean.. I use unity UI, mono behaviours etc. It's just all of that stuff is built to handle data that's canonically sourced outside the unity context. Makes tests (play mode and editor) much simpler as a bonus. Just shove data at it.
|
# ? Apr 7, 2021 21:34 |
|
Are there some external things (text, video, whatever) going over how much people have decoupled from Unity while still using it? This is a common enough mood on here that I assume it gets talked about in detail elsewhere. I wanted to see some of the different experiences. Regarding my scheduling thing: I take it there isn't some thing people are all using other than leaning on Tasks as much as possible. This is without considering how I save level state.
|
# ? Apr 7, 2021 23:46 |
|
You pick and choose your Unity systems. Unity systems might be avoided because they become difficult to debug in complex situations, its awkward to manage their data at scale, or they have pointless overhead. There's no reason to reduplicate a Unity system when it works well. Like I had my own sprite system when Unity's sucked, but I got rid of it when Unity improved it. The new input system I also thought was good enough to ditch any third party assets. I still use my own sprite animation system because I think Unity's has far too much complexity, awkwardness, and performance overhead for the usual fairly simple requirements of sprite animation. When used endemically for something simple like UI animation it has unexpected performance impacts. Some systems just suck so whatever you gin up is potentially better and at least you know them inside and out. I'm not actually very fond of most third party assets because its another cook in the kitchen for something you also don't know through and through. There are exceptions though like Mecanim sucks forever in all situations and if you need to do 3D animation I highly recommend Animancer. Addressables is dreadful and not getting better and this is far better. For gameobjects I just find them awkward to deal with, manage their memory, or debug compared to plain c# objects. I think they should only be used when it's necessary because something needs to interact with Unity built in systems like colliders, renderers, etc. Their overhead is minimal but its also part of the thousand shrugs that lead to a Unity mess that runs poorly. Early optimization is bad but no reason for unnecessary bloat either. Like I use their sprite system but don't do sprite prefabs. It was easier to have a generic sprite renderer prefab that can be attached to an entity that needs to render a sprite. When done I can pool the Unity sprite renderer and more easily manage the memory of the actual sprites. Hot references in prefabs can be a mess for memory management. edit: Unfortunately no specific videos/articles come to mind. If you focus on talks or articles from actual commercial games using Unity you'll find lots of info on bypassing messy Unity systems. I can't think of specifics but a lot of GDC talks from Unity game devs are basically about how they rewrote some Unity thing to solve a problem. Its also a common topic at any programmer bullshitting sessions at conferences/whatever. FuzzySlippers fucked around with this message at 00:44 on Apr 8, 2021 |
# ? Apr 8, 2021 00:42 |
|
Hi - Graphics question that's driving me out of my loving mind, I'm porting a graph rendering thing from OpenGL to Vulkan and this is the only thing I can't get working after bashing my head against it for days. Here is Mr Cube, who is going to demonstrate the problem. If I change the rotation on the Y axis, it rotates on the Y axis: Cool. Let's reset the Y axis back to zero and now rotate it on the X axis. Yep. That's nice. Now, what I want to happen is that, when rotated on one axis, it rotates the way pictured - regardless of the current rotation on the other axis. Here is the relevant code I'm using (library called Veldrid in C#, but I think this is just generic Vulkan) - adapted from this code:
So, graphics Thanks!
|
# ? Apr 10, 2021 23:39 |
|
That looks like gimbal lock. It's basically a limitation of euler rotation, you can see how it works here: https://www.youtube.com/watch?v=zc8b2Jo7mno I believe the typical solution is to use quaternion rotation instead. I'm not very experienced with this kind of thing though. There might be a way to detect the problem and switch the order of x/y/z dynamically as needed.
|
# ? Apr 11, 2021 00:27 |
|
I think doing the multiplication in the right order is the right solution for what you described. But I think your description of the problem may not be actually what you want. If you rotate on X by an amount and then want rotating on Y to be around the other axis, then doing it in the right order will solve it. But if you then want to be able to rotate on X again and have that be around the absolute X axis again, then updating the X "angle" in your fixed-order code won't help you because that angle is the angle that is rotated before the Y angle, so it'll do the wrong thing. The solution you're looking for if that's what you're trying to do is that you can't do it with just two angles - you have to keep a copy of the current *combined* rotation, and apply your new additive rotation around the absolute axis as a multiplication onto that combined angle. Because floating point math isn't precise, if you do it this way you also have to occasionally normalize the stored rotation matrix or it will gradually begin to deform your object as the imprecisions propagate over time.
|
# ? Apr 11, 2021 00:31 |
|
Not sure since I haven't done it in a while, but I think you want to rotate around the camera's axis, not the world axis. Y axis rotation is spinning the object around "horizontally" to you, so if you shift X axis up 90 degrees to look from above, you're still spinning it around the same axis, so it just spins like the last diagram. Building a rotation like that from scratch is tricky because the way you want to rotate depends on the way you're Currently looking, so I'd do it more as applying adjustments over time to a stored rotation matrix, and taking your current camera's facing angle to calculate which vector to spin around. code:
|
# ? Apr 11, 2021 00:34 |
|
That works perfectly, thank you so much! Would not have thought to do it like that.
|
# ? Apr 11, 2021 01:21 |
|
roomforthetuna posted:Because floating point math isn't precise, if you do it this way you also have to occasionally normalize the stored rotation matrix or it will gradually begin to deform your object as the imprecisions propagate over time. I wrote a 3D Tetris program in college and I found this out when I kept rotating blocks and they'd start warping after several rotations
|
# ? Apr 12, 2021 17:40 |
|
Zaphod42 posted:I wrote a 3D Tetris program in college and I found this out when I kept rotating blocks and they'd start warping after several rotations
|
# ? Apr 12, 2021 17:44 |
|
OneEightHundred posted:I hope there is a corresponding bug where they randomly get caught on the corners of blocks when you try to drop them because of some 0.0001-unit overlap in the collision. Sadly the code that checked for where blocks would land was purely 2D, it was just rendering that as a 3D representation. That sounds like an interesting (and extremely un-fun lol) mechanic though.
|
# ? Apr 12, 2021 17:47 |
Zaphod42 posted:Sadly the code that checked for where blocks would land was purely 2D, it was just rendering that as a 3D representation. That sounds like an interesting (and extremely un-fun lol) mechanic though. https://aslangames.itch.io/tetris-with-physics
|
|
# ? Apr 18, 2021 21:34 |
|
What are people generally doing for bounds checking for their overall game world or level? I started to work on this, and with adding on diagnostic stuff, it's starting to get a little wild. There's determining what the bounding volume is at a given time, whether it's even active, and what to do when stuff runs into it. I'm using a box collider in Unity and have a specific MonoBehaviour wrapped around trigger exit callbacks to catch the culprits. Then how I react is kind of varying on what I hit. I'm trying to think about what to do if a player hits the volume, and I'm just defaulting to killing them.
|
# ? Apr 21, 2021 07:19 |
|
Rocko Bonaparte posted:What are people generally doing for bounds checking for their overall game world or level? I started to work on this, and with adding on diagnostic stuff, it's starting to get a little wild. There's determining what the bounding volume is at a given time, whether it's even active, and what to do when stuff runs into it. I'm using a box collider in Unity and have a specific MonoBehaviour wrapped around trigger exit callbacks to catch the culprits. Then how I react is kind of varying on what I hit. A kill plane is pretty common in videogames, (implemented either as a box, plane, or just a line of code that checks "if coord Y ever < X kill player") so that's certainly a solution It kinda depends upon the nature of the game, genre, how easy it is or how likely it is to encounter the bounding volume.
|
# ? Apr 21, 2021 07:23 |
|
Rocko Bonaparte posted:I'm trying to think about what to do if a player hits the volume, and I'm just defaulting to killing them. Other common solutions are just bouncing the player off elastically, or setting their velocity to 0.
|
# ? Apr 23, 2021 00:23 |
|
Having the player killed like that gave my complete game loop a little bit of stress, and it failed. I guess this is yet more cautionary tales about putting too much logic into Unity's MonoBehaviour stuff. My entire game was being controlled by a MonoBehaviour that did all player navigation as well as main menu navigation. When the player dies, they eventually get deleted. When they get deleted, the MonoBehaviour is destroyed. Then I lose all control of anything.
|
# ? Apr 25, 2021 05:13 |
|
Rocko Bonaparte posted:Having the player killed like that gave my complete game loop a little bit of stress, and it failed. Yes, you should maintain separation of concerns. Especially on systems with separate lifecycles.
|
# ? Apr 25, 2021 12:54 |
|
Also remember that just because something dies, that doesn't mean you have to Destroy it. You can move it out of the way, shut down irrelevant tasks it might be executing, and keep the object around for later. This is a basic aspect of pooling objects, which is something many games need in order to be performant.
|
# ? Apr 25, 2021 15:02 |
|
Yeah that's not a monobehavior problem per se. Definitely an issue to think about though.
|
# ? Apr 25, 2021 19:13 |
|
Unity help please. Camera won't render depth stuff from shader graph. Left is viewport, lil one is in game
|
# ? May 12, 2021 20:20 |
|
Did you turn on the Depth texture in the renderer settings?
|
# ? May 12, 2021 21:28 |
|
Reharakhti posted:
Yup. Thanks.
|
# ? May 13, 2021 02:33 |
|
I've been dabbling in Love2D and then eventually decided to try out this book: https://howtomakeanrpg.com/ Which uses Lua and DinoDeck. I know it's not something that will get me ajywheres but that's fine since this is just a hobby. Anyways, I'm wondering if any of you know a site where I can buy 2d assets and sprites or hire a artist? I looked on the unity asset store but everything seems very of a certain mobile game style, if that makes sense. Thanks for your help!
|
# ? May 17, 2021 14:49 |
|
Humble Bundle has 2D game asset packs pretty frequently. They have an RPG oriented thing at the moment, maybe some of it is of use to you. https://www.humblebundle.com/software/royalty-free-rpg-game-dev-assets-software
|
# ? May 17, 2021 16:17 |
Empress Brosephine posted:I've been dabbling in Love2D and then eventually decided to try out this book: itch.io has a fair amount of assets and humble bundle does bundles every now and then, like right now
|
|
# ? May 17, 2021 17:56 |
|
oh sweet thank you both so much
|
# ? May 17, 2021 18:40 |
|
Those packs on Humble tend to link back to gamedevmarket, that's another place you could browse.
|
# ? May 18, 2021 15:22 |
|
Yeah I got half my art assets by buying a humble bundle and then following the artists who made things in the bundle back to the unity marketplace or other art marketplaces and bought more of their stuff.
|
# ? May 18, 2021 17:48 |
|
Yeah I found someone doing the exact style I want on gamedevmaker so I'm going to reach out to them. It's exciting but imho the worst part of making indie games is the art if you have no artistic talent
|
# ? May 18, 2021 23:38 |
|
Im in Unity. What would cause less potential problems w/ 20 players?: growing player scale or shrinking everything else?
|
# ? May 22, 2021 01:16 |
|
Growing the players is less hassle for sure
|
# ? May 22, 2021 05:32 |
|
hello thread, i've been goofing around with Unity ML Kit and making youtube videos capturing the process... I haven't got any cool results yet but i'm enjoying making these videos. So far I've made a basic clone of Ski Free and I'm trying to make an ML agent ski down the slope nicely. Here's a link if you want to check out the latest one: https://www.youtube.com/watch?v=RDmJb_WmzS0. If you want to give feedback/constructive criticism that's cool too
|
# ? May 25, 2021 02:01 |
|
That's a sweet vid, good job. I should get into Unity, is unity learn the best source to learn Unity if I already know a decent amount of C#? (I used to xna program uh 14 years ago. It's like a bike isn't it ?!?)
|
# ? May 25, 2021 02:38 |
|
Empress Brosephine posted:That's a sweet vid, good job. Learn.Unity has lots of cool tracks that can walk you through things. I really like Bracheys videos on youtube https://www.youtube.com/user/Brackeys Its definitely like riding a bike. You'll have to learn a little bit about how to use the editor but it should be pretty easy to jump into
|
# ? May 25, 2021 02:48 |
|
Sweet thanks zaphod
|
# ? May 25, 2021 02:52 |
|
Empress Brosephine posted:That's a sweet vid, good job. Thanks! Since Unity is so widely used, one option is to just start making something you want to make and Google as needed. Any problem you're trying to solve should pop up on Google if you can get close to describing it
|
# ? May 26, 2021 00:27 |
|
|
# ? May 23, 2024 09:01 |
|
The one thing I get stuck on with Unity is coming from a software dev job, I get caught up trying to build a game like an enterprise app and tbh it's much better when doing small projects to just do whatever and worry about cleaning it up later. To an extent, anyway. Just hide the garbage stuff behind a nice method name and pretend it doesn't exist.
|
# ? May 28, 2021 21:41 |