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

learn more… | top users | synonyms

0
votes
0answers
12 views

Porting a SFML game to the browser?

I've been messing around with SFML, it's my first experience with C++ and I'm enjoying it. But I'm wondering how to publish my game onto anything other than a native platform. Noting that this is my ...
3
votes
2answers
2k views

FBX Importer - Texture Name

I have a problem with the FBX SDK. I read in the data for the vertex position and the uv coordinates. It works fine, but now I want to read for each polygon to which texture it belongs, so that I can ...
0
votes
2answers
165 views

accelerated curved bounce

I'm trying to make a simple pong clone and want the ball to curve when the racket was moving on hit. To test out curves I removed all the rackets and just have a ball bouncing around in a rectangle, ...
1
vote
2answers
94 views

Unity3D with C++

So, my game is being developed in pure C++, with very limited dependencies (Mostly just pocoproject). The main goal here is portability, not performance. The code runs on multi-platform clients, as ...
-1
votes
2answers
133 views

Segmentation fault adding SDL_Surface

I'm trying to add a new SDL_Surface to my whack-a-mole clone code but even if I set it to null it wont let me. game.h #include<SDL2/SDL.h> #include<SDL2/SDL_image.h> ...
0
votes
2answers
49 views

D3D12 device not supported

In the last days, I tried to learn the basics of Direct3D12, using some online resources and tutorials/demos. After failing to run the demos, I created a new project in Visual Studio 2015, added the ...
0
votes
1answer
561 views

