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

learn more… | top users | synonyms

0
votes
1answer
32 views

Skeletal animation with ASSIMP, COLLADA, and glm

I have been trying to learn how to implement skeletal animation (skinning) from COLLADA files using ASSIMP and glm. But after a week of being stuck reading different tutorials and posts I have found ...
1
vote
0answers
20 views

Why current scene in cocos2dx has no children when accessed from outside scene class?

I want to access a sprite in a scene, but I cannot get the running scene from outside the scene class. The scene is created using: Scene* MyScene::createScene() { auto scene = Scene::create(); ...
1
vote
1answer
49 views

How can I do sprite batching in SFML?

I'm new to game dev and using SFML. I need to use lots of sprites at the same time, so I will probably need sprite batching. I know that sprite batching is used to draw multiple sprites with a single ...
0
votes
0answers
15 views

Cocos2dx How to show different parts of a scene in a split screen

I come from an SFML background and you could show different parts of a scene in split screens by manipulating sf::View. Is there any way to do it with Cocos2dx? I plan to make a split screen game but ...
-1
votes
1answer
36 views

Is RHI and C++ cross platform renderer are frameworks? [on hold]

Is RHI a framework like this one- http://www.rastertek.com/dx11tut02.html but much more diverse? If yes, then what is C++ cross-platform renderer, is that too a framework like this one - ...
1
vote
1answer
55 views

How do I get GLEW to use my Nvidia GPU instead of an integrated Intel card?

I'm new to graphics programming, though not to coding generally. I've been learning opengl from the OpenGL Superbible, 6th Edition. I was trying out the shader examples from the book but couldn't get ...
1
vote
2answers
50 views

How do I create and implement a sprite sheet for my SFML game?

I have a game I am currently working on, and I have created 6 16 frame animations for my player character. Currently each of these are saved as seperate .jpg files, which are about 1.5x bigger than I ...
0
votes
1answer
56 views

Collision Detection algorithm using Line Detection

For a 2D physics sandbox I am working on, I need a way of detecting detecting a collision using lines. This sandbox uses a class called Particle, which has a x and a y (stored as a struct called ...
0
votes
1answer
15 views

Loading Indices Collada File

I have been writing a COLLADA loader in c++ and I have run into a problem loading the indices for the mesh vertices whenever I try and find what indices correspond to the vertices and I try and draw ...
0
votes
1answer
57 views

Is there a significant amount of overhead when using STL containers instead of plain arrays?

I have read discouraging statements about using plain arrays in c++. Where videogame development is involved we are aiming, as far as I know, at max speed execution. STL containers (such as ...
1
vote
2answers
85 views

How to resolve collision between a dynamic AABB and static AABB?

I wanted to ask, how do I resolve collision between 2 cubes - in my case I want to push a moving / dynamic cube (used for the player) out of another static cube (used for the floor or objects in the ...
1
vote
1answer
37 views

Problem with 2D matrix transform og shapes

I have set myself onto the task of creating a class BaseObject, which represents a graphics object with an associated shape as the member variable shape, which is a pointer an object Polygon. I'll ...
0
votes
0answers
69 views

Game written using C++, OpenGL 4.4 on SDL doesn't drop frame rate but runs in slow motion [closed]

Our game written with C++ on SDL using OpenGL4.4 has a fantastically weird bug. When the game is run for enough time, things begin updating in slow motion. The framerate is still 100fps - 90fps, but ...
0
votes
0answers
37 views

Calculating Bounding Rect

I'm trying to clone space invader of atari and I have problem with bounding rect calculations.. the rect is not correctly bounded.. maybe I have problem with the transformations void ...
0
votes
1answer
95 views

How should I choose between Vec3 and Vec4?

I find myself torn between using Vec3's vs Vec4's for representing position, directions, etc in my non-gpu code. I see the obvious benefit of using Vec3s for stuff like data in buffers, to more ...
0
votes
0answers
19 views

Debug vs Release memory [closed]

My game runs fine in release mode, but in debugging mode if i get too much objects on screen it slows down game fps and the game can get very slow. I am using vstudio and c++ language, is there a ...
-1
votes
0answers
29 views

Basic concept of SceneGraph [closed]

Is there anyone who can explain me the basic concept of the scene graph? thank you
-1
votes
0answers
37 views

Error MSB6006? “fxc.exe” exited with code 1 [closed]

Allright, so I fixed my problem with Entrypoint Error, but now, I have another problem. When I want to build my application, I get this error: Error MSB6006? "fxc.exe" exited with code 1. My ...
0
votes
1answer
24 views

DirectX RenderTargetTexture bound to both RTV and SRV

After following the 22th tutorial of Rastertek. I and some others on the internet have had an error. Despite following the tutorial to the letter. However, the answers to this error message have been ...
1
vote
4answers
346 views

Object orientated design for RPG character creation

This question may not be helpful to some but I'll ask anyway. I've hit a bit of a object orientated design issue. Making a RPG and the user gets to choose their own class i.e warrior/rogue/etc. ...
0
votes
1answer
42 views

Organizing a Transform class to internally use quaternions

So, I'm interested in building a Transform class similar to the one used in Unity Engine, but in C++. My intent is for it to be user-friendly to change the position, rotation, and scale of a variable ...
1
vote
1answer
39 views

How do I destroy a SDL_Finger pointer?

Hello I'm using SDL with C++ and I got this code: void handleEvents() { SDL_Finger* finger = SDL_GetTouchFinger(SDL_GetTouchDevice(0), 0); } I do not know what SDL does inside the GetTouch ...
0
votes
0answers
13 views

C++ - Error X3501 Main Entrypoint Not Found [duplicate]

I was developing my DirectX 11 app, but when I wanted to add a function to draw a triangle, I get this error from compiler. Error X3501 Main Entrypoint Not Found This is how my main .cpp looks ...
0
votes
0answers
53 views

Preferred way to integrate box2d with SFML

I'm trying to integrate Box2D with sfml. My current solution is to have overloaded functions creating sfml shapes from box2d fixtureDef shapes. I store created sfml shapes under the name 'visual' in a ...
-1
votes
1answer
44 views

How to handle pathfinding and path following with sprites the same size as the grid?

The game I am working on is currently using 32X32 collision boxes. I have implemented a working AI (A* - path finding method) which is based on the Grid Size. Lets say that I use that 16x16 grid , ...
1
vote
1answer
112 views

C++ Entity Component System: Diverse Behaviours

I'm trying my hand at an action RPG kind of game and using a modified version of entityx from alecthomas, which is basically an Entity Component System. I have really big troubles with some of the ...
0
votes
0answers
36 views

loading a model, which has multiple meshes using assimp

I have been using Open Asset Import library(assimp) along with OpenGL API to load and render 3D models. I followed some tutorials and have got the output as expected. But, I have failed to understand ...
0
votes
0answers
36 views

SDL Handling random collision boxes and AI path Finding [on hold]

as the title says i want to present here mine approach to map and collision generating in SDL. Currently the map is generated by loading an HD picture of a map from Zelda. Then i made a simple map ...
0
votes
0answers
21 views

How can motion/simulation be suspended for a given orientation of the body in bullet physics?

I am currently trying to make a Ragdoll and it falls to the ground obeying constraints as expected but it never actually comes to rest. The rigid bodies appear to vibrate and the Ragdoll starts moving ...
2
votes
1answer
71 views

Is there a way to manipulate a pixel Array on the GPU?

I'm currently working on a 2D-Game and i want to draw and calculate the whole screen myself through a pixel array. I'm programming in C++, using SDL 2 and OpenGL specifically a OpenGL Texture which is ...
0
votes
1answer
27 views

Cocos2d - Physics bodies randomly loosing Velocity along an axis after impact

This just started occurring and seems to randomly happen during, and between, game sessions. A dynamic moving body collides with a static body and instead of bouncing off looses (almost completely) ...
0
votes
1answer
35 views

calling joystick's force effects in C++

I want to use c++ to call the joystick's force effect if it leaves the parameters. I'm using Logitech Force 3D Pro. For example, when the joystick's cursor goes outside the box, I want the joystick to ...
0
votes
1answer
79 views

Why must SDL compile as a dll

I'm using SDL for some small games I work on, and I have tried to no avail to change the compiler settings from compile as a dll to a 'normal' project. So my question is, why must SDL compile as a ...
0
votes
1answer
60 views

PointSprite in DirectX9

I was trying to implement a particle system using PointSprites. Draw calls return D3D_OK but I don't see any particle on the screen. I'm not using Vertex Buffer for the particles, but I use two ...
1
vote
0answers
13 views

Full-motion transparentized video clips

This is sort of a question following onto a previous question I wrote specifically targeting XNA. Understanding that it's an involved enough process that I'd want to manage memory myself, I'm now ...
0
votes
1answer
24 views

How do I center the view around specific coordinates in SFML

I want to use sf::View in SFML in order to change the position of the view, such that the player sprite is always in the center of the screen. Thus I want to write a function which allows me to input ...
0
votes
1answer
36 views

Can I display text in SFML without setting a font?

I'm trying to render text without setting a font. #include <SFML/Graphics.hpp> #include <iostream> using namespace std; string culoare; int main() { sf::RenderWindow ...
0
votes
0answers
37 views

blasting an explosion like space invader

I'm trying to clone space invader, especially the part where you hit the green barriers and there is a small black blasting explosion that occur. https://www.youtube.com/watch?v=437Ld_rKM2s I have ...
0
votes
1answer
36 views

First Person Camera Target

I have a camera at position P, and a normalized direction vector D (where the camera is facing). I want the target of the camera to be 5 units forward from the position. Here's my attempt: F = (0, 0, ...
0
votes
0answers
22 views

Reading Color data from UTexture2D in UE4

Here's my code: // get RenderTarget2D static ConstructorHelpers::FObjectFinder<UTextureRenderTarget2D> TargetObj(TEXT("/Game/Textures/RenderTexture")); // generate a UTexture2D CameraTexture = ...
0
votes
1answer
41 views

How to make a stereoscopic 3D Game with SDL for iOS

I was looking up google for an answer the whole night but didn't find anything. Yesterday I found some VR demos and games on the AppStore, with stereoscopig (dual rendered) screens. So you put your ...
1
vote
1answer
116 views

C++ DirectX FBX SDK Importer Weird Mesh Problem

I'm having a problem understanding how to render the vertex data in fbx model into directx. This is my two functions and I've already triangulated all the mesh nodes. bool ...
-1
votes
2answers
45 views

Change sprite position

I have Sprite and i want change my Sprite position when score == 2 score = 0; auto bird = Sprite::create("bird.png"); bird->setPosition(Point(-visibleSize.width, ...
3
votes
3answers
180 views

Possible A* Optimizations [closed]

I have implemented A* in my game. However, I am not happy with the performance and need some help deciding what to do next. I have already done the following optimizations: Not having a closed ...
-1
votes
0answers
73 views

OBJ Loader Incorrectly loads textures

I have this OBJ loader function that I have created within my Object class that loads in an *.obj file and when the object is rendered onto the screen the textures seem to be loaded incorrectly I ...
0
votes
1answer
52 views

Multiple Vertex Layouts

I have different vertex layouts I'm using to render things in DirectX and as of now I've just used the same vertex layout for every mesh I load in. But now I want to have the vertex layout change ...
3
votes
1answer
127 views

glBufferData consuming system memory

I am memory profiling my game in Visual Studio and about 60% of memory usage is happening from calls to glBufferData(). I may be missing something but should this consume GPU memory instead of system ...
0
votes
1answer
36 views

Immovable object impact physics

I am trying to do some physics calculations from scratch, and as a result am creating a small bouncing ball example. However, I have some issues getting correct results from my impact physics when the ...
0
votes
3answers
45 views

How Use loop's in cocos2d-x

I've for loop which work well on Windows double speed = 35; for(int i=0; i<60 ;i++){ speed += 0.3; Sleep (1000); // sleep 1000 mili seonds } But it responds an error ...
1
vote
1answer
38 views

Open OBJ files with OpenGL c++ [closed]

I need some help because i'm trying to open a obj file with Code Blocks. Im already downloaded the requirements for OpenGL and GLUT libraries. somebody knows some basic and specific steps to do it?