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
21 views

Wrong Bone deformations using assimp

Hi I'm trying to animate a skinned mesh in my game using assimp and OpenGL. this question is a follow up of this one : OpenGL Strange mesh when animating Assimp But I'm having diffuculty ...
0
votes
0answers
17 views

OpenGL call glDetachShader after linking program

Im currently working on my ShaderProgram class for my simple OpenGL Renderer. I am passing and attatching my Shader objects like this: ...
0
votes
1answer
61 views

OpenGL Strange mesh when animating Assimp

I'm trying to animate a skeletal mesh. The mesh loads with no problems and all is set up correctly. My problem is that when I calculate the matrix for a given keyframe the mesh go nuts. Here is na ...
0
votes
1answer
74 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
1answer
91 views

How can I structure 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
25 views

How can I perform synchronisation between two Directx 12 processes?

I have created two applications. 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
1answer
31 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
38 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
61 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
98 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 ...
0
votes
0answers
33 views

Godot native c++ [closed]

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
38 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
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 ...
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
1answer
33 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
43 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 ...
2
votes
1answer
96 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 ...
-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 ...
0
votes
1answer
25 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 ...
-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
1answer
91 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 ...
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
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 ...
-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 ...
0
votes
2answers
68 views

Adding a map without recompiling

I am creating a maze game in c++. I have a class that is used to create the walls with positioning and collision. I want the user to have the capability to include the header files needed for making ...
0
votes
1answer
53 views

C++ property is none when accessed in bp

I have a class in C++ that I want to access in BP. It appears to be fine in C++ but in BP I get Accessed None errors when I try to use it in BP. Here is the class declaration that I am trying to use ...
0
votes
1answer
39 views

How do i draw sprite on fixture position?

...
1
vote
2answers
106 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 ...
0
votes
2answers
69 views

Assertion b2Assert(m_bodyCount > 0) showing an error

I have the following code for deleting a Box2D body: ...
-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: ...
0
votes
1answer
38 views

Cant find a way to set fps for sf::Time

...
0
votes
0answers
13 views

How to get normals in the FBX SDK?

I'm working with FBX SDK and I'm trying to get normals of my model but I have no idea of how to do it and I dind't find anything on Google. I am using C++. I hope you'll be able to help me !
1
vote
1answer
111 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 ...
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 ...
0
votes
1answer
75 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: ...
3
votes
1answer
194 views

C++ Wrapper class for raw pointer to an SDL_Texture

First time in game dev, so go easy on me. I understand it's senseless to copy textures, but I'm trying to see this from a copy/move perspective since there is a lot of that going on in my code and in ...
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, ...
0
votes
0answers
21 views

Libnoise bounding box - from spherical to planar

I'm trying to convert a bounding box inside a spherical map (equirectangular image as a result of Libnoise/c++) into a planar projection, but I can't find the correct algorithm for it and I'm not good ...
0
votes
0answers
28 views

what exactly is the logic behind 6502 and precise clock cycle emulation?

Key questions to consider based on page 10 of this document: http://archive.6502.org/datasheets/rockwell_r650x_r651x.pdf What does page 10 imply by "Add 1 to N if page boundary is crossed"? What ...
0
votes
2answers
67 views

UE4 Code Project is not showing sub folders created within C++ Classes Folder even though they exist

These were my steps. Created an empty code project in UDK4. The editor starts up. On the left bottom you have: If you try to right click on C++ Classes, Or select [Add New] while having C++ Classes ...
0
votes
1answer
59 views

C++:Segmentation fault (core dumped) while creating gameobject

i made a small code to debug and i get this error player inherit from gameobject code ...
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 * ...
0
votes
0answers
51 views

Cyclone LED gaming code HOW TO HELP?

I am very new to programming. For a project I decided to make a game of cyclone using some LEDs,a push button, and a raspberry pi. I researched how to at least start on the game, but the problem that ...
-1
votes
1answer
54 views

C++: passing gameobject as a parameter and then into vector

firstly iam used to java and new to c++ so maybe this will looks a noob's question i will explain this and give a pseudo code and then c++ just so you can understand me i have a player class which ...
2
votes
0answers
102 views

Structure for a strategy game

I am making a strategy game like Age of Empires. It's a pretty big project and I need a clear game structure. I have defined a Game_Object class with variables ...
0
votes
1answer
52 views

Could not load PNG in SDL2?

I have three image files, one is Techs.png, one is Techs.gif and one is Techs.bmp. I have used SDL_image 2.0.5 and SDL 2. When I load the image of Techs.gif and Techs.bmp, there is no error, but when ...
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. ...