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
0answers
14 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 understood the skinned mesh concepts wrong(or assimp wrong). When i import a model, everything ...
-2
votes
0answers
53 views

how can i separate a network function so i can run it each frame?. c++ game development [closed]

full disclosure: i am not a very experienced C++ developer so i think i am asking something basic. i have this snippet of code that start my client: ...
1
vote
0answers
22 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
46 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
102 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
30 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
votes
0answers
20 views

3D sphere vs sphere collision resolve problem

I have been watching OneLoneCoder video about circle collision resolve and use the code from git. But the code is for 2D case, i.e. circles, and I need a solution for spheres. So I tried to add Z-...
1
vote
1answer
30 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
56 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
35 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
1answer
95 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
59 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
52 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
90 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
14 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
119 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
45 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 ...
0
votes
0answers
18 views

How to correctly generate tile map with atlas in cocos2d-x (4.0) without TMX file?

Good afternoon! Can someone give me advice, what is the proper way to generate TileMap? I know about TiledMapTileLayer in LibGdx. With that tool i could set tile map cell by cell, something like this: ...
1
vote
1answer
61 views

How to get Unreal find headers needed for my code to work?

I am trying to open a dialog to select files under UE4, using OpenFileDialog. I added this to my build.cs ...
-1
votes
1answer
77 views

How to set C++ language standard for VS2019 in an Unreal project?

I am trying to a simple thing, just like that, in a header file; #include <filesystem> #include <iostream> namespace fs = std::filesystem; And ...
1
vote
1answer
29 views

Constant Buffer Alignment issues

I have issues with constant buffer member alignments. I have the following C++ struct: ...
2
votes
0answers
58 views

How can an Entity trigger changes to the world in C++?

I'm writing a simple physics based game in C++ using SFML. I want to trigger a scene change when my playerCharacter collides with a door. Since C++ does not have any native Event Sender/Listener ...
-2
votes
1answer
19 views

How i can detect a single ARuco marker among several markers?

Hi everyone i am working on a rehabilitation application that depends on ARuco markers. The idea is to draw an object on a single marker among the four existing ones, then when the patient's hand ...
2
votes
1answer
47 views

Tilemaps are loading differently each time

Tilemap data is stored in a 2D array. It is saved using the following code ...
1
vote
2answers
122 views

3D Camera Rotation (Unwanted Roll) - Space/Flight Cam

I am working on a camera class that will have full range of motion (pitch, yaw, and roll). When only altering pitch and yaw, I am getting a large amount of roll. I understand that the issue is ...
0
votes
1answer
37 views

Texture blends into one single color

It looks like that it's being sampled from the least detailed MIP level, at least RenderDoc sees the texture as it should be, and what the actual texture looks like is the same as MIP 9th. I'm using ...
1
vote
0answers
48 views

How to use continious collision detection in a dynamic AABB tree

I am currently writing a game in c++ using openGL, and I am currently using a kinetic sweep and prune algorithm for the broad phase and then using GJK Raycast + GJK & EPA for the narrow phase. ...
2
votes
1answer
259 views

How can I save game “professionally”?

I am a novice programmer and just learned about the concept of saving and loading games. The way I am doing it is to write data into a text file and read it afterward. However, I realize how insecure ...
0
votes
0answers
46 views

How do I calculate the bounding box for an ortho matrix for Cascaded shadow mapping?

I've been trying to get a cascaded shadow mapping system implemented on my engine, though it appears to be that the bounding boxes for the cascades aren't correct. The part I'm interested in can be ...
1
vote
1answer
53 views

debug unreal engine c++ - how to run in break mode

I have a number of things not working properly with my FBX imports and I would like to understand how FBX imports work internally. Now, I am noob in software development, so how do I debug the ...
2
votes
1answer
81 views

Management of objects as targets of other objects

I have started my first game three years ago and learned a lot during that process. Now I would like to rewrite it to incorporate my "lessons learned" or try out new ideas. My game consists of space ...
1
vote
0answers
35 views

Using behavior tree with custom pawn and movement component

I am trying to have a custom APawn along with its custom UPawnMovementComponent and AIController, to move to a location using the MoveTo node of a behavior tree. I've followed the code in the engine ...
0
votes
1answer
150 views

