A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
0answers
20 views

Creating A UDP Game Server

I am currently creating a game in need of networking i.e. server and clients. I have basic experience with socket programming and am able to transfer data between two machines via UDP sockets using ...
0
votes
0answers
25 views

Structuring in-game menus

I'm working on a multiplayer RPG using only C++ and SDL2. I've already made the main menu and a map editor, and I'm preparing to make the actual game. The main menu and map editor were easy to ...
0
votes
0answers
14 views

Directx 12 : Synchronisation between two processes

i have created two application. One application is rendering a texture off-screen with unlimited frame rate present option. The second application is reading what APP1 is rendering from graphic ...
0
votes
0answers
20 views

UE4 Multiplayer how to replicate Player name in lobby

I've been working on a little 1V1 snipper project to try and get a better grip on the replication and the game framework of unreal engine. So after the core gameplay, I'm trying to make a lobby ...
0
votes
1answer
58 views

VAO not showing

My VAO is simply not showing up and i'm not sure if my matrices are wrong or if the shader is wrong… Please have a look a see what is wrong… My code is big so i'll post the essential. ...
0
votes
1answer
165 views

How do I perform collision resolution for rigid bodies of varying volume?

I am currently trying to develop a small physics engine for my games. I have created bounding volumes for different rigid bodies. However, I am having problems handling collision resolution, more ...
1
vote
1answer
85 views

SIMD and Inverse Tangent

I'm calculating spherical UV coordinates in a loop, trying to get GCC to vectorize the code. Here's a compile-able example of what it looks like. ...
0
votes
1answer
35 views

Rotate Sprite towards mouse cursor SDL

I have trouble to make my sprite(Arrow) to point at the position of my mouse cursor but i don't get the Right results. I've tried this: ...
0
votes
1answer
90 views

Programming Test for a job in Game Dev - expected levels of documentation etc

If this is the wrong place to be asking this - please let me know and I'll happily ask it somewhere else! I am completing a C++ Proficiency test for a "Junior Engine Programmer" role at a game studio ...
2
votes
3answers
808 views

How to get `Label::createWithTTF` to support RTL languages such as Arabic

Firstly, I'm using Cocos2d-x v3.6, Visual Studio 2013 uses(UTF-8 without signature option) and ...
1
vote
1answer
199 views

C++ Mouse picking for ray to plane intersection

I'm making a C++/OpenGL application (decidedly without GLM), and I'd like to understand how to create a ray from the camera eye to the mouse pointer, as well as detect an intersection point from the ...
1
vote
1answer
109 views

Tilemap collision in Pure ECS?

I'm currently making a 2D topdown dungeon crawler using pure ECS and Data Oriented Design. So I only use structs of arrays for all my components. I have now added tilemap generation, but was wondering ...
0
votes
2answers
160 views
0
votes
1answer
71 views

2D Topdown Shooter - Line of sight based purely on angle and rotation

In a game I'm working on, enemies constantly rotate around as they move around the map. I want them to only shoot the player if they're within a field of view. This is the function header: ...
1
vote
1answer
537 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
32 views

How to set root signatures specified in HLSL in my command list?

From Microsoft Docs, I can specify the root signature of my shader in HLSL. How do I use it though? Since at the beginning of the command list, root signature is undefined. I need to use ...
0
votes
0answers
30 views

Godot native c++

I want to add java native interface cpp to be compiled to .so files in the apk in godot android export. Basically add android native jni c++ to godot. My first gamedev stackexchange question.
0
votes
1answer
88 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 ...
1
vote
1answer
37 views

Making a box character in UE4, not a capsule

I want to make a character for a Breakout game that is a kind of cube. From the instructions from Unreal it appears I need to create a 'Character' blueprint. But when i do this, it comes with ...
0
votes
0answers
28 views

Execute Timer Events of another Blueprint from the C++ UE4

I am having problem and it's about a week now that I still can't figure out how to get it right. It seems that I can't run any functions from the blueprints that contain timers at all. I have a ...
-1
votes
1answer
817 views

Volumetric Lighting/Light Shafts in DirectX

