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

learn more… | top users | synonyms

0
votes
0answers
2 views

Cross platform libraries for gpu information

Are there any cross platform vendor specific libraries from each of the major GPU vendors (intel, AMD, Nvidia)? I know AMD offers the AMD display library. Nvidia has the nvapi but is windows only ...
-1
votes
1answer
55 views

Which scripting engine is free, and secure to use in a C++ game? [on hold]

I am working on a multiplayer game in C++, and I would like to make it scriptable. The scripting language can be Javascript, Python or any language which is quite easy to learn. The reason that I ...
2
votes
1answer
53 views

2D infinite grid data structure

I'm currently developing a game, and I'm in a process of experimenting with various data structures to support my game model and simulation. Here are some of the requirements: Grid structure where ...
0
votes
0answers
13 views

3d rotation of a cube using DirectX

I can't solve an apparently simple problem: i have a cube, similar to the one in the following picture I've tried to write a small demo where i can rotate the cube by dragging the mouse, but i ...
0
votes
1answer
29 views

Terrain not rendering like it should be

i was following this tutorial here: https://www.youtube.com/watch?v=yNYwZMmgTJk, in which i was translating from Java to C++ to generate a terrain, and stumbled across this issue: As it appears, it ...
0
votes
1answer
83 views

Tetris implementing rotation

I am currently at the last stage of the Tetris Clone using SDL library, the only thing left is rotation. For each piece I have a separate class, and in order to move the pieces down I use a method: ...
1
vote
0answers
34 views

How to make expanding ring with constant thickness?

I need to generate this burst or (donut-shaped) pulse. I'm having a difficult time how to generate such shape. At first, I was thinking of scaling the image but that didnt work out because the line or ...
0
votes
1answer
47 views

Parsing .OBJ to fit the gldrawelements() call. c++/opengl

I'm struggling trying to get this to work like it should. Ive been able to make an obj loader that fits the glDrawArrays() call, with uv and facenormals, but when trying to modify it to fit ...
4
votes
0answers
61 views

Diamond-Square algorithm output is random and noisy

I have implemented a rough interpretation of the Diamond-Square algorithm in C++ to create some semi-realistic fractal terrain, but the output just seems like a random y value at each point rather ...
1
vote
0answers
36 views

Swept AABB vs AABB Calculation Error

I'm having issues running simple AABB vs AABB collision detection. I'm able to successfully detect collisions without checking with velocity. But for some reason my code keeps prematurely firing ...
0
votes
1answer
68 views

Bullet: No Bouncing off the walls

I'm using Bullet Physics for Collision Detection in a first person game. The collision basically work fine, I cannot walk through objects. But if I walk against the wall and release the key I get ...
0
votes
0answers
15 views

Syncing entities. Best way? [closed]

W're a team from a IT school, building a multiplayer game and w're asking ourself about syncing the entities over the network. For now, we have found two ways to do : The server ask each connected ...
0
votes
0answers
28 views

How do I save/load the state of my console snake game [closed]

I'm making a snake console game but I want to be able to save the state of the game (where the snake is, where the mice are, where the power-ups are, and where the mongoose is). I've looked at quite a ...
-2
votes
0answers
27 views

Adding Function in C++ [closed]

i have been trying to make a simple Game that a hero fires some bullets toword obejects so Gusy How Can i Make a Funcion that Fires some bullets Towords Object and The Object Disappears in C++
0
votes
0answers
29 views

Defining camera/view space

Im working on expanding my camera class, but having trouble defining camera/view space in the manner of this diagram: What Im trying to achieve is to define the camera as a true object much like a ...
0
votes
0answers
52 views

Weird Collisions in ODE

I'm trying to get a basic OBB/OBB Collision System working. For this I use ODE. My problem is: Whenever I use the dSpaceCollide and pass in my Space and my Callback, my Callback shows me, that a ...
3
votes
0answers
14 views

RWTexture3D in Compute Shader on Intel HD 4000

I'm having some weird issues running a Compute Shader with DirectX 11 on an Intel HD 4000 GPU. The goal is to write different shapes into a DXGI_FORMAT_R32_FLOAT 3D Texture with a size of ...
1
vote
1answer
21 views

