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

learn more… | top users | synonyms

0
votes
1answer
10 views

Adding Components (classes) to unordered_map in Entity? (Possible typeid as key issue)

I've got a little test put together that has a couple simple Components that are supposed to be added to an Entity, but the addComponent function isn't working; I think it's got something to do with ...
0
votes
0answers
39 views

Question regarding the separation of input , logic and animations. (SFML)

I am completely new to game development and I've been trying to make a 2d game as a project for the past couple of days. I am using SFML and so far things are going well, but I am not sure how I ...
-1
votes
0answers
34 views

how to seperating raw input devices into classes?

Is there a way too seperate raw input keyboard, mouse and controller in classes so i can use them independent of each other(something like xinput for xbox controllers).
0
votes
0answers
8 views

AntTweakBar compilation error [on hold]

When I try to add a button to the bar that calls a function when clicked, I interestingly get a compile error. The following is my code, and compilation is due to TwAddButton function call. The error ...
1
vote
2answers
74 views

glGenVertexArrays causes crash

My code keeps crashing at runtime, I have done some creative debugging and determined that it was the glGenVertexArrays that was causing the crash, I've looked around and come across some answers that ...
0
votes
0answers
30 views

Focus a turntable style camera on an object

I have a turntable style camera in the maya / blender / alembic / opensubdiv example. I want to be able to match the camera translation to any objects translation pivot point in the scene and then ...
0
votes
0answers
29 views

Loading Wavefront Data into VAO and Render It

I have successfully loaded a triangulated wavefront(.obj) into 6 vectors, the first 3 vectors contain the locations for vertices, uv coords, and normals. The last three have the indices stored for ...
3
votes
1answer
62 views

Should my GLSL Shader object/wrapper encapsulate loading/setting a VertexArrayObject?

I am working on a 2D game in C++, with a simple rendering layer over OpenGL. I have a wrapper for GLSL shaders and shader programs, these wrappers encapsulate shader objects into C++ classes and ...
35
votes
7answers
4k views

How does Lua work as a scripting language in games?

I'm a little hazy on what exactly Lua is and how a game that is programmed in C++ would use it. I'm asking primarily about how it is compiled and run. For instance when you use a program written in ...
0
votes
0answers
21 views

issues involved in the multi player web gaming? [on hold]

i want to develop counter strike game as a web application any one who is interested should be able to login to the site with his registered credentials and play, To convert CS in to a web based game ...
3
votes
3answers
131 views

Make openGL program only update every 1/60 seconds

I'm learning C++ and openGL and have this program as a result from tutorials and playing around. The problem is that the main loop is running at "full speed", making the program unnecessarily cpu ...
0
votes
1answer
45 views

Point rotation around point, accuracy question

I study OpenGL ES 2.0. But I think it's more a C++ question rather then an OpenGL one. I am stuck with the following rotation question: It is known, that rotation transformation can be applied using ...
0
votes
0answers
37 views

Mouse input that 'sucks in' particles [on hold]

I'm having trouble figuring out the equations behind the title, I did exactly this using OpenGL's fixed function pipeline, but while transferring this over to the programmable pipeline i'm running ...
0
votes
0answers
31 views

Data structure for storing game objects in a tile based game [closed]

This is my first time developing a game using C++, so I want to do it right. I decided to start with a tile based game since it has always seemed simpler to me. Previously the way I managed objects ...
0
votes
1answer
106 views

How do I fix my planet-facing camera?

Summary I'm having trouble implementing a camera controller suitable for first person use around a planet. The camera needs to be oriented correctly according to gravity (vector from camera ...
0
votes
0answers
25 views

Calling interactivity functions from object classes

Let's say I have a class object_door. An instance of said class is now in the game world in a locked state. Now to enable the player to open it, he needs to attempt to pick the lock. So I was ...
1
vote
2answers
126 views

Single or multiple inheritance for game world objects

So I am currently laying out on paper the system I want to code for a game in C++. Now currently I am debating whether to have e.g. a class object_door that inherits from another class ...
0
votes
3answers
132 views

