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

How can I use single uniform variables inside this Vulkan shader?

I have set up a shader like so. Instead of having all projection view model in a single ...
user avatar
0 votes
0 answers
16 views

DirectX 12 Ultimate graphics sample generates a D3D12 "CBV Invalid Resource" error

Presently I'm working on updating a Windows 11 DX12 desktop app to take advantage of the technologies introduced by DX12 Ultimate (i.e. mesh shaders, VRS & DXR). All the official samples for ...
user avatar
1 vote
0 answers
79 views

How to calculate geometry term from "Multi-Scale Global Illumination in Quantum Break"?

In presentation "Multi-Scale Global Illumination in Quantum Break" from SIGGRAPH 2015, on slide 105, they present concept of geometry term, which is used to help with light leaks in volume ...
user avatar
  • 111
0 votes
0 answers
59 views

Movement diagonally is not consistent

I am making my own game and this is the first time i'm doing so. so I hope you can forgive stupid mistakes. Im making this in C++ and using the SDL2 framework. Currently, I have a character on my ...
user avatar
0 votes
1 answer
36 views

Box2D bodies order inside the world

I'm working on a small platform game using box2d. When I create the game's objects I store them inside a vector. One for dynamic bodies and one for static bodies. ...
user avatar
0 votes
1 answer
20 views

SDL2 and TmxLite (Tiled) (Reading the actual TILE data from the layer)

I am trying to make use of the Tiled Map Editor for my SDL2 projects. (By using the TMXLITE parser from Fallahn on Github) https://github.com/fallahn/tmxlite ...
user avatar
0 votes
1 answer
57 views

Sometimes player moves too much

I'm working on a simple platform game. I have the player - a dynamic body, which moves by ApplyLinearImpulse. Generally it works very well, but sometimes the player ...
user avatar
0 votes
1 answer
31 views

Box2D make dynamic body fixed on the y axes

I working on a game project using C++ with SMFL and Box2d. I'm basically recreating the game "Jump and Hover", a simple platform game. In the game ther is an platform thats "hovering&...
user avatar
0 votes
2 answers
130 views

Game loop c++ implementation

I'm starting to develop some simple 3D game. The basic topic for a start is the game loop. There is a solution: ...
user avatar
0 votes
1 answer
36 views

"Fix Your Time Step" Variable or Fixed Physics "timeStep" parameter for Step in Box2D?

I have seen multiple contradictory articles on this topic. Have been trying to implement the Should the function call ...
user avatar
0 votes
1 answer
46 views

What would be a correct ID3D11Query design for occlusion testing?

I've tried looking for tutorials or samples related to the topic - but all that I could find are either scientific papers or vague posts on forums. As I understand it - I need to dedicate a whole pass ...
user avatar
  • 1
0 votes
1 answer
47 views

Network racing game position interpolation jitters a lot

I'm making multiplayer racing game and I have problem with interpolating position.. Here's the sequence. Server simulate the world and send vehicle transform packet through UDP socket every 33ms to ...
user avatar
  • 3
1 vote
1 answer
40 views

How to inherit from a custom node of a gdnative plugin, in gdnative?

Context I am developing a game in gdnative and I would like to design it in several "modules", where there would be: a main module for the core gameplay, a second module that I defined as a ...
user avatar
0 votes
2 answers
71 views

X axis intersection with inverted Y axis coordinates

I'm making a visual clue for the player to know where (and more or less when) an asteroid is going to enter the screen. For this I'm using a triangle pointing at the incoming object and color ...
user avatar
  • 13
0 votes
0 answers
32 views

How does using C# and C++ together with Unity affect efficiency?

I'm new to game dev and I'm looking to use Unity to create a phone game that will utilize neural networking. Obviously, putting neural networks in a mobile game presents a serious performance concern, ...
user avatar
  • 1
1 vote
1 answer
18 views

Inconsistent behaviour from MonoObjects

I have embedded mono inside a c++ game engine to be used with my component system. Currently, I store the MonoObjects (instances of the components) using entt like this: ...
user avatar
0 votes
0 answers
42 views

Function glBindBuffer access violation while executing

So I have a problem, I am calling some opengl frame buffer functions in my code but for some reason I get the error from the title. I am also calling many other opengl functions without any problems ...
user avatar
0 votes
0 answers
15 views

