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

learn more… | top users | synonyms

1
vote
1answer
36 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 ...
0
votes
0answers
27 views

Retrieving adjacent object if existing [on hold]

I am doing a little game. Before performing an action, I need to know whether my current object is next to another object, i.e. trying to know if my object is adjacent on the world map (tile-based) to ...
-2
votes
1answer
951 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
3k 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
304 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
250 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
2answers
59 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
121 views

filling the empty spaces in a certain region in a grid using c++

Hi guys i am struggling to find the optimal way to fill the grid of a certain region. In the above example lets say my player is at (7,5) and traveled (2,0) and i have the information of all the ...
0
votes
1answer
54 views

Mutlplayer game organization [on hold]

I'm planning to create an RPG that you can play in multiplayer. The graphics will be simple ASCII. I will do the client C and the server in Python. Having never done a multiplayer game was wondering ...
3
votes
0answers
86 views

How do I handle rope physics with fixed ends and a sliding weight?

I've been interested in rope physics recently—I've successfully implemented a simple Verlet rope with moveable ends. Now I am trying something a little different: I want to start by recreating the ...
0
votes
1answer
80 views

DirectX9 Drawing Sprites out of place due to offset

This is my very first time into DirectX. Im trying to make a simple 2D game, just for learning the basics. And i've achieved that. The next step is to draw an animation using sprites. For that, i ...
0
votes
0answers
62 views

Garbaged textures on OpenGL [on hold]

I've been struggling with this for a long time, and now I've hit a dead-end, I have no idea what to do. I'm pretty new to OpenGL (roughly about eight months), and I've been developing an engine for ...
0
votes
1answer
53 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
57 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 ...
0
votes
0answers
44 views

New Programmer looking for experience in C++ Game Dev [closed]

I've been working on an outline for a game idea that would be a single-player PC simulation game along the lines of the Football Manager series. There's no fancy graphics planned as it is more of a ...
1
vote
0answers
49 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 ...
0
votes
0answers
15 views

DirectX 11 Vertex Buffer Corruption [closed]

So I am trying to draw 2 separate models with their own vertex, index, and constant buffers. I'm not sure what exactly is going wrong, but basically I get an error that says invalid parameter 3 for ...
3
votes
1answer
98 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. ...
-1
votes
0answers
31 views

Fixing Camera for DirectX 11.1 2D/3D [closed]

I have implemented two parts of the camera, ortho and perspective. Now I'm writing a 2D Game and I've used that setup // near 0, far 100 m_Camera.SetOrthographic(WINDOW_WIDTH, WINDOW_HEIGHT,0.0f, ...
0
votes
0answers
26 views

Assimp - Error loading .obj files

I'm trying to load .obj files in my little game. I decided to use assimp as tool to import those models. But it seems that assimp does not import them correctly. I looked for a simple cube mesh ...
0
votes
1answer
73 views

OpenGL / Soil Image Loading Difficulties [closed]

The Problem I am attempting to load and display an image in OpenGL using the SOIL library. I originally started with lodePNG but I had difficulties getting the image to display so I assumed it was ...
1
vote
1answer
232 views

Calculating shadowmap coordinates for cubemap in shading pass?

I'm trying to implement shadow mapping with cube maps. I believe I've done the first stage by filling the cube map, but for the final shading pass I am unsure how to exactly calculate the cubemap ...
39
votes
9answers
25k 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 ...
-2
votes
1answer
63 views

What is the advantage of 6 Directional Movement vs, for instance, 8 or 4 [closed]

I'm making a fallout 2 inspired game and I'm wondering what you guys think about its use of 6 directional movement. It kind of bugs me for some reason and seems like it would make game play odd and ...
0
votes
1answer
133 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 ...
-3
votes
0answers
49 views

GLSL array with variable index? [on hold]