Cannot create a C++ Class on UE4

I'm new to UE4 (4.24 on Ubuntu 16.04) and I'm using AirSim and the Blocks world. Whenever I create a C++ class, I get the following message: "Successfully added class 'MyActor', however you must ...
0
votes
1answer
52 views

How to implement toroidal mapping in SDL?

I am making an Asteroids clone in SDL2. I think the kind of world asteroids takes place in is called toroidal map. I'm refering to the fact that the edges of the world are connected so when you exit ...
0
votes
1answer
89 views

Cube doesn't render as expected when rotated (representing 3D in 2D)

Cube. When I rotate the object around OZ moves to the left. Rotation around OX - the cube rises up. Rotation around the OY-the cube is compressed. The function I use for rotation: ...
0
votes
1answer
112 views

Why don't we assign a class for each gameobject type in unity?

I used to create games from scratch with C++. There, people would create a "class Bullet", and add functionality to that class so that we can instantiate objects of class Bullet at runtime. However, ...
0
votes
1answer
29 views

Unreal member variables reset between function calls

I'm trying to make a weapons switching mechanic in my game. My implementation is a data asset that contains an array of weapons with each weapon contatining the meshes, stats and a weapon actor ...
2
votes
1answer
57 views

In Unreal why is it safe to access a UTexture2D's properties from the render thread despite the documentation stating this is not allowed?

I've been trying to implement something that will update textures on the render thread from a background thread. And from what I've read of the unreal engine documentation you should never access a ...
1
vote
0answers
75 views

How can a system similar to Dwarf Fortress' legends mode be implemented?

In Dwarf Fortress, nearly everything that happens during world generation is logged and viewable in legends mode. An XML file containing that information can be exported and loaded into a utility such ...
0
votes
0answers
48 views

Voxelizing a mesh using FAABB to get volume data

I want to solid-voxelize a mesh in c++ and get a volume data with faabb bounding and voxel array , this is my code but it's not working and I can't understand where it goes wrong. ...
0
votes
1answer
40 views

What is the signifigance of the Dot Product in World to Local Transformations?

Looking for help understanding why this World to Local Space function works. I'm working my way through Buckland's Programming Game AI By Example The following function is used in the book to convert ...
0
votes
1answer
75 views

Why Present(0,0) is removing first rendered object?

I have to render two objects, more exactly, same object twice, just to clarify, all my constant buffers are dynamics, created like whit this flags: ...
0
votes
0answers
45 views

3dsx.specs, ds_arm9.specs, and gba.specs are missing?

I am having problems getting devkitARM to work. It won't find the proper .specs files for me. I know indeed, that they don't exist in my installation of it. So when I try to compile a 'hello_world' ...
0
votes
0answers
43 views

Serializing object members within unordered_map and storing into binary file (C++)

I'm making a multiplayer game, the Server stores it's game world state as various std::unordered_map in a class called ServerWorldState. The server is composed by a single class called Game, which ...
0
votes
1answer
18 views

How to collect objects from map in blueprints

I have a plate with trigger(TriggerVolume) on it. When it overlapped cubes from map deleting. I've manually created references on cubes in blueprint to delete them but it seems very hard-coded. Is ...
0
votes
1answer
86 views

Should 3D transformations be represented by a 4x4 matrix or a 3x4 matrix?

Since 3D transformations are represented by 4x4 homogeneous matrices we know that their last row is always (0,0,0,1), and as such the behavior of this final row is implied so long as we know whether ...
0
votes
0answers
19 views

How to implement two sided view in directx 11?

I'm searching for the way to implement two sided view in directx 11, the best answer I found is this: enter link description here I tested to do that: initialize backface culling to CCW (counter ...
0
votes
0answers
22 views

C++ OpenGL Arcball controlls 'flipping direction' after crossing any of the axes

hello graphics developer... I want to implement something like the mouse rotation controls found in 3D modelling software like MeshLab Here is the code in the mouse callback: ...
0
votes
1answer
34 views

How to update different constant buffers for different vertices in vertex buffer?

Lets say I have vertices and indices for Box and Sphere and I put them into one vertex buffer. But if I want to use different constant buffers for each of the figures, how would I do that? As I ...

1
2 3 4 5
78