How necessary are shader coders? [closed]

I know that gameplay mechanics programmers, either directly working with source or with scripting are needed, however there are so many shaders written already that I would imagine you could find ...
1
vote
1answer
129 views

What is Ogre::String?

I was working with the OGRE .NET bindings (MOGRE) for quite a long time. To improve my (not that good) C++ skills, I am switching from C# to C++. After implementing a basic OGRE application, I was ...
0
votes
0answers
18 views

alBufferData() sets AL_INVALID_OPERATION when using buffer ID obtained from alSourceUnqueueBuffers()

I am trying to stream audio data from disk using OpenAL's buffer queueing mechanism. I load and enqueue 4 buffers, start the source playing, and check in a regular intervals to refresh the queue. ...
0
votes
2answers
130 views

OpenGL - How can I make the edges of this textured circle smoother?

I'm building a game and I've applied a certain texture (RAW file) to a circle (GL_POLYGON) in OpenGL. It loads correctly, with the right size and all, but the edges seem a bit jagged and I would ...
-1
votes
1answer
82 views

C++ SDL2 OpenGL Rendering Problems [closed]

I just started with SDL2 and OpenGL in C++ and I am having some trouble rendering a triangle. The triangle I want to draw renders on the screen, but it is black. I tried added some shaders, but they ...
0
votes
1answer
63 views

Slight pause/delay when moving

I've been working on this little framework for my game today and realized that moving delays when moving around. I've used SFML before and have had the same problem, but never bothered to fix it. I'm ...
5
votes
2answers
220 views

Do I really need to clear the renderer every iteration?

Just a quick question about fine-tuning/optimization. If I'm making a 2D platformer with a parallax-scrolling background (meaning no two frames are the same) do I really need to clear my renderer for ...
5
votes
2answers
503 views
+100

How to solve the big video memory requirements in 2d game

We are developing 2d game (Factorio) in allegro C/C++ and we are facing the problem with increasing video memory requirements as the game content increases. What we currently do is, that we gather ...
1
vote
0answers
18 views

How do I detect image clicks in Dark GDK?

I am trying to determine if an image has been clicked, using the Dark GDK game engine. I've found no methods in the engine that do this. I would rather not brute force this with a large nested ...
2
votes
1answer
111 views

How can I implement a dialogue where the words appear as if they were being typed?

I'm planning on putting a dialogue system into my game, I don't really work with surface so my way of implementing SDL_Ttf is by turning it into a texture, in other words, every paragraph would be ...
1
vote
1answer
123 views

Creating weapons/armor procedurally

In my current project I am creating a 2d game (rpg) which should be able to dynamically create new weapons and armor based on different components. So, i.e. a sample weapon would consist of barrel1, ...
0
votes
2answers
43 views

irrlicht: drawing two textures with draw2dImage issue

Im just starting out with irrlicht (and c++) for 2d development and I followed the 2d tutorial, so I am able to draw a 2d texture on the screen (With draw2DImage) this seems to work fine. So I made a ...
0
votes
1answer
72 views

How big a transition from programmer to modeler/level designer/creator [closed]

So I think I may take a break from the programming side, I have put in 6 hard months learning C++ and graphics theory, I have learned a huge amount but over the last few days have been studying level ...
6
votes
0answers
149 views

Hotplugging Joysticks And Gamepads On OSX

I've tested the cross platform joystick support features on GLFW, SDL2 and SFML. SDL2 appears to be the most complete, but it can't detect when joysticks have been unplugged on OSX. To me, this is a ...
0
votes
0answers
35 views

Cocos2d-x , setup the debug environment and remove the red marks in my eclipse

I am struggling with this issue since last week. I still can’t figure out where is the error. My code is compiling perfect if I restart the eclipse. but, when I edit the c++ file it shows red marks ...
1
vote
1answer
36 views

Do I need to call Release() on D3D objects when I use them in another function?

For example, I have an IDirect3DSurface9 * Surface and IDirect3DSurface9 *BackBuffer. If I were to use them directly in the render_frame function, I would need to release them on the closeD3D ...
2
votes
0answers
31 views

