Questions tagged [c++]
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.
4,360 questions
0
votes
0
answers
50
views
Storing reference of delegate in pointer
I have multiple different classes which need to perform the same complex operation
So to keep my code dry, I'm using a manager object which requires a delegate for the complex operation
Here's a ...
1
vote
0
answers
38
views
How can I integrate a library that expects backend events into my own event system?
I'm using SDL2 in my game engine and have created custom event types that use the data from SDL_Event. This works well within my own code, but it becomes ...
1
vote
0
answers
39
views
How to integrate QML UI into a custom Vulkan renderer without using a separate window
I'm developing a custom Vulkan renderer and want to integrate a QML-based UI into it.
I already have a working Vulkan setup and also managed to render QML over Vulkan using a separate ...
0
votes
0
answers
44
views
How to detect which physics body of skeletal mesh has overlapped?
I have a skeletal mesh with a Physics Asset assigned to it as such:
This skeletal mesh is used within an ACharacter with collision settings as such:
And an actor which has the overlap event as such:
...
1
vote
1
answer
158
views
How to properly change resolution dynamically in SFML?
I am working on creating an options menu through which I can change resolution and toggle full screen mode. I am allowing only those resolutions that have aspect ratio 16:9, as my game was originally ...
0
votes
0
answers
80
views
Specifying a "default value" for parameters when binding functions to delegates?
Let's say I have a class UFoo which has a dynamic delegate myDelegate with no parameters. I cannot modify the contents of ...
0
votes
0
answers
80
views
Hashing gradient vector and unshuffled permutation table in perlin noise generator
I'm implementing perlin noise in C++. I have a permutation table for the gradients vectors and want to shuffle them with a 2 number hash that has 2 purposes. The hash uses the integer portion of the ...
1
vote
1
answer
96
views
How to format a godot::String with an array parameter in a gdextension?
I'm writing a gdextension and trying to format a string using an array as one of the parameters.
Example:
...
1
vote
1
answer
328
views
How does real Perlin noise work?
I find lots of articles but they cut parts out to simplify the process. I am trying to write a function to generate real 3D Perlin noise without skipping steps like averaging the 4 corners ray somehow....
0
votes
1
answer
111
views
Voxel Level Storage
I want to know some methods of storing the voxel data in a game like Infiniminer or Minecraft in a C++ program. What file types can do this easily? The voxel values will be big possibly a trillion by ...
0
votes
0
answers
32
views
AABB algorithm in C++ no vec3 [duplicate]
Hi im trying to select voxels in a voxel world that are at the center of the cameras view.
The players camera X,Y,Z position and its rotations are known. The camera works in this program.
I tried ...
0
votes
0
answers
192
views
Voxel Raycasting/ Divide A Line In 3D Into Small Portions
I have a voxel game where I want to know which block the players camera is facing. To do this I have a line the distance allowed for the player to interact with the world cast from the center of the ...
0
votes
0
answers
114
views
Looking for a way to handle/define area of effect attacks in a 2D grid based game
I am working on a top down 2D grid based game, where as it is currently, units have a movement and an attack range. An example of this:
The blue squares are tiles the selected unit can move to, the ...
0
votes
1
answer
290
views
How to implement something like Noita's spell system?
Does anyone have any insight or at least a guess as to how the spell system works in Noita?
The game is done in C++, and it has spells that can be modified with other spells and spell modifiers that ...
0
votes
1
answer
144
views
How much slower are decent ECS frameworks supposed to be, compared to a naive array lookup?
I'm developing an ECS framework in C++ and after doing every optimization I could think of, the comparison with a naive array look up is terrible. It's 10x worse in debug mode and 3x worse in release ...