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

learn more… | top users | synonyms

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
2answers
18 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
38 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 ...
-3
votes
0answers
39 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.
-1
votes
1answer
38 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
16 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
0answers
30 views

OpenGL c++ terrain generation [on hold]

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{ ...
2
votes
0answers
23 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 ...
1
vote
0answers
32 views

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

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 ...
0
votes
0answers
26 views

Fixing memory leak in Opengl texture class [on hold]

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 ...
0
votes
3answers
67 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
0answers
40 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
2answers
26 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
0answers
30 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
13 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, ...
0
votes
1answer
19 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
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: ...
-1
votes
0answers
33 views

Can someone help me locate a digital copy of a book? [closed]

I am currently studying game development and was provided some books through my college for my course. However, I am really not a fan of paper books and would prefer to use a digital copy. I have ...
0
votes
2answers
46 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
0answers
20 views

OpenGL, Multithreaded loading/streaming of data

I've thought about how i could implement loading of data in a second thread for two reasons, first, so i can show a nice loading-screen with progressbar and second, for openworld streaming. I came up ...
0
votes
1answer
64 views

What's better - drawing every interval that the window updates, or drawing when necessary and updating when drawing?

So what's better? In case the title is a bit confusing I mean: 1) Drawing every window update interval. For example, for a 60FPS window, every 17 milliseconds. For example: ...
1
vote
2answers
78 views

Smallest, most memory-efficient way to have tiles? (C++/OpenGL)

I need to have tiles in my game, just 16x16 images, there would be hundreds (or even thousands) that make up a level. Of course it's not viable to have thousands of memory-hog normal entities, but ...
0
votes
1answer
48 views

Missing keyup event

I have a pretty generic input class. In the main app, I forward an event to the game. The game an input object that manages Keyup and Keydown presses. It stores the keys pressed in a ...
1
vote
1answer
60 views

2D World - How to represent my Game Objects graphically?

I want to code my own topdown 2D game with SFML+C++ that later shall have multiplayer functionality. Therefor I want to seperate the graphical and logical Parts of my game. All of my ingame Objects ...
0
votes
1answer
42 views

How to use traditional pixel coordinates system in OpenGL? (with C++/SDL2)

I find the normalized, centralized coordinate system used in OpenGL weird and annoying, is there anything I can do at all to make it work like normal pixel coordinates on everything ever except ...
0
votes
2answers
33 views

Traversing a pre-defined path with a delay in SFML - C++

I want the player to move smoothly & slowly through a vector of co-ordinates that define a path, below is an illustration of what i mean. [P][ ][ ][ ][ ] [.][ ][ ][ ][ ] [.][ ][ ][ ][ ] [.][ ][ ...
0
votes
0answers
17 views

Device.SetRenderTarget Prevents Shader From Executing

Using DirectX 9 and C++. I'm trying to finalize this code to run a HLSL shader on in-memory data. In theory it should be working. In practice the shader doesn't run. ...
0
votes
1answer
34 views

Opengl, VAO creation within a class

Creating the VAO for a simple cube within a function in the main file results in the cube being rendered properly: GLuint createCube() { GLuint VBO; GLuint VAO; GLuint EAO; GLfloat ...
0
votes
1answer
26 views

How to Set HLSL Shader Input Textures?

Very simple question. With C++/Direct9, I'm creating a texture as RenderTarget with a full screen quad, creating a scene, setting a HLSL pixel shader, copying the image and then call Present. 1) How ...
0
votes
0answers
14 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
28 views

Sphere texture mapping using Directx 11

I have a spherical panoramic image which I would like onto a sphere and centre it around the camera so I can look around the image, how should I best go about this? I will be using DirectX11. ...
1
vote
1answer
49 views

Map a normal image to a cubemap

How can I map a normal non T form image to a cube map? and if there is no manner with which to do this, is it possible to, via DX11, split the image, as the image may be generated on the fly? ...
0
votes
0answers
15 views

DX9 How to Apply HLSL Shader with StretchRect

Using DirectX 9,I'm trying to run a HLSL pixel shader on video frame data while copying it from one texture buffer to another texture buffer without displaying it. StretchRect at the end is what ...
0
votes
0answers
16 views

How to Set Compiled Pixel Shader

When compiling a shader with D3DXCompileShaderFromFile, it works. But what if the shaders are pre-compiled into .cso files? I have this function. It fails. What's the proper way of loading the pixel ...
1
vote
1answer
78 views

Pathfinding with differently-sized objects on tile map [duplicate]

It's my first RTS game and I'm having trouble finding out how to make infantry take less space than tanks. Right now I have 1 tank and 1 infantry type ready with sprites, pathfinding, selection and ...
1
vote
1answer
57 views

Need help with creating a stun gun. (Unreal Script)

I am fairly new to the programming world. I am currently at College and one of the tasks I need to do is create a "stun gun" or "freeze gun". Basically when you shoot a target (other player) i want it ...
0
votes
0answers
12 views

DX9 StretchRect to Texture Fails

Alright, I got the code almost working to copy memory data to a texture, process it with DirectX9 into another texture and copy the result back to memory. Almost all the errors are gone and the code ...
0
votes
1answer
20 views

How to Create Device with D3DFMT_A32B32G32R32F

I'm trying to create a DirectX9 device to copy video frame data from one memory buffer to another while processing it through a HLSL shader. I will need half-float or float precision for each channel. ...
0
votes
0answers
19 views

Directx11 Shadow Mapping Not Rendering

I'm reading luna directx11 book,i want to implement shadow mapping using it but i'v got a problem with it here is the image from my scene(at bottom right you can see shadow map,why is it in red color? ...
0
votes
0answers
18 views

boost/geometry replacement in Java/for the JVM (Destructable Box2D terrain)

I'd like to reimplement https://github.com/seemk/DestructibleBox2D in Java. The main problem is finding an adequate replacement for the boost/geometry library. Any ideas?
0
votes
1answer
43 views

Wrapping things up in opengl based library [closed]

I am currently building a render library, based on opengl : problem is that I'm starting to get a lot of different ccomponents (Shaders, Materials, Textures, Meshes, ...), and I'm trying to wrap ...
4
votes
2answers
137 views

How do I separate physics from framerate?

Skyrim (Creation Engine / Gamebryo) is a prime example of a game that has its physics tied to the framerate for which it has been heavily criticized, because if you disable vsync / have a > 60 HZ ...
1
vote
1answer
34 views

Can DirectX9 be used without HWND handle?

I found an excellent code here that does almost everything I need: running an HLSL shader on memory texture to process video frames into another texture buffer without displaying it. ...
0
votes
0answers
33 views

Tessellation won't render

I am starting to work with tessellation and have some problems right in the beginning. I try to render a quad made of two triangles with tessellation, but nothing appears on the screen. But as soon as ...
0
votes
0answers
33 views

Model / Mesh Constructing OBB

Recently I started to implement simple bounding volumes in my Engine. So far I have implemented a Sphere and AABB, also I implemented simple ray-intersection methods for those two volumes. But I am ...
-2
votes
1answer
62 views

Porting SDL OpenGL Game to Android and IOS

I am currently learning OpenGL (3.0+) with C++. I am using SDL for input handling, window creation, etc., GLEW to use OpenGL and call OpenGL Functions, and GLM for OpenGL Math stuff. If I fully ...
0
votes
1answer
44 views

Transformation problems with hardware instancing in DirectX 11

I'm getting some wonky geometry in my application when trying to use instancing. I'm not sure if I'm doing the mapping of my per instance data wrong. This is how my mapping looks like: XMMATRIX scale ...
0
votes
0answers
32 views

Run Simple HLSL Pixel Shader with DirectX 9

I'm trying to run HLSL Pixel Shaders with DirectX 9 where I feed a texture in, run the HLSL code and copy the resulting texture back from memory. I think I'm getting pretty close, although a LOT of ...
0
votes
0answers
37 views

Using a Unity RenderTexture in a native plugin (4.6.1)

I am trying to create a RenderTexture in unity, but I want to update it using a plugin. I am doing this on Windows 7 Pro 64bit and I wrote the plugin using VS2010 professional. Here is the code in ...
1
vote
1answer
72 views

Screen tearing in emulator

I'm trying to make a game boy emulator, and I'm using Windows for the graphics (StretchDIBits). I'm getting screen tearing like this. I tried enabling vsync in graphic settings but nothing changed. ...