|
Rocko Bonaparte posted:Thankfully, they got a new guy with a lot of good experience with subscription pricing!
|
# ? Oct 10, 2023 00:55 |
|
|
# ? May 25, 2024 10:41 |
|
drat. The similarities are unreal.
|
# ? Oct 10, 2023 05:58 |
|
Rocko Bonaparte posted:drat. The similarities are unreal. I see what you did there, it was epic.
|
# ? Oct 10, 2023 06:01 |
|
Well I'll crawl back from pun time to ask some more UE5 questions: 1. Is there some way to dissociate actual input controls from the actions you want to do with them? Right now, I'm just getting events on this-or-that specific key, but I figure there's a way to decouple that from the thing I'm trying to do. Like, instead of having an event specifically trigger on space bar to make the player jump, I should be able to define jump as a thing and then map it to whatever-what-the-heck. I don't remember what Unity had stock to do this because I was just using InControl, and that had this under a concept of "Actions." 2. Does UE5 have some logic already to handle stacking of menus? I had to create a stack of controller contexts to do this in Unity. Say, normally the stack is just one element and it's the main game that's going on. Then the player triggers a menu, which transfers control inputs to that UI. They then do something that prompts a dialog, which transfers control to that UI. They make their choice, which "pops" that UI's control back to the menu. They close the menu, which pops it back to the main game.
|
# ? Oct 16, 2023 08:51 |
|
Rocko Bonaparte posted:Well I'll crawl back from pun time to ask some more UE5 questions: This is the Enhanced Input System, it's exceptionally good. https://docs.unrealengine.com/5.3/en-US/enhanced-input-in-unreal-engine/ jizzy sillage fucked around with this message at 10:02 on Oct 16, 2023 |
# ? Oct 16, 2023 09:57 |
|
Yup basically any actor blueprint can listen to the "jump" key being Pressed. Maybe you want another mediator to act as the go between though, like for touch controls they're not normalized and it's stupid. So this depends on how you want to handle any filtering on a per actor basis or via a manager.
|
# ? Oct 16, 2023 15:28 |
|
If my target is PC and (at-best/worst) console, would I worry about touch control for joystick and button-press-like inputs? I'm assuming that's only a phone thing unless I wanted to, hmmm, do something on a Switch?
|
# ? Oct 16, 2023 15:40 |
|
Rocko Bonaparte posted:If my target is PC and (at-best/worst) console, would I worry about touch control for joystick and button-press-like inputs? I'm assuming that's only a phone thing unless I wanted to, hmmm, do something on a Switch? Worry about that later. There can be touch controls on PC (and console, the PS4's touchpad for instance), but you shouldn't need to worry about it for now.
|
# ? Oct 16, 2023 15:48 |
|
Rocko Bonaparte posted:2. Does UE5 have some logic already to handle stacking of menus? I had to create a stack of controller contexts to do this in Unity. Say, normally the stack is just one element and it's the main game that's going on. Then the player triggers a menu, which transfers control inputs to that UI. They then do something that prompts a dialog, which transfers control to that UI. They make their choice, which "pops" that UI's control back to the menu. They close the menu, which pops it back to the main game. It's hard to understand what you're actually asking. Stacking of menus in UI--as in, displaying multiple UI elements at a time and deciding which one gets input priority--is done by adjusting the z-order in the widget class itself. If you're asking how the engine handles consuming input for UI vs. game purposes, there are built-in functions that you can call on the widget class itself that handle this.
|
# ? Oct 16, 2023 16:21 |
|
Chillmatic posted:It's hard to understand what you're actually asking. It's more like making sure any previous game or UI stuff gets no inputs at all until the current active one is satisfied and closed. Consider something like a game going on where the direction buttons would move the character, then the main menu on top of that, then the save menu on top of that, and then a dialog prompt about deleting a save. You don't want any buttons going to the character, nor do you want anything to even go to the save menu. It's all on the confirmation dialog. When that confirmation closes, it cedes control back to the save menu, and when that closes, it cedes control back to the main menu, and when that closes, it cedes control back to the main game. If you happy to just know linearly all the paths these GUIs can take, you can manage it globally, but having a "control stack" is a lot more graceful generally and specifically necessary if you have common dialogs that can come up from different parent contexts.
|
# ? Oct 16, 2023 23:13 |
|
Yeah, I implemented a whole input abstraction layer for Waves of Steel to handle this problem. Different components, when activated, would say "Hey input director, push me onto the stack as a [non-]blocking input listener". Then in their update/tick calls, they would say "Hey input director, is this button pressed?" and the director would check if they were allowed to receive input before responding with anything other than "no". Very useful, graceful, and hard to make bugs with, but it requires a different philosophy for input handling than the usual event-based approach.
|
# ? Oct 16, 2023 23:26 |
|
I was able to do events just fine, it's just that everything had to listen to the controller subsystem's version of the events, and each would get those events when they deserved them.
|
# ? Oct 16, 2023 23:31 |
|
Rocko Bonaparte posted:It's more like making sure any previous game or UI stuff gets no inputs at all until the current active one is satisfied and closed. This should just be Add Widget, Set Widget to Focused, Widget now consumes input until it's closed or another Widget is Focused. Game gets input until a Menu is opened and the menu widget is focused. Main menu widget is focused until the player opens a save dialogue, and the dialogue is then focused. Dialogue finished, focus returns to main menu. Main menu closed, focus lost and input now routes to game.
|
# ? Oct 17, 2023 00:43 |
|
Rocko Bonaparte posted:It's more like making sure any previous game or UI stuff gets no inputs at all until the current active one is satisfied and closed. Consider something like a game going on where the direction buttons would move the character, then the main menu on top of that, then the save menu on top of that, and then a dialog prompt about deleting a save. You don't want any buttons going to the character, nor do you want anything to even go to the save menu. It's all on the confirmation dialog. Yes, I explained all of this in my response to you.
|
# ? Oct 17, 2023 03:26 |
|
I'm going to just take it that ordering is a little different in Unreal and implementing some kind of stacking like that isn't necessary. Well, more like I'm going to do a little bit of random UI crap and see if I get painted into a corner when going widget-to-widget.
|
# ? Oct 17, 2023 09:05 |
|
Looking to create a simple turn based 3D game, but all of my expertise is in C++. Should I roll with Unreal, Godot, or a hidden third alternative? I'd also consider other type-safe languages but would like to avoid GDScript or anything similar if possible.
|
# ? Oct 18, 2023 18:42 |
|
If you don't have any game development experience, despite all the drama, I would recommend Unity for that. If you know C++, C# is much more fun.
|
# ? Oct 18, 2023 19:18 |
|
Do some shopping around to try out different engines and see what works for you. Godot, Unity, and Unreal can all do what you want.
|
# ? Oct 18, 2023 19:45 |
|
Alterian posted:If you don't have any game development experience, despite all the drama, I would recommend Unity for that. If you know C++, C# is much more fun. I think possibly a big part of why I feel that way might boil down to: if you're "functional", Godot, if you're "object oriented", Unity. (C++ is only as object-oriented as you make it, and once you're outside of the university environment, in my experience, that's not very.)
|
# ? Oct 19, 2023 04:42 |
|
roomforthetuna posted:Counterpoint, I do a lot of C++, and I hate C#, it's like Java. I'm not a big fan of Python, but I prefer Godot's Python-like language over Unity's C#. I've seen towers to God in c++ and c# Both are bad, but the c# ones just undulated ineffectually in circles. The c++ ones unfurl the canvas of reality to enable forgotten nightmares to inhabit the machine and whisper gently from the compiler, "what the gently caress is this poo poo"
|
# ? Oct 19, 2023 05:03 |
|
I like C#. It's expressive without losing type safety. It lets you quickly and elegantly (i.e. without loss of clarity) express moderately complicated concepts. The "everything must be an object" stuff is a *little* silly, but ultimately it's just an extra layer of namespaces, and that's far from a bad thing. I've been having to re-learn my C++ lately, and man, it's super obvious that it's a 50-year-old language in a toupee, trying to hang out with its 30-year-old, much cooler relations.
|
# ? Oct 19, 2023 05:07 |
|
TooMuchAbstraction posted:I like C#. It's expressive without losing type safety. It lets you quickly and elegantly (i.e. without loss of clarity) express moderately complicated concepts. The "everything must be an object" stuff is a *little* silly, but ultimately it's just an extra layer of namespaces, and that's far from a bad thing. I like C more than C++ but few people agree with me
|
# ? Oct 19, 2023 05:15 |
|
TooMuchAbstraction posted:I like C#. It's expressive without losing type safety. It lets you quickly and elegantly (i.e. without loss of clarity) express moderately complicated concepts. Not that this would necessarily be better in Godot-script, but I wouldn't feel let down there because I wouldn't *expect* a mature language with interfaces that actually work.
|
# ? Oct 19, 2023 12:57 |
|
leper khan posted:I like C more than C++ but few people agree with me This is actually a very hip opinion right now
|
# ? Oct 19, 2023 18:16 |
|
giogadi posted:This is actually a very hip opinion right now Where are these people and how do I work with them
|
# ? Oct 19, 2023 18:27 |
|
mallocs and garbage collection is the computers job, not mine.
|
# ? Oct 19, 2023 18:30 |
|
Game development is one of the domains in which manual memory management is very desirable, because most garbage collectors pause execution of the program when collecting garbage, which can impact the perceived smoothness of the program, which is tolerable in some applications but much less so in a game. There are techniques you can use to mitigate it, but my own preference is to just categorically exclude GC pauses by not having a GC.
|
# ? Oct 19, 2023 18:39 |
|
My preference is to get memory allocations down to the point that an incremental GC can handle them between frames without creating lag. That's kind of like manual memory management, except that you don't have to worry about it 90% of the time because most code isn't doing enough allocations to matter.
|
# ? Oct 19, 2023 19:16 |
|
TooMuchAbstraction posted:My preference is to get memory allocations down to the point that an incremental GC can handle them between frames without creating lag. That's kind of like manual memory management, except that you don't have to worry about it 90% of the time because most code isn't doing enough allocations to matter. I've worked on porting two different Unity games to console. On both of them, we had a senior engineer dedicated, for the entire 2 year project, to reducing mid-frame allocations (mostly strings). It's so, so, so much harder than manual memory management, because the environment is actively fighting you. In UE3, we had the same problem. Eventually the engine tried to moved to reference counting for resources, but you had years of legacy code creating UObjects willy-nilly because it "you don't have to worry about it", and every UE3 project I worked on had a massive effort to remove allocations so that GC wouldn't run except on level load. Using a GC language or environment for AAA games on anything but PC is a nonstarter.
|
# ? Oct 19, 2023 19:54 |
|
leper khan posted:Where are these people and how do I work with them Just get a job working on embedded software, they're all mental for C, sometimes even for reasons that are objectively wrong. I've seen all sorts of bonkers coding standards justify bad ideas for "safety" (of the literal "someone might be injured" sense). Some are more sane than others, of course, so it's not all bad. e: I will admit that embedded-style game development is probably out the window since the 3DS was discontinued, though for small scale the PlayDate still assumes you want C if you don't want to use Lua (though personally I immediately did the stuff you need to do to just make C++ work, which was very standard for "making C++ work in embedded", though I think there's some people actually using RTTI and exceptions on the PlayDate which is extremely unusual for embedded C++). Charles Ford fucked around with this message at 20:16 on Oct 19, 2023 |
# ? Oct 19, 2023 20:10 |
|
more falafel please posted:I've worked on porting two different Unity games to console. On both of them, we had a senior engineer dedicated, for the entire 2 year project, to reducing mid-frame allocations (mostly strings). It's so, so, so much harder than manual memory management, because the environment is actively fighting you. This reminded me of Profiling the new animation system for a huge game and finding that 60% of the CPU time was spent in std::string c'tor because the animation system call stack was about 60 deep of: FunctionA(std::string str1, std::string str2) { auto thing = FunctionB(str1, str2); ... } So much efficiency just by doing a search and replace of std::string to const std::string&
|
# ? Oct 19, 2023 22:07 |
|
TooMuchAbstraction posted:My preference is to get memory allocations down to the point that an incremental GC can handle them between frames without creating lag. That's kind of like manual memory management, except that you don't have to worry about it 90% of the time because most code isn't doing enough allocations to matter. Yeah this is how I feel too. With C# I can manage the memory as much as I need to, but if something slips through the cracks it's swept under the rug by the GC with minimal impact on performance. It feels like the right balance for me.
|
# ? Oct 19, 2023 22:29 |
|
more falafel please posted:I've worked on porting two different Unity games to console. On both of them, we had a senior engineer dedicated, for the entire 2 year project, to reducing mid-frame allocations (mostly strings). It's so, so, so much harder than manual memory management, because the environment is actively fighting you. Obviously I can't contest your lived experience, but by the same token, it doesn't match my lived experience, so either one of us is wrong or there's not a simple "GC is good/GC is bad" declaration to be made here (hint, it's the latter). Like, my game is obviously substantially simpler than a AAA game, e.g. no need to stream assets in because it's not open-world. But it is also very, very far from a simple game. And yet I was able to get allocations down to 1-2kB/frame, even during hectic combat, with, I would guess, about two weeks worth of dev effort: running the memory profiler, identifying hotspots, and fixing specifically those bits. The vast majority of my game did not need to care about how exactly memory was being used. Now in fairness, Unity added the incremental GC shortly after I started development, which may well postdate your own Unity experience. And maybe the games you were porting were more complicated, or at least, harder to optimize, than mine was. Not to toot my own horn, but I'm good at software development, and I was the only person contributing code to the project. That does simplify things a lot.
|
# ? Oct 19, 2023 22:44 |
|
Resource cleanup in destructors alone is a enough reason to be using C++ over C. Ask someone to write code where there are error conditions and multiple resources that need to be released on error and there is a 99% chance they will gently caress it up.
|
# ? Oct 20, 2023 01:16 |
|
OneEightHundred posted:Resource cleanup in destructors alone is a enough reason to be using C++ over C. Ask someone to write code where there are error conditions and multiple resources that need to be released on error and there is a 99% chance they will gently caress it up.
|
# ? Oct 20, 2023 01:43 |
|
I'm trying to create a plugin in Unreal to include a third party library but I'm getting unresolved external symbol errors, the library works when compiled basically on its own in an example c++ project provided with it from github, but there's no .lib or dll files, its just .hpp and .cpp files. Do I need to compile a dll in order to include it? Or is there some extra secret sauce I need? I already specified in the Build.cs the include folder, which gives no syntax errors, the error is just on the linking and this as C++ code compiles fine on its own, Unreal just doesn't like it or I am not providing Unreal enough info yet?
|
# ? Oct 21, 2023 02:50 |
|
roomforthetuna posted:The thing that very quickly turned me off C# was having to implement my own red-black tree because the library ordered-map implementation doesn't have a method for "find the item *nearest* a value", and the commonly suggested way to do that is to transform it into a different kind of list which would make the whole thing hilariously inefficient. IMO one of the big upsides of C# over godot script is you really only did this because you wanted, as there are a jillion good red black tree inplementations for C# and maybe there is a particular implementation for a dsl but probably not. https://www.nuget.org/packages/System.Collections.Generic.RedBlack etc
|
# ? Oct 21, 2023 02:57 |
|
Unormal posted:IMO one of the big upsides of C# over godot script is you really only did this because you wanted, as there are a jillion good red black tree inplementations for C# and maybe there is a particular implementation for a dsl but probably not.
|
# ? Oct 21, 2023 03:04 |
|
Raenir Salazar posted:I'm trying to create a plugin in Unreal to include a third party library but I'm getting unresolved external symbol errors, the library works when compiled basically on its own in an example c++ project provided with it from github, but there's no .lib or dll files, its just .hpp and .cpp files. So when you build the library on its own, what binary file does it compile into? The linker errors tell you that the compiler knows how the function calls look like (since you provided the header files), but it doesn't know where the built objects are (part of a dll/static library/other .o files) - you need to provide that.
|
# ? Oct 21, 2023 07:29 |
|
|
# ? May 25, 2024 10:41 |
|
mmkay posted:So when you build the library on its own, what binary file does it compile into? The linker errors tell you that the compiler knows how the function calls look like (since you provided the header files), but it doesn't know where the built objects are (part of a dll/static library/other .o files) - you need to provide that. So how do we build the library on its own, I can build the example project which has a Example.cpp with a Main function, I assume we don't want that, so how do I build without it so I can provide just the dll/lib? I've tried googling "converting stand alone library to a dll/lib" but what I mostly found seemed like an agonizing amount of work and I think mainly for use for other languages? Do I just remove the main file, switch the project configuration to dll, and just hit the build button would that work in theory?
|
# ? Oct 21, 2023 15:09 |