The C programming language.

learn more… | top users | synonyms

-6
votes
2answers
882 views

Is it possible to use OpenGL purely with C instead of C++?

Is it possible to use OpenGL purely with C instead of C++? I am wanting to make sure there won't be any problems with my using C and not C++. OpenGL does not depend on any C++ libraries right?
4
votes
3answers
808 views

scanline filling a trapezoid

I have computed the four corners of the viewable bit of 2d map in my 3d view. So I know the trapezoid that is visible, and I want to 'visit' these tiles in my map. So my algorithm is basically a ...
2
votes
3answers
4k views

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

It is very similar to this question: Famous games written in Java Does anyone know of any popular or famous games only written in C?
0
votes
2answers
487 views

CubeRealm OpenGL rotation problems, need help. :\

I'm totally new to OpenGL and I'm working on a Sandbox game called CubeRealm. My problem you see is rotation. I've got it in my head that to rotate the 'camera' I just rotate all the scene by the ...
1
vote
3answers
2k views

Walkin on terrain - Opengl

i wanna walk to terrain... first i created the terrain void desenha_terreno(float px, float pz){ for (int z = 0; z < iwidth-1; z++) { glBegin(GL_TRIANGLE_STRIP); for (int x = 0; x < ...
3
votes
3answers
512 views

How to find the bottleneck of the graphical pipeline

I've been wondering about this issue for a while. How to find the bottleneck of the graphical pipeline. Recently I've been using a program to draw massive amount of polygons in a simple scene with ...
3
votes
2answers
3k views

How do games make fire and smoke effects?

I was wondering around, searching internet about particle system and fire effects but I haven't found any good answers. On some games I have realized that some sort of movie is being shown as the ...
1
vote
1answer
358 views

GML and C/C++ language question

Is GML (Game Maker Language) script is clipped in C/C++ language, and GML wrote the code to Visual Studio C++, it will always be correct, because it is just under C++ language features? I think that ...
9
votes
3answers
19k views

Writing Game Engine from scratch with OpenGL [closed]

I want to start writing my game engine from scratch for learning purpose, what is the prerequisites and how to do that, what programming languages and things you recommend me? Also if you have good ...
10
votes
2answers
473 views

Can I call c functions within the XNA framework?

I would like to make a 360 game and was just wondering if I could re-use some existing C code I have or whether I need to re-write everything in C#. Any help is appreciated.
3
votes
1answer
352 views

Is there are a good double-precision small matrix SIMD library for x86?

I'm looking for a SIMD library focused small (4x4) matrix operations for graphics. There's lots of single precision ones out there, but I need to support both single and double precision. I've looked ...
3
votes
1answer
114 views

connecting multiple anti-aliased lines together

I implemented/copied the wu line algorithm from pseudo-code on wiki-pedia and other places. When drawing a sine wave it breaks down at the point where the line changes from y dominant to x dominant ...
3
votes
2answers
1k views

What shall I choose between CoronaSDK or AirPlay?

1st Question is I want to write a board game for iOS and Android so I'm coming up with CoronaSDK and AirPlay. Since I have a mac, development platform is not an issue but the problem is which one ...
2
votes
1answer
364 views

How to refresh allegro textprintf_centre_ex text upon keypress?

I'm trying to print the coordinates of a drawn square upon movement. The problem is that the x value doesn't get refreshed on screen. This is the code I have: #include <allegro.h> BITMAP ...
0
votes
1answer
445 views

Using Tilemaps in C

I have used tilemaps .TMX files using cocos2d and objective c. How are tilemaps used in C? Are there libraries available or where is a good place to start for using tilemaps in C? I would like to ...
4
votes
2answers
4k views

Constant game speed independent of variable FPS in OpenGL with GLUT?

I've been reading Koen Witters detailed article about different game loop solutions but I'm having some problems implementing the last one with GLUT, which is the recommended one. After reading a ...
5
votes
3answers
2k views

OpenGL Vertex Attributes - Normalisation

Alas, I have searched, and have found no definitive answer. When would you normalize the vertex data in OpenGL using the following command: glVertexAttribPointer(index, size, type, normalize, ...
7
votes
7answers
5k views

Library to load images into textures, Linux, C and OpenGl

I am looking for simple, self-contained C library for Linux to load images from files into OpenGL textures. The licence should be quite liberal: zlib, bsd, mit or something. I have found SOIL, however ...
5
votes
2answers
1k views

3D primitive rendering library

I am looking for a library which would easily allow me to render shapes (cubes, spheres, lines, circles, etc.) in 3D3 and OpenGL if possible. I want to be able to rapidly design visual debugging tools ...
19
votes
2answers
13k 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 ...
12
votes
10answers
13k views

Game Development In C Only. Is it possible? [closed]

I am a first year college student in India and want to make a small game as a this semester project. I am quite good at C and am learning it rapidly but I wanted to ask if developing a game entirely ...
5
votes
1answer
3k 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 ...
2
votes
3answers
2k views

Where can I get DirectX headers for Mingw?

I have downloaded the latest Mingw toolchain from mingw.org, but it seems DirectX headers are missing. Where can I get those? I assume there are open source compatibility headers out there, in ...
-1
votes
1answer
763 views

Is quake3/ioquake's OOP good to do a large game?

Everybody heard about the release of the Quake3 source code. But since it's plain C but uses OOP a little, isn't it too complex to decipher or to use for large projects such as a 3rd person ...
1
vote
3answers
1k views

Correct order of rotation and translation

Trying to get this right in openGL: 1) glRotate( cameraRotation ) 2) glTranslate( -cameraPosition ) 3) glRotate( objectRotation ) 4) glTranslate( objectPosition ) 5) Draw Object is that right?
10
votes
2answers
218 views

Should the color of a texture be adjusted for display on a television?

If a 24bit RGB image with a range of 0-255 per channel is displayed on a television that displays a range of approx. 16-235 per channel, color detail will be lost, correct? If so, should images be ...
6
votes
2answers
1k views

How do I build games with scripted actors?

The idea I have an idea for a game. A few games, actually, that can built on top of the same general design. There is a game world that the player and the other actors exist in. The player can get ...
4
votes
6answers
3k views

Any free 2D C\C++ framework that supports iPhone?

I'm looking for a C\C++ game dev framework that supports iPhone. It should have least Objective-C requirement to use it. The closest one I could find is Kanji engine. But that's not free. Other ...
6
votes
6answers
832 views

What is the story of game programmers beside gaming history?

Nowadays, game programming is like a big business-ish, technological, academical, programming havoc. There are dozen of engines, free or not, don't-reinvent-the-wheel dos and don't, plenty of ...
12
votes
1answer
5k 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 ...
2
votes
4answers
1k views

Objective-C to plain c iPhone game performance improvements

I'm testing a 2D OpenGL ES based iPhone game on both the iPhone 3G and the iPhone 4. It runs great on the iPhone 4... and pretty well on the 3G. The game state is updated at 60 Hz... and the ...
6
votes
2answers
1k views

Sending a struct containing a string over network

I'm trying to send structs as neatly sorted packets using iPhone Game Kit.. I have a struct which looks like: typedef struct { int coolStuff; char playerID[100]; } MyStruct; Then I'm using ...
37
votes
12answers
12k 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 ...
7
votes
1answer
2k views

Which c/c++ model animation library for OpenGL [closed]

I'm fairly new to game development, played around with xna before and just learning OpenGL & c now and I'm interested to know which c/c++ based model animation libraries are out there and which ...
33
votes
5answers
5k views

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

Do you have any tips/recommendations when creating a cross-platform game in C/C++?