Questions tagged [c++]

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

Filter by
Sorted by
Tagged with
-2
votes
1answer
1k views

GLSL- How to change a certain color of a sprite, to another color passed into the shader?

There are sprites, with certain pixels being bright pink, and a shader dyes these pink or grayscale pixels to a custom color determined by the player. For example, a character looks normal except for ...
-2
votes
1answer
498 views

Confusing Callbacks

I'm trying to programm now a "game", and started with the EmptyProject that's provided by the DirectX SDK. The problem is that the Callbacks are confusing me. Can please someone explain me? Edit: <...
-2
votes
2answers
107 views

Loading the map from an image file in C++

For my platformer tile-based game I want to be able to load the game map from an image file. Consider the following 25x15 px .png (enlarged) representing some level: Assume that each specified ...
-2
votes
1answer
46 views

Models /textures/music corrupted!

I'm making a 3d rpg game. Everything seems to work on other computer. But when I open my game in my computer, the polygons gets crazy everywhere filled with random polygons. Textures will get rainbow ...
-2
votes
1answer
156 views

Problem using SDL_TTF

I'm trying to create a 2D game, and I'm trying to use a layered drawing model. First I draw the background, then the world, then the constructs (buildings etc.), then the objects (NPC's etc.) and ...
-2
votes
2answers
1k views

Indices of a obj file format

If I have the obj file like below, what would be my indices. How do I find the indices? What would be the order of the indices also.(the triangles) ...
-2
votes
2answers
1k views

C++ Multi-Platform (Windows, Linux, Android) OpenGL(ES) Solutions or Tutorials? [closed]

I'm sorry if this has been asked recently and I'm not Googling it right, but I've been digging all week for something. I've got a game prototype I made in Unity, and I have some decent experience ...
-3
votes
3answers
4k views

Making game totally from scratch [closed]

I'm used to make my games in Java. Java is an awesome language but to launch .jar files you need a good updated JRE. So I thought: "I'm just going to make my games in C# or C++!" Unfortunely, I can't ...
-3
votes
2answers
1k views

Making a game engine or using Unity3D? [closed]

I was wondering, which one would benefit me the most? I have as much time as I need to make a game engine and rapid development does not appeal to me. Unity3D is easy, but how much will mastering ...
-3
votes
2answers
965 views

Using virtual functions [closed]

I am starting to use virtual functions, and i am programming a simple text game, my question is this, if i have a virtual function called spec_abil with in a Super class called rpg_class. If you allow ...
-3
votes
1answer
4k views

What is the best engine for my first serious 2d game? [closed]

What game engine/graphics engine should I use for my first indie game? I'd like to add that this is not my first game, I've previously used Allegro for 2d development (pong, chess and stuff). I am ...
-3
votes
2answers
419 views

What are some good combinations of libraries? [closed]

Lately I have been working on a game that i plan to make online. I have used different libraries to make this game as far as i could, but I feel that I should rethink on how Im sertting this game up, ...
-3
votes
1answer
1k views

OS X OpenGL 3.2 Core (Black Screen)

I want to render a Quad via VAO, IBO and VBO but nothing is drawn. I'm using glDrawRangeElements in OS X OpenGL 3.2 Core context. The screen is completely black without any error. GLFW3 is used to ...
-3
votes
2answers
1k views

Starting Game Programming in C++, where to begin for optimal cross-platform development? [closed]

I wish to begin learning game development in C++. I have knowledge in syntax and the console using Visual C++ 2010, however I want to begin programming. My only problem is that I want to be able to ...
-3
votes
1answer
117 views

How do I implement semi-random level generation?

I am trying to make a platform game that generates semi-random levels. I want it to read in the segments of a level and then choose a random one from among these segments. I am stuck. I have ...
-3
votes
1answer
97 views

Virtual Reality without source code access is it possible [closed]

Hey is it possible to make a pc game that has no access to source code to the community support virtual reality.... I need answers tonight....... More in depth I need to know how to make a game that ...
-3
votes
1answer
157 views

Creating a Zelda-like map in pure C++ not working [closed]

I wanted to create a map like in Zelda, but it keeps showing hashtags instead of 1 on A1 and I don't know why. ...
-3
votes
1answer
147 views

Undefined fireball movement behavior

Demonstration video I try to do after the player shoot 10 times of fireball, then delete all the fireball objects and recreate a 10 new set of fireball objects. I did it but there is a weird bug ...
-3
votes
1answer
187 views

C++ Loading DLL Error [closed]

So I'm attempting to fix a OpenGL in Java problem by making a DLL in C++ and then call it from Java but I've ran into an issue. So I'm testing a basic DLL in C++ and I got this error: "error: '...
-3
votes
1answer
200 views

Performance of programming languages and frameworks [closed]

I want to program an online 2D MMORPG with graphics like in this game. Since I develop in javascript and python mainly I chose python for my first games and the game library pygame which is pretty ...
-3
votes
1answer
10k views

Rotate camera with mouse? [closed]

Once again, using tutorial 10 at NeHe. I want the code ...
-3
votes
1answer
169 views

How are certain objects named in OpenGL?

I am a beginner in OpenGL, and I would like to know how to distinguish specific objects in an OpenGL game. For instance, the game world contains 3 gems of different colors, how can I know which one ...
-3
votes
3answers
2k views

Homemaking a 2d soft body physics engine

hey so I've decided to Code my own 2D soft-body physics engine in C++ since apparently none exist and I'm starting only with a general idea/understanding on how physics work and could be simulated: ...
-3
votes
1answer
129 views

Cant make SFML work

I am having an error when I try to create the first window in SFML. the error says: The code execution cannot proceed because sfml-system-d-2.dll was not found. Reinstalling the program may fix the ...
-3
votes
2answers
452 views

Random points spread like old TV static in a polygon OpenGL

OpenGL version 3.1 Have to draw around 10000 randomly placed and colored points inside a rectangle to appear like old TV static but colored as shown in the image below. Right now the code draws a ...
-3
votes
1answer
563 views

Game does not exit when playAgain (char) is set to 'n' [closed]

I have a level system in place for my Guess the Numbers game. I give the user the option to play again after guessing correctly. If only one level is active (with the other 3 being commented out) then ...
-3
votes
1answer
710 views

How long would it take to learn c# if I know c++? [closed]

I already know c++, having worked through Accelerated C++ reading all the chapters and doing all the problems, with a bit of college coursework in C++ as well. From what I read, I seem to have ...
-3
votes
1answer
481 views

Why are game engines written in C++? [duplicate]

Possible Duplicate: Why has the industry switched from C to C++? Since many organizations have demonstarated Object orientation in C and we all know its ABI compatibility that C++ lacks, why game ...
-3
votes
1answer
317 views

Algorithmically generating neon layers on pixel grid [duplicate]

Possible Duplicate: How to achieve a Neon-Light effect? In an attempt at a screensaver I am making, I am a fan of neo-like graphics, which, of course, look great against a black background. As I ...
-3
votes
1answer
4k views

Best Source Engine Tutorial Books/Sites? [closed]

I want to get into Source Development. Anyone know any good sites for tutorials on it? I already know a few.. Just thought I would ask incase you guys know of any that might be better. Thanks :)
-3
votes
2answers
181 views

