Design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.

learn more… | top users | synonyms

6
votes
4answers
803 views

Java collections and managing simultaneous operations / concurrency (java.util.ConcurrentModificationException)

Ok, so i have created my first "game" and it uses a lot of java's collections. for example, i have a bunch of monsters in a HashSet which sometimes gives me the fabled ...
6
votes
1answer
411 views

How should I approach architecting a data-driven shoot-em-up?

I'm venturing into Mobile/Tablet based development coming from the world of Web Applications. I want to write a game similar to 1942/43 video game from the 80's: ...similar in the sense that I have ...
4
votes
3answers
651 views

Designing the main classes in a solar system simulation game in C++

If this is not the right place for this question, could you please direct me to a more suitable site/forum? I'm a beginner in game development (and in the use of this site). I've worked with C++ only ...
2
votes
4answers
627 views

How to code the animations of attacks in RPG game

I have an attack class that has the basics like damage and cost and works in the game. Originally I slapped it together to the the ai targeting algorithm so you choose your attack and you see the ...
2
votes
3answers
653 views

Design pattern on class level, how to do separation of concerns through mvc or alike?

Say i had a Monster class public class Monster { } Now this class has a set of properties like int health int speed int weaponDamage which details the core information about the monster. in ...
5
votes
4answers
1k views

Database structure for a trading cards video game (TCG)

Just started and after pondering with registered users' table everything came to a halt. So far I've got: +----------------------+ | tblUsers | +----------------------+ | ...
13
votes
3answers
1k views

Avoiding singleton pattern for Event Scheduler?

