|
Yesterday I mostly spent my time getting a stub game logic subsystem (I think that's what it was?) to properly incorporate and compile. I had to reinstall the game dev tools in Visual Studio and then update Visual Studio itself. I had to go to bed while it was updating so I don't even know if it was sorted out. That is to say: no different from Unity, really. I have to do the same stuff from time to time when I can no longer ever attach the debugger to Unity.
|
# ? Dec 7, 2023 18:26 |
|
|
# ? May 25, 2024 15:25 |
|
Anyone know in the context of the Triangle delaunay triangulation library (the original c version and the various c++ & c# ports), what a segment/subsegment is? Looking at the code it looks like something that's a part of the algorithm but the end result in my general use case is that every segment/subsegment corresponds to the edges of the outer edge of the triangulation (I don't manually input or specify my own segments which I assume is a part of a constrained triangulation), is this guaranteed behaviour? That the final produced collection of segments for the final triangulation is always the outer edge when no other segments are passed in?
|
# ? Dec 8, 2023 15:22 |
|
I managed to level up at least once on being able to do C++ in Unreal at all. Mind you, the C++ is not part of the problem here. The problem here: 1. Having the mind to both install the Unreal development extension in Visual Studio along with the Visual Studio plugin from the Unreal installer. 2. Having to fix a few incorrect lines of code in Unreal's own source before compiling successfully for the first time. 3. Realizing that live coding will cause Visual Studio to hallucinate and the additional errors I'm seeing are not real errors at all. 4. ...but only have closing Unreal Editor, building in Visual Studio, and seeing that I got no errors in the output. 5. Disabling live coding is also a no-no because it's apparently a check against having to do a hot reload, which can completely corrupt the project. The code in my C++ subsystem worked fine after all that the first time. No problems lol.
|
# ? Dec 11, 2023 06:23 |
|
Rocko Bonaparte posted:I managed to level up at least once on being able to do C++ in Unreal at all. Mind you, the C++ is not part of the problem here. The problem here: I also don't bother with live coding, it's weird and finicky. I exit the editor and recompile my code every time. Make sure to right click the project file and select regenerate project files whenever you're adding new classes or modules. The VS extension and plugin etc is in the "How to setup unreal for c++ development" how to in the website. Are you compiling the engine as well? If you don't have a specific need for the engine source code the installer version of the editor from the epic store launcher works just fine for c++ development.
|
# ? Dec 11, 2023 15:34 |
|
Rider is a lot better about not hallucinating errors. It's not perfect, but it happens to me like once a week, compared to constantly with VS.
|
# ? Dec 11, 2023 18:36 |
|
Rocko Bonaparte posted:2. Having to fix a few incorrect lines of code in Unreal's own source before compiling successfully for the first time. What did you have to fix? You generally shouldn't have to do that unless you're using a newer platform SDK than what's officially supported or something.
|
# ? Dec 12, 2023 04:07 |
|
more falafel please posted:What did you have to fix? You generally shouldn't have to do that unless you're using a newer platform SDK than what's officially supported or something. It was basically this thread: https://forums.unrealengine.com/t/error-compiling-the-automation-tool-after-updating-visual-studio-today-unreal-5-3-2/1393088/18 Raenir Salazar posted:Are you compiling the engine as well? If you don't have a specific need for the engine source code the installer version of the editor from the epic store launcher works just fine for c++ development. I am assuming I'm not compiling the entire engine. It doesn't run forever and I don't think I went out of my way to build the whole engine. Whatever gets included was choking in two spots though. Generated template stuff? I don't really know.
|
# ? Dec 12, 2023 08:57 |
|
hello thread i did something i think is pretty cool so i'm crossposting it here from the other gamedev thread. complex collisions on the game boy!Your Computer posted:i haven't posted anything after getting my start on the 3d platformer and i kinda got sidetracked by various things if anyone here is interested in getting into retro dev and game boy assembly there probably has never been a better time! i don't know how it happened but there are a lot of resources, modern tools and an active community over at https://gbdev.io/ and they were really helpful to me!
|
# ? Dec 12, 2023 10:57 |
|
Time to complain about Unreal development a little bit more. I think I'm digging into much more complicated relationships between the concepts since I'm focusing on making an analog to the save system I had written in Unity. This makes me look like I'm posting some garish nightmare--which I am, but I think it's unusual. This has shown to me how I'm actually writing some kind of proprietary Unreal C++. Stuff like this always frustrates me; I'd rather have the language be completely different so I can't make any assumptions about the language. I also can't really blame them for doing it. The most success I've had with a compilation workflow has been to keep both Visual Studio and Unreal Engine open. I have to add new C++ classes through the Unreal Editor, or everything just chokes between Unreal Editor and Visual Studio. Building in Visual Studio is also a no-go because it chokes on some of the special stuff that Unreal is doing. So when I want to build, I hit CTRL+ALT+F11, and that brings up the live coding window. This seems to happen just fine while I'm chilling in Visual Studio, so I take it as a strong hint. Whatever is wrong in there has been what is actually wrong and I haven't had falsehoods either way with it. So that's step one in the Skinner Box puzzle it has taught me to do. I also figured out some fun times with interfaces. The code I'm using for a base for actor-based serialization had a C++ interface that any actor that wanted to save itself had to implement. I wanted to expose this to Blueprint classes so I started doing the incantations--which I didn't really understand at the time. What seems to happen is: 1. Declare the interface as a class with a generated body. In this case, it is named ISaveable. It is not actually an interface. There are no virtual functions. 2. Declare all the functions with UFUNCTION declarations to expose them to in the Blueprint interface. 3. Create an empty subclass for this that has the preamble macro UINTERFACE(Blueprintable) defined. Call it USaveable. I believe the name convention is very important here. 4. Declare an Unreal-friendly default constructor for USaveable (pass through an FObjectInitializer). I can declare a regular C++ interface if I wasn't intending to expose it to Blueprint. My nose is telling me I should write a C++ interface anyways, and then create a Blueprint wrapper "implementation interface" (lol) that exposes it to Blueprint. The serialization logic relied on uint32 object IDs for referencing connections between actors. It also had a map and an array for lookups to map these IDs to their new versions when reloading. Neither the uint32 type nor these containers are available in Blueprint, so I had to wrap them for what I needed them to do. This is not so bad because I think I have to encapsulate all this anyways to extend the serialization system to handle level-switching and saving the state between levels too, but it was another layer I had to add to a bunch of code that I wasn't certain was even going to ever work in the first place. Finally, when it came time to actually save all these actors, I had to scan all actors for implementations of USaveable::StaticClass(). From here, I then had to disambiguate between Blueprint implementations and C++ implementations. The C++ implementations will take a Cast<ISaveable> but the Blueprint implementations will fail that cast. For them, I have to invoke the method statically (after paranoia-testing that they implement the USaveable::StaticClass()). If the real function is ISavable::SaveToRecord(), then I have to invoke ISaveable::Execute_SaveToRecord(actor). This is just some magic I had to find on the forums. Visual Studio is still sitting there with that line squiggled red, but it compiles and runs. I eventually just plugged my nose and prepended the function name with "Execute_" and bam. I'd like to know if any of that plumbing could be simpler. I think in the 5.x engine, all the GENERATED_BLABLA_BODY stuff collapses to GENERATED_BODY() regardless of the type so I don't need to remember subtleties there. I still have some blocks using the old ways that I will be transforming and checking. I'd like to brag that I didn't get too many crashes while working on this, but that's because I learned early that whatever I try to call in Unreal that returns something will not be valid. It'll just not work like I'd expect and I will have to Google, Discord, and hit the forums a bunch to figure out that I'm supposed to use some other function instead, which also doesn't work, until I get to about the forth one. I'm guessing as time goes on, this hit-and-miss rate will improve in a way like "programming for Unreal requires a lot of luck. The more I do it, the luckier I get."
|
# ? Dec 27, 2023 10:09 |
|
For adding classes what I tend to do is keep aside somewhere some empty template files which I just copy and paste into their respective private/public folders and rename MYAPI and MYCLASS to whatever; close the editor, regenerate the project files so Unreal will now see it and recompile. Interfaces suck yeah, there's a lot of special rules as to what can be a true virtual function and what needs to be a ufunction and sometimes these things don't work together. Making my new global event bus framework for Unreal was a big pain because I can't pass multicast dynamic delegates but I CAN pass the unicast versions, only for that I can still add a unicast delegate to a multicast delegate internally and so I'm like, why? There is in fact a whole system for saving and loading, did you happen to look at the UGameplayStatics::SaveGameToSlot stuff? https://www.tomlooman.com/unreal-engine-cpp-save-system/ https://bluebubblebee.medium.com/lets-create-a-save-system-in-unreal-engine-4-276a24e66b2c
|
# ? Dec 27, 2023 17:33 |
|
Raenir Salazar posted:For adding classes what I tend to do is keep aside somewhere some empty template files which I just copy and paste into their respective private/public folders and rename MYAPI and MYCLASS to whatever; close the editor, regenerate the project files so Unreal will now see it and recompile. quote:multicast dynamic delegates quote:There is in fact a whole system for saving and loading, did you happen to look at the UGameplayStatics::SaveGameToSlot stuff? Now, I would like to screw around with built-in serialization to output JSON instead for debugging and inspection, but I'm having enough fun just getting the basics working here.
|
# ? Dec 27, 2023 18:33 |
|
Rocko Bonaparte posted:I couldn't get that to work when I tried it. I have to concede I was forming a mental rage cloud, so I could have been whiffing it. When I tried to introduce files to the project from within Visual Studio itself, they just wouldn't show up in Unreal. They were ignored regardless of restarting everything or trying to use the live coding rebuild. When I regenerated the project in Unreal, it removed the files from the project--although not from disk. I had to add a new c++ class from Unreal to have it registered in the project and recognized for builds. If you want I can post my templates a little later if I'm done digging myself out of image reference for art commission hell. You basically gotta have the right keywords and includes and other little C++ details all together the right way and it should just work after you do the right click on the uproject file and click "Generate".
|
# ? Dec 27, 2023 19:06 |
|
I think I figured out some of the finer bits between Visual Studio and Unreal Engine now.
I also discovered the joy of having to mark a TArray of a UObject derivation I made as a UPROPERTY. When I changed levels, all the UObjects inside the TArray got blown up and the editor would crash in strange spots related to the Blueprint that would try to use them.
|
# ? Dec 30, 2023 22:23 |
|
unrelated but I just tried to install unreal engine on my laptop and it's 60gb?!?! guess I'm going with godot for this project
|
# ? Dec 30, 2023 22:26 |
|
The Fool posted:unrelated but I just tried to install unreal engine on my laptop and it's 60gb?!?! You can cut this down a ton by unchecking the box that downloads sample content, but it'll still be gigabytes and then you won't have any sample content. Unreal's a big beefy boy.
|
# ? Dec 30, 2023 23:11 |
|
I had to look at sample content to soak in all the ways I could get actors and their blueprints to talk to each other. Even that demo has some odd gigabytes.
|
# ? Dec 31, 2023 00:13 |
|
I blew some odd hours figuring out that Unreal's UGameplayStatics::OpenLevel function is a non-blocking call and just signals a level change without fully doing it. So all the stuff I'd load in and change right afterwards would get nuked because the level wouldn't actually load until later. It took a lot of digging around to find which delegate to subscribe to in order to be told the level was finished loading, and I settled on FCoreUObjectDelegates::PostLoadMapWithWorld. You'd think FWorldDelegates::LevelAddedToWorld would be it, but that was never invoked at all. My player control isn't completely re-established with the loaded player pawn yet. I do get my player controller and possess the pawn with it, but none of my controls actually respond. So I assume there's a bunch of other Unreal-specific technicalities with all this that I still haven't figured out.
|
# ? Jan 1, 2024 23:24 |
|
Your Computer posted:if anyone here is interested in getting into retro dev and game boy assembly there probably has never been a better time! i don't know how it happened but there are a lot of resources, modern tools and an active community over at https://gbdev.io/ and they were really helpful to me! Slightly less retro but after the big "you can just hack your 3DS" (which I did as I had a US New 3DS and a bunch of UK games) I got interested in homebrew there, installed the environment and compiled some of the example apps and ran them on-device, including ones that do the 3D (I love lenticular screens). Trying to think of a project to actually use on it now, though. The fact you need to program the shaders in Weird Shader Assembly bothers me though (particularly as it has a bunch of gotchas including "no break loop instruction inside an if instruction's true block", my first task might be writing a little compiler for that.
|
# ? Jan 1, 2024 23:36 |
|
Getting loops at all is a luxury, it sounds like there's already some compiling going on?
|
# ? Jan 1, 2024 23:58 |
|
Rocko Bonaparte posted:I blew some odd hours figuring out that Unreal's UGameplayStatics::OpenLevel function is a non-blocking call and just signals a level change without fully doing it. So all the stuff I'd load in and change right afterwards would get nuked because the level wouldn't actually load until later. It took a lot of digging around to find which delegate to subscribe to in order to be told the level was finished loading, and I settled on FCoreUObjectDelegates::PostLoadMapWithWorld. You'd think FWorldDelegates::LevelAddedToWorld would be it, but that was never invoked at all. What are you initializing, and is there a reason you’re not doing this as part of BeginPlay on the game mode?
|
# ? Jan 2, 2024 00:10 |
|
There might be some microcode, but it's not specified - as far as I understand it it's reverse engineered. https://www.3dbrew.org/wiki/GPU/Shader_Instruction_Set It's worth a look if you like that kind of thing. It took me a few reads of the article there to fully understand it, but the reason the if and the break interact badly is that it's all stack based, it's mildly clever (the "control flow" section at the bottom covers it, and mentions things like a BREAK instruction without a LOOP (e.g. the loop stack is empty) will just hang the GPU).
|
# ? Jan 2, 2024 00:10 |
|
blastron posted:What are you initializing, and is there a reason you’re not doing this as part of BeginPlay on the game mode? I am loading a save, which I causes me to load the level in which that save was made. I would then compare saved actors to ones in the level and replace them with the saved version. I am mostly focusing on the player actor right now because I knew it would suck (courtesy of doing this in Unity some time back) Game mode stuff is a no-go for directly doing it because the game mode gets wiped when loading a level. I found that out last night. I would have to retain the relevant information on a game instance at a minimum, so I just have a game instance subsystem trying to do it.
|
# ? Jan 2, 2024 01:41 |
|
Wow, pretty impressive stuff coming from Godot engine! https://www.youtube.com/watch?v=ao34A0Y2x6c
|
# ? Jan 3, 2024 16:40 |
|
I see myself running into a timing situation with GameInstanceSubsystems in Unreal Engine and wonder if I'm supposed to do what I had done in Unity: create one God subsystem in the engine that I then attached my own subsystem API into it. Then I could order them so that they all got ticked and timed in a consistent, expected sequence. I suppose it would be nice if UE just kind of did this in some way. It's not really the end of the world if I have to fall on this, but it also smells like something it might have actually addressed. I also wonder about cross-level data sharing. I want to note points where the player would start in another level based on an exit they took from the current one. I'm representing those points as actors in those levels. I found soft pointers and I'm verifying how well they work. What I managed to do is use that levels list, add the other level into mine, and assign the representative actor to the thing that will trigger the level transition, and then remove the level from the levels list. The whole sublevel thing doesn't really make sense to me. They're both live in the level at the same time. It's literally loading multiple levels in the same space at the same time. I find it a little odd I can't somehow load the other level on the side and reference the target from there. (I also don't know if this scheme even works).
|
# ? Jan 8, 2024 07:19 |
|
This has to be the most chaotic game programming I've seen, and I love it. My add brain would never allow for such chaos. https://www.youtube.com/watch?v=CWrzGpxi5R0
|
# ? Jan 12, 2024 19:38 |
|
Reminds me of life before getting a second monitor. Please, if you are doing gamedev, get yourself a second monitor. It's like the second-best thing you can do for yourself behind getting an SSD.
|
# ? Jan 12, 2024 20:50 |
|
everyone should have a second monitor regardless of anything. hell make it three
|
# ? Jan 12, 2024 20:56 |
|
I can't imagine life without 3 monitors. There's no creation software I use I could use now without 3 monitors as a basic minimum, like a plant needs electrolytes, yet 4 feels like a bit much.
|
# ? Jan 12, 2024 21:07 |
|
OneEightHundred posted:Reminds me of life before getting a second monitor. I work almost exclusively on a 16" laptop
|
# ? Jan 12, 2024 21:12 |
|
I think Unreal Engine wants three monitors. One for IDE, one for the editor, and one for all the YouTube videos I have to watch to figure out how to do anything.
|
# ? Jan 12, 2024 21:23 |
|
Rocko Bonaparte posted:I think Unreal Engine wants three monitors. One for IDE, one for the editor, and one for all the YouTube videos I have to watch to figure out how to do anything. the quest 3 gives you exactly three views at once
|
# ? Jan 12, 2024 21:33 |
|
Tunicate posted:the quest 3 gives you exactly three views at once The virtual desktop stuff? I was following that awhile because I was really keen on the idea, but it looked like it would ultimately make your neck snap and eyes bleed. Can somebody with poo poo-rear end vision actually read well with that stuff?
|
# ? Jan 12, 2024 21:40 |
|
Rocko Bonaparte posted:The virtual desktop stuff? I was following that awhile because I was really keen on the idea, but it looked like it would ultimately make your neck snap and eyes bleed. Can somebody with poo poo-rear end vision actually read well with that stuff? I used a quest 2 for like a week when my monitor was broken, it works as a comedy option or shortterm but i would not recommend for serious use. Who knows about tbe newer ones
|
# ? Jan 12, 2024 22:15 |
|
Tunicate posted:I used a quest 2 for like a week when my monitor was broken, it works as a comedy option or shortterm but i would not recommend for serious use. Who knows about tbe newer ones That's pretty much still how it is. Even though most of the optics are pretty good, you still can't just move your eyes and have everything be clear edge to edge, so you're still constantly uncomfortably shifting your head back and forth to get everything into focus
|
# ? Jan 12, 2024 22:38 |
|
I don't think you strictly need multiple monitors to be productive, just the equivalent desktop real estate. I used a single multi client monitor for a bit at work, and it worked about as well as my usual three separate monitor setup. I used one quarter of the display for OSX dev hooked into a macbook for a bit while keeping the other three quarters for IDE, browsers, etc on my main machine. I slightly missed having vertically oriented screens for coding & documentation, but being able to switch one input to full 43-inch 4K was also pretty useful. I've also done work stuff on my gaming-oriented 21:9 Ultrawide at home every now and then, either by splitting it into 3 equal windows or one 16:9 window main window and one narrower side window. Current OSs have features that let you split up space sanely on a single display, even if they don't go full xmonad. The problem with gaming monitors tends to more be that they prioritize refresh rate and visual pop over accurate color reproduction, but depending on what you do that may not be an issue. Rocko Bonaparte posted:The virtual desktop stuff? I was following that awhile because I was really keen on the idea, but it looked like it would ultimately make your neck snap and eyes bleed. Can somebody with poo poo-rear end vision actually read well with that stuff? My vision is extremely poo poo-rear end -- possibly too poo poo-rear end to be a good sample: I have myopia, cyclotropia, and my lateral eye movement is mildly screwy -- and god no. They're a terrible way to program, even as someone with crappy peripheral vision who also can't actually move their eyeballs much (unsure if this makes me a good or bad usecase for VR in general, certainly most headsets don't like my glasses). Presumably they're even more poo poo if you're working on anything remotely design- or graphics-related that isn't actually targeting that VR platform. There are situations where VR is a good work tool, working in CAD I've met architects who think it's great for visualizing interiors. Coding things or anything else that involves a lot of text is emphatically not one of those situations. I doubt that the enclosed "darkroom" headset type displays will ever be good choices for reading or writing.
|
# ? Jan 13, 2024 05:06 |
|
Yeah my life is definitely a lot of text. In other news, I think the Unreal Source server on Discord has an implicit policy of solving everything with X instead of Y. So if you want to do X, they'll ask why you aren't doing Y. If you ask about Y, they will ask when you aren't doing Z. If you ask about Z, then they'll ask why you aren't doing X. So far, I have traversed this once and when asked why I wasn't doing X (the thing I wanted to do originally), I try to lean into it. "Wow, what is that? How would I do X?" But then the rotating timer goes off and they start saying I should do Y instead.
|
# ? Jan 13, 2024 22:06 |
|
Rocko Bonaparte posted:In other news, I think the Unreal Source server on Discord has an implicit policy of solving everything with X instead of Y. So if you want to do X, they'll ask why you aren't doing Y. If you ask about Y, they will ask when you aren't doing Z. If you ask about Z, then they'll ask why you aren't doing X. I've kind of given up on that Discord at this point. There's a bunch of knowledgeable and helpful people on it, but the level of questions they're able to answer are the kinds of questions I can find answers for myself on Reddit or the UE community boards. Anything more arcane than that, like "when I finish loading player config data from the backend, is it okay to finish instantiating their player controller from the task graph or do I need to do that in a tick?", is something I need to ask my industry friends about or check Epic's licensee discussion boards for. e: This isn't to say that it's a bad resource in general. If you've got questions about stuff that's well supported by the engine, they'll definitely be able to at the very least point you in the direction of a solution. blastron fucked around with this message at 22:37 on Jan 13, 2024 |
# ? Jan 13, 2024 22:34 |
|
The real problem with discord is none of that knowledge is accessible by web crawlers and discord's internal search is garbage. There's vast amounts of knowledge sitting out there that no one can find.
|
# ? Jan 13, 2024 22:40 |
|
https://twitter.com/Phantom_TheGame/status/1746123320204947871
|
# ? Jan 14, 2024 13:18 |
|
|
# ? May 25, 2024 15:25 |
|
Wow that's beautiful. I unironically love the gently caress around find out syntax. Also yeet.
|
# ? Jan 14, 2024 13:44 |