game-development

Is the MVC design pattern used in commercial computer games

Is the MVC design pattern used in commercial computer games? Particularly with regard to high performance games I am curious if there have been any commercial users of MVC in the games industry? ...

Closest point on a path to a point, or: Dear target, sorry I missed you.

For a 2D game I'm working on, I'd like to figure out when a projectile reaches its closest to point to its target. A projectile is a point that moves by a constant dx,dy per frame. A target is another point whose speed relative to the projectile is slow enough as to be considered stationary. I want to have the projectile explode when it...

iPhone Quartz 2d development using C++?

Could I write c++ code that interacts with the iPhone Quartz 2D framework, or can I only using objective-c? Thanks ...

Storing vector XNA Animations

I'm working on XNA C# when I came upon this problem where I need to store easily editable animation data such that my game will be able to render and play it. It's something like this: I have a texture flying across the screen from (0,0) to (800,600) pixels. This will last 5s. How do I represent it in data and also write it such t...

C++ Pac-Man : SDL or Qt ?

Hi everyone, I have to code a Pac-Man clone in C++ for a school project, and I'm hesitating between SDL and Qt for the graphical implementation. I have already a little experience with SDL, but I wanted to give Qt a try. I was asking myself if it is "technically" realisable and if Qt is a good choice for that. I know that it have an an...

How are 3D games so efficient?

There is something I have never understood. How can a great big PC game like GTA IV use 50% of my CPU and run at 60fps while a DX demo of a rotating Teapot @ 60fps uses a whopping 30% ? Thanks ...

Combining subclasses which have different fields for efficiency?

I'm working on a Java Android game. Games here generally need to use memory pools to avoid garbage collection. For the sake of argument, say I have the following classes: // Enemy in the game class Enemy { int x; int y; abstract void update(); } // Enemy that just bounces around class Roamer extends Enemy { int direction; ... } // Enem...

AI: selecting immediate acceleration/rotation to get to a final point

I'm working on a game where on each update of the game loop, the AI is run. During this update, I have the chance to turn the AI-controlled entity and/or make it accelerate in the direction it is facing. I want it to reach a final location (within reasonable range) and at that location have a specific velocity and direction (again it doe...

Design considerations for temporarily transforming a player into an animal in a role playing game

I am working on a role playing game for fun and to practice design patterns. I would like players to be able to transform themselves into different animals. For example, a Druid might be able to shape shift into a cheetah. Right now I'm planning on using the decorator pattern to do this but my question is - how do I make it so that when ...

Game development with Qt: where to look first?

Hi there, So, I'm going to develop my Pac-Man clone with Qt. The problem is that I do not really know where to start. I quickly take a look at the documentation and some demo. I also downloaded some game sources on qt-apps.org. And it seems that there is a lot of ways to develop a game with Qt! In your experience, which part of Qt sho...

Running C# app inside browser as a plugin

I have a small 2D game engine written in C#, using DirectX. Is it possible to somehow run it in a browser as a plugin? Like for example Flash and others, where you go to a site with a game and it will ask you to install a certain plugin and then you can play the game in the browser, with mouse and keyboard input. I have searched around f...

How are game event lengths handled in 2D games

I have an idea of how I want to approach this but i'm not sure if it is ideal. By event I mean for example, if the player wins, a bunch of sparks fly for 1 second. I was thinking of creating my game engine class, then creating a game event base class that has 3 void functions, update, draw, render. There could be for example fireforks fo...

XNA tearing when doing 2D camera transformations

I'm not sure why this is happening. Basically I render my tile map to the screen using a Spritebatch with a matrix transformation, and I get this weird tearing thing happening. Tearing Note that everything looks fine when I render using Matrix.Identity. This is the code that I use to create the Matrix: #region Creating Transfor...

XNA C# 2D Platformer Game

Hey, I'm trying to make (figure out how to..) a 2d platformer in XNA. I know how to create a tile grid and how to perform collision detection. I perform collision detection on the 9 bounding tiles of the player, but I'd like to know if there's a better way to perform collision detection. I've read Braid doesn't use tiles but pieced i...

Options for developing a web-based game

I am currently looking around for some tools for developing games on the webs. I want to avoid Flash because I have seen that many Flash games stutter a lot even on mid-end machines. The good thing is everyone has Flash on their computers, but the performance really hurts a lot. So are there some sort of a Game Engine (or other tool) ...

Engine sounds in racing computer games

Always wanted to know, how these fancy engine sounds come into being. Is it generated on the fly? If so, how do all these little quirks appear there (like intercooler sound)? Or is it pre-recorded, and if so, how does its pitch changes? ...

Issue with code using Interface Options Addon in World of Warcraft

I am writing a UI to a pre-existing addon. Or, more specifically, adding configuration options and trying to take advantage of the Interface Options Addons (IOA) panel. I've been referencing wowwiki, specifically the page that talks about using that panel, but more generally a bunch of pages. I'm running into a problem that I'm sure is ...

Game design in an OO manner

I'm designing a simple game, which uses Java 2D and Newtonian physics. Currently my main "game loop" looks something like: do { for (GameEntity entity : entities) { entity.update(gameContext); } for (Drawable drawable : drawables) { drawable.draw(graphics2d); } } while (gameRunning); When an entity is instructed to u...

What's the most suitable sound/audio framework for iPhone OpenGL-ES games?

I'm making a game for iPhone/iPod. My engine uses OpenGL-ES, and this means game requires some performance. (realtime games, not a static boardgame like games.) I looked at basic sound framework in iPhone, there're several frameworks,(Core Audio, Audio Toolbox, OpenAL...) but I cannot determine differences of them in detail. I think Op...

What content have you made/seen made using procedural techniques

Hey S.O. guys, I was looking at some study i have to do in the future to do with procedural generation techniques and i was wondering what type of content you have: Developed Helped Develop Seen implemented Tried to develop and what methods/techniques/procedures you used to develop it. If you feel generous maybe you can even go into spec...