Questions tagged [c++]

C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.

Filter by
Sorted by
Tagged with
0
votes
1answer
60 views

How would I go about coloring marching cubes terrain?

I'm making a game with marching cubes terrain (I know very original idea) and I don't exactly know how to color it. I have a system to do it, I just need to know how to interpolate it where it's not ...
1
vote
0answers
24 views

How would I implement a level transition when reaching a cave in Raylib?

I am the developer of an upcoming 2d/3dRPG. I have a simple scene setup where there is a bridge over some acid and a cave entrance-like thing that I want to change the level with. I have used C and C++...
0
votes
0answers
5 views

PlaySoundAtLocation plays sound after some delay

I’m developing the Pong game to learn Unreal Engine 4.26 using C++. I use this code in the class’ constructor to load the sound: ...
0
votes
1answer
54 views

Trouble with Raylib install on Arch Linux

I am learning Raylib game library, but in the "First Person Maze" example the images cannot be found, for example:  ...
0
votes
0answers
18 views

models and images are just blank in raylib. any fix?

I am using Raylib after trying SFML, and I have a playable level, albeit just a plane that you can walk on. I'm trying to add a skybox and nothing shows up, even when using the example code that they ...
0
votes
0answers
117 views

Some maths about camera in 3D

So after finishing a 2d game for my school project, I decided to dive into 3d world by using raylib instead of Unity. Raylib does provide a simple implementation of 3d camera without you doing maths, ...
5
votes
1answer
1k views

How does the SDL dynamic API inject itself in statically linked code

I've been using SDL2 for development almost since it came out. Long story short, I stumbled upon the SDL dynamic API explanation. I've looked in SDL_Dynapi.c to ...
0
votes
1answer
51 views

Why the mouse doesn't move in mouse-look feature of RPG/FPS games?

Description The mouse look (or free look, i.e., move the mouse to change the view/camera) is common in RPG and FPS games. In my cloud game project, I tried to achieve this feature. Before programming, ...
2
votes
1answer
76 views

What is GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS?

I am a beginner in OpenGL. I am learning about textures in OpenGL. What I don't understand is how to determine how many texture units are in the GPU. I heard someone said that you can see how many ...
0
votes
1answer
73 views

Difference between shader input element classification between D3D12 and Vulkan

I'm confused about the difference between the shader input element classifications in D3D12 and Vulkan. For example, in Vulkan I could have the following declarations: ...
1
vote
0answers
30 views

How to properly delete unwanted models

I am implementing bullets into my game, and each bullet has a lifetime. Whenever the bullet has existed for a set amount of time or collides with an object, the bullet should be deleted. I implemented ...
1
vote
1answer
19 views

Using UPawnMovementComponent to control a Pawn with Keyboard sharing code between Pawns

I've just started to learn Unreal and reading the tutorial Components and Collisions I have found that they use the UPawnMovementComponent to control their ...
0
votes
0answers
15 views

How to use SetBoneRotationByName() to rotate a single bone in a armature?

I am very excited to finally be learning Unreal engine development! But I have been working with Unreal editor for only the past couple of days but am having trouble understand how to rotate or ...
2
votes
1answer
987 views

HAA* / HPA* C++ Algorithm / Help

so I have been working on implementing a form of HPA* but i'm really struggling to decide what to do next. https://webdocs.cs.ualberta.ca/~mmueller/ps/hpastar.pdf <- here is the article. There is ...
1
vote
1answer
2k views

Creating a real loading screen between levels in Unreal Engine 4

I'm trying to create a loading screen to pop up between levels in Unreal Engine 4. I want to have a traditional loading screen such as the loading screen in Skyrim, where the player presses play and ...
0
votes
1answer
96 views

I can't figure out whats wrong with my .obj file reader

I'm just loading a simple textured cube but it always has missing bits or warped textures. This is for directx 11 rendering by the way. Updated with more information. I think my problem is with ...
0
votes
1answer
144 views

I can't make the cube map to use shadow mapping - or it seems so

Basically, I'm following tutorials as I'm very new to OpenGL. I managed to perform shadow mapping towards just one direction, meaning I created 2D texture depth map. Now with omnidirectional shadow ...
0
votes
0answers
20 views

I'm implementing a sort of isosurface extraction and theres a bunch of holes

i'm implementing a isosurface extraction algorithm losely based on dual contouring but theres a bunch of holes it looks like what i want though other than that can you look at code and fix it maybe it'...
1
vote
0answers
40 views

How to reduce code duplication in a cross-platform renderer without tying the interface to one specific API?

I'm working on a game engine as a fun project over the spring+summer. I've decided that to allow myself to explore rendering APIs I'm unfamiliar with, and force myself to write reusable code, I'd ...
1
vote
0answers
27 views

How can I create a heightmap for ocean surface simulation?

I am working on a game that is based on boats fighiting each other. The game is finished but due to some license incopatibilities, I have to change how I simulate the surface of the sea. What I used ...
0
votes
1answer
179 views

Collision between a player and a solid block C++ SDL2

I am trying to implement a collision between a player and a solid e.g. a solid box. ...
1
vote
2answers
4k views

IDE cannot find CoreMinimal.h, Unreal Engine 4 course

I'm following this tutorial on Udemy about learning the basics of Unreal Engine as I start up my CS degree, and I've reached a problem where CoreMinimal.h cannot be ...
1
vote
0answers
39 views

Parsing Sprites from Spritesheet

How can I parse a spritesheet consisting of scattered sprites with different sizes, like this example and return the (x, y) and ...
0
votes
1answer
22 views

What is the difference between libraries like C++/PDCurses and SFML?

I have read that PDCurses is a library that can be used to create 2D games however SFML is also a library but they are not in the same category I presume according to what I have read: "The ...
0
votes
1answer
46 views

