game-development

Trapping the mouse?

I'm using GLUT and developing a FPS game. I need a way to trap the mouse so that the camera continues to move because right now when the mouse position exceeds the monitor limit, there is no way to calculate change in X or change in Y. How can I 'trap' the mouse with GLUT? Thanks ...

How to write an elegant collision handling mechanism?

I'm in a bit of a pickle: say I'm making a simple, 2D, Zelda-like game. When two Objects collide, each should have a resulting action. However, when the main character collides with something, his reaction depends solely on the type of the object with which he collided. If it's a monster, he should bounce back, if it's a wall, nothing sh...

Revisiting the issue of LWJGL vs JOGL for game programming

There exists the question, "Java Game Programming: JOGL vs LWJGL?" but it's not exactly what I'm looking for, and it's over a year old (in which time JOGL has gone through some changes) so I'd like to revisit this issue... I have been studying game development with a focus on Java. I've worked on some little projects with JOGL, but late...

Is there a formula without if/else/switch/? etc that could replace the solution[,] matrix

Is there a formula without if/else/switch/? etc that could replace the solution[,] matrix and what are the implications or differences on performance/efficiency for that? class Program { private static Random r = new Random(); // names of the "moves" private static string[] rps = { "PAPER", "ROCK", "SCISSORS"}; // ...

What are the differences between using pure C with a C compiler and the "C part" of a C++ compiler ?

I'm not sure what programming in C really means: - Programming in pure C with a C compiler or - programming in C with a C++ compiler. Apart from the differences between the C's syntax of C and the C's syntax of C++, can I safely say there are absolutely (or in very few cases) no differences between two executables in terms of performanc...

"Realistic" collision in pong

I want to write a pong in C# and XNA with friction and bounce. I tried to implement the collision as described by Garet Rees in a previous question. Here is the basic algorithm I use for pong: Seperate the colliding objects so that they are no longer colliding. Get the surface normal for collision response. Compute the new velocity - ...

Collision detection between two general hexahedrons

I have 2 six faced solids. The only guarantee is that they each have 8 vertex3f's (verticies with x,y and z components). Given this, how can I find out if these are colliding? ...

Simulations and The Entity Framework

I'm coming from a background developing business applications so am used to MVC/n-Tier development. Most of my applications have an architecture something like this: GUI -> BL (which deals with entities) -> DAL (SQL DB) Now, I'd like to write something which is a cross between an interactive story and a simulation - There is a persis...

Handler class and the timing of when its message queue is emptied

I was curious about the nature of the handleMessage() and sendMessage() behavior of the Handler class. I want to be able to send message to another thread in such a way that the destination thread can process the message queue when it wants to. It seems, however, that the message is processed by handleMessage() practically as soon as it'...

Roulette Wheel C#

Hi, I'd like to create a game with some kind of a Roulette Wheel with C#. I have no relevant experience in GUI. The first thing that comes to my mind when I want to develop such Roulette Wheel, is silver light but I prefer to implement it in a winform (unless you think otherwise). If you can give me some ideas were to start... 1. How...

Collision detection between 2 rotated cubes

Possible Duplicate: Collision detection between two general hexahedrons Right now I do collision detection by finding the min and max and doing bounding box check. Unfortunately, my player cube rotates with the camera and this makes for some annoying results when the player is at a 45 degree angle. The constraints are that eac...

Collision detection between a capped cylinder and an AABB?

I'm making a game where the player is an upright capped cylinder, and the world is axis aligned bounding boxes. Given this, how could I check if the cylinder is intersecting a box? Thanks ...

A simple iphone game like papi jump tutorial

Not trying to beg off anyone but if someone did happen to have a simple game tutorial for iphone and xcode would they be so kind as to post it here? ...

Where should I go after learning C++?

I'm in high school and taking a class where basically we design our own course and choose what we learn. I've chosen to learn about C++ and game programming. I'd like to learn as much about using C++ with OpenGL or DirectX or some other API as I can. After I finish learning C++ where should I go? Can you recommend a book on game prog...

IP Hook through java

Hey guy's I'm an intermediate programmer looking to learn more. I'm trying to figure out the basic idea about IP Hooking. I'm trying to make a program similar to what the hosts file does in windows but for one specific program. How would I go about doing this? I want to implement it to a website ...

First Java Game: Ideas & Tips

I started learning java last week. ( I took one C class last year.) Now I need to create/code a simple game. Here are the directions, followed by my questions: You get to decide what kind of role-playing game you wish to have. It must either be a top-down view game, or a side-scroller game. The player is to do something: kill things,...

Cocos2D game element design

Hey Guys, My question is as easy as that: What is the best method to create character for example in Cocos2D? Here's an example: I want to create an enemy of my "Ninja". The enemy has a strength of 0.5 and a speed of 50. How would you implement this? A subclass of CCSprite or CCLayer or something completely different? I tried with...

Adding distant fog with OpenGL?

I', using GL_FOG, but it really only fogs up my geometry, I would like a way for the fog to feel like it encumbers an area, not just fog up my geometry, sort of like a box of fog... Is there a way to do this? Or possibly another way to give a smooth draw distance transition? Thanks ...

Calculate correct sprite direction image in bird's view game? (Math here might be speed vector to degrees angle?)

Background: I have 8 images for every sprite in my bird's view JavaScript game, representing top, top-right, right, right-bottom etc., depending on the player's space ship speed. Question: Given the values sprite.speed.x and sprite.speed.y (which could be something like 4 and -2.5, or 2 and 0 for instance), how do I get the correct angl...

how to change game into pause mode when message received(j2me game)

Hi... I am developing a mobile game in j2me and i am using mobile nokia 6300. In game canvas i used hideNotify() to change game into pause mode when external and internal events occurs. But when sms received ,its doesn't change to pause mode and game will continue. Any idea to handle message event in j2me. ...