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

learn more… | top users | synonyms

0
votes
0answers
4 views

Ideas for a seminar in computer graphics

I'm about to enroll in an "Advanced seminar in computer graphics" as part of my MSc degree in computer science. I'm relatively new to computer graphics, I'm currently in the middle of taking a basic ...
0
votes
1answer
13 views

Solitaire Game: Transferring Cards Design in C++

So, I'm working on a Solitaire game. I already created a the classes: Card, Pile, Stock. Each work as expected on it's own. My question is: What possible design for managing moving card(s) between the ...
0
votes
1answer
34 views

SDL pixel access very slow

I'm using SDL and need to plot pixels one by one on the screen. When I do this, it's extremely slow. I followed the tutorial here: http://www.programmersranch.com/2014/02/sdl2-pixel-drawing.html ...
0
votes
2answers
42 views

How to keep a shape inside a rectangle

So i'm making a game which is based on randomly generated rooms and i need a way to keep the player inside them and make the player glide when he collides with the room's bounds. I currently have a ...
0
votes
0answers
14 views

SAT MTV collision resolution jittering

Edit: I have updated my approach a bit, but now the problem is that if i'm outside a wall i stick to it, basically i get the Desired vector of motion and move there. Also how would i adapt this ...
-1
votes
0answers
61 views

A complete guide to becoming a game developer [on hold]

I am an experienced PHP developer who has been programming web apps throughout his career and been using lots of PHP frameworks. Have been trying to create a simple 2D football game recently but I ...
-1
votes
0answers
25 views

CEGUI 0.8.4 and SDL2. Crash the app after startup

Do not run the compiled lesson. Link to the lesson. https://bitbucket.org/lucebac/cegui/src/ea8f8c814a4d5dbaa56344218659eb68ce173961/application_templates/SDL2.cpp?at=application-templates-devel Link ...
0
votes
1answer
26 views

How do i load, render and trasnform 2D images using Direct3D 11 API?