DirectX 8 Win32 GUI Not Appearing/Flickering While Running

I am programming a game with DirectX 8, and I am trying to use the GUI options that are provided by the Win32 window that I am using. However, when I try to render a button or, in this case, a textbox ...
user avatar
0 votes
1 answer
36 views

D3D11 CreateInputLayout error: CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE

I created a simple shader, and it compiled, but when using the vs as input layout, it failed with CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE. I don't know why. ...
user avatar
0 votes
0 answers
23 views

SDL_BlitSurface() 'dstrect' - Not working as I expected

I am new to SDL but have used C++ a fair bit over the years. I'm struggling with displaying sprites with a scale. EG. Here I am trying to draw a grid of squares (ie. Tetris) but the source BMP is ...
user avatar
0 votes
0 answers
31 views

Why does object not show?

I would like to tell about my home made exercising step to step with LWJGL and Java. But I don't understand why does matrix shut up? Transformation.java: ackage Example; ...
user avatar
0 votes
1 answer
51 views

Detect if actors are inside another actor with custom shape

I have few actors with custom, non convex geometry (mesh) created using PxRigidActorExt::createExclusiveShape and a lot of actors with ...
user avatar
  • 111
-2 votes
1 answer
389 views

Is it possible to make a 2D game using Unreal engine 5?

Is it true that UE5 can't be used to make a 2D game?
user avatar
0 votes
1 answer
55 views

How can I determine which 2d entity was selected from a overlapping pile

I'm using C++ and SDL2 to learn about coding by creating a clone of a 2d tile-based game I enjoy. To setup my problem; There can be multiple items dropped on a tile by the player or other entities ...
user avatar
0 votes
0 answers
27 views

How do I create a texture from a surface in DirectX 8?

I am making a game in DirectX 8 for a retrocomputing game contest. I am creating a Real Time Strategy game, and I am trying to make a minimap, which is merely an orthographic view of the terrain. When ...
user avatar
1 vote
0 answers
81 views

Draw and render a sequence of 3D models with OpenGL

I have an application that will generate a 3D model for a dynamic 3D object (3D mesh + texture formatted as .obj file) at a time, so I end up getting a stream of 3D models (or 4D models?), and I want ...
user avatar
  • 111
0 votes
0 answers
29 views

Projectile Aim Prediction with Target Acceleration and Bullet Deceleration Varying with Angle

I previously asked a question about this topic here, and now I'd want to review if the offered solutions worked, and then frame a new inquiry based on the difficulties and issues that resulted. So my ...
user avatar
0 votes
1 answer
101 views

Intercept an accelerating object with a constant velocity projectile

I want to calculate the time that it takes to intercept a moving target "plane" with a projectile. For example I have two 3 dimensional vectors (2 locations in 3D space). ...
user avatar
0 votes
1 answer
130 views

How to make object follow the mouse OpenGL?

I am trying to move an object on the 2D plane to follow the mouse position. I converted the mouse's XY and depth buffer value to world space coordinates, but the problem is that when I run the program,...
user avatar
1 vote
0 answers
59 views

2D tilebased collision system

