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

learn more… | top users | synonyms

0
votes
1answer
55 views

My texture blends into one single color (DirectX11)

First thread on gamedev stackexchange. I am currently creating a cube with a single texture on each side. I got my cube up and running. But when I apply my texture, I get this: It blends the ...
20
votes
7answers
6k views

How can one implement hot-swappable C++ modules?

Fast iteration times are key to developing games, much more so than fancy graphics and engines with truckloads of features in my opinion. No wonder many small developers choose scripting languages. ...
36
votes
9answers
5k views

How are deterministic games possible in the face of floating-point non-determinism?

To make a game like an RTS networked, I've seen a number of answers here suggest to make the game completely deterministic; then you only have to transfer the users' actions to each other, and lag ...
0
votes
0answers
37 views

Angel2D won't find GLFW

I'm doing my first steps with C++ and game development to build a simple prototype. I've chosen Angel2D as framework to get some help from the beginning but I have problems to get it working with a ...
0
votes
0answers
52 views

How to properly transform vertices for a model loaded using Assimp?

When I try to load a DAE model then vertices are not placed correctly. Here's the code snippet I use to load 3D models using Assimp : aiNode* CGameObject::findNode(aiNode* rootNode, const char ...
0
votes
0answers
58 views

When camera moves the textures move and rotate

I recently followed the tutorial at PaulsProjects on shadow mapping. After finishing the tutorial all of my textures seemed to have vanished, then I moved my camera and the texture reappeared. But the ...
2
votes
5answers
4k views

How do i choose what technology to use for a 2D game like Pokemon? [closed]

I apologize in advance for the wall of text about to come. I've had an idea for a game for a while now, and am stuck at step 1 of game development: Choosing a language/engine. I've read a whole ...
0
votes
2answers
60 views

How can I change the value of a matrix uniform in an OpenGL vertex shader?

I'm new at OpenGL. I have a uniform transform matrix in a vertex shader file. I want to modify the matrix by individually assigning each values in the matrix. How can I do that in C++? I learned that ...
0
votes
1answer
205 views

Why does my SFML game cause screen tearing on Linux?

I wrote a little game of a bouncing ball, using SFML and Box2D. On Windows, the graphics animate smoothly. However, on my Linux machine, the animation stutters randomly. To be precise, I get a ...
0
votes
1answer
198 views

Linking error when compiling Allegro example [closed]

I am currently learning about game development tools and decided to use Allegro and OpenGL for starters. I've run into some problems in getting examples to compile though. It seems the allergro.h ...
3
votes
2answers
1k views

Variables in static library are never initialized. Why? [closed]

I have a bunch of variables that should be initialized then my game launches, but must of them are never initialized. Here is an example of the code: MyClass.h class MyClass : public BaseObject { ...
-4
votes
1answer
165 views

For loop optimisation [closed]

Here are some variations of for loops: 1) Standard: for (int i=0; i<limit; i++) 2) Using preincrement for (int i=0; i<limit; ++i) 3) Inverting the loop for (int i=limit-1; i>=0; i--) ...
2
votes
2answers
755 views

Was C++ designed for speed, and is it better to not use high level features when teaming with inexperienced programmers? [closed]

