u/Jaded_Ad_2055

Trigger "panic"

I have a Trigger component derived from UBoxComponent, and is binding its member functions to the delegates OnComponentBeginOverlap and OnComponentEndOverlap.

So when I step on it, the bound function OnOverlapBegin send a signal to open the door, and OnOverlapEnd send a signal to close it.

It works correctly, but the thing is, if I stand just in the right position at the edge of the trigger, the two functions will alternate rapidly, making the door "panic" and go up and down very fast :S

How do games usually handle this?
My first ideas was: "when the trigger gets overlapped, ignore further signals from the trigger until door is fully open/closed"

...but doesn't seems ideal and responsive, ideally I would just like for the trigger to be precise - if I'm standing still either I'm in or out of it.

So what's the optimal solution to this problem good games employ?

EDIT: Solved! :S
The issue was that the Trigger was attached to the pressure plate, so when you step on it and it sinks into the ground, if you're at the edge the trigger is literally going away from you and ending the overlap, coming back up and creating that flicker effect.
I needed for the Trigger to be a static box not moving with the plate :S

reddit.com
u/Jaded_Ad_2055 — 22 hours ago

A bit confused on Delegates

I wanted to understand Delegates, so I attempted diving into the documentation, at this link, and I'm getting more confused...

For example, scrolling down under the section Binding Delegates it says:

BindRaw Binds a raw C++ pointer delegate.

and later there is the example:

MyDelegate.BindRaw( &MyFunction, true, 20 );

So who is the delegate here, the variable or the function pointer?! Because I'm getting mixed signals, the variable is named "MyDelegate", but the BindRaw comment says "Binds a raw C++ pointer delegate."

And then further down there is an example, where we have this class with a method we want to bind:

class FLogWriter
{
void WriteToLog(FString);
};

followed by:
//...
Now, to assign the delegate, simply create an instance of your delegate class, passing along the class that owns the method as a template parameter.
//...

TSharedRef<FLogWriter> LogWriter(new FLogWriter());

WriteToLogDelegate.BindSP(LogWriter, &FLogWriter::WriteToLog);

First, are we assigning "the delegate" or "to the delegate" (or neither) ?
And also "passing along ... as a template parameter" - the actual code does not pass FLogWriter as a template parameter anywhere...

I don't know if I'm just too dense for that page, but if possible I would appreciate if someone could help dispel some confusion by clearly pointing out what is what: is Delegate the Object calling the registered functions, or the functions being called ???

Also, regarding OnComponentBeginOverlap, it is a Delegate, right?
And how does it knows it has been overlapped and needs to call the registered functions?

u/Jaded_Ad_2055 — 1 day ago

OnComponentBeginOverlap.AddDynamic expected function signature

I'm following Unreal Engine 5 C++ Developer from Kaan Alpar and on lesson 67, he has me use this delegates system in which I register my function using OnComponentBeginOverlap.AddDynamic, to be called when the player overlaps the component.

And he brings up this page here from which you have to copy the following signature for the function to properly fit in this system:

void OnOverlapBegin(class UPrimitiveComponent* OverlappedComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);

And my question is, is this properly documented somewhere, or how would someone that doesn't know about it go about finding this out?
Can you discover it from engine or from the code, and where exactly?
I find hard to believe one is expected to find this random page named "C++ Only" to get a glimpse at the correct signature, I would have never found it.

He also says "These arguments are determined by the delegates and we have to provide these if we want to bind to said delegates" - ...so how can I take a look at these delegates?

reddit.com
u/Jaded_Ad_2055 — 1 day ago

Looking for challenging UE5 C++ oriented courses

I’m currently following Unreal Engine 5 C++ Game Development by Kaan Alpar. I’m at lesson 44/194, and while I’ve picked up a few useful things along the way, the pace feels too slow for me. In other words, the amount I’m learning doesn’t feel proportional to the time I’m spending watching the videos.

This is probably also because the course is aimed at people with no prior C++ experience, while I already know the language.