Load an Image to the BackBuffer

How can I load and display an Image?... I have tried something but it didnt.. worked.. this is what I've tried.. File : StrikeOps_main.cpp .. void : render_frame : Intro::DisplayIntro(d3ddev, ...
5
votes
2answers
179 views

What does the Particle engine do and how are special effects created/processed?

For example, take bullets, sparks, fireballs, light sabers, lightning bolts, any kind of special effect in a game. Are there various ways to implement these effects in a game. As far as I can see you ...
0
votes
0answers
139 views

How to make an Game Intro

How do I display my logo (a short video) before displaying the main menu? For example when you start Call of Duty, it displays the IW / 3ARC logo, Activision, and then a cinematic. I just need to ...
0
votes
1answer
61 views

How are vertices determined complex geometries in an ever changing game state

For example say you wanted to draw a 3D cube you can define an array of hard coded vertices using float3, here is an example. http://msdn.microsoft.com/en-us/library/windows/desktop/jj552949.aspx But ...
0
votes
1answer
102 views

Separating axis Theorem rotation issue

I made a post yesterday to see if anyone could understand my problem. However I did not receive much guidance, probably because my question was not clear. I have worked on it a little more and ...
0
votes
1answer
127 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 ...
1
vote
3answers
186 views

How can I implement a main menu?

I have been following the tutorials at http://lazyfoo.net/tutorials/SDL/index.php and although they are all very well written and I have learned more than I would have on my own, I am not sure how to ...
0
votes
0answers
4 views

Code::Blocks undefined reference to “*” [migrated]

Like the title says, I'm getting multiple build errors using C::B, all are saying undefined reference to '*'. I'm trying to build a program using OpenGL, GLFW, and GLEW. The top three things that it ...
1
vote
2answers
66 views

Loaded OBJ Model Will Not Display in OpenGL / C++ Project

I have been experimenting with new effects in game development. The programs I have written have been using generic shapes for the visuals. I wanted to test the effects on something a bit more ...
0
votes
0answers
99 views

Separating Axis Theorem Issue

I am trying to create a 2d top down shooter using DirectX 11 (Windows 8 Store) and I am trying to implement OOBB collision using the Separating Axis Theorem. However I appear to have run into an ...
1
vote
1answer
32 views

Correcting Lighting in Stencil Reflections

I'm just playing around with OpenGL seeing how different methods of making shadows and reflections work. I've been following this tutorial which describes using GLUT_STENCIL's and MASK's to create a ...
1
vote
1answer
65 views

How to create a sun billboard with Ogre3d

I've been working with a few different engines alongside trying to code my own project. Rather than rewrite an entire renderer, etc I am using Ogre3d. To begin with I am trying to implement a very ...
0
votes
2answers
97 views

Synchronizing mob states in online multiplayer game

I'm developing an exploration-based platform game in which from the start there were plans about including local multiplayer support, but recently I've been considering an online multiplayer mode, ...
0
votes
0answers
24 views

Exporting .bullet file from Blender Render

I'm trying to export my blender render bullet world to a .bullet file. Unfortunately, it seems like when I bring my bullet world to the game engine it drops the bullet info. Is there a way to export ...
1
vote
2answers
72 views

How can I render a texture to the screen in SDL2?

I've recently started upgrading my SDL version from 1.2 to 2.0.3, and while on the SDL Wiki, I've come across SDL_Renderer, SDL_Window, and SDL_Texture. I did some research and found a link at ...
2
votes
1answer
48 views

How To Set Constants Using ID3DShaderReflection

I got to the point where I am tired of hardcoding shaders and decided that it was now time to look into using ID3D11ShaderReflection to get data from the shader and set my shader's constant buffer ...
1
vote
2answers
118 views

Data Locality and Polymorphism [closed]

I've been reading over the various chapters available at http://gameprogrammingpatterns.com, and in particular his chapter over Data Locality(http://gameprogrammingpatterns.com/data-locality.html) has ...