Convert Triangle/OBB Test to OBB/OBB Test

I'm using the collision library OZCollide (http://www.tsarevitch.org/ozcollide/) and I want to do OBB vs. OBB collision tests. The problem is, that this function doesn't seem to exist (see my other ...
0
votes
1answer
66 views

Frustum culling takes ages c++

I have two ways of doing frustum culling taken from different web sources. First one takes 200ms to check 10k AABBs, second around 50ms for the same box count. I read some forum answers, people say ...
0
votes
1answer
53 views

Is window creation decoupled from game engine?

I'm new to game development, and I was wondering about a architecture question. The window creation code in C++ is given by doing the following: Fill out a WNDCLASS struct Register the window class ...
0
votes
1answer
31 views

Why when releasing a DirectX Texture it fail

I have an instance where a class creates a DX9 texture via UINT usage = D3DUSAGE_RENDERTARGET; HRESULT hr = D3DXCreateTexture (m_D3DDevice, 200, ...
0
votes
0answers
9 views

Config SFML in QTCreator with file.pro

I know that are a method with cmake , but i wouldlike config my project in Qtcreator usinig qmake and my doubt is what my file .pro must have for work it ?. I will run in windows , maybe later linux . ...
1
vote
1answer
55 views

How do I correctly shift arrays on a Tetris line clear?

I'm writing a Tetris clone in C++ and I am at the last stage, I need to delete a row when it is full. Once a piece falls it is stored in a boolean array grid[20][10]. For example I check which row is ...
0
votes
0answers
22 views

OBB Collision Intersection Problem

I'm trying to create OBB's around objects and then collide them using DirectX 11 and C++. It all works fine until I rotate one (or more) of the boxes and then the collision detection returns true too ...
57
votes
10answers
15k views

Is UDP still better than TCP for data-heavy realtime games?

I know that UDP is usually recommended for real-time multiplayer games with high data usage. Most articles are serval years old, and since ~80% of all data transmitted on the internet is TCP, a lot ...
2
votes
4answers
525 views

Why is my A* Pathfinding incredibly slow?

I'm trying to use A* to make my enemies move about, but it takes up to 20 seconds to get a path to walk. My grid is only 64*64. This is my code: #include "AStar.h" #include "Node.h" #include ...
0
votes
1answer
64 views

How to Load and Apply a Cube Map with DDS Texture Loader?

So I have been spending a lot of time recently implementing a working skybox/skysphere, and have almost completed it. The last thing that I need to do is to load my given texture, a skybox texture ...
0
votes
0answers
23 views

OBB/OBB Test in OZCollide

I want to know if anybody, who tried OZCollide (http://www.tsarevitch.org/ozcollide/), knows whether OBB vs. OBB Tests are possible or not. I know there is a AABB vs. OBB function but I can't find one ...
0
votes
1answer
54 views

Create a crosshair openGL

How do I draw a white crosshair in the middle of screen in openGL, it's all well and good knowing how to render objects in 3d space, but I have literally no idea on how to draw something that sticks ...
0
votes
0answers
13 views

Unreal Engine Physics creation is slower in Editor

I just figured out that when UPrimitiveComponent::CreatePhysicsState() is called, it calculates the mass, but only in editor, also when i build for non-editor it is faster (standalone) this is not ...
0
votes
1answer
29 views

Drawn frustum does not match with glm::perspective

I am working on a personal project and I got a 3d viewport with moving camera working nicely. Now I am working on being able to freeze the time and switch to a debug camera and move in the game ...
0
votes
0answers
52 views

Using different shaders for different objects openGL

Basically, I want to draw one object with one shader, and another object with a different shader, but the second object wont show. Currently working on some openGL stuff, and am trying to get one ...
0
votes
1answer
40 views

Trouble applying a texture to a cube

Currently working on applying a texture to a cube and I am at a road block. I am using UV coordinates to apply the texture. Currently using 24 uv coordinates with indices. I am using glDrawElement and ...
0
votes
1answer
37 views

SDL Key Input previous and current key states not working as expected, how to fix?

Here is my code that's part of the main game loop: // ResetKeyState stores currentKeyState in previousKeyState // and then clears currentKeyState engine.ResetKeyState(); // Fill ...
0
votes
0answers
47 views

C++ Modern OpenGL - Calculate Vertex Normals

I'm learning modern OpenGL and i just got started so go easy on me :). Right now im trying to understand normals but im having some difficulties. On my program i have this class which i use to draw ...
1
vote
3answers
102 views

C++ Platformer Collision

This is very simple, but I have spent nearly 6 months messing with this and it is always messed up. This is a tile platformer, everything is "normal", x and y correspond to tile. Tiles are 32 x 32 ...
0
votes
1answer
62 views

Rendering three-dimentional array of tiles (as a tilemap)

I'm trying to create 2d game engine in C++ using SDL2 (actually some code was migrated from SFML). I want to have a flexible multilayer tilemap that can store different types of tiles. My current ...
0
votes
0answers
35 views

Sfml c++ scrollbar

Im making a program and i need to create a scrollbar class.My prgrams screen is 1200x800;The size of the little left arrow and little right arrow is 15x15; I calculate the width of the scrollbar in ...
1
vote
0answers
30 views

OpenGL texture not loading onto the model

I am still learning and I'd like to apologize if I don't explain something clear enough or anything like that. please forgive me :) So I am experimenting with 3D graphics for my university ...
1
vote
0answers
14 views

error: ‘struct RakNet::SocketDescriptor’ has no member named ‘socketFamily’| [closed]

when i run my client code i get this error i using code::blocks and im linux system in the tutorial that i follow the code working without any errors my includes files in the project #include ...
0
votes
0answers
18 views

Skin Mesh Animation Shader Issue

I'm having troubles with properly animating a skin mesh from an .fbx file. I feel like the issue is in the shader, but not sure what is going on. All I know is that I am getting unexpected results ...
0
votes
0answers
49 views

vertex shader doesn't work properly

Linux, OPenGL 3.0, GLSL 130 (Intel card) I'm learning OpenGL and successfully rendered a triangle, but as soon as I create the matrix of projection I get an error. The shader compiles and works ...
0
votes
0answers
14 views

Fbx Importer/exporter groups

I want to create Groups (empty transforms in a Scene Graph) but i find no documentation on how to go about it, to create a fbx loader which can create groups or show the different objects in that ...
1
vote
1answer
58 views

Rotating A model in 3D so it matches its direction of movement

So I have a model of a spear and when it gets thrown I want to set the orientation of the spear to its direction. ( I also want to use this for other things like bullets pointing in the direction ...
4
votes
1answer
53 views

How to buffer an image in winbgim?

So ive always had problems with buffers and never used them before. I read up on the topic online but since winbgim is so old i couldnt find any definite answers to the topic. So im gonna ask them ...
0
votes
0answers
15 views

Box2d capsule stumbles on ground

I am working on a game with box2d and sdl. I Created a character and some boxes as ground, but faced the problem where the character would run a few meters, and stumble on one of the boxes' edge. I ...
-2
votes
1answer
67 views

Is there any limit to the amount of threads you can run at the same time? [closed]

So i have a decent CPU with 2 cores and 4 threads, Will that effect the number of threads i can allow my program to run simultaneously? In my case, im using a thread for each player on a server.
2
votes
0answers
53 views

Easing towards stepped value

I'm currently developing this rhythm game in lua (on top of a c++ engine) and I'm having trouble keeping a steady playhead position for the song currently playing. The playhead position that the ...
1
vote
1answer
121 views

Collision isn't working in pong

I've posted about another pong problem a while ago, but now I'm having another problem with the ball collision with the paddle , when the ball collides, it doesn't bounce back, why is that? Here is a ...
0
votes
1answer
44 views

Why is xcode not letting me use my static variable? [closed]

I'm pretty sure I'm making some stupid mistake. Can't seem to find it, and no good results when googling it either. When I run my SDL project I get these errors : Undefined symbols for ...