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

learn more… | top users | synonyms

0
votes
0answers
3 views

Parsing Blender exported collada file in c++

Since I could not find any libraries that can help me parse collada files in my c++/opengl project, I decided to write my own. (I did find assimp, but binaries for Visual Studio 2013 were't available, ...
0
votes
0answers
6 views

FBX Scene causing vs2013 to crash with exception to NTDLL.DLL

# IM Loading An FBX Scene and All Dependency are Set, Yet this exception crashes the program Unhandled exception at 0x77EEE052 (ntdll.dll) in App7.exe: 0xC0000135: Unable to Locate DLL. the code is ...
0
votes
1answer
30 views

Missing Visual Studio 2013 Templates

Visual Studio 2013 is missing the installed templates related to graphics, SPECIFICALLY the fbx scene template.. Why is this so? And where do I get them ?
0
votes
1answer
20 views

Making a ordered list iterator

Noob here, I am trying to display a list of a vector with ascending numbers. To display the list I iterate through the following code. cout << "\nYour games list is: \n"; for (iter = ...
0
votes
0answers
30 views

Efficient way of rendering entities - C++ and SDL2

I'm currently a little bit confused about how to coordinate the entites in my game and how to render them properly and efficiently - I'm programming a 2D zelda-like game using SDL2 and C++ and ...
0
votes
1answer
31 views

Sorting sprite's layers in isometric view

I'm making a strategy game with isometric view and I'm having some problems with deciding which sprite should be drawn first (I'm using SFML 2.2 as graphic library). I'm using std::sort to sort ...
0
votes
0answers
39 views

I'm looking for an outline of a simple 2D game architecture, as my projects always get overcomplicated [on hold]

So quick backstory: I'm currently getting into game development with C++ and SFML for graphics. I have a pretty solid grasp of C++ so my question is not really language related. What I've been ...
0
votes
0answers
19 views

How to implement Lua thread for Sleep function

I am running into a problem in my game engine right now. I want to be able to call Sleep(number_of_seconds) from .lua file (1 only) and halt the execution of the lua file, WHILE the game is running ...
-1
votes
1answer
55 views

Should I use octree or quadtree for my spacial data structures? [on hold]

I would like to know the advantages and disadvantages of using octree or quadtree for spacial data structures? In a 3d gaming setting would you ever need more than 4 children nodes? Does it take ...
0
votes
1answer
45 views

Moving one object from one point to another with acceleration

How would someone implement moving an object from one point in 2D space to another using these formulae to update objects: m_position.setX/Y( m_position.X/Y() + m_velocity.X/Y() * dt + 0.5 * m_acc * ...
0
votes
0answers
23 views

SDL won't show images [on hold]

I'm new with C++/SDL and I'm having problems getting textures on screen. I'm trying to make a Tic tac toe as a first project, I know there's probably a lot of bad code but I only want help with the ...
1
vote
1answer
56 views

C++ Frogger game - Logs on Water bounding boxes?

I am making a Frogger game in C++ using SFML but have come across a problem. I have a block of water and log rectangles moving over it (All sprites) and would like the Frog sprite to do something when ...
0
votes
1answer
25 views

Extra sprite spawning when the enemies are redrawn SFML

I am making a game in sfml and at the moment when all of the enemies die. They are set to respawn however when this is happening they are respawning with one extra sprite than before. The code for ...
1
vote
1answer
79 views

OpenGL VBO and VAO Confusion

I would like to present here my Question about VBOs and VAOs. Basically from what i understand you can have different VAOs each of which can contain up to several VBOs , and by binding to the VAO's ID ...
0
votes
1answer
18 views

How can I get the “SelfActor” in OnBeginActorOverlap?

The signature it takes is void ( AActor* OtherActor ) However, The actor that is handling this event is not involved in the overlap. How can I access the actor that owns this delegate? Assuming I ...
0
votes
1answer
34 views

Why aren't all public methods BlueprintCallable by default?

Considering the entire point of public/protected/private encapsulation is to abstract the class so it's easy to use, why does the programmer also have to decide if a method is callable from ...
0
votes
0answers
10 views

change position/orientation of a bone using assimp

I have been using assimp to import rigged models and animations. I followed this tutorial for skeletal animation and I have got it done properly. The part that I am trying to do now is to orient a ...
1
vote
0answers
31 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
1answer
35 views

JNI multidimensional array as return value

I have some C++ code that I wrote to generate voxel terrain and would like to access it in JAVA. you pass it three integers; the seed and the coordinates of the chunk that it is generating ...
0
votes
2answers
40 views

How should data about past interactions be stored?

I have been developing a text-based rpg in C++, using sqlite as my database. When it comes to interactions that change the world around the player in some permanent fashion I have been unable to find ...
0
votes
1answer
73 views

Best way to handle movement input?

I'm currently developing a RPG movement system in c++, and tried to use the State Pattern/State machine for this, but AFAIK I would have to check each movement key in every state.(right?) Is there a ...
0
votes
1answer
14 views

Maya 2015 Collada mesh transforms not applied

I am trying to load a dae (Collada) model into my 3d engine. The problem is they export the vertices and transforms seperately. So in Maya 2015 it looks like this In the game engine I have it simply ...
3
votes
1answer
104 views

How can I optimize per-pixel drawing in SDL?

I've been messing around with C++ the last few days and I'm trying to figure out how to draw the screen pixel by pixel each frame. It sounded simple enough at first, but then I realized for loops ...
2
votes
0answers
46 views

OpenGL Planet Generation - Simple Matrix Issue (Planet “Spins” With Mouse)

I originally asked this question on StackOverflow & was directed here by a commenter. Im currently working on a OpenGL planet rendering. I'm using the Tessellation pipeline. So far things are ...
0
votes
0answers
27 views

Pseudo 3D questions in SDL/C++ [duplicate]

I'm going for a SNES mode 7 effect. From my understanding you do maths, to grab the current pixel from z values. Resulting from this math you take an image and then transcribe it into the screen for a ...
0
votes
0answers
54 views

Array<byte>^ in Win32 [migrated]

I have a DirectX 11.1 program which is written for Metro style and I want to convert it to Win32 application. I have used a lot of WinRT libraries and most of them are founded for HWND. but I still ...
0
votes
1answer
59 views

Handling (spawning/removing) entities in SFML

I am unsure which method to use to handle my enemies in SFML. The idea that I am trying to recreate is to spawn enemies every so many seconds. Initially I wanted to do this using a vector such as ...
0
votes
0answers
35 views

Modern OpenGL, rendering multiple obj objects not working

I am currently working on a 3D Game Engine that loads a level from an OBJ file and renders it with OpenGL. My problem is related to understanding how to render each object individually when i have ...
0
votes
0answers
45 views

resolving per pixel collision issue

In space invader, I'm doing bullet to barrier intersection using rect to rect, then I'm testing the first bullet's impact pixel, if it's green I blast a circle, if it's black, it continues travelling. ...
0
votes
0answers
16 views

DirectX 9 - Troubles on PRT

Does anyone tried to use PRT? I'm asking this because i didn't find out anything in the internet that may help me solve my problem without asking here for help. So my question is - why the code below ...
5
votes
1answer
206 views

Elegantly simulating NPC movement in inactive areas

My AI is utility-driven in a similar pattern to The Sims, where all unique behavior is coded into interactable objects, and the only thing an NPC does is decide which object they wish to use, path to ...
0
votes
1answer
47 views

missiles skip in collision detection

I'm trying to work on spaceinvader. I have problem that missiles or the bullets skip frames due to its fast speed. I tried to use the previous position of the bullet in the collision check, but still, ...
0
votes
2answers
76 views

State Machine class vs function pointers [closed]

What do you guys recommend to use? A State Machine with function pointers or classes? Or, in which case one would be better than the other one? At work we use the state machine with function ...
0
votes
1answer
87 views

Game mechanic player following path looks very roughly

I want my player entity to follow a path, which works, but it looks very roughly. Like it would stuck everytime. bool arrivedX = false; bool arrivedY = false; float speed = 0.06f; ...
0
votes
0answers
53 views

Python interpreter as in-game console

Say I have a game which has lots objects (NPCs, monsters, etc.), I want a console so I can change the variables of the objects (like changing HP for example), how could I embed python into my program, ...
0
votes
0answers
27 views

Steam for Linux platform libraries causing Qt application misbehavior

I'm currently having difficulties with a very simple launcher application that's intended to display a webpage and have some buttons to launch a game. When you click a link inside of the launcher it ...
1
vote
1answer
53 views

How do I compile further libraries into my game? [closed]

This might be vague; I don't know how to search for this. How do I link a GUI framework (in my case, CEGUI) to a graphics framework (in my case, SDL)? I'm using a Mac. My mental model on how to add ...
0
votes
2answers
132 views

Space invader barrier implementation algorithm

I've been struggling with implementing the space invader bullet to barriers. I wanted right now to blast a circle around, when the bullet hits the barrier and modifies the circle. As shown in the ...
0
votes
1answer
53 views

Weird rendering of bounding box

I'm trying to make a bounding rect for my bullet which is in space invader game. I'm using marmalade, and the bounding rect seems translated and doesn't bound the bullet at all, however the math is ...
3
votes
1answer
66 views

OpenGL Indexed VBOS?

I'm a little confused with using indexed vbos in opengl. I understand that different each vertex can only have one uv. How would it be possible to map a texture onto a 3d object if you can't "unwrap" ...
1
vote
1answer
42 views

Runtime resolution changing with GLFW3

I've been trying to figure out the correct method for changing the resolution/fullscreen state of a GLFW window for a while now, but after searching all I found were references of how to do it with ...
1
vote
0answers
39 views

Dynamically allocate memory for object array [closed]

I'm trying to create a RPG game and for a test I thought I might draw the same tile(20x20 pixels) over the whole window(720x480), it works and renders the tiles fine but the amount of memory and CPU ...
0
votes
1answer
62 views

How can I implement triple buffering using Direct3D 9?

I am creating an application using Direct3D 9. I want to implement triple buffering with vsync. I can successfully create a graphics device object with 2 back buffers. How do I know which buffer to ...
1
vote
0answers
26 views

Compiling glfw application mingw [closed]

I am trying to compile a glfw application on mingw. I am using 64 bit windows and 32bit mingw compiler And I have downloaded 32 bit binaries from http://www.glfw.org/download.html I am trying do by ...
0
votes
0answers
23 views

How can I manually syncronize render calls with a monitor's refresh rate in Direct3D 9?

I have an application that utilizes Direct3D 9 to render 3D graphics. I'm trying to manually control the number of frames rendered in a given second. Here is pseudocode: while( bInGame ) { // ...
0
votes
0answers
60 views

Manage map like The sims game

I'm trying to create a (light) tool to create houses like in the Sims game but I don't know how to manage data/make a valid architecture. For now, I think about something like that: Map: Player's ...
0
votes
0answers
33 views

Per pixel collision using marmalade bug

I'm trying to implement space invader, collision with barrier in which you blast some pixels, for the time I'm drawing a circle, right now I get correct collision but only on the bottom of the ...
0
votes
0answers
33 views

Help with scoring system and score multiplier

I am new to the scripting world and I am currently trying to add a score multiplier to the game code I am working on. Right now the score is set to increase as the player runs across the level however ...
0
votes
0answers
34 views

How to draw a ellipse with DirectX 9?

I have spent the entire day trying to get it to work... I can draw the outline of an ellipse but I want to draw a filled in ellipse but I can't seem to get the code to work. Any help would be great! I ...
1
vote
1answer
35 views

Render to Texture Using Multisampling

I have a DirectX11 application, which has multisampling / anti-aliasing enabled. However, I want to add an effect that requires a render-to-texture step. When I add this extra step, I lose all ...