I have read some optimisation guide for C++, and it seems it requires more knowledge to have a fast C++ code, than using C++ without the high level features of C++ (classes, templates, inheritance, ...
0
votes
0answers
29 views

“Unresolved external symbol” errors in DirectX: LNK1120 and LNK2019 [duplicate]

I'm making a DirectX 11 framework, but debugging gives me these errors: error LNK2019: unresolved external symbol __imp__DrvGetModuleHandle referenced in function "private: void __thiscall ...
1
vote
1answer
164 views

C++ Ray Traversing in 3D Voxel game

I'm currently working on a Voxel game in 3D and need a tad bit of help to figure out what Voxel the player is looking at. This is the data I currently have: GRRLIB_Camera3dSettings(Player.x, ...
0
votes
1answer
51 views

Space Invaders: Getting the aliens to move as one [closed]

I'm having issues getting my invaders to move together. Currently they hit the edge of the screen and then go crazy. Here is the code for the Alien: #include "Alien.h" #include <iostream> ...
0
votes
0answers
30 views

Collada 3d file type

For animations in the Collada file type. How does it store them? I'm reading them in with Assimp and I got the keys. mNumPositionKeys = 24. I made the animation and it had 24 frames. But only 2 were ...
0
votes
1answer
100 views

Shipping images with a C++ program [closed]

I've done hobby development in Java for a couple of years now, and I've just started learning C++. I understand syntax fairly well, but I'm extremely confused as to many structural facets of a typical ...
0
votes
2answers
90 views

Filling up the empty blocks when the player touches the safe zone again! using cocos2d

Hi guys i am stuck with filling up the data of all the blocks which are empty like the ones in the image. As you can see there i have a pacman like object where i will be moving around. But when ...
0
votes
1answer
84 views

How can I tell if a set of tiles form an enclosure?

I have this tile-based game I've been messing around with and I want to have a way to check if a set of wall tiles make an enclosed space. Here's some more details: I have a tile map. Each tile has ...
1
vote
1answer
84 views

Errors when loading Assimp meshes

I am experiencing some oddities when loading meshes in Assimp. Some models render perfectly, while others are complete jumbles of triangles. Some Example Images: Teapot Correct - Teapot Actual ...
17
votes
2answers
11k views

I can't figure out how to animate my loaded model with Assimp

I have loaded in a model to my C++ OpenGL game. It is a COLLADA file type that I have loaded, and I setup an animation under blender for the file. The problem is I don't know how to animate the model. ...
0
votes
1answer
49 views

Bullet pointer becoming zero [closed]

I am currently trying to implement the Bullet physics into my game project. However, when i add some rigid bodies to the scene, i occasionally get an error in btDbvtBroadphase.cpp at the line ...
1
vote
1answer
67 views

Should I check SDL_Event for NULL?

I have taken as a practice (as many others, I think) to always do this when working with pointers: void I_take_pointer(some_type* arg1) { if(arg1) { //safely do stuff with pointer ...
1
vote
0answers
51 views

3D engine for technical application [closed]

I am looking for a 3D engine for a very technical application. I want to visualize orbits around bodies of the solar system, and thus need some way to easily display 3D Models and draw lines in 3D ...
1
vote
1answer
617 views

How can I obtain a HBITMAP or HICON from a Direct2D bitmap?

Is there any way to obtain a HBITMAP or HICON from a ID2D1Bitmap * using Direct2D? I am using this function to load the bitmap. The reason I ask is because I am creating my level editor tool and ...
1
vote
2answers
258 views

Surface creation algorithm using points cloud

I am looking for a realtime algorithm to create a 2D mesh using points. But I am quite confused. It seems that Delaunay triangulation can help me create mesh using point clouds, but Meta-balls seems ...
4
votes
1answer
366 views

Why do these quaterion multiplications produce different results?

I am trying to use quaterions to modify the camera direction vector. This code works perfectly: glm::quat temp1 = glm::normalize( glm::quat((GLfloat)( -Input1.MouseMove.x * mouse_sens * time_step), ...
0
votes
1answer
164 views

OpenGL: I only see one square instead of a cube / giving information to vertex shader

I am new to OpenGL and tried to follow this tutorial. I use C# and OpenTK. So I translate the C++ Code from the Tutorial: My C#-Code: /* Hintergrundfarbe */ ...
4
votes
2answers
663 views

C++ property system interface for game editors (reflection system)

I have designed an reusable game engine for an project, and their functionality is like this: Is a completely scripted game engine instead of the usual scripting languages as Lua or Python, this uses ...
1
vote
2answers
107 views

Getting around limitations posed by float in space game

I'm working on a procedurally generated game set in outer space. As in the real world, the game universe will be pretty much 99% empty, with planets/stars/solar systems etc... being very far apart. ...
0
votes
1answer
106 views

Mesa: Howto enable OpenGL 3.x functionality via extensions?

How can I enable OpenGL 3.x functionality via extensions? I'm new to OpenGL development under Linux. Currently I have: #define GL_GLEXT_PROTOTYPES #include <GL/osmesa.h> #include ...
0
votes
2answers
202 views

How to make sprites from multiple images using SDL2

Using SDL2 in C++ I can load textures with out problem however, I have sprites that are from about 15 different png's that I was hoping I could load them all up and for loop through them. However, ...
16
votes
2answers
4k views

Animation Blending Basics

Say I have a framework with characters that can run and walk and of course, stand still. Am I right in thinking that animation blending is the process of smoothly transitioning between these by ...
0
votes
1answer
328 views

How do I set a background image in OpenGL/GLFW?

I'm writing a simple 2D game with C++ and OpenGL/GLFW, and my current step is to create a menu. I finished with buttons, but I think it looks a little bit boring (with only 4 buttons and a black ...
0
votes
1answer
134 views

OpenGL - Asteroids clone - shooting bullets from spaceship [duplicate]

I am having a bit of difficulty figuring out how to shoot bullets from the front of the spaceship. I can draw it to screen, but I can't properly figure out how to create bullets each time I press the ...
0
votes
0answers
44 views

Getting a Rect of a SpriteBatch

I'm using DirectXTK, https://directxtk.codeplex.com/wikipage?title=SpriteBatch it's a port of XNA spritebatch. I'm trying to get a bounding rect of my sprite for testing collisions AABB. I draw ...
1
vote
1answer
151 views

OOP design, keeping track of entities

First, I would like to say that I have no experience with this and am still getting my head around OOP, so if something is really obvious, just point it out :) I am designing a game and I am not sure ...
0
votes
1answer
73 views

FBX SDK texture file name

I have built an importer that retrieves necessary vertex data however I wish to be able to read texture file directories. How do I retrieve the texture file name?
0
votes
1answer
314 views

How to calculate ray polygon intersection? [duplicate]

I'm in a class where we are creating a ray tracer from the ground up in C++. I'm at a point where I can't seem to wrap my head around the math that is required to calculate the point at which a ray ...
2
votes
2answers
3k views

Unity Plugin DLLNotFoundException

I am using a plugin DLL that I created in Visual C++ Express 2010 on windows 7 64 bit Ultimate Edition. The DLL functions properly on the machine that it was originally created on. The problem is ...
2
votes
1answer
91 views

How does the SDL dynamic API inject itself in statically linked code

I've been using SDL2 for development almost since it came out. Long story short, I stumbled upon the SDL dynamic api explanation. I've looked in SDL_Dynapi.c to understand how it works. I get that the ...
-2
votes
1answer
961 views

C++ Valid for indie 2d games? [closed]

I am not currently developing any games, but am taking a C++ course. Will I actually be able to make any games with the knowledge I have from this course? I really just want to make a game with ...
5
votes
4answers
4k views

Is ActionScript 3 used by Serious Indie Developers? [closed]

This question is for dedicated independent game developers: My dream is to be a game developer. I am a senior in high school who has taken Computer Science for all four years. I have used Java the ...
-1
votes
2answers
319 views

Looking to create a game with a small indie team, where to start? [closed]

A group of friends and I would like to start developing a small indie game for fun. It's something to do over a period of time as a hobby. We're in school, so it's not like we can go to a college or ...
3
votes
1answer
276 views

small independent game development on a virtual machine

I've been learning about OpenGL and SFML with c++ now for about 6-8 months, and would like to work on a small little personal game to put some of my skills to the test. Now I want to kill two birds ...
0
votes
1answer
97 views

Can't seem to get Sprite to face left in sfml c++

I am having some small issues getting my sprite character to flip around. Basically I have a character that can walk to the right.. I am looking to flip it so that it looks like it is walking left. I ...
0
votes
0answers
85 views

Particle System Tracking

I have a particle system where instead of tracking the time each particle is alive, I just track the time of the oldest particle and the time of the youngest particle. Basically, the oldest particle ...
1
vote
0answers
169 views

2D Rotation Transform Matrix Issues

I'm stuck on my computer graphics class homework. I'm sorry if this is not right place to ask. I think this is closest thing to computer graphics. My assignment is to create basic 2D colored ...
3
votes
1answer
170 views

Fighting Game Camera Positioning in SDL

I'm working on a 2D fighting game (using SDL) much like the original Killer Instinct on SNES. I want the camera to keep both players an equal distance from the left and right sides of the viewport. ...