game-development

How do I use random numbers in C#?

I'm working on Pong in C# w/ XNA. I want to use a random number (within a range) to determine things such as whether or not the ball rebounds straight, or at an angle, and how fast the ball moves when it hits a paddle. I want to know how to implement it. ...

Matrix Transformation Problem - Z Axis Rotation is Skewing

For a simple 2d game I'm making I'm trying to rotate sprites around the z axis using matrices. I'm clearly doing something wrong as when I attempt to rotate my sprite it looks like it's being rotated around the screen origin (bottom, left) and not the sprite origin. I'm confused as my quad is at the origin already so I didn't think I nee...

Creating sudoku initial boards

Is there an algorithm or way I can get initial state sudoku puzzles for a sudoku game. Preferably with the ability to have different levels of difficulty? ...

An MMORPG using AJAX...

Hi. I want to start making an MMORPG which would run on the browser using JavaScript, AJAX and / or PHP. Of course it will use MySQL as storage for the user's data (position, items, etc.). It needs to be tile-based wherein users click on a tile in the map and their character proceeds to that tile. It can be isometric or not. So long as i...

How do I get a consistent speed on new as well as old iPhones?

I'm in the process of creating a 2D game in OpenGL ES for the iPhone. I'm calling my game loop using NSTimer at an interval of 0.002 (60 fps) with repeats set to 'NO' (I'm running the NSTimer again from within the function as recommended): -(void)gameLoop:(id)sender { double currTime=(double)CACurrentMediaTime(); m_FPS_framesTh...

Information on implementing game multiplayer?

I'm building a game and I'm looking for a good way to implement multiplayer. It is a sandbox game with Box2D physics. I was thinking of making it so the client only sends input to the server and receives which sprites to draw and where. Would this be a good idea? What might be ideal for a game with Physics like this? Thanks ...

Unreal Development Kit equivalent for Mac?

I wanted to start learning/using UDK but its not mac compatible... Can anyone suggest other engines that are similar to UDK (2d is good too) and run on a mac. Thanks! ...

Can XNA DrawableGameComponents be drawn before SpriteBatch draw calls so that sprites are drawn on top of DrawableGameComponents?

I would like some 2D sprites to occlude some 3D DrawableGameComponents. For a simplified example, a pause menu (implemented as a 2D sprite) should be drawn on top of a paused space ship (implemented as 3D game component). The XNA framework automatically calls Draw methods of classes from Microsoft.Xna.Framework.Game and Microsoft.Xna.Fr...

Time delays and Model View Controller

I am implementing a turn based game, there are two sides and each side has several units, at each specific moment only one unit can move across the board. Since only one unit can move at a time, after i figure out where it should go, as far as the simulation is concerned it Can instantly be teleported there, but playing the game you wou...

Free motion backgrounds (simple and light)

My son, a ten year old, has started working with Scratch. He has made a car driving scene with my help. In the process the first thing he learned was that not the object (the car), but the background should move. From there we got to the notion of background loops for continues playback. I want to keep the fun parts in balance with the l...

3d race game collision detection

Can somebody explain how the collision detection works for race tracks in games like need for speed or wipeout? ...

XNA Fighting Game Style Animation Looping Problem

I've been working on this for quite some time looking for solutions in various places. I've used Nick Gravelyn's style of storing animations into a text file and am simply incrementing an index to change frames. The trouble I'm having is looping an animation once and only once, but for some reason the way that I know should work isn't wo...

Algorithm to generate outline of an alpha picture?

I'm trying to figure out an algorithm which can look at raw rgba pixels and return points that make up the polygon of the object inside example: http://img706.imageshack.us/i/polii.png// It doesn't have to return bezier curves or anything smooth or fancy, nor a connected outline as I showed, but basically the points to build such an ou...

How are software requirements handled in game development?

When I think about software requirements, the first thing that springs to my mind is a group requesting an application with x number of features and functionalities, while the requirements analyst(s) try to organize this influx of ideas, miscommunications, etc. into a stable and non-contradictory system. How does this apply to game deve...

Turn a panel into a circle in C# Visual Studio 2010

Hi I'm trying to make a basic soccer game in C#, and ive almost completed the field except for the various arcs and circles that are fairly important in the game, especially to set the bounds the computer's players cannot pass while their teammate/opponent is lining up for the kick. So, all the methods I've tried havent worked because a...

Commandos-style Line of Sight algorithm

Hi, Could you please point me to an article on a Line of Sight RENDERING algorithm? I'm looking for something similar to the one used in the Commandos series of games (by Pyro Studios). The Line of Sight cone/triangle must be rendered (in a top down view) with appropriate shadows caused by obstructions. Thanks ...

How to create isometry imitation in 2d Racing game?

How can I modify 2d racing game to seem like isometry? Flash + ActionScript3 ScreeShot The game is totally in 2d. Car moves like it should and while it drives the ground everything is fine. I've added a grey ramp. Now the car should move like the arrows are showing, creating illusion of a 3d (isometry). Ramp is divided in 3 sectors ...

What's the difference between a Web Server and a Game Server?

I'd like to build a turn-based, multiplayer iPhone game that will require a game server somewhere to connect the players and dish out the world state data. I'm trying to understand how the game server will work so I can begin designing and building it. Up until now, I only have experience with building web applications and so naturally...

splice Object into nested Array code error

I am trying to replace an Object inside my nested array (colArray) by using splice, the object acts as my player and will need to maneuver around the Array it's in. The Problem is splice doesn't appear to be showing anything in return, it comes up with an error saying: Cannot access a property or method of a null object reference. Wha...

Projectile hit coordinates at the apex of its path

Hi, I have a projectile that I would like to pass through specific coordinates at the apex of its path. I have been using a superb equation that giogadi outlined here, by plugging in the velocity values it produces into chipmunk's cpBodyApplyImpulse function. The equation has one drawback that I haven't been able to figure out. It onl...