game-development

Why don't large programs (such as games) use loads of different threads?

I don't know how commercial games work inside very much, but the open source games I have come across don't seem to be massively into threading. Same goes for most other desktop applications, normally two or three threads seem to be used (eg program logic and GUI updates). Why don't games have many threads? Eg separate threads for physi...

How to calculate bounce angle?

I played around with it for a while, but i simply cant figure it out. I made a tank that fires missiles, and when the missiles hit the walls, i want them to bounce off, but i want them to bounce off to the right angle. Right now i havent got any obstacles, the missiles just bounce off when they get outside the viewportRectangle i made....

PyGame not receiving events when 3+ keys are pressed at the same time...

I am developing a simple game in PyGame... A rocket ship flying around and shooting stuff. Question: Why does pygame stop emitting keyboard events when too may keys are pressed at once? About the Key Handling: The program has a number of variables like KEYSTATE_FIRE, KEYSTATE_TURNLEFT, etc... When a KEYDOWN event is handled, it ...

XNA: Which single book should a beginner start with?

I have tried searching for a similar post on SO, but apparently only found posts that suggest following online tutorials, and I'm ok with that. But I'm big on reading, and prefer having a book in my hand, even for referential purposes. Searching on amazon returns about 4 pages of books related to XNA Game Programming. I am very new to...

Any documentation out there about OCAML Sdl?

hi everyone, am developing a small game (worms), and am using OCAML Sdl for that, actually i didn't find any documentation out there about it, so i have three questions: I want to use ocaml sdl under windows, so anyone can help how can I compile it, (I already gave up and installed linux on a virtual pc) Is there any documentation on h...

XNA, direct X , OpenGL

Hi, I have been wanting to give game programming ago for a long while and never got round to it, and i have finally decided to give it ago. I have decided to try and create a simple to 2D platform game. I have had a quick play with XNA and I do like it. What i am looking for tho is a comparison between XNA,directx,OpenGL. mainly the stre...

Game messaging on mobile platforms?

Does anyone have recommendations on messaging for multi player games on mobile platforms? I assume SMS would be too expensive for the average player. I'm not talking about lots of real-time messages, but simply one message per player per round to all other players. Is there any available messaging that is cross platform (say, windows m...

Links for simple game algorithms

I was reading that question and I remember of the Wikipedia list of algorithms. I know that Wikipedia have a list of Open Source games too, but what I want is a links for simple game algorithms, even if written in pseudocode. As "simple" games, I mean games like Sudoku, Bejeweled, Solitaire, Minesweeper, Labyrinth, Snakes, Gorilla, Che...

How can I stop a Java while loop from eating >50% of my CPU!?

Okay, I tested this on an empty program, and just having a while(true){} running gave me >50% on my CPU. I have a game I'm working on that uses a while loop as it's main loop, and it's CPU is at 100 all the time. How can I get Java to repeat something over and over without eating up >50% of my CPU just to do the repeating? ...

How to embed a mini-console within a Java app?

Hey all, I'm making a small game in Java and would like to add a Quake 3 style of console to the game, that supposed to appear when toggled. Is there any implementation or any similar embedded console you folks know of? Otherwise, what would be a good way to go about it? Right now, I simply have a TextArea on top of a TextField. J...

How can I find the arctan of a right triangle using only the hypotenuse?

Okay, so I need to make C go the shortest path from A to B. A to B is the hypotenuse of my right triangle, and I need to give C the arctan of said triangle. How do I do this, and does the formula have a name? ...

Gameloop for j2me "turn-based" game

Edit: This makes alot more sense to me now that i've taken a step away from the code, thanks for the help. Just found stack overflow the other day through Coding Horror and it looks awesome. Figure that i'd ask the community about a problem i'm currently trying to work out. I'm developing a roguelike sortof game using j2me for midp 2....

iPhone SDK: disabling cllipping for UIScrollView

Hi, I'm working on an iPhone game, and trying to use a UIScrollView to display some icons, which I then want to enable the user to drag off the bar being scrolled, onto another view (basically, dragging them from their hand into play on the game board). The problem is that the UIScrollView clips everything outside it's own bounds. Her...

Can one make real games with XNA and C#?

Can XNA and C# be used to create commercially feasible PC/XBOX games? Is it the best approach for creating 3D games with C#? If not, what would be? ...

What is a good scripting language to integrate into high-performance applications?

I'm a game's developer and am currently in the processing of writing a cross-platform, multi-threaded engine for our company. Arguably, one of the most powerful tools in a game engine is its scripting system, hence I'm on the hunt for a new scripting language to integrate into our engine (currently using a relatively basic in-house engin...

How do I prevent Core Animation blocking my main thread?

I'm aware of the fact that Core Animation dispatches its animations in a seperate thread, as stated in the documentation. Nevertheless, my animations seem to be blocking my main thread. All animations start and finnish. (With or without kCATransactionDisableActions set as true.) but become jumpy and the main runloop stalls. What am I do...

Good asynchronous TCP based protocol for non-realtime games?

I'm developing open source cross-platform platform for non-realtime multiplayer chat/game system. Like card games, boardgames, turn-based, etc. Servers are spawned server-side (not from users computer). Client has these game modules or downloads game module and then runs them. I've come to conclusion that best protocol is "IRC-like". S...

How feasible would a completely/semi autonomous P2P network for multiplayer games be?

I've been mulling over how one would go about creating a P2P system (like BitTorrent is for files) for playing multiplayer games. The idea is to remove the traditional server from the multiplayer architecture. I understand that some sort of server may be necessary for initiating the communications and sending world updates etc, but I'm i...

How mature is SDL for iPhone?

For a while I've been thinking of trying to do a port of one of my favorite classic PC games, The Ur-Quan Masters (aka Star Control 2) to the iPhone. UQM uses SDL for all its graphics, sound, input and other gamey stuff and there does seem to be a port of SDL to iPhone but it doesn't look very mature at this point. Has anyone put the iP...

Memory modifying in C++

im trying to learn to modify games in C++ not the game just the memory its using to get ammo whatnot so can someone point me to books ...