Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c]

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

2
votes
2answers
925 views

Clutter for game GUI

I'm pretty new to game development, having only written a simple 3d game for a class project, but I'd like to get started on a bigger project. I'm writing an MMORPG to run in both the browser (WebGL) ...
0
votes
2answers
2k views

Is there an alternative to SDL 1.3 for a C++ game that should run on iOS and Android? [closed]

I've used SDL for many desktop games, always as the cross-platform glue for: Creating a window Processing input Rendering images Rendering fonts Playing sounds/music It has never disappointed me at ...
3
votes
1answer
1k views

Procedurally generated 2d terrain for side scroller on Sega Genesis hardware?

I'm working on the Sega Genesis that has a 8mhz Motorola 68000 CPU. Any ideas on how to generate fast and decent 2d tile terrain for a side scroller in real time? The game would generate new columns ...
3
votes
5answers
671 views

Is It More Efficient To Make Games In Languages I Like?

Is it more "efficient" to develop games with languages you're good with and like best rather then the "best" language? For example: I like C# (It's My First Language) and I'm really good at it and ...
2
votes
1answer
249 views

How to alter image pixels of a wild life bird?

Hello so I was hoping someone knew how to move or change color and position actual image pixels and could explain and show the code to do so. I know how to write pixels on a surface or screen-surface ...
1
vote
1answer
198 views

State machine interpreters

I wrote my own state machine tool in C and at this point I'm faced with two choices for specifying state machines. Crafting a little language and writing a interpreter. Writing a compiler for that ...
0
votes
1answer
538 views

Data-driven animations

Say you are using C/SDL for a 2D game project. It's often the case that people use a structure to represent a frame in an animation. The struct consists of an image and how much time the frame is ...
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: ...
-3
votes
1answer
457 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 ...
1
vote
2answers
271 views

How do I write an interface for the keyboard and mouse input?

I have started to develop a simple 3D engine. I use OpenGL for rendering, and it is developed for Windows. It is all written in C. How do I write an interface for the keyboard and mouse input? I ...
10
votes
1answer
3k views

Floating Point Precision (fp:precise vs. fp:fast)

In C or C++, does the compiler option of floating point precision really make a difference in real world (small/indie) games? From my observations, setting fp:fast is many times faster than fp:...
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 ...
5
votes
2answers
375 views

Advice creating build process for medium sized game project

I've been looking through the SCons build script for Doom3 and researching different approaches to build processes used by professional game developers/studios (C/C++) and I've come across a few ...
5
votes
3answers
11k views

Simple 2D Collision Detection Algorithm Library [closed]

I'm building a simple OpenGL game and I was looking for some simple collision detection library for objects like squares, triangles and circles. Any suggestions? PS: Preferably a library that is very ...
3
votes
2answers
9k views

Creating an OpenGL FPS camera: I have the position and orientation vectors, now what?

I have been struggling to create a first person camera in OpenGL ES 2.0 without using gluLookAt(). I grab the camera's orientation vectors (the way it's looking) from the current modelview matrix, and ...
21
votes
4answers
12k views

How much assembly is really used in modern game code? [closed]

On average, how often is assembly used in modern game code? Specifically on platforms that already have good C++ compilers, like x86, PPC, or ARM--because I assume games on embedded systems make ...
0
votes
1answer
776 views

OpenGL 2.1+ Render with data returned form assimp library

I have just read this tutorial about how to load a 3D model file. Its render routine uses a recursive_render function to scan all nodes. My question: What does a <...
-1
votes
1answer
976 views

How to fix OpenGL Co-ordinate System in SFML?

My OpenGL setup is somehow configured to work like so: (-1, 1) (0, 1) (1, 1) (-1, 0) (0, 0) (1, 0) (-1, -1) (0, -1) (1, -1) How do I configure it so that it ...
8
votes
3answers
290 views

What does the Sys_PageIn() function do in Quake?

I've noticed in the initialization process of the original Quake the following function is called. ...
4
votes
1answer
1k views

Fog with Blend in OpenGL

I want to add fog in my scene which contain transparent textures made by Blend , when i enable the fog the transparent textures appear white From a distance but when i disable it the textures ...
3
votes
3answers
1k views

What algorithm can I use to detect simple shapes in a 4x4 matrix?

I'm working on a simple multiplayer game that receives a random 4x4 matrix from a server and extracts a shape from it. For example: ...
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 ...
2
votes
1answer
2k views