How do I get the instance of my tiles from the game class?

I have a c++ problem. So I have a base GAME class. In this class I have an instance of the player class. I want to check this player for collision with tiles. Tiles are also stored in the game class. ...
-4
votes
3answers
2k views

Why Game engines use C++? [closed]

Why most of the game engines use C++ to develop game?. Why not java or C#?.
-4
votes
1answer
171 views

How to add multi-core features to a game engine that was created to run on a single core?

I'd like to turn old game engines (such as Doom engine/id Tech 1) that were designed to run on a single core computer into multi-core game engines. How can I do that?
-4
votes
1answer
185 views

For loop optimisation [closed]

Here are some variations of for loops: 1) Standard: for (int i=0; i<limit; i++) 2) Using preincrement ...
-4
votes
1answer
166 views

Struct Method for Loops Problem [closed]

I have tried numerous times how to make a do-while loop using the float constructor for my code but it seems it does not work properly as I wanted. For summary, I am making a TBRPG in C++ and I ...
-4
votes
2answers
595 views

Programming games for Windows

I've programmed a couple simple games so far, in C++ as that's my language of choice, all using open source, cross platform libraries, they're great. I'd like to understand how are cross platform ...
-4
votes
2answers
218 views

A starter need some tips and tricks [closed]

This might be a very stupid question as it's frequently asked on the internet. But i'm new to the game development and i would like to learn C++ in creating 3D games. what software is good for such ...
-4
votes
2answers
281 views

Safe zone implementation in Asteroids [closed]

I would like to implement a safe zone for asteroids so that when the ship gets destroyed, it shouldn't be there unless it is safe from other asteroids. I tried to check the distance between each ...
-4
votes
1answer
70 views

is if statements important or do I need them [closed]

Hey I was wandering I am needing some advice I am using #if expressions to execute my code and I was wandering if you have #if expressions is it really needing to use if statements in your c++ source ...
-4
votes
1answer
457 views

Can we port any game written in C++ with SDL to Android platform or we would need to change some codes too? [closed]

Just wanted to lean a cross-platform library!! Since SDL library supports iOS too..
-4
votes
1answer
385 views

how to run game server [closed]

I'm creating a game on UDK and i have some questons about the server. my game is a 3d mmorpg simliar to dayz/warz. I have some questions Each map will consist of 30-60 players similar to dayz/ warz....
-4
votes
1answer
335 views

A question about C++ in video game industry [duplicate]

Possible Duplicate: Why is C++ used for game engines? How about its future in game engines? C++ will remain the AAA video game industry standard, especially indispensible in video game engines ...
-4
votes
1answer
365 views

Complementing Ogre3D and C++ [closed]

I will start my first 3D game, and for now I'm inclined to Ogre3D and C++. But Ogre3D isn't an engine. It is a 3D rendering library, and quoting another user here in GameDev: Ogre3D does not have ...
-4
votes
2answers
2k views

Programming real time combat [closed]

I am programming a lot of turn based game, all text, but how do you program real time combat in games, like an rts, or a shooter, where everything is not input based
-4
votes
1answer
84 views

How can I execute a C# script even if my game is closed?

I've made a game with Unity and I want to execute a C# script that runs even the game was closed. I searched a lot but didn't find anything.
-4
votes
1answer
375 views

C++ SDL/SFML advancing help [closed]

I've been playing around programming using SDL and SFML for a while now and done all the basic tutorials I can find(love lazyfoo). but I'm stuck and not sure how to move on from simple games like ...
-4
votes
1answer
367 views

What is the best way to get into game development and learn how to program with graphics? [closed]

I'm a 16 year old learning C++. My friend and I have dreams of starting our own indie game company and we would, both, like to know how to get into game development. One of our major questions is: ...
-4
votes
1answer
78 views

Why isn't this glsl program working? [closed]

Why isn't this glsl program working ? ...
-4
votes
1answer
812 views

Making a scroll bar in game [closed]

I'm making a scroll bar for chat box in my game now but I can't calculate the height of thumb in scroll bar. I try ...
-4
votes
1answer
125 views

.NET in Windows ME [closed]

So I'm used to work with C# and I recently started studying C++. So I have a Vista computer, which I'm using right now, but I also have an old Windows Millennium Edition Computer, and I also wanna ...