How to render a vertex buffer in DirectX11 C++ (specifically with box2d's b2Draw)

I have all the DirectX11 devices etc setup and working with DirectXTK's SpriteBatch and currently attempting to implement a b2Draw class to draw my box2d physics worlds. I have little idea on how to ...
0
votes
0answers
18 views

OpenGL Quad Tessellation - What kind of VBO?

I'm just getting into tessellation and after drawing and tessellating a triangle, I want to try a quad. If I change the TCS to output 4 vertices, the TES to expect a quad and the patch size to 4, only ...
0
votes
1answer
414 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 ...
0
votes
1answer
26 views

Box2D - Platformer tiled map problem

I'm using C++, Box2D and SFML. I convert a Tiled map to world in my platformer game and I get stuck when I go against a block when I go forward like that : I can use a circle as foot of my ...
0
votes
0answers
62 views

Simple Bullet Physics Collision Detection

I've been looking into bullet physics a lot here lately to handle my collision detection. I was using XNA collision but once I started to implement momentum into my physics simulation true and false ...
0
votes
0answers
17 views

Making a UDK server - with custom loadouts

Basically I need some help with creating a UDK server on my custom map. I have a Custom Main Menu that has four different weapons to choose from. Once you click on the weapon of choice i want to be ...
0
votes
1answer
62 views

Why is each column being shifted down the X value of the column in my 2D Data Structure?

I have a two 2-dimensional arrays. One of which stores characters from a text file, and the other stores pointers to instances of Blocks. For some reason, in either of the arrays (I'm not sure which), ...
0
votes
1answer
127 views

Solitaire Game: Transferring Cards Design in C++

So, I'm working on a Solitaire game. I already created a the classes: Card, Pile, Stock. Each work as expected on it's own. My question is: What possible design for managing moving card(s) between the ...
2
votes
1answer
100 views

Rotating a 3rd person camera toward a target

I have a 3rd person camera that doesn't look directly at the player but somewhere in front of him. When the user enter shooting mode, I want the camera to turn around the player to face the target. ...
0
votes
0answers
8 views

Cannot include CCTableViewDataSource in Cocos2d-x

I found a tutorial in programering.com that show me how to create a scrolling list. But when i tried to follow this tutorial i realize that i have a problem with inheritance. I'm using Cocos2d-x ...
0
votes
0answers
3 views

How to iterate through a list of xml tags that have the same name?(msxml) [migrated]

I've written an xml reader that grabs the values out of the tag EVENT, however I need to iterate through the list so the information doens't get overwritten by the next Current code: #include ...
1
vote
1answer
760 views

Need Help with Cocos2d Ver 3.3 AudioEngine

So I have 2 audio files that I want to play at different times: background.wav a sneeze.wav. I believe that I have to convert both wav files into mp3, caf and ogg files. Then I do this: static ...
0
votes
1answer
525 views

post on Facebook from cocos2d-x on windows phone

Is it possible to share/post on Facebook from cocos2d-x on windows phone. Is there any example/tutorial available.
1
vote
2answers
24 views

DDS files with DirectX Tk, Some work, some don't

I am learning DirectX with the DirectX Tool Kit library and everything seems to be going smoothly but I have run in to a tiny little hiccup. I am currently trying to load DDS textures from file ...
1
vote
1answer
56 views

RPG Game Graphics Help/Review

I've been working on an simple RPG game and I'm having troubles figuring out how my graphics should look. I'm wondering if any of you could give some advice on how they are/could be more pleasing to ...
1
vote
1answer
465 views

Playing a sprite sheet animation in Cocos2D-x

I'm trying to create an animation using a sprite sheet in Cocos2D-x. I'm doing the following. The game doesn't crash but the screen is still blank. bool HelloWorld::init() { ...
5
votes
2answers
2k views

Implementing strafe jumping

As a Defrag player, I would like to add advanced movements to my (simple) game, in particular strafe jumping. I currently have basic fps movements (WASD and free look to be clear), but how can I add ...
-3
votes
0answers
43 views

How can i create Game Chat? [on hold]

How can I create an in-game chat like this? Can someone tell me how to do this? I'm using DirectX 11.
0
votes
1answer
34 views

FindNextValidTechnique fails

My effect file compiles successfully, but FindNextValidTechnique fails. Technique part of the shader: technique Diffuse { pass Pass0 { VertexShader = compile vs_2_0 ...
-1
votes
1answer
45 views

How to package a Windows c++ game? [on hold]

When you buy a game at the store, and want to play it on your computer, you do the following: Run a setup.exe Install on computer End up with an exe on your desktop (separate from its source files, ...
0
votes
1answer
17 views

glm Z coordinates are flipped

I am trying to render a 3D model using OpenGL. And for the projection and transformation matrices, I am using glm. I've got my model on the screen and it works just like I intended it to; except one ...
0
votes
2answers
68 views

Texturing without D3DX

Well, i have been online for hours looking for solutions, but i have found none. Im looking for a way to create textures without the function D3DXCreateShaderResourceViewFromFile. Since D3DX is ...
0
votes
0answers
35 views

OpenGL c++ terrain generation [closed]

Im trying to use a grid of vertices ,a blendMap and a heightMap to generate a terain.And i got an error which i simply dont understand. Model.h struct coordinate{ float x,y,z; }; struct face{ ...
0
votes
1answer
300 views

How to compute matrix transform local/world on OpenGL

I'm developing an OpenGL program where each object / entity contains m_WorldPosition, m_WorldOrientation, m_WorldScale and m_WorldTransform (Vector3, Quaternion, Vector3 and Matrix4f). The problem is ...
0
votes
2answers
258 views

What's the most efficient way to deal with in-game messages in Allegro 5?

I have a little 2D game made with Allegro, and I want to introduce strings during gameplay. For example, I've just made it so a key is needed to open a door, so I'd need some tutorial text to appear ...
1
vote
1answer
759 views

glsl shader to allow color change of skydome ogre3d

I'm still very new to all this but learning a lot. I'm putting together an application using Ogre3d as the rendering engine. So far I've got it running, with a simple scene, a day/night cycle system ...
2
votes
0answers
26 views

How to increase the number of available chapters for an HL2: EP2 mod?

I created a mod for Half-Life 2: Episode 2 that has 39 chapters (or maps, here it is the same). The problem is that the game seems to see only 32: when clicking "new game", and clicking next, I count ...
0
votes
0answers
27 views

Fixing memory leak in Opengl texture class [closed]

I recently run my 3D game engine under Valgrin and discovered that everything's almost fine, except that I leak 7,862 bytes in my opengl texture class... I think that I'm not calling a specific opengl ...
1
vote
0answers
32 views

trying to figure out how to output all the user moves to a file in c++ [closed]

Hi I am creating an escape the room type game where you input the direction you want to move to go that way (i.e. 'forward', 'backward', 'left', 'right'). I have an idea to use a dynamic array to ...
3
votes
1answer
154 views

FBX Importer - Vertex Color

I imported vertex positions, indices and normals successfully in OpenGL using fbx sdk, but I just can't figure out how to import vertex colors. I tried to fetch the pointer to array of colors trough ...
0
votes
3answers
69 views

Implementation of collision in 2D platformer (C++)

My collision system for my game currently works fine, it lets me test a collision with an entity or specified rectangle... but that's not enough. I used to use GameMaker and it had collision events in ...
0
votes
2answers
28 views

Render specific part of a texture in OpenGL (2D Sprite Sheet)

I've looked at this answer to find out how to render just a part of a texture: http://stackoverflow.com/questions/6884285/c-opengl-render-part-of-an-image I tried that, but the problem is, this is how ...
0
votes
1answer
190 views

Trying to implement Camera

I'm trying to implement a Camera class in order to walk and look on the world as follow: #ifndef _CAMERA_H_ #define _CAMERA_H_ #include <glm\glm.hpp> class Camera { public: Camera(); ...
0
votes
2answers
47 views

How to create custom gravity in unreal engine and only affect specific actors?

I am fairly new to unreal engine and I would like to know how to set custom gravity in a specific point or area instead of down. For example I do not want the gravity pull to be down but more to the ...
0
votes
2answers
812 views

How do I determine the look-at vector of a free-look camera?

I'm trying to create a free-look camera with DirectX 10. I've figured out how to get the directions for forward and back and left to right. However, I don't know how to rotate the look-at vector of ...
0
votes
0answers
44 views

Speed up the DirectX game - how else can I boost the fps with typical triangle drawing?

I am writing my own c++/DirectX engine. I've made the basic framework and here comes the time for optimizations. I don't want to focus on optimizing the resources themselves right now (meshes, ...
0
votes
1answer
22 views

Set the name of an animation in collada to be used by AssImp

I am using the collada file format to contain my model and animation but when I use AssImp to load the file the name will be empty for the animation. Where is the name for animation set on the collada ...
0
votes
0answers
31 views

Image speeds up while moving and or rotating instead of constant speed

I'm having a problem with rotating/moving an image. I've set one of my images to rotate on it's z-axis buy updating the angle, but when I run my game, the image starts slowly starts to rotate from a ...
0
votes
0answers
14 views

OpenGL, glDrawElementsInstanced behaving differently on NVIDIA GPU than AMD

I have an AMD GPU on my desktop, AMD HD 5770. I am working on a project on my desktop for over a year. In the scene, I have instanced grass and instanced trees. Everything is working fine on desktop, ...
1
vote
2answers
419 views

Should I draw directly on a CCLayer or a CCSprite?

Now I am a little confused in my cocos2d-x cpp project. I want to draw lines with user's finger touch. Following the screenshot of a CCScene: In the screen, there are two squares. I want show an ...
0
votes
1answer
106 views

How to Load a Level for use with the Bullet Physics Library

I am trying to use a level in .obj format loaded with Assimp to generate a btBvhTriangleMeshShape to use with the Bullet physics library. I can successfully load btConvexHullShapes as well ...
1
vote
1answer
328 views

Bullet 3D Physics Objects Not Rotating?

So I've got Bullet 3D controlling the motion of objects rendered with DirectX. In the clipping below I've got 2 identical rectangles & 5 balls. The lowest rectangle has a mass of 0 and doesn't ...
47
votes
9answers
37k views

Why don't C++ Game Developers use the boost library? [closed]

So if you spend any time viewing / answering questions over on Stack Overflow under the C++ tag, you will quickly notice that just about everybody uses the boost library; some would even say that if ...
0
votes
1answer
31 views

Getting if a key was released/pressed this frame (C++/SDL2)

Getting if a key is currently down is easy. Just return keys[scancode]: switch (ev.type) { case SDL_KEYDOWN: keys[ev.key.keysym.scancode] = true; break; case SDL_KEYUP: ...