game-development

C++ Game - Signalling a parent class, circular dependency issue

I'm having a little circular-dependency problem. It works fine, but it makes for ugly-seeming code. It's in the context of a Snake game. I have a class, Snake, which contains a vector of SnakeSegments, and manages their interaction (for instance moving and growing as a unit, rather than as separate entities). When a SnakeSegment collid...

Which AI books/material would you recommend?

I've always found artificial intelligence interesting, and took a uni course in basic AI; the final project was to write a C++ program which solved Sokoban puzzles. This has motivated me to study AI further. I am therefore interested in which AI books or material you would recommend? I'm particularly interested in game AI, but am also i...

Objects that defy gravity but collide with others in Box2D. How?

Hello, newbie to iPhone game development and Box2D here. I'm developing a game in which I can move (drag) otherwise stationary objects that can collide with other objects. How do I make these objects stationary in a Box2D world with gravity while maintaining their ability to collide with dynamic bodies? One random thought is to exert ...

Pick random messages from a .txt file or a PHP page which contains the messages in a variables, and post them to another page

Hello, I'm creating a humble web browser-game in PHP. I'm making a "robbery" section... I want to greet the user if he succeeds at a robbery. Some messages like "You're the man!", "A piece of cake, it was" etc. I want more than, like, 5 different messages/notifications like this. How could I do this? how could I pick them from a .txt f...

Silverlight Facebook client.

As my final project I wanted to do client for Facebook and twitter using the API's available. But there is not much tutorial or guidance available for me to start this project. And the other idea was to build a Game in Silverlight, which have more tutorials and info on it. I would prefer to do social media client,but if enough help is th...

Measuring time difference between networked devices

I'm adding networked multiplayer to a game I've made. When the server sends an update packet to the client, I include a timestamp so that the client knows exactly when that information is valid. However, the server computer and the client computer might have their clocks set to different times (maybe even just a few seconds difference), ...

What's wrong with this XNA RotateVector2 function?

Hi, I know this is probably a very simple question, but I can't seem to figure it out. First of all, I want to specify that I did look over Google and SO for half an hour or so without finding the answer to my question(yes, I am serious). Basically, I want to rotate a Vector2 around a point(which, in my case, is always the (0, 0) vecto...

Threads for peer to peer communication

I am trying to make a multi-player network game. Each player is represented by a rectangle on the screen. I am using OpenGL for the graphics and also the user input (commands like MOVE-LEFT, MOVE-RIGHT etc ) will be handled by it (or GLUT or sumthing). I have the following architecture for the game. There are 4 players(nodes) in the g...

What programs were used to make this flash game?

the url is probably NSFW the game: http://www.tsbmag.com/booty-call-episode-1/ Could this game be created 100% in flash? If not, what programs could be used to provide this style of graphics and animation ...

Is it possible to write (a*b)+(c*d) in a way that doesn't use order of operations?

Alright, so warsow has some pretty excellent hud code with the exception that the math logic is a bit screwy. Input: a*b + c*d Interpreted as: ((d*c) + b) * a As you can see, the game does a series of operations in reverse order without regard to order of operations. Parentheses do not work in the hud code. It must be a linear ser...

Looking for an algorithm to generate a flat 2D map

I'm not sure if "traditional" random noise-based height-map generation is what I need, because what I want to end up with is a very simple map consisting of two types of region. The end result I want is some very simple geometry dividing 'land' areas from 'sea' areas, and determining if a point is wet or dry. Ideally it should all be p...

Looking for a suitable data structure for manipulating player stats in a game

I'm planning to store player stats in a database for a game, and need to find a suitable data structure for testing against them in the code. The structure needs to work well in php, but I'm interested in any ideas for learning purposes. In this first iteration of pseudo-code, I'm imagining multi-dimensional arrays for the data-structu...

Objective-c -> iphone design: delayed action

Hello! Sorry to bother, but I am in a bit of a pickle and I was wondering if anyone here could give me a hand. I am currently designing a game in which enemies appear on the left side of the screen (out of boundaries) and move to the right. I have used a number of codes (this is using Sparrow Framework) and pretty much the number of ...

Objective-c -> class method to main file query

Hi! Sorry to bug twice so quickly, but since people were so kind in their informative responces, I figured it couldnt hurt to ask another question. The same program i tried to make it rather swanky and have a main screen which allows you to click on a button which leads to a limited options screen. This lets you switch the music on ...

How to make the player slide smoothly against terrain in a game?

I'm making an isometric game. When the player tries to walk diagonally into a wall I want them to slide smoothly across it, so whatever portion of the movement would be legal is used, and anything in the direction of the normal is thrown away. Walls can be any angle, not just vertical or horizontal, and the player has 360 motion. I fe...

Android calling GLUtils.texImage2D within onDrawFrame very slow...

We are building a scrollable background, and currently have one large background image that we split up into 512x512 tiles, and want to load these tiles as they are needed, instead of all at once, when calling GLUtils.texImage2D within onDrawFrame, we have noticeable lag we think because of having to load the texture onto the hardware, i...

Algorithms used in game programming

What are the most frequently used algorithms in game programming? I guess some will be about graphs (traversals, minimal paths and so on), some about geometry (drawing circles, finding intersections of figures). It would be nice if someone with experience write down his thoughts about it. ...

Continuous circle-point collision detection and response still allows intersections

I'm developing a game where I need to do collision detection between a mobile circle and a stationary point. I am using a continuous method. I detect if the circle will hit the point before moving it, get the time of intersection, move the circle, then give the circle a new velocity vector. In my case, the new vector pushes the circle...

Does this game have a solution

Hi, I am developing a simple game using Java swing. I want to know whether this particular game has a solution in the following scenario. If I am convinced that theoretically a solution cannot be arrived at this point, I will throw a notification to the user. 3x3 4x4 The objective of this game is to fill numbers from 1 to 8 (or 1 t...

Networking problems in games

I am looking for networking designs and tricks specific to games. I know about a few problems and I have some partial solutions to some of them but there can be problems I can't see yet. I think there is no definite answer to this but I will accept an answer I really like. I can think of 4 categories of problems. Bad network The messag...