Questions tagged [c]

C is a general-purpose computer programming language used for operating systems, libraries, games and other high performance work.

39
votes
5answers
13k views

Any tips for creating cross-platform games? [closed]

Do you have any tips/recommendations when creating a cross-platform game in C/C++?
30
votes
2answers
30k views

A good way to build a game loop in OpenGL

I'm currently beginning to learn OpenGL at school, and I've started making a simple game the other day (on my own, not for school). I'm using freeglut, and am building it in C, so for my game loop I ...
53
votes
12answers
43k views

Is it reasonable to write a game engine in C? [closed]

Even though C++ appears to be king, from what I've been told C is still widely used in games, especially on the consoles. However, would writing an entire game engine in C be unreasonable today? What ...
19
votes
4answers
18k views

Why has the industry switched from C to C++? [closed]

First of all i would like to have a real answer, i'm always trying to get more from various sources and articles, and when I read things like C++ is slow because it has virtual functions and because ...
3
votes
2answers
1k views

Deterministic replay in a modern game

I am doing a study in modern games graphics, and as part of the study it would be really helpful to be able to replay a sequence in the game multiple times. For example, recording a series of inputs ...
8
votes
1answer
6k views

State Machines: State Object versus sequential check: what are the pro/cons?

I dont know much about finite state machine in AI or other game behaviors in game, except this quick tutorial with a Miner: http://www.ai-junkie.com/architecture/state_driven/tut_state1.html which is ...
15
votes
1answer
8k views

How can I tell how much video card memory I'm using?

I want to programmatically determine at runtime how much video card memory is being used by my program. Specifically I'm wondering about how to do it on a Windows machine using OpenGL, but am ...
4
votes
3answers
1k views

Semi Fixed-timestep ported to javascript

In Gaffer's "Fix Your Timestep!" article, the author explains how to free your physics' loop from the paint one. Here is the final code, written in C: ...
11
votes
2answers
529 views

How can I generate a texture that looks like left-over tea leaves?

We are working on a project for iPhone and Windows Phone 7 where we'd like to be able to generate tea leaves at the bottom of a cup. It doesn't have to look photo-realistic, and actually cartoon-y is ...
5
votes
1answer
1k views

Drawing at floating point position

The library I am using (SDL2) only supports drawing to int positions. I am currently storing my objects positions as double, and ...
4
votes
3answers
9k views

What popular/famous games are written in C? [closed]

It is very similar to this question: https://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java Does anyone know of any popular or famous games only written in C?
2
votes
1answer
1k views

Handling variable frame rate in SDL2

i am creating a game with C++ and SDL2 game engine but i noticed this. I used the Vsync option for rendering, so it'll render at 60fps. If i use this game with another monitor, fps are different (for ...
1
vote
1answer
2k views

Translating local to global coordinates in ARToolkit / OpenGL

Ok, so I've tried reading over the other questions and something's just not clicking for me. I am working on an augmented reality application using ARToolkit, however it should just be straight ...