Questions tagged [c++]
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.
4,363 questions
0
votes
0
answers
30
views
How to properly manage vertical offset for ghosts oscillating between tiles in Pac-Man ghost house
-2
I am implementing ghost behavior in a Pac-Man clone, specifically the behavior when ghosts are inside the ghost house during the waiting phase.
The issue is that ghosts inside the ghost house do ...
0
votes
0
answers
31
views
Procedurally generated 2D planets [closed]
I'm pretty new to making games, so excuse my ignorance if I say something stupid. I'm coding in cpp with raylib as a graphics thing. What I basically wanted to do is have procedurally generated ...
0
votes
0
answers
37
views
Need help with 2D player controller
I'm trying to create a 2D side-scrolling player controller like in Terraria, but I can't get the delta time right. If I set my laptop's mode to battery saver, my character jitters (from dt jitters), ...
0
votes
0
answers
45
views
how to implement event system with SDL2?
I'm writing a C++ game engine using SDL2 and I have an SDL event loop, but I'm not really sure what I want to do with these events. I know that I'll have systems that will be interested in these ...
0
votes
0
answers
54
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
51
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
48
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
46
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
175
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
81
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
81
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
112
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
340
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
116
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 ...