So currently I am trying to implement Light Shafts into my DirectX Engine. I read the Nvidia GPU Gems Article (https://developer.nvidia.com/gpugems/gpugems3/part-ii-light-and-shadows/chapter-13-...
1
vote
0answers
61 views

What Type Does One Cast the Result of “get_function_address” to in Order to Call the Function Within a C++ DLL?

According to the game maker documentation for dll manipulation: get_function_address('function_name') Returns the address of a GameMaker function. This can be passed to DLL's so the can call ...
0
votes
2answers
79 views

What is the most efficient way to trigger an action based on proximity?

I am developing a 3rd person platformer that entails a grapple hook system. This grapple hook system relies on a series of 'grapple-able' points. I would like these points to shine every so often. ...
0
votes
0answers
42 views

2D Spatial Hashing in C++ Causing Game to run more Slowly

I'm trying to use spatial hashing to speed up collision detection in my game. I believe spatial hashing is better suited for my game than quadtrees, because I have lots of fast-moving objects in my ...
1
vote
2answers
105 views

What is the proper way of handling resolution and size units on a 2D game?

So I started to learn SDL2 and I want to make a simple 2D game. Now when I render a texture I have to specify in pixels the size of the element I want to draw and also the position in pixels on the ...
-2
votes
1answer
107 views

How can I draw filled triangles in C++?

VERY IMPORTANT NOTE: Im trying to fill a triangle. I have already made the 3D part. Sorry if this wasn't understandable. I'm currently trying to create a simple 3D-Engine. Well, I have successfully ...
0
votes
1answer
34 views

Accessing the Properties of an object already in Scene in Unreal Engine using C++

I am trying to learn more about raycasting in C++ and am trying to implement raycasts in a mini third-person game I am creating. In order to shoot a raycast, I first need to determine its starting ...
2
votes
1answer
95 views

Game Either Runs Poorly or at Different Speeds

I'm making a simple 2D shooter game using C++ and SDL2. For my main game loop, I used the code from the famous Fix Your Timestep article. The problem is that, because I'm using a fixed delta time, the ...
1
vote
0answers
455 views

Libnoise producing completely random noise

I am using libnoise in C++ taken and I have some problems with getting coherent noise. I mean, the noise produced now are completely random and it doesn't look like a noise. Here's the image produced ...
0
votes
1answer
24 views

Why do I get syntax error: identifier FHttpRequestPtr

I'm trying to add HTTP requests to my game and everything compiles fine until I try to set up a delegate for when the response is ready. Adding this function causes the compiler to fail for syntax ...
11
votes
3answers
3k views

Why is it possible to encounter a texture coordinate greater than 1 or less than 0

I'm studying a text about texture mapping and in the preparing to draw session, I read: Define the texture wrapping ...
0
votes
1answer
51 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 <...
-2
votes
0answers
41 views

How do I bind a bone vector to a glBuffer?

I want to shred the bone with the vector of weight. However, running the c++ and the GLSL code below, I get an error: glBufferData import problem vertex shader :S How should ...
0
votes
2answers
140 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 ...
1
vote
1answer
104 views

The A * algorithm in the map has many moving objects

I am using the A * algorithm for my game, it is a kind of Isometric map with lots of tiles. If all the game objects are trees, rocks, houses and only one game object is a moving hero, the A * ...
7
votes
1answer
399 views

Why isn't my cbuffer updating?

I am really frustrated because my cbufer isn't updating. This is my VS: ...
0
votes
1answer
89 views

Game states and events

I'm writting a game in C++ and I'm struggling with getting events and game states work together. By game states I mean something like this ...
2
votes
1answer
127 views

'Destroyed Actors' and 'Save Games'

Background Our team is creating an adventure platformer, and I have been tasked with creating a Save Game system. Our game features the usual progression systems, and is relatively linear. Approach ...
3
votes
1answer
557 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 ...
1
vote
2answers
51 views

Problem with rendering a quad from four lines

I am having a problem with rendering a quad in opengl via 4 lines (5 vertices via GL_LINE_STRIP). The rendering is generally working fine in terms of connecting the lines into a quad. The problem is, ...
-1
votes
0answers
45 views

Why does not checking for something before using it *sometimes* crashes the editor with an unhandled expection?

This has happened a couple of time and I just want to understand what's going on. Most of the times I can use GetController() without any problems, but sometimes I need to check for it first, ...
1
vote
0answers
53 views

How can I apply my camera to all graphics objects?

Is there a way to have the camera be applied to all objects? Can you have the camera effect objects that where made with glVertex3f(); This is the fourth time I ...
-2
votes
1answer
72 views

Why is my map not drawing properly?

My code compiles fine but for some reason, I get this white background in my window. what am I doing wrong? I want to draw my map (sorry, there is a lot of code). Here is my debugged window image: ...
1
vote
1answer
77 views

How do I render a word in the middle of the screen using FreeType and OpenGL?

I'm following this tutorial series on making a simple 2D clone of the classic Breakout game, but its author doesn't mention how to render a whole word or sentence in the middle of the screen. He ...
0
votes
1answer
37 views

Unable to create OpenGL window in SDL2

I am currently working on a C++ + SDL2 game engine and I am stuck on a problem. The problem is that whenever I pass SDL_WINDOW_OPENGL to ...
0
votes
1answer
336 views

SFML 2.5 on Ubuntu 18.04 - cannot open shared object file: No such file or directory

I'm trying to run an example code with SFML 2.5 on Ubuntu, but without success. I'm using: VSCode 1.27.0 with the Easy C++ Projects extension on Ubuntu 18.04. The build/run output keep saying that ...
0
votes
1answer
189 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 ...
0
votes
0answers
45 views

Can I use plain old C++ objects and smart pointers in UE4?

I'm a big fan of reusable code and want to make use of code that I integrate into UE4 projects outside of the engine as well. I am new to UE4 dev, so this is my first attempt of weaving the UObject ...
0
votes
1answer
44 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
2answers
203 views

How can I represent a 2d UI?

So, I wanted to start building a desktop application, which is of course with an interface, and I thought that OpenGL would be best. The problem is, once I started following TheChernoProject's ...