I have a GLSL fragment shader with this part of code: for(int i = 0; i < 10; i+=3){ vec3 l_pos = vec3(lightMat * vec4(light_poses[i],light_poses[i+1],light_poses[i+2],1)); vec3 ...
0
votes
1answer
113 views

Rendering multiple meshes in directx11

Recently I have tried adding rendering with multiple meshes in my program. This did not go too well. The attempt I currently have goes like this bd.Usage = D3D11_USAGE_DEFAULT; bd.ByteWidth = ...
3
votes
5answers
209 views

Is it bad practise to have an object for every tile?

In the game I am working on, many of my tiles must have special attributes (such as triggers when the player steps on them). I was wondering if it would be bad practise to create an object for every ...
0
votes
2answers
155 views

Handling player and AI in a component based structure dynamically?

I'm trying to find a way to allow both input and AI to call actions of an actor in a component based structure for a 2d turn based game. The actions make use of the components. To keep the system ...
0
votes
0answers
30 views

Use other IDE then Eclipse on OSX for game dev with Cocos2dx for Android

I've started with cocos2dx 3 days ago and already having a massive pain in my "back" with this support of C++ that eclipse provide me. It support it a little bit more then notepad++, and after years ...
1
vote
1answer
29 views

How can I send matrix data to shaders without the Effects11 framework?

I'm making a Direct3D engine but I'm stuck with this one little problem. I want to not use effect files but instead use shader files. What can I use to send matrix variables to shaders if I don't use ...
0
votes
0answers
28 views

C++ Visual Studio Sprite Animation Function only setting values for certain Rect structs in SDL

I'm making a game in SDL and I am using an Array of Rects to store values of sprite sheet clip's dimensions. When I call the function and pass in one of my sprite sheet textures with it's ...
3
votes
2answers
1k 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

How do I call OpenGL methods that require pointers in C#?

I have found the following C++ code in this tutorial to draw a triangle with OpenGL 4: float points[] = { 0.0f, 0.5f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, -0.5f, 0.0f }; GLuint vbo = 0; ...
0
votes
1answer
46 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, ...
11
votes
8answers
16k views

What are good solutions for serialization in C++? [closed]

I'm curious what solutions game developers have come up with for serializing the different types of data that they deal with for their games. Do you guys use some monolithic GameObject hierarchy that ...
0
votes
0answers
24 views

Intersection issue with box2d in iOS

I'm trying to use the code here http://www.iforce2d.net/b2dtut/raycasting So I can know whether a line cross a box2d object or not. It half works, in that when the line crosses the object it does ...
0
votes
1answer
148 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
1answer
521 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 ...
0
votes
1answer
143 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 ...
0
votes
0answers
18 views

Cocos2d-x how to draw in specific free form area

Here https://github.com/mikeccy/cocos2dx-finger-paint/blob/master/Classes/HelloWorldScene.h and https://github.com/mikeccy/cocos2dx-finger-paint/blob/master/Classes/HelloWorldScene.cpp you can see how ...
0
votes
1answer
68 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() { ...
4
votes
1answer
319 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
82 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 ...
0
votes
2answers
81 views

How to detect collision between two directed object?

I'm currently writing a game which is like Battle City game. But right now I'm facing a trouble involved to checking collision between two objects. This is the code that I wrote: ...
1
vote
1answer
384 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 ...
0
votes
2answers
71 views

Strange quaternion rotation

I was implementing some quaternion rotations in too my infant 3d game engine and the rotations were really strange? Excuses my cluelessness. Anyways this is what I have: static XMVECTOR ...
0
votes
0answers
38 views

c++ factory pattern component creator with singleton container [migrated]

I'm implementing the factory pattern for component creation and want to implement a singleton container for all instances of each type created by the factory. Ideally this would be one vector for each ...
0
votes
1answer
118 views

why is glVertexAttribDivisor crashing?

I am trying to render some trees with instancing. This is rather weird, but before sleeping yesterday night, I checked the code, and it was in a running state, when I got up this morning, it is ...
1
vote
0answers
27 views

How to custom file formats work, encryption, packing etc [duplicate]

So say I take an example from Telltale games, they pack all their file assets into ttarch files, now I guess this is a custom file format that allows many file assets such as dds, jpg, bik, wav, 3ds ...