That said, I really like the fact that the instructor consistently gives challenges *before* showing the solution. I just wish those challenges had more "depth" to them. Writing UE_LOG() for the nth time is not gonna make me any better... but the hope is that the challenges step it up going forward.

Currently I understand the C++ language and how to operate on the engine at a basic level, and what I’m trying to develop is the ability to solve actual game-related problems through code and math (especially math, since that’s still a weak area for me), anything that a future team might ask me to solve, regardless of what the challenge is.

So, I was wondering if anyone could recommend highly regarded courses, maybe aimed at advanced learners and that aren’t just “watch me do it” style tutorials, but instead a course that lay down in front of you the mathematical concepts needed, and then actually push you to you wits end (in a good way) with hard but feasible challenges, before showing the solution/implementation.
Because I know its in that "trial and error", try and come up with my own solution (and then comparing it after!) that I learn the most.

Let me know what you got, and thank you ^_^

reddit.com
u/Jaded_Ad_2055 — 3 days ago

Visual Studio / Unreal Engine workflow

I’m not clear on the Visual Studio / Unreal Engine workflow.

(I’m using Visual Studio 2022 and UE 5.7. I also have the Visual Studio Integration Tools disabled because, for some reason, when they’re enabled, Live Coding fails to compile.)

For example, I add a UArrowComponent from C++ to a class, compile from Unreal, and the arrow component correctly appears in the Blueprint based on that class.

But then I change the arrow’s initial position in the constructor, save the code, build again from Unreal, and this time the arrow does not update its position.

If I then restart Unreal and build again, only at that point the arrow updates correctly.

So am I really supposed to restart Unreal every time I change the value of something in C++?
Is this expected behavior, or am I misunderstanding the workflow?

Because if this is the expected workflow, I must say it feels miserable.

But I could swear when I used UE with VS few years back, I hadn't encountered any of these issues!

Are these problem introduces by some recent version?

Professional programmers around here, please tell me what your workflow looks like, because I simply refuse to accept this as normal.

reddit.com
u/Jaded_Ad_2055 — 5 days ago

Am I exporting my theme correctly?

*This is a work in progress.*

As you might know color influences mood, and personally, I've always found the default VS Dark color theme to give a cold feel of loneliness and isolation, not a mood in which I would like to be programming.

Therefore coming back to C++ as an hobby, I've set as first task the creation of a color theme called "Friendly Machine", which would give a simple, comfortable, relaxed and friendly mood.

It's still a w.i.p., there's a tons of colors I still need to address, but since I'm scared to losing progress (due to an update, hard disk failure etc...) and then not being able to load this again, I would feel more at ease knowing I am exporting this correctly.
So I would like to ask if someone would be available to load it on their VS and let me know if it would show the same thing from the screenshot.
The .vssettings file is at this link.

Thank you

u/Jaded_Ad_2055 — 10 days ago

Looking for Structured C++ Project Lists With Clear Milestones and Constraints

Yesterday, while looking to get back into C++ as an alternative hobby to just playing videogames, I made a post asking if there were any sites that teach the language (including advanced topics) in a gamified way.

It turns out that doesn’t really exist, so today I’m back looking for the next best thing I know would work well for me.

When it comes to videogames, what motivates me is the challenge of accomplishing well-defined goals (achievements), which is why I usually can’t get into sandbox games.

Similarly, I’m looking for a list of programming projects with gradually increasing complexity that, crucially, also provide clear constraints and milestones for each project - possibly even specifying which libraries to use.

I know this might sound odd, but without that structure, it still feels too close to a sandbox to me.

So instead of something like:

・Create a calculator
・Create a 2D game
・Create a renderer

I’m looking for projects with clearly defined goals and intermediate milestones, like:

・Create a calculator using Qt
  ・Create the calculator window with buttons
  ・Add addition / subtraction / multiplication / division
  ・Add keyboard input support
  ・Prevent invalid operations (division by zero, malformed expressions, etc.)
  ・Add memory functions (M+, M-, MR, MC)
  ・Write unit tests for the calculation logic
  ・Package the application into an executable installer