Hi i want to implement a collision system (something comparable to super mario) I would like it to have objects which can have any size (the hitbox of it) And it should be reasonably efficient (so ...
user avatar
  • 11
0 votes
0 answers
46 views

unity native plugin: UnityPluginLoad is called but UnityPluginUnload is not?

I created a unity plugin which uses the low level native plugin interface, specifically UnityPluginLoad and UnityPluginUnLoad. Here is my result: When the dll is NOT marked with "Load on startup&...
user avatar
0 votes
0 answers
114 views

Constructing a world ray from mouse coordinates

I've got the following c++ code. It produces a Ray from the mouse coordinates given. However the z coordinate is wrong, I expect it to be on the near plane of the ...
user avatar
0 votes
0 answers
21 views

How can I disable gravity for an object after gravity has been applied previously?

I have a rigid body component which has a field named enableGravity. This flag is synchronized with Physx objects before simulation: ...
user avatar
  • 189
0 votes
0 answers
48 views

Is there a way to call an exe from a unreal game

I'm making a turn based game Unreal with someone. They are writing the AI in C++. When it's the AI's turn I call the exe they have written. How should I call the .exe or is there a better way? I tried ...
user avatar
1 vote
0 answers
57 views

What is the correct way to combine transforms together?

I have a type called transform in my game engine: ...
user avatar
0 votes
0 answers
33 views

How to program skinned mesh animations with DirectX 8

I am trying to figure out how to use skinned meshes so that I can have 3d models that have bones that I can move myself through the code. I have been unsuccessful finding information about how to do ...
user avatar
0 votes
1 answer
74 views

How do I corretly use a Direct X 12 Root Signature?

I know a Direct X 12 Root Signature tells Direct X 12 how to use the resources between the CPU and GPU, but I'm having a hard time using it. I tried using it before but it kept failing saying the ...
user avatar
  • 1
0 votes
0 answers
81 views

Rotate the Camera with the Character on Dynamic Gravity UE4

I’m trying to create a world which is not a flat plane on the X and Y axis, and so it will have dynamic gravity. I have been capable of rotating the Character around a Sphere (for testing) by creating ...
user avatar
1 vote
0 answers
35 views

Unreal Engine 4 How to read saved player data?

I seem to have writing working fine now. But I am running into odd problems reading the data back. I want to iterate over the files so I tried this but I got an error in the log stating something ...
user avatar
0 votes
1 answer
44 views

Anyone about me how we make games in Android , also about me can we use c# or c++ in blender [closed]

game development in blender with c# hello everyone about me c# coding for games in blender game engine how i can use blender in Android because i'm new student in game developement Also about me how ...
user avatar
0 votes
1 answer
65 views

How can I create an instance of an object on mouse click where the cursor is in SFML?

I'm new to coding. I'm trying to make a simple game where you can left click to spawn a salt "molecule" and right click to spawn a water one where the mouse cursor is. I don't know how to ...
user avatar
0 votes
0 answers
24 views

How do I get Win32 GUI to render while rendering with DirectX?

I am trying to make a Map Editor for my RTS game in DirectX 8. Everything worked properly until I started drawing with DirectX, and now, everything is drawn after the main scene, preventing the ...
user avatar
1 vote
1 answer
54 views

Casting from APawn* to MyCustomCharacter* ? Is this ok?

So I am still learning C++ but been using it for quite a while. But I have a function which is not working properly (separate question posted here: Calling Client RPC in order to assign a Team value ...
user avatar
0 votes
0 answers
28 views

How to fix this 3D depth and blending issues using legacy opengl in c++?

I want to make some voxel game but when I enable GL_BLEND artifacts starting to show up. here some photo that I taken: As you can see when the semi-transparent ...
user avatar
0 votes
0 answers
40 views

Unreal Engine 4 EOS Plugin : Game crashes when calling ClearOnCreateSessionCompleteDelegates

I have got login and logout working. I am now playing around with creating sessions. The session is successfully created, however in the callback for OnCreateSessionCompleteDelegates I call ...
user avatar
0 votes
1 answer
76 views

Unreal Engine: I cant login with EOS

I am giving a shot at trying out EOS. I am running into an error while trying to log in. I have a product and application set up in the online dev portal. Dont know if I have everything right though. ...
user avatar
0 votes
0 answers
29 views

How do I represent team colors without Pixel Shaders in DirectX?

So I have been programming a RTS game in DirectX, and, of course, there needs to be team colors so that the players are not confused as to which troop is theirs. I managed to give each troop a hue ...
user avatar
0 votes
0 answers
37 views

What are the best LOD methods for planetary rendering?

I've been studying how to render planets for a while now. In 2013, a similar question, Which is the best LOD method for planet rendering? was asked. And the answers were: 1. CDLOD 2. GPUGCM 3. ...
user avatar
0 votes
1 answer
80 views

How many command lists should there be in DirectX 12?

I'm new to DirectX 12. I understand some of the basics. For speed and optimization, is it better if I have more than one command queue, command list, and command allocator? If so, how many should I ...
user avatar
  • 1
0 votes
1 answer
35 views

NVidia Physx get yaw pitch roll from rigid body orientation

I am using NVidia PhysX in the game that I'm developing and I stumbled upon a math problem. I need to retrieve Yaw, Pitch and Roll from the orientation quaternion stored in the rigid body of some ...
user avatar
  • 23

1
2 3 4 5
82