I want to make an Event scheduler for my Game, I basically want to be able to schedule the triggering of a Game Event. This can be a one time trigger, or a periodic trigger (trigger event ...
11
votes
3answers
686 views

I want to get rid of my make-everything-static-and-global design pattern, but how?

I'm making a little dungeon crawler in space, and I'd like to hear some advice on how to make the backend of the engine nicer. Basically, currently everything is based on a crapload of managers: ...
2
votes
2answers
2k views

How do I get access to the SpriteBatch service in my Sprite class using XNA?

I have the following Sprite class (leaving out everything that doesn't pertain to my question): public class Sprite { public Texture2D Texture { get; set; } public Vector2 Position { get; ...
5
votes
3answers
4k views

What are some ways to separate game logic from animations and the draw loop?

I have only previously made flash games, using MovieClips and such to separate out my animations from my game logic. Now I am getting into trying my hand at making a game for Android, but the game ...
6
votes
4answers
1k views

How does an Engine like Source process entities?

[background information] On the Source engine (and it's antecessor, goldsrc, quake's) the game objects are divided on two types, world and entities. The world is the map geometry and the entities are ...
6
votes
3answers
562 views

Trophies programming design pattern

What design pattern is best for implementing trophies in a game? I am not a games developer, but is it easy for each player's action to check and update conditions that satisfy 50-100 trophies at any ...
-4
votes
2answers
810 views

Is this design a service locator design pattern?

I was reading what a service locator pattern is from this article, and now I'm just wondering if I merge service and locator classes is it still a service locator pattern or not? And if not, do you ...
3
votes
4answers
233 views

What are windows used for?

I have a very general question: In games, what use does the programming concept of a window have? Or, in other words, why do some game dev libraries offer interfaces through which to create multiple ...
20
votes
2answers
3k views

How to Interpolate between two game states?

What is the best pattern to create a system that all the objects positions to be interpolated between two update states? The update will always run at the same frequency, but I want to be able to ...
2
votes
2answers
362 views

How optimal do you think maintianing states in a sprite class?

Currently i'm working on a sprite system which will have frames which make animations. Usually a sprite contains current position, current frame number to be displayed in the running animation, ...
15
votes
2answers
5k views

Designing a component based game

I'm writing a shooter (like 1942, classic 2D graphics) and I'd like to use a component based approch. So far I thought about the following design: Each game element (airship, projectile, powerup, ...
6
votes
4answers
1k views

MVC or Components, or both?

I'm an experienced developer but recently I've been wanting to get into game programming but as you know game development is an entirely different beast from most other forms of programming (perhaps ...
4
votes
0answers
535 views

MVC? patterns for game development? [duplicate]

Possible Duplicate: MVC-like compartmentalization in games? I am thinking of the best way to structure my project and was thought a MVC style pattern would be appropriate. Would be correct ...
7
votes
2answers
756 views

Capitalizing on JavaScript's prototypal inheritance

JavaScript has a class-free object system in which objects inherit properties directly from other objects. This is really powerful, but it is unfamiliar to classically trained programmers. If you ...
3
votes
3answers
559 views

How to implment the database for event conditions and item bonuses for a browser based game

I am currently creating a browser based game, and was wondering what was the standard approach in making diverse conditions and status bonuses database wise. Currently considering two cases. Event ...
6
votes
3answers
2k views

Multiplayer / Networking options for a 2D game with physics

Summary: My 50% finished 2D sidescroller with Box2D as physics engine should have multiplayer support in the final version. However, the current code is just a singleplayer game. What should I do ...
4
votes
3answers
1k views

Reusable skill class structure

Pretty new to the whole game development scene, but I have experience in other branches of programming. Anyway, I was wondering what methods are used to implement a skill structure. I imagine a skill ...
10
votes
7answers
2k views

Seperation of drawing and logic in games

I'm a developer that's just now starting to mess around with game development. I'm a .Net guy, so I've messed with XNA and am now playing around with Cocos2d for the iPhone. My question really is more ...
7
votes
1answer
413 views

How can I selectively update XNA GameComponents?

I have a small 2D game I'm working on in XNA. So far, I have a player-controlled ship that operates on vector thrust and is terribly fun to spin around in circles. I've implemented this as a ...
9
votes
3answers
2k views

Creating Entity as an aggregation

I recently asked about how to separate entities from their behaviour and the main answer linked to this article: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/ The ultimate concept ...
7
votes
4answers
4k views

Per-Frame Function Calls versus Event Driven Messaging in Game Design

The traditional game design, as I know it, uses polymorphism and virtual functions to update game objects states. In other words, the same set of virtual functions are called in regular(ex: per-frame) ...
4
votes
2answers
819 views

Receiving user commands in a text based console game

I'm working on a little text based console game for a bit of fun and am starting work on the user commands entered into the console. Are there some good design patterns for deciding what to do with ...
5
votes
2answers
483 views

Seperating entities from their actions or behaviours

I'm having a go at creating a very simple text based game and am wondering what the standard design patterns are when it comes to entities (characters, sentient scenery) and the actions those entities ...
4
votes
2answers
804 views

How to play many sounds at once in OpenAL

I'm developing an RTS game and I would like to add sounds to it. My choice has landed on OpenAL. I have plenty of units which from time to time make sounds: fSound.Play(sfx_shoot, location). Sounds ...
0
votes
3answers
787 views

Creating Level iPhone

I am thinking about a new game idea for the iPhone and presumably all the levels would have to be made programatically. So Im wondering what the best method to approach it? Say I have a game with a ...
1
vote
1answer
2k views

Where can I learn 2D game architecture [duplicate]

Possible Duplicate: Good resources for learning about game architecture? I know that game architecture can vary greatly, especially with the type of game being built, but I know that there ...
9
votes
3answers
663 views

What pattern is this, and should I do it?

I'm making a game in as3 using flash develop and flash cs5. Everything is object oriented. I was wondering, should I have one "gateway" class that has a property-reference to all instantiations of ...
18
votes
3answers
2k views

MVC-like compartmentalization in games? [closed]

I was contemplating the design of a game (translating a boardgame to the computer, specifically, which I suppose is relevant in this case) and it occurred to me that it might make sense to build the ...
5
votes
1answer
1k views

2d map: how to manage it?

i'm developing a 2d game (top down), and i'm a beginner. Now, i've to create a map, with object (to interact with) ... I don't know how to .. manage the problem ! Does anyone can help me ? What are ...
9
votes
3answers
754 views

Using “friend” classes in game development

Typically in C++ game development speed is valued over encapsulation, you therefore see a ton of publicly accessible class members which really shouldn't be public. I seem to find in most cases that ...
2
votes
3answers
429 views

Custom Rule-Based System for Action Recognition in a Game

I want to make objects in a side project interatible with each other. For this, I want to be able to create rules so "Collisions" (Interactions) can be recognised by testing the rules. The rules ...
18
votes
6answers
960 views

What are the biggest pitfalls to consider when developing a new game?

I actually just started tracing (thanks David Young for the nomenclature correction) a couple of new web-based games for Facebook a few weeks ago and I have just been inundated with mental blocks and ...
77
votes
9answers
29k views

What are some programming design patterns that are useful in game development? [closed]

I have a few books on Design Patterns, and have read some articles, but cannot intuitively figure out which programming design patterns would be useful in game development. For example, I have a book ...
114
votes
8answers
21k views

Why are MVC & TDD not employed more in game architecture?

I will preface this by saying I haven't looked a huge amount of game source, nor built much in the way of games. But coming from trying to employ 'enterprise' coding practices in web apps, looking at ...
25
votes
7answers
3k views

Do retail games use “inversion of control” and “dependency injection”?

Many of the more diligent software developers I know are moving to inversion of control and dependency injection to handle references to objects. Coming from a Flash games perspective I don't know all ...
3
votes
2answers
308 views

what are the essential things to be looked upon in game design

I've made a couple of games now. Starting from basic hobbyist projects like snake , I advanced into platform based games, board games, turn based games. While doing the latter of these projects I had ...
2
votes
1answer
248 views

Anyone have a source for pictures/screenshots/demos of Mud OLC systems?

I really want to get access to some images of MUD (multi user domain/multi user dungeon) OLC (mud OnLine Creation), to use the structure of npcs/mobs/characters/areas/rooms that muds use on my own ...
11
votes
12answers
2k views

Are there cases where globals/singletons are useful in game development?

I know that having global variables or singleton classes creates cases that can be difficult to test/manage and I have been busted in using those patterns in code but often times you gotta ship. So ...