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

learn more… | top users | synonyms

0
votes
0answers
5 views

GL_INVALID_OPERATION on glBindVertexArray Despite glGenVertexArrays()

so I've been trying to create a simpler way to draw polygons and and have come across the following issue: When I call glBindVertexArray(m_VAO); it throws a GL_INVALID_OPERATION even though I have ...
0
votes
1answer
26 views

How to design parameters for events

I'm working on the event system for my engine, and have some trouble deciding what types of parameters my events should have to be both generic and specific at the same time. I want to be able to ...
0
votes
1answer
14 views

C++ SFML and Box2D: Move world or move player?

I'm currently making a top-down shooter game and it's my first time developing with SFML. I came across and issue and I want to know if there is a better way to solve it. I need to get the "camera" ...
1
vote
1answer
58 views

Efficient container(s) for units in an 2D RTS game

As the title says, I'm toying around with developing a 2D space RTS game. All of my units are spaceships that basically just shoot at one another, but they have to do a variety of other things as ...
-5
votes
0answers
36 views

What to choose Game Engine or Make my own? [on hold]

I want to go into game programing, I know basic stuffs in Unity, C++ / OpenGL, and I don't know what is better to make a Game Engine (I'm don't gone write a programing language for it, I will make ...
-4
votes
0answers
33 views

Need ideas for a space game [on hold]

I am Tyler and I am 17 years old. I have been learning C++ over the last few months and I am also working on creating a game that i hope will rival already established space MMOs one day such as ...
-4
votes
0answers
42 views

Noob question about programming, help [on hold]

my name is Vitor Leal and I want to be a programmer, or better, a game developer. So I'm very confused because I don't know what programming language should I know first. Some people say to learn C++ ...
0
votes
3answers
69 views

Grid Programming: Selecting a tile returns a negative coordinates

Let me explain what I am doing here. I created a class template named as PlayField where T is the type of the GridObject. I wrote this class using Cocos2dx. The point of this class is to make it easy ...
0
votes
0answers
30 views

How should I go about scripting voxel behavior?

I'm trying to add scripting to my voxel application. The scripts are meant to define blocks and their behaviors. However, this also means I must have unique data for each block since the script is ...
0
votes
1answer
84 views

What is the correct approach to implement multiplayer in a game? [duplicate]

I'm developing a game and it is intended to be a multiplayer game. I have experience in writing servers and clients in Java, but the game is written in C++. The server will be written in Java for ...
1
vote
1answer
32 views

Environment mapping - cube mapping using OpenGL

I'm trying to do cube mapping. Problem is that I'm getting this: This is what I get when I rotate it: But it should look like this Here is code for vertex shader varying vec2 tex_coord; void ...
0
votes
0answers
41 views

How to achieve Anisotropic filtering x16?

I'm using directx and I've achieved x1 anisotropic filtering, however regardless of the maxanisotropy value I set, it's still only x1. If someone could help me figure it out i'd greatly appreciate it. ...
0
votes
0answers
16 views

Buffer resource as shader resource view

I am trying to build a shader that change the output color according to something that happen in my c++ code In my code I create a buffer with four element(each element containe four float - RGBA) ...
0
votes
1answer
33 views

Texturing without D3DX

Well, i have been online for hours looking for solutions, but i have found none. Im looking for a way to create textures without the function D3DXCreateShaderResourceViewFromFile. Since D3DX is ...
0
votes
1answer
13 views

Using /usr/local POSIX using cygwin inside windows eclipse projects [closed]

I am currently developing in eclipse using cygwin libraries and tool chains. I am also creating a multi platform compilable Makefiles and configure script. The objective is to compile Graphics ...
0
votes
1answer
47 views

Rescale pixel art scenery before rendering in SDL2

I looked at this page that mentions the SDL2_gfx library for rescaling SDL_Surfaces without the image getting blurry: SDL zooming/upscaling without images becoming blurry? I wanted to know if it was ...
0
votes
1answer
67 views

Best way to create a timer? [closed]

I've created a Timer where I can set the time it should run and ask whether it isRunning() or wasRunning() etc. I've done this with c++ std::chrono, but somehow I think this is not the best way for ...
1
vote
0answers
42 views

Handling animations in a Platformer

I'm developing a 2D platformer game using the Cocos2d-x Engine, i can load correctly the animations according in which action the player is(running, jumping, standing, etc). Now i'm trying to add the ...
0
votes
3answers
107 views

Loading models with opengl

I'm developing a video game using OpenGL as graphic API and C++ programming language, and I'm creating all models with blender. One question I have is how you deal with models (vertices), I mean, ...
1
vote
1answer
47 views

How to debug a GLSL shader? [duplicate]

I cannot find any tutorial in Google and Youtube. I have a C++ program that uses OpenGL ES 2.0 API to render something on the screen. How can I debug my shaders? Any step-by-step guide? What is the ...
-1
votes
0answers
27 views

Protocol for stats transfers [on hold]

My company is designing a poker style game. I have the work of designing the API and optimal network connections. What do you think is the most optimal protocol to be implemented for sending game ...
2
votes
1answer
51 views

Transition between normal and slow motion

I have a game (C++) in which I want to transition between two speeds of motion. For illustration, the player raises their weapon to aim, and whilst this is in progress over a known duration, time ...
0
votes
1answer
45 views

How to send coordinates from one object to another [on hold]

In the game I'm building, there is a class of coordinates x, y. There are other Creature objects that are located at different points along the Coordinate object. The Coordinate object is therefore ...
1
vote
1answer
36 views

Deterministically shuffling of array

I couldn't find an answer to this so I'm asking here, I've made a voxel engine and it's working reasonably well, except for a small detail: I have yet to figure out how to seed my simplex noise ...
1
vote
0answers
21 views

Forking vanilla Doom 3/id Tech 4 for proper sound timing [on hold]

I've been enjoying Doom 3 modding lately. but one thing that's been rubbing me the wrong way was the way sounds played exclusively at regular intervals completely dissociated from the weapons' ...
0
votes
1answer
52 views

How to put the “camera” inside a cube in OpenGL

I'm really new to OpenGL and can't seem to figure out how to put the "camera" inside the cube I've created so that I can move in an FPS-like style. I tried to use gluLookAt and gluPerspective but I'm ...
4
votes
1answer
782 views

32 Bit colors difference

Im going through a tutorial to create a basic directx framework, and i've noticed that in there (and other tutorials, when i checked out) use DXGI_FORMAT_R32G32B32A32_FLOAT inside the input element ...
-1
votes
1answer
39 views

How to use PhotonPeer in Unreal Engine 4.8

I'm trying to implement PhotonPeer in Unreal Engine 4.8 but I'm stuck at the connect function. I need to provide an AppId, but nothing I try is accepted by UE4. Here's my code: DALGameInstance.h // ...
1
vote
2answers
222 views

How can I calculate the future position of my moving object?

I'm relatively new to games development and I have a 2D game where the playing area is an enclosed rectangle with width w and infinite height. In the playing area there is a ball. A gravity force of ...
0
votes
1answer
50 views

How to get `Label::createWithTTF` to support RTL languages such as arabic

Firstly, I'm using Cocos2d-x v3.6, Visual Studio 2013 uses(UTF-8 without signature option) and C++. When using Label::createWithTTF method to write Arabic text, It appear like the following. ...
1
vote
1answer
57 views

Event-/Input system with SFML: Cannot move diagonally in 2D

I am a beginner in anything with game development. I written a small prototype in which i can move a square around with the arrow keys. For that i use SFML. At the moment i experiment around with my ...
1
vote
1answer
31 views

SFML Library Not Rendering Sprite Texture Updates When Accessing Sprite From Lower In Framework Heirarchy

So currently I am working on a framework for a game utilising the SFML graphics library and in one of the classes representing a renderable object in the framework there is an sf::Sprite that is used ...
1
vote
1answer
53 views

Keyboard input vs character movement encapsulation

In our game created with c++ and sdl we are having difficulty delegating how the main character should be controlled. We have a keyboard class and a sprite class for the main character, but are ...
0
votes
0answers
43 views

Using Cocos2dx with Android Studio