Distance between moving, rotated rectangles in snake game

I am trying to implement basic Snake game with movement based on timestep. For now I've got something along those lines: Update function: ...
1
vote
1answer
44 views

Godot C++ NativeScript version not rendering multimesh instance whereas GDScript version does

I am new to Godot. I am aiming to create a RTS game with 10's of thousands of units and for it to run smoothly. So I'm looking to use GDNative C++ with the Visual Server to handle updating and moving ...
1
vote
1answer
1k views

Directx11 create Texture2D using subresourceData

I'm trying to create immutable texture in d3d11 so I want to use subresourceData, every tutorial on textures creates them with 2nd argument being null and after that updates subresource but I want to ...
0
votes
1answer
18 views

Why Query Only fires OnComponentHit? It supposes to fires only Overlap events

I've just started to develop with Unreal Engine 4.26.2 and I've been for five days trying to understand how collision works. I'm developing a Pong game, and I'm trying to make that the Ball bounces ...
1
vote
1answer
43 views

Delta Time FPS with SDL 2 in C++

I have tried achieving a good delta time and fps counter over the last few days, read and watched a lot about it, but still can't seem to get it to work. Here is an example: ...
0
votes
1answer
32 views

What to do with d3dx9math.h when converting to DirectX11?

I'm converting an old game from DirectX9 to DirectX11 and I have a question: What I should use instead of d3dx9math.h? Do I have to convert everything for ...
0
votes
0answers
26 views

self extending factory: return type and serialization

I'm trying to implement a better management for the objects in my game project. With input from another thread here on S.O., I decided to implement different collections for different types for better ...
0
votes
0answers
20 views

How to a select a single 3D object out of multiple objects using mouse click and move it using mouse drag in OpenGL

I am rendering multiple 3d objects on the screen but i want to select one particular object by clicking on it and then move it using mouse drag but i cant figure it how to do it because on clicking ...
1
vote
2answers
206 views

How to keep same aspect ratio in different devices with cocos2dx?

I have been making a board game and I am using cocos2dx. There are two scenes for now, One is main menu and the other is gameplay scene. When I run the apk on tablet with EXACT_FIT resolution policy ...
0
votes
1answer
74 views

Typical Point Light Flow?

A Quick Note This question assumes you have some knowledge about the overall rendering process and do not need clarification on rendering objects with HLSL and a <...
0
votes
1answer
61 views

Get BP FollowCamera Rotation and Location

I'm accessing my FollowCamera https://imgur.com/a/vbFagxg from my BluePrintCharacter class in my C++ code, with this following line : ...
0
votes
2answers
275 views

Game movement in 2D SFML game

I am making simple 2D game, imagine it as 2D Minecraft where you can dig blocks and build other things. Currently I am struggling with movement. I have none experience in game development, but I am ...
8
votes
5answers
16k views

Game loop on windows

I have seen different "basic" game loops both from books like "Introduction to 3D game programming with DX11" or online tutorial ( Rastertek ) and if we take off all the fancy stuff to control ...
7
votes
1answer
432 views

Why isn't my cbuffer updating?

I am really frustrated because my cbufer isn't updating. This is my VS: ...
0
votes
0answers
8 views

Get GPU Visualizer widget info

I want to read some info from the GPU Visualizer widget and use it in my plugin, but I have no idea how. I guess this code is responsible for running the ProfileGPU ...
3
votes
1answer
763 views

Specular Light not working (Phong Lighting)

There seems to be a problem with my current Phong Shading implementation. I have been using the per fragment approach. The specular highlight aspect of the technique is not rendering as it should, as ...
0
votes
1answer
64 views

How to pass data between game states?

Lately I've been using game state stack implementation from a book SFML Game Development and I've stumbled upon a problem with passing data between states. In this implementation State constructors ...
0
votes
0answers
11 views

Assertion Failed: TextureRHI - Texture Casting Errors (UE4)

I am taking a pointer to a UTexture2D asset "MyTexture2D", and casting it to an array of FColor using the following: ...
-1
votes
1answer
4k views

Convert 3D direction vectors to yaw/pitch/roll angles

I have the code below that takes a set of yaw, pitch, and roll rotation angles (in degrees), and populates forward, right, and up basis vectors to express this rotated orientation as a Cartesian ...
0
votes
1answer
988 views

Is there a plugin example for SKSE Special Edition?

I'm having trouble creating a skse plugin for skyrim special edition. For the old version there is a example plugin: https://github.com/xanderdunn/skaar/releases/tag/plugin3 I've tried to do it by ...
0
votes
1answer
224 views

Offset on camera following object that accelerates

I have camera a that is actively following an object (a plane) from behind. This object can accelerate or decelerate. I would like to have a camera offset when I move the plane, so it doesn't look so ...
-1
votes
0answers
26 views

How can i destroy texture and load it again in SDL2 C++?

How can i destroy texture and load it again in SDL2 C++ ?
0
votes
0answers
14 views

Skinning on simple model doesn't work as expected

I have created a simple application to make skinning work with OpenGL. so I want to share with my vertex shader: ...
0
votes
1answer
54 views

Update TTF Texture for Score

I have a little problem with Updating my Score with TTF. Im a neewbie so dont blame me :P I Try to Update my Score But the Buffer Get too small after a while and my Game Crashes. ...
0
votes
0answers
34 views

Single Array Texture, multiple wrap modes

I have a array texture of which I would like some of its sub-images have wrap modes of GL_REPEAT and others to be ...
0
votes
1answer
96 views

How to correctly reset vertex attributes after modification

I am trying to use the same vertex shader for two different use cases to preserve memory, but I am having issues where the modifications of one shader run are passed on to the next run, even after ...

1
2 3 4 5
81