・Create a simple Pacman clone using Raylib
  ・Render a controllable player character
  ・Add enemy AI with pathfinding
  ・Implement collision detection
  ・Create a save/load system using serialization

・Create a simple renderer using OpenGL and GLFW
  ・Create a window and initialize OpenGL
  ・Render a colored triangle using shaders
  ・Add a movable camera
  ・Render a cube
  ・Implement textures

You get the gist. The milestones and constraints are very important to me because the former gives me something I can easily track and “gamify” for myself, while the latter reduces the sandbox feeling and pushes me to learn libraries or tools I otherwise probably wouldn’t use.
It needs to have that external, verifiable sense of progression - if I'm the one making the milestones, then I'm back into sandbox territory.

It doesn't necessarily need to be a website by the way, if there is something like this in the form of an exercise book, I would immediately purchase it.

If you know of anything that resembles what I'm looking for, please let me know.
Thank you.

reddit.com
u/Jaded_Ad_2055 — 11 days ago

Places to learn C++ in a "gamified" way?

I've learned the basics of C++ a few years ago, and lately I've been considering getting back into it as a hobby.

I was wondering if there are any websites that teach you C++ in a thorough, structured but "gamified" way, similar to how Khan Academy approaches teaching.

What I'm looking for is not sites that throw random problems at you, but something that has a clear roadmap with milestones and that takes you from the basics up to modern C++ features and newer additions, for example I still have no idea how things like the pipe operator work, I understand very little about templates, and absolutely nothing about reflection from C++26.

I had found many of these sites when I was looking for them in the past, but zero of them covered the entirety of the language, in fact past the basics, they would only give you a very superficial explanation of the rest (or none at all).

So basically I'm looking for a website that teaches C++ and has these traits:

  • structured progression (with a roadmap)
  • exercises
  • somewhat game-like or motivating (progress bars, unlocks, medals, wathever)
  • very thorough, doesn't skip on modern C++ and advanced language features

...I suspect this post might mildly trigger those serious about learning the language, so I'll put my hands forward and emphasize this would be only an hobby for me, a distraction from playing videogames, so indeed, I'm not serious about it.

Thank you in advance.

reddit.com
u/Jaded_Ad_2055 — 12 days ago
▲ 1 r/MonitorAdvice+1 crossposts

Hi everyone, soon I'm going to replace my 7y old AOC 21G1WG4 with a new one and I needed some help in choosing.

What I'm looking for is:
27''
2560x1440
144Hz (honestly, never felt the need for more and my GPU won't reach higher anyway)
relatively high contrast (3000:1 or greater)
gaming oriented (1ms response time, those cool sync modes etc...)
VESA mount
absolutely NO oled (I don't have the budget to replace it in few years due to burn-in)
・*most of all, I want just a very good monitor on top of those things*

Currently, I was looking at the AOC Q27G3XMN which I remember was much talked about the past years, so this is the baseline.
I don't know if we've surpassed it in the meantime, so I'm counting on you for guidance ^_^

u/Jaded_Ad_2055 — 15 days ago

I was wondering: how realistic are the declared toner yields, actually?

When manufacturers say something like 1600 or 2100 pages, has anyone ever tracked their real-world usage and checked how close those numbers are?

I know those ratings are probably based on ideal conditions and standardized coverage, but in normal use - documents, PDFs, occasional images, mixed text density, etc. - how far off are they usually?

I'm curious to hear actual experiences from people who paid attention to this.

reddit.com
u/Jaded_Ad_2055 — 15 days ago

I've bought toners for my printer on Amazon, and this is what I've got:

https://preview.redd.it/yth0rtwhaizg1.png?width=964&format=png&auto=webp&s=d74e68e973bb3460eec8175b230e0537450037a9

As you can see the sealing plastic had a circular cut around all 4 chips.
It couldn't have simply happened on its own the way this was packaged, this was very much intentional, done by an individual.
Leading me to believe someone tampered with the chips in my toners.

I've sent it back and asked for a refund, but what I would like to understand now is: why would someone do that? What do they have to gain?
And would have it been safe to use them?

reddit.com
u/Jaded_Ad_2055 — 17 days ago