Has anyone got Android Studio to work with Android Studio? I can get the generated project to work with proj.android, and add the NDK path to local.properties but I can't get it to rebuild after I ...
2
votes
2answers
59 views

Assigning IDs to entities and obects for use in scripts and by other objects

I'm currently planning a small, simple scripting system for my game engine that will allow me to easily define scenes (similar to the "cutscenes" found in 2D RPGs). It consists mainly of simple ...
0
votes
1answer
30 views

Cannot Get The Texture Showed Up Correctly glDrawElements

I still have this problem almost 1 month. Tried to search on Google but did not find any solution to this. I have loaded all the data correctly but don't know why the texture came up like this. Here ...
1
vote
0answers
43 views

How to build a static version of cocos2d-x and link it to my project

Firstly, I'm using Cocos2d-x v3.6 for Win32 desktop + Visual studio 2013 and C++. When building Cocos2d-x, always it has been built as a dynamic version not a static version as I want. How to ...
0
votes
1answer
33 views

Cocos2d-x project every time must compile the project plus other libraries

I'm using cocos2d-x v3.6 for win32 desktop and Visual Studio 2013 with c++. When I change the code and then compile the project again, I must re-compile my project AND other libraries every time ...
1
vote
0answers
75 views

Implementing a Render queue [closed]

I am currently in the process of re-writing my 3d engine, and I am looking at improving the renderer. I have read that organizing objects into a "render queue" and sorting is the best method. The ...
1
vote
0answers
41 views

Generating a grid (Array) of Tetris Pieces [duplicate]

What I want to do is quite self explanatory. Just like the title states. I want to code something that will generate a grid which contains is filled of Tetris pieces. However some conditions must be ...
0
votes
1answer
65 views

Game Controller that is constantly changing

I'm writing a game where the main character is a ghost, and therefor can possess just about everything. The problem is, I'm not sure how to efficiently & effectively handle the changing actions of ...
-7
votes
0answers
51 views

STL for games, yes or no? [duplicate]

Every programming language has its standard library of containers, algorithms, and other helpful stuff. With languages like C#, Java, and Python, it's practically inconceivable to use the language ...
3
votes
2answers
131 views

Algorithm for a smooth weather transitions in game weather system

I've been slowly learning c++ and building up a codebase intending to create a simple first person role playing game. I've coded a time management tool to track time elapsed in game, an inventory and ...
0
votes
1answer
67 views

Working but flawed bullet spread (vector math)

I'm trying to implement random bullet spread into my game, and I've managed something that works, but is consistently flawed. The spread doesn't vary depending on the distance the mouse is from the ...
0
votes
1answer
40 views

DirectX map/unmap

In my 2d game i want to use dynamic buffers to render sprites. My question is, when should i map unmap buffer? The 2 possibilities are: #1 //game logic map() fill buffer unmap() render() #2 ...
1
vote
0answers
44 views

When does data move from the system memory to the GPU memory? [closed]

I am starting off with a basic idea. My understanding is when a game loads, the assets are loaded into the system memory, images, sounds, maps etc. So say you have an open world game, AFAIK, the ...
0
votes
0answers
49 views

Simple Bullet Physics Collision Detection

I've been looking into bullet physics a lot here lately to handle my collision detection. I was using XNA collision but once I started to implement momentum into my physics simulation true and false ...
36
votes
1answer
6k views

Why are all OpenGL function calls prefixed with “q” in the Doom 3 source code?

Why is every OpenGL call prefixed with a "q" in the Doom 3 source code? Are they custom functions or a different library, and if so, why use that over OpenGL? Any Google search comes up with the Qt ...
0
votes
1answer
60 views

2d canvas representation in c++ code

I would like to create a basic 2d graphics program to do very simple editing of in game assets. My question, starting out how could I represent the canvas? Let's say I know i'll need a canvas ...
-1
votes
1answer
57 views

Leading Zero's in int returning weird number c++ [closed]

I'm doing UTs on a class of mine, and I tried the edge case of putting 05421 in the ctor instead of 5421. As far as I know, putting a leading zero in an integer results an octal number, but seeing as ...