Recent mainstream games written in pure C? not C++ what was/is the point? [closed]

Recent meaning the current decade. I had found this post https://gamedev.stackexchange.com/a/15403/6544 wasnt c++ adopted as the industry standard quite some time back. In what sort of situation does ...
4
votes
3answers
2k views

How do I do a game loop in c99?

I'm having trouble with how to structure a game using c99. I've seen a few tutorials on making a game loop, but they are all done with c++ and classes. My main problem seems to be moving data around ...
-4
votes
1answer
609 views

Game programming in C, where do I get started? [closed]

I started programming about 6 months back and have a decent knowledge in how to code in C. I have mainly used it to implement elementary algorithms or solve Project Euler questions (reached 50 now :) )...
3
votes
1answer
257 views

Techniques for benchmarking code running on the Sega Genesis' 68000 CPU?

I'm playing around with writing code for the Sega Genesis, which uses a Motorola 68000. I'm not an assembly code guru by any means so I'm writing in C and using SGDK. As it's slower than assembly, I'd ...
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 ...
2
votes
1answer
1k views

How should I manage multiple entities?

Before I start making a game, I'm trying to figure out how I will manage things. One of the first things I'm not sure about is how to manage entities (enemy, player, projectile...) I'm going to be ...
0
votes
1answer
1k views

glBlendFunc transparency in cocos2d?

GL_ONE, GL_ONE This makes the flamingoes transparent on: http://www.andersriggelsen.dk/glblendfunc.php but not in cocos2d using: sprite.blendFunc = (ccBlendFunc){GL_ONE, GL_ONE} How can I achieve ...
8
votes
1answer
918 views

Processing component pools problem - Entity Subsystem

Architecture description I'm creating (designing) an entity system and I ran into many problems. I'm trying to keep it Data-Oriented and efficient as much as possible. My components are POD ...
2
votes
3answers
2k views

How to save game progress (savefile)

I am currently working on a terminal text game just to practice my skills (C). It will be story driven escape the mansion kind of game. Even though the game will be short I want it to support save ...
0
votes
3answers
201 views

How should I proceed next with my programming skills? [closed]

I am currently studying at University of technology in Brno (Czech Republic). This semester is almost over and I might say I have some knowledge of C. Since I went to this school just for the purpose ...
5
votes
1answer
2k views

Advice for programming a lobby for a network multiplayer game?

I'm working on learning network programming. I'm working on a simple card game. The basic idea is: ...
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 ...
0
votes
2answers
936 views

Ogre3D: customize water demo

On the water demo supplied with Ogre3D's SDK, controls are set to actually control the camera and environment, but not actually the ogre head that generates the disturbances. I tried digging into the ...
8
votes
6answers
965 views

Is it possible to write a game that doesn't require a GPU?

I already know many computers today have a GPU that supports DirectX and OpenGL. But what about computers that don't? Can I write a simple 2D game that does not rely on the GPU, so that it works even ...
2
votes
2answers
767 views

Trying to implement Render to Texture

I'm having trouble implementing render to texture with OpenGL 3. My issue is that after rendering to the frame buffer, it appears the rendered object becomes deformed, which may imply a bad ...
5
votes
3answers
509 views

Video game entity storage and structures

I finally have all the working input/output of a game engine. However, I'd like to be able to put an amount of about 2000 shots being simulated in a region, total. I have done other games where all ...
11
votes
2answers
10k views

What are the best ways to serialize and unserialize network messages for C/C++ multiplayer game?

We are using JSON right now and want to move to a binary format for some types of messages between client and server. Should I just read structs into the socket? Use proticol buffers/thrift? How ...
1
vote
2answers
377 views

Are C and Objective-C sufficient for creating games on the iOS? [closed]

These days, I'm focusing on games development on the iOS. C++ is the lingua franca for games development but seriously, I prefer to code in C programming language, not in C++. So for iOS games ...
-6
votes
2answers
943 views

I want to use Python as a scripting language for my game, can I use it purely with C (not C++)?

I want to use Python as a scripting language for my game, can I use it purely with C (not C++)? It is important to me that I not use C++, and purely use C instead.
-5
votes
3answers
2k 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
2k 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 ...
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?
0
votes
2answers
575 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 ...
3
votes
3answers
4k views

Walkin on terrain - Opengl

i wanna walk to terrain... first i created the terrain ...
3
votes
3answers
2k 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
4k 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 fire,...
1
vote
1answer
1k 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 ...
14
votes
3answers
30k 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 ...