C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.
-5
votes
2answers
307 views
How do I limit the game loop?
How do I make a game update at a consistent speed? For example, this would loop too fast:
while(true)
{
GetInput();
Render();
}
This just wont work ...
4
votes
1answer
283 views
Zooming into Mouse Position
I'm trying to implement my camera class for a simulation. But I cant figure out how to zoom into my world based on the mouse position. I mean the object under the mouse cursor should remain at the ...
4
votes
1answer
701 views
How can I get my meshes to work with Bullet Physics?
The problem is that I'm trying to use my meshes with Bullet Physics for the collision part of my game.
When I attempted doing this method with my GLM(model loading library by nate robins) model, I ...
2
votes
1answer
49 views
How to rotate camera around some point?
I have screen with dimensions: 800x600.
The object that I want to rotate around is located at (400,300, -50) - center of the screen.
Orthogonal projection:
Near plan - 0.1f, far plane - 1000.0f
left - ...
2
votes
1answer
97 views
Separation algorithm in flock simulation?
I'm using box2d (the c++ one).
I found a method for an arriving behavior (on http://www.red3d.com/cwr/steer/gdc99/ ), which works well, problem is, the bodies are bumping into each other and it ...
2
votes
1answer
259 views
OpenGL Fast-Object Instancing Error
I have some code that loops through a set of objects and renders instances of those objects. The list of objects that needs to be rendered is stored as a std::map>, where an object of class ...
1
vote
1answer
83 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 ...
1
vote
1answer
142 views
Creating the Animations in C++ from 3DS Max
I'm reading from the FBX format and I'm using Bones to animate an object, and I'm at the point where I have to decide on the code that actually moves the vertexes.
So far I thought on two methods:
...
1
vote
1answer
86 views
Delta Time in Videos
When playing a Video in my OpenGL Game (e.g. startup video), I want to sync it with my delta time. What is the delta time and how to use here.
Do I need to sync with the delta time (and how?) or is ...
1
vote
1answer
111 views
Driver error when using multiple shaders
I'm using 3 different shaders:
a tessellation shader to use the tessellation feature of DirectX11 :)
a regular shader to show how it would look without tessellation
and a text shader to display ...
1
vote
1answer
65 views
Finding Surface of Inner Voulme mesh
I am working on the generation of Hexhedral mesh generation using octree based discretization. what I want I have volume mesh (Hexhedrals), Now using isomorphism I need project the outter most surface ...
1
vote
1answer
268 views
FFMPEG Opengl video rendering
I'm searching any way to render with ffmpeg, an opengl texture that contains the video frame.
Actually, I am not good with ffmpeg... Is there any library/documentation or something?
How can I render ...
1
vote
1answer
193 views
Reducing the level of detail of a mesh
I am importing an extremely detailed mesh (provided by a client) and it consists of something like 16 million triangles. For rendering performance I've been using the ID3DXMesh interface's Optimize ...
0
votes
1answer
178 views
Moving the camera as in a first person shooter
I am trying to implement the movement of the camera with the mouse. The result I want to achieve is the same that you get when you move your aim in a first person shooter.
Here is the code I wrote, ...
-1
votes
1answer
118 views
Changing map 0,0 origin to top left while using D3DXMatrixOrthoLH
Thanks to Tetrad (for pointing out D3DXMatrixOrthoLH ) I have figured out how to set it up in DirectX9. However, the problem I am now facing is my 0,0 mouse position is now in the middle.
What I ...
-1
votes
1answer
108 views
DirectX UV Coordinates not responding?
My UV coordinates never respond to me for some reason. It is just UV mapping itself in the smallest way possible. It's a tile-able texture and the program is subdividing so much I can't even zoom in ...
-1
votes
1answer
108 views
C++ Void and Constructor Method Problem with Loops
I am having a problem on the console game I am making. How can I decrease the health of the character or enemy with loopings? My code goes like this by the way for example:
class RPG_Scene_Battle {
...
-1
votes
1answer
886 views
loading images to the backbuffer / direct3d / c++
i think i just found the solution. 1) the problem is that backbuffer surface and source surface are of different formats - that is why exception was thrown. 2) the image path needed double slash ...
-4
votes
1answer
164 views
How Do Game Timers Work?
I don't understand the whole game timer things, I know XNA comes with one but im realying on VSync to do the work rather then a game timer. I know what they are It's just can someone show me of a ...
0
votes
0answers
165 views
How can I render multiple windows with DirectX 9 in C++?
I'm trying to render multiple windows, using DirectX 9 and swap chains, but even though I create 2 windows, I only see the first one that I've created. My RendererDX9 header is this:
#include ...
0
votes
0answers
39 views
FillOpacityMask() not working
I'm attempting to use a Direct2D feature called an opacity mask where the alpha values from one PNG image are used to determine the transparency of another image:
...
0
votes
0answers
111 views
rendering minimap from large bitmap
I'm trying to create a minimap for my game but am having an issue.
I'm using Direct2D as the graphics API and have a ID2D1Bitmap* which contains the pixel data for the loaded area of the world.
I'd ...
0
votes
0answers
80 views
How can I have multiple layers in my map array?
How do I load Levels in my game, as in Layer 1 would be Objects, Layer 2 would be Characters and so on. I only need 3 layers, and they will all be put on top of each other. i.e having a flower with a ...
0
votes
0answers
64 views
Using boost function to wrap execution of a boost signals2 signal
I am considering using the boost library to design a simple yet effective callback event notification framework for my game application. The idea is that objects that can raise events would have a ...
0
votes
0answers
114 views
Problem displaying tiles using tiled map loader with SFML
I've been searching fruitlessly for what I did wrong for the past couple of days and I was wondering if anyone here could help me. My program loads my tile map, but then crashes with an assertion ...
0
votes
0answers
96 views
How to efficiently render resizable GUI elements in DirectX?
I wonder what would be most efficient way to render the GUI elements.
When we're talking about constant-size elements (that can still be moving), the textures' atlas seems to be good.
But what with ...
0
votes
0answers
106 views
Simulating smooth movement along a line after calculating a collision containing a restitution of zero in 2D
[for tl;dr see after listing]
//...Code to determine shapes types involved in collision here...
//...Rectangle-Line collision detected.
...
0
votes
0answers
108 views
Incorrectly says that 2 rectangles collide: whats going wrong?
I am using and expanding a function that detects whether two 2d rotated rectangles collide. The function is from here.
My Problem: The function incorrectly detects a collision between the following ...
0
votes
0answers
63 views
Strange problem with impostor generation
Yesterday, I started studying a tutorial about impostors and I came across a strange problem when running the source to see the result.
There are two implementations of an impostor - the one is with ...
0
votes
0answers
181 views
SDL audio streaming callback function never triggered
I'm attempting to stream audio for my C++ game which uses SDL through the mingw32 environment. From my understanding it's a fairly simple affair:
extern "C" void audioStep(void* unused, Uint8* ...
0
votes
0answers
97 views
Direct X Vertex Coloring
So I've been messing around with directx 9 for the past few days, and I recently bump in a simple problem of vertex coloring. Can someone here with directx9 expirience solve this problem? I would ...
0
votes
0answers
171 views
I'm using OpenAL, trying to load a .ogg file and having .dll troubles
I'm using OpenAL for my game's music, and it loads .wav files by default, but to load in Ogg files I had to download and setup a few .dlls and lib files. I have fixed all errors with dlls except for ...
0
votes
0answers
154 views
Using OpenCl to jiggle the Pipe
I've got the Idea to use OpenCL to program a simple Renderer. A clear contra is, that this approach won't benefit from the hardware as the functions on the device (I think).
Would it be useful to do ...
0
votes
0answers
139 views
Porting simple FFP bumpmapping to HLSL
I'm trying to port some antiquated D3D8 Dot3 bumpmapping code from fixed function calls to an HLSL shader. The original code looks like the following:
dev->SetTextureStageState (0, D3DTSS_COLOROP, ...
0
votes
0answers
246 views
Windows Events lag behind
I'm making a simple openGL application and so far I can get the window to display, the update/render loop work, and it processes windows events (like WM_QUIT and WM_MOUSE). I've found though that ...
0
votes
0answers
130 views
Setting a Direct3D world matrix by an array
Outside of the DirectX class I have objects that hold their own transform matrix (this is calculated every frame by the physics system) held in a linear array of floats
//rotation Mat|Position
[m0, ...
0
votes
0answers
123 views
adding contacts in “cyclone”
I am trying to adapt the Cyclone physics engine ( http://procyclone.com/, source code: https://github.com/idmillington/cyclone-physics/) to work with my game, and for my game I think that it would be ...
0
votes
0answers
126 views
DirectX9 dynamic rendering
What I am planning to do is have the models (or maybe just an identifier for the model to be used) stored outside of the directX9 framework, and so in nature have completely dynamic rendering.
All ...
0
votes
0answers
128 views
Anti-aliasing works for debug runtime but not retail runtime
I'm experimenting with setting various graphical settings in my Direct3D9 application, and I'm currently facing a curious problem with anti-aliasing. When running under the debug runtime, AA works as ...
0
votes
0answers
217 views
Box2D high-level c++ wrapper
Is there a high level wrapper around Box2D out there?
I know that the library isn't exactly very low level as-is, but in my opinion some things in the library could be made more intuitive at the cost ...
0
votes
0answers
438 views
Loading a sub resource for a texture array
I've been trying to load textures into a texture array, but I've hit a wall with my knowledge of subresources. Any time I try loading the data, I just get junk as output. The code below is only set ...
-1
votes
0answers
135 views
Loading .obj file with my own parser; textures aren't mapped correctly
I have written a simple .obj parser for my OpenGL game engine that reads vertices, uv's and normals; but when I get to drawing the model in the texture isn't mapped correctly.
I have tried uv.y = ...
-1
votes
0answers
87 views
2D scrolling background sprite, Direct X, and C++
Here is a quick rundown of my problem. I am trying to make a 2D scrolling shooter, using a sprite to render the background. This works fine by itself, it has the scrolling effect I am looking for. The ...
-2
votes
0answers
101 views
What do game developers use to prevent modding of games that use JIT programming languages?
Before I explain, this is not a "What programming language should I use?" question.
So, mods can be a major problem, you see I don't want to make a game someone could easily hack and win every round, ...
-3
votes
0answers
44 views
How to multiply mouse coordinates by view matrix?
I'm working on mouse coordinates to convert them from window to openGL. I'm multiplying the mouse vector with x,y coordinates by the glm::lookAt matrix to rotate mouse vector. I start with 90deg. and ...