In my small game project using DirectX 11 API, I created a Direct3D device, and can draw 3D meshes, using web tutorials and a book. But I cannot figure out how to load, transform (rotate, scale, ...
3
votes
1answer
98 views

How do I create a multiplayer server also suitable for local single-player?

I've created a voxel game in C++, OpenGL and SFML, and I want to make it multiplayer. I'd like to make it similar to Minecraft's client-server model: The single-player is just a client to the hidden ...
-1
votes
0answers
25 views

Why are my GLUT/GLEW models only visible for one frame in the framebuffer?

I'm having this problem with an OpenGL program where the models in the scene are only visible for one (the first) frame when rendering them to a texture, and then to the screen. If I render them ...
-1
votes
1answer
69 views

How can i fix my Ground detection code?

My ground detection works by checking if the player's x position is between the range of a sprite xpos+16 and xpos-16 if it is,then it uses a separate axis theorem on the y axis to see if the player ...
1
vote
2answers
89 views

Movement in gameloop

I wonder what the best way is to move the player. Is it best to always check for movement like I do in the first example of is it better to only access the movement function via the input function ...
1
vote
2answers
94 views

Proper Text-RPG Monster Generator

I'm making a text-based RPG in C++ just for fun, and in a way that I can keep adding to it and hopefully give it graphics one day, and I've got a lot of code for everything. My only problem is that I ...
-2
votes
0answers
79 views

unity 5 C# or Unreal Engine 4 C++ [on hold]

now with unity 5 and unreal engine 4 both going for AAA graphics(unity) and free(UE4) which is a better choice...i have been working with unity for the past year and C# is boring to program...UE4s C++ ...
0
votes
0answers
75 views

Problems with First Person Camera in C++ OpenGL

I'm building a first person camera for my application but I'm having a couple of problems relating to moving the camera. In general, I have 2 vectors, one for the camera's position and one for the ...
1
vote
1answer
130 views

Simulation of ball movement in a 3d landscape. The easiest way?

I have a landscape(generated via Perlin noise) and a ball. I want the ball to move along the geodesic(implementation of basic physics: gravitation, friction). I thought to do raycast around the ball ...
2
votes
1answer
66 views

Creating polygons with separate outline/fill colors in OpenGL

Subject I am creating a terrain map with triangle strips and I would like to make the bodies of the triangles black, but have their outlines be colored. Problem The solution appears to be to draw ...
0
votes
0answers
30 views

How can I create a collision like the ball and peg in Peggle?

I'm making a game which requires the same type of collision as Peggle. I know of the 3 main types (elastic, inelastic and perfectly inelastic) but those result in both objects moving after the ...
0
votes
1answer
41 views

How to figure out if I'm on the right path [closed]

I'm a software developer from Israel, I've been programming professionally since 2011, my first job was in HP software and lasted 2 years after which I decided that I want to pursue my dream in ...
0
votes
1answer
28 views

How to load in meshes efficiently into DirectX11

I wanted to know if there was a standard and efficient method to load meshes from a file into DirectX11. Currently, I'm loading .obj's by parsing them in and storing their information into a vertex ...
2
votes
2answers
84 views

How can I set up an intuitive perspective projection/view matrix combination in OpenGL, using GLM?

Could anyone help me set up an intuitive perspective camera matrix using OpenGL and the GLM library? By "intuitive" I mean that I want the camera to be looking at the middle of the screen down the -Z ...
1
vote
0answers
57 views

Directx 11 full screen

I build simple directx 11 application in c++ that draw square to screen. Also check in the end of the program when I close the last peace of directx the number of free reference. This work great in ...
0
votes
0answers
54 views

OpenGL Slow Rendering Procedures . glDrawArrays

Hello i would like to present my problem here. At the moment i have a scene with about 250 trees , 100 ferns , a player model and a custom generated terrain (from height map). For the past few days i ...
0
votes
0answers
27 views

How to use a sprite class in cocos2d-x?

I am writing a game and would like to add child from a different class (Actor.cpp). I try two method to implement the sprite, but neither can show the sprite on the simulator. Do I implement it wrong? ...
2
votes
1answer
68 views

Character states in component based entity system

I'm working on a Zelda-like game (github), and I made a component-based entity system. I've a Scene class which holds a std::vector of SceneObject. SceneObject is a collection of components Scene ...
2
votes
1answer
41 views

Since D3DX utility library is deprecated, what can I do about this legacy code?

D3DX Structures utility library is deprecated for Windows 8 and its not supported for Windows Store apps. So my question is, Does anyone know what to replace this legacy code with.. ...
-1
votes
0answers
53 views

How should I structure game flow (2D sidescroller in C++)? [on hold]

My question is more specific than the title implies but seemed to long to fully expand in it: My conundrum is whether responding to game events (i.e a collision with solid geometry, picking up items, ...
5
votes
2answers
175 views

Should a game clean up after itself when exiting? [closed]

Should a game/engine clean up after itself(close windows, shut down renderers, close files, free memory) when its closed? The OS should do that anyway, and usually in a faster way. I guess most ...
0
votes
0answers
45 views

SDL2 - Windowed mode, VSYNC active, refresh rate 56hz instead of 60hz

As the topic title says. System is Windows 7 64bit. C++. I am not sure why this happens. The refresh rate in the window is 56 hz (calculated in the application from SDL_GetTicks) instead of the ...
1
vote
1answer
76 views

Stepping through 3D noise to generate a cubemap for a sphere

This is somewhat related to a previous question I asked How to create a seamless cubemap noise texture? I have managed to successfully step through a 3D noise function to create a cubemap texture ...
0
votes
1answer
68 views

Is it better to make a cpp and hpp file for every new object or is it better to make one parent class and define types in there? [closed]

Let's say we make a game. The game has items, enemies, allies, etc and there are multiple of them, like zombies and robots as enemies. Do you think it would be better to make one parent class called ...
0
votes
1answer
39 views

SFML drawing Tiles low fps

int main() { sf::RenderWindow window(sf::VideoMode(800, 800), "SFML works!"); sf::VertexArray Tquad(sf::Quads, 40*40*4); int size{ 20 }; int width{ 40 }; for (int x = 0; x < width; x++) { for ...
0
votes
0answers
22 views

Directx 9 Obj Model

There's is a error with my obj load/render that I can't solve I'm a newbie in directx 9, I'm trying to do this in the best way The model is not displayed properly, do not know if this correct model ...
0
votes
1answer
46 views

2d Collision detection response equation doesn't work

I am currently doing some game engine programming as a hobby. I have been working on getting the collision detection working for a while now, and I'm at my wits end with it. I started with this ...
0
votes
1answer
30 views

Why is each column being shifted down the X value of the column in my 2D Data Structure?

I have a two 2-dimensional arrays. One of which stores characters from a text file, and the other stores pointers to instances of Blocks. For some reason, in either of the arrays (I'm not sure which), ...
0
votes
0answers
54 views

server/client architecture, how to combine physics data, scene graph and database over the network?

I'm writting a C++ server and a C++ client for a rpg game. The client is using OpenSceneGraph for rendering the 3D. RakNet is used for communication between the client and server. At this time, the ...
0
votes
3answers
79 views

2D Box Collision Trouble

Hello I am trying to handle some simple box collision (axis-aligned) in my top-down 2d game, but running into a problem. My game is running at a fixed time step, and checks for player-wall collision ...
0
votes
0answers
10 views

Box2d c++ can't see b2PolygonShape

i try to follow this tutorial and convert it to c++ http://www.emanueleferonato.com/2009/04/06/two-ways-to-make-box2d-cars/ the second part of the tutorial Now im facing very strange Behaviorno ...
0
votes
1answer
50 views

SDL2: Unable to get center of screen when drawing more than one texture?

so I've been trying for the last four hours to get this to work and although I can get to the center of the screen when printing one texture using: ...
1
vote
2answers
58 views

Updating children nodes in a game engine

I am writing my own small game engine (thin layer based on SDL2) in C++. My base class is Node (contains information on an entity's position, scale, rotation, etc.), And I've got two special ...
6
votes
1answer
181 views

C++ exensible resource manager class with dynamic registration of factories

I've done some some research on my own, so I hope someone can help me finish it. I'm trying to replicate the design of an extensible asset manager featured in this answer. At the moment I have ...
1
vote
1answer
92 views

Entity component system, Communication between components [duplicate]

I am trying to implement ECS for my simple 2D game. I would like to ask a question about how components should communicate between themselves and with entity. I tried to implement few components, ...
0
votes
1answer
33 views

Input Assembler - Vertex Shader linkage error

I'm new to HLSL and have been struggling with this problem for a while and I can't figure it out. I'm getting the below error a number of times in the debug window: D3D11 ERROR: ...
0
votes
1answer
28 views

SDL2 LogInfo not outputting with different category?

So this is probably really simple but I just cannot see it. I've made my own log class using the SDL_Log functions to output to the console. Only thing is, is that it only outputs using one category ...
0
votes
1answer
22 views

FindNextValidTechnique fails

My effect file compiles successfully, but FindNextValidTechnique fails. Technique part of the shader: technique Diffuse { pass Pass0 { VertexShader = compile vs_2_0 ...
0
votes
1answer
48 views

Button image on game menu is updating too slow

I'm using SDL2 and i'm facing a problem with my game menu buttons. Every time i detect that the mouse pointer is over a button of the menu i update the image of the button (from MOUSE_OUT to ...
0
votes
1answer
53 views

Orthographic viewport zooming

I'm a bit new in opengl so please bear with me. I have a viewport window like this I have implemented zoom in/out features using the arrow keys. The problem is it zooms in and out with the whole ...
0
votes
0answers
18 views

How to convert ticks to clock cycles when profiling API calls [migrated]

I am profiling Direct3D9 API calls. I have read a lot of documentation here that describes the process. I have a question though about calculating the elapsed clock cycles. Here is my current method: ...
0
votes
1answer
54 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
1answer
74 views

Missing Visual Studio 2013 Templates [closed]

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 ?