Questions tagged [c++]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
93 views

Instantiating GameObjects in Custom Game Engine

So,i'm having a bit of an issue with instantiating my gameobjects into to universe(My Scene object). I can create an empty object from scratch and populate it from there with ease,my problem starts ...
0
votes
2answers
58 views

Smooth out movement of the snake in a 2d Snake game

I am working on a 2-D snake game in C++ with the SFML library. I would like to smooth out the movement of my snake as it looks extremely choppy currently. How the Snake moves The snake is made up of a ...
0
votes
1answer
62 views

Unable to create Shader Object for Geometry Shader (GL_GEOMETRY_SHADER)

I am just starting with OpenGL using c++ on Ubuntu 18.04. The problem I have is that when I try to link Geometry Shader in my main program, the following function call is unable to create an object (...
0
votes
1answer
122 views

Half of my tris are textured in streaks and blurs

I have written code to import meshes from OBJs and textures from BMPs. My texture coordinates seem to be getting messed up somehow, or some other issue is occuring, because I am getting these effects ...
0
votes
0answers
42 views

Click event won't trigger?

When the screens shows, there is one squere when ckicking on the square, it should create 4 squares. First i made the explosion. This is made in the drawExplosion but when i try to change the enum ...
0
votes
0answers
48 views

How can I do real-time mesh deformation?

I have a very simple problem: I have a icosphere mesh rendered with OpenGL and I want to deform/stretch it. But it has to be a real-time process because the deformation is generated when user drag'n ...
0
votes
0answers
38 views

Calculate whether you can jump from one platform to another

I need some kind of formula that will help me connect two platforms that are reachable to each other by jump. I am working on a pathfinding implementation for a 2D platformer and preprocessing the map ...
0
votes
0answers
20 views

How to draw a screen space decal along a desired projection direction and control which surfaces it affects?

I am currently programming a complex 2D lighting system which calculates lighting in 3D space. Something like what I want to achieve (Source @pixpilgames from Twitter): I recently learned how to ...
1
vote
2answers
165 views

OpenGL only rendering 4 tris of cube?

I'm on Win10, OpenGL 4.5 I wrote some code that takes mesh data from an OBJ file and puts it into a vertex buffer. I used this code to import a cube OBJ and render it in OpenGL. For some reason, ...
0
votes
1answer
17 views

UE4 C++ - Add generated source code folders to Visual Studio solution?

In Unreal Engine 4, using a Visual Studio solution and projects generated from the Editor using the First Person Template, the layout of the Solution looks something like the following: I am not a ...
1
vote
1answer
19 views

Bind render result to texture id

I want to save the result screen of the rendering and then apply another shader on that result, the typical way is to read the screen using glReadPixels and then buffer that image to gpu and then ...
0
votes
0answers
39 views

GLFW Problem “The driver does not appear to support OpenGL”

I am trying to learn OpenGL & GLFW , when I run this simple project I get error ID : "65542" with the message "The driver does not appear to support OpenGL". My graphics card ...
2
votes
0answers
25 views

Access GLFW functions from DLL

My game uses DLLs as mods. Players can write DLLs which can render, play audio, print to console, etc. This works fine, however when I try to access GLFW functions, they don't seem to work properly. <...
0
votes
0answers
31 views

How to copy morphs from one SkeletalMesh to another in UE4?

I would like to enable modders to copy morphs from one SkeletalMesh to another. I wrote simple Python script to do that. The inspiration came from here. ...
0
votes
0answers
22 views

OpenGL obj loader fails to work

...
0
votes
1answer
57 views

C++ map isn't finding key even though it exists [closed]

I am in the process of learning C++ for the Unreal engine. I am trying to figure out why when I use the [] operator on a map<Vector2, ControlNode> with a value that I know is in the map, it ...
0
votes
0answers
38 views

C++ Help with Separating Axis Theorem

I am trying to detect collision between two triangles using Separating Axis Theorem however I am unaware what is wrong with my code. The CollisionHelper::isTriangleIntersectingTriangle is called every ...
0
votes
0answers
36 views

'CoreMinimal.h' file not found when building on Unreal Engine on Mac

I'm trying out C++ on Unreal Engine 4.25 on Mac. If relevant, my Xcode version is 12. When I try to compile, there's an error: 'CoreMinimal.h' file not found. I've ...
0
votes
0answers
33 views

Box2d on authoritative server for Unity client

I'm creating a multiplayer platform and shooting game in unity, using unity2d's own physics system (box2d). But the truth is that I am quite lost in the creation of an authoritative server in c ++. I ...
0
votes
0answers
23 views

Same image in both eyes of VR HMD results in wrong 3D effect

I am trying to mod in VR support for a game without VR support via OpenVR as it proved to be the easiest one to implement with the least amount of issues, i don't think my issue is related to OpenVR ...
0
votes
1answer
41 views

Online multiplayer. Provoke lagged move on local player

I am developing an online multiplayer 2D videogame with Unity as a client and a server programmed in c ++. I do the synchronization of movement through an interpolation so that the movement is ...
4
votes
1answer
163 views

space map generation

I am at the beginning of the creation of a space 4x and first of all i need to generate a galaxy of stars linked by connecting lines that changes in each new game, I'll add a few pictures to show what ...
0
votes
0answers
22 views

NDK opengl-es unknown error

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago ...
0
votes
0answers
37 views

Optimizing Box2D for a couple hundred static bodies

I searched but could not find anything similar (Yet) around the web, so here I am asking my question: In my game I use around 3 to 4 hundred static bodies with like 10 dynamic bodies in the Box2D ...
0
votes
1answer
26 views

Stuttery camera with mouse movement

I'm implementing a framerate independent FPS camera and I'm having a problem with jerky camera. The camera is smooth if I translate it or if I make it rotate at a fixed rate, but as soon as I start to ...
-1
votes
2answers
97 views

Why do we have to use a fractional numbers in the graphic engines (2D/3D)? Why integers are not enough?

Maybe it'll be a super beginner question but can someone explain me why do we have to use a fractional numbers (floats, doubles) ...
0
votes
0answers
19 views

When using transformation matrices, how does one convert orientation and scaling from a global frame of reference into a local one?

Note: I'm certain I cannot be the first to answer this question. Unfortunately, the answers I need are buried under an avalanche of posts asking how to move coordinates between frames of reference, ...
1
vote
2answers
164 views

Render hands and gun in front of everything

I'm currently learning about Unreal Engine 4 by making an FPS game. How can I render the player character's hands and gun on top of everything? Currently when I walk up to a wall, the hands and gun ...
0
votes
1answer
65 views

Functions in the game loop

I'm learning about the game development. No i'm on the total basics - writting a proper game loop. As i've searched over the Web i'v found that simple but good ...
0
votes
0answers
47 views

How real time volumetric light beam effect could be achieved in opengl?

Here is 1.5 mins long video to give you an example of what I meant. From research that I did , regarding lighting effect, usually it is done offline (post-processing) using algorithms like "god ...
-1
votes
1answer
37 views

Which version of Quake 2 source code do I need to compile to work with version 3.20 map packs?

I'm a big fan of Quake 2 game. Recently I've decided to spend some of my free time for digging into the Quake 2 src code. There ...
1
vote
0answers
24 views

Low Level Audio Engine Sample Rate Conversion

First off, there seems to be a sparse number of audio programming tutorials out there so if anyone knows of some good resources I would be very appreciative. Now on to the topic at hand! I am using ...
0
votes
1answer
99 views

How can I create multi objects in modern OpenGL?

I am trying to do make a 3D game in modern OpenGL where the player throws a ball and when it hits a cube, the score will be increased by one. I created a 3D object and camera. Right now I'm stuck ...
0
votes
1answer
104 views

Howto use the depth buffer in DirectX 12

To make things short: I am trying to bind and use a depth buffer in D3D12, but it is not working. The depth buffer gets created and bound properly (I can see it in nsight graphics) but does only take ...
2
votes
1answer
33 views

No local transform with skinned mesh with assimp?

I'm trying to add skeletal animation to my engine and I'm importing meshes with assimp, but I think I misunderstood the skinned mesh concepts (or don't understand assimp). When I import a model, ...
1
vote
0answers
37 views

Why my code changes don't take effect in editor UE4?

I have a plugin in my project to move around stuff with gizmos(much recommended tool, by the way). It has quite a few blueprint functions that I use. I would like to add some functionality to it, ...
0
votes
0answers
115 views

Can't build UE4 sln after regenerating it from uproject file

I was having issues with code, so I decided to regenerate my projects SLN file, and then rebuild the whole project. It was a really bad idea, I can't even open my project again. Anytime I try to start ...
0
votes
1answer
145 views

How to make this C++ game server cross platform? [Focusing on Ubuntu compatibility right now] [closed]

The question's description will evolve depending on requested information or evolution of answers. I made this C++ server for a game, which works on Windows, and would like to make it cross-platform, ...
0
votes
1answer
34 views

wavefront .obj file loader problem

I'm pretty new to direct x and c++, I have a problem with loading .obj files. This is a cube I think the problem is with creating vertices and indecies. ...
1
vote
1answer
32 views

Why does the platform created with for cycle go over the border limit?

ve started programming just recently and I've learned the basic concepts of classes and objects and how to create them. So I decided to try and create a simple game of breakout with what I've learned ...
2
votes
0answers
101 views

Efficient communication between entities using ECS via entt

To avoid confusion about the ECS terms I'll use, I explain them here quickly. I use entt terminology and set-up my architecture like this: Entity: is only an id (...
1
vote
0answers
39 views

Binding Lua Function to Perform tasks using std::async

I am trying to load a bunch of mesh resources in the format of .obj files. Some of the files are very high in poly count so when loading using the below method It takes more than 10 seconds. I would ...
1
vote
2answers
133 views

Modern Compilers Inlining and Header and Implementation Practices in Game Development

I was taught that in general practice its best not to try to beat the compiler, at least until its proven to be stupid. So in general, and since I was told that its generally only used as a suggestion ...
1
vote
0answers
65 views

Transform the mouse coordinates to the GLSL plane

I am creating a 2D map editor in C ++ with GLFW. I want move and drag entities with the mouse, but I have a problem, the mouse coords are in the window size range (1200, 720) and the entity is in the ...
-1
votes
1answer
56 views

DirectX 11 C2661 & C2664 errors constructing SpriteBatch / SpriteFont [closed]

I keep having these two errors: Error C2664 'DirectX::SpriteBatch::SpriteBatch(const DirectX::SpriteBatch &)': cannot convert argument 1 from 'ID3D11DeviceContext *' to 'DirectX::SpriteBatch &...
1
vote
1answer
157 views

DirectX 11, support for Font drawing

I have recently started to work with DirectX 11 and 12, I am using Microsoft Visual Studio Community Edition. I am under a 64-bit machine. I am currently rendering a frame with background and a window ...
1
vote
0answers
15 views

Overriden Event does not execute on Unreal

I've been learning Unreal Engine through this tutorial and I am having an issue with overriding an event I created on C++ using blueprints. So here is what I've done: I created a class called ...
1
vote
1answer
133 views

Why is my OpenGL triangle not drawing on the screen?

I am currently following this tutorial to create a simple game engine, but I am doing it using SDL and C++. I am stumped, however, because I can't get a triangle to draw on the screen, and I'm getting ...
1
vote
1answer
51 views

Assigning values on multiple clients in UE4

I am currently working on a multiplayer game and I am having difficulties on assigning values on variables for each clients. Originally I looped through available clients character from HUD then ...

1
2 3 4 5
79