Engine-design related questions. How code is structured.

learn more… | top users | synonyms (2)

10
votes
3answers
784 views

How do I make complex AI manageable? [closed]

In the past, I've used simple systems like finite state machines (FSMs) and hierarchical FSMs to control AI behavior. This pattern falls apart very quickly or any complex system. I've heard about ...
6
votes
4answers
4k views

Why has the industry switched from C to C++?

First of all i would like to have a real answer, i'm always trying to get more from various sources and articles, and when I read things like C++ is slow because it has virtual functions and because ...
10
votes
11answers
1k views

How to model multiple “uses” (e.g. weapon) for usable-inventory/object/items (e.g. katana) within a relational database

So I'm working on expanding the uses of items over at www.ninjawars.net, and I'm not exactly sure how to represent them flexibly in the relational database that we use. I may be barking up the wrong ...
7
votes
1answer
463 views

Global keyboard states

I have following idea about processing keyboard input. We capture input in "main" Game class like this: protected override void Update(GameTime gameTime) { this.CurrentKeyboardState = ...
7
votes
3answers
2k views

Role of an entity state in a component based system?

Component-based entity systems are all the rage these days; everyone seems to agree they are the way to go, but no one really has a definitive implementation of such a system. I was wondering, what ...
2
votes
3answers
2k views

How do I code a 2D tile map? [closed]

I'm new to game development and I want to know how to create a tile map. The map should be divided into squares, such that each square represents a location like x : 10, y : 10. The width and height ...
10
votes
3answers
7k views

Best solution for multiplayer realtime Android game

I plan to make multiplayer realtime game for Android (2-8 players), and I consider, which solution for multiplayer organization is the best: Make server on PC, and client on mobile, all communition ...
4
votes
2answers
2k views

Use a SQL Database for a Desktop Game

Developing a Game Engine I am planning a computer game and its engine. There will be a 3 dimensional world with first person view and it will be single player for now. The programming language is C++ ...
-1
votes
3answers
2k views

C++ GameState management

I have been attempting to make a game engine in C++ and have come across the dilemma of game state management. I have done a lot of research and found numerous ways of accomplishing from game engine ...
1
vote
2answers
155 views

How do I separate model positions from view positions in MVC?

Using MVC in games (as opposed to web apps) always confuses me when it comes to the view. How am I supposed to keep the model agnostic of how the view is presenting things? I always end up giving ...
1
vote
2answers
505 views

3D game: is a spatial index necessary?

I'm working on a 3D space simulation game in C++. I've read that in many cases games use spatial indexing (hashing) that allows to quickly detect collisions, find out what entities to draw and so ...
21
votes
4answers
9k views

How to design a game engine in an object-oriented language? [closed]

Whenever I try and write a game in any object-oriented language, the first problem I always face (after thinking about what kind of game to write) is how to design the engine. Even if I'm using ...
20
votes
4answers
2k views

How to design a game's software such that it is easy to unit test?

Is it practical to use a testing framework like JUnit in a game development situation? What sort of design considerations can you follow in order to make your game more testable? What parts of a game ...
18
votes
4answers
3k views

How to design an AssetManager?

What is the best approach to designing an AssestManager that will hold references to graphics, sounds, etc. of a game? Should these assets be stored in a key/value Map pair? I.e. I ask for ...
17
votes
5answers
3k views

noSQL - Is it a valid option for web based game? [closed]

Out of an opportunity and boredom, a friend and I decided to make a web based game. This is the first 'game' I will be making, since usually I program web apps in django. I've opted to use the same ...
11
votes
2answers
2k views

Is this the right architecture for our MMORPG mobile game?

These days I am trying to design architecture of a new MMORPG mobile game for my company. This game is similar to Mafia Wars, iMobsters, or RISK. Basic idea is to prepare an army to battle your ...
6
votes
4answers
3k views

Entity System and rendering

Okey, what I know so far; The entity contains a component(data-storage) which holds information like; - Texture/sprite - Shader - etc And then I have a renderer system which draws all this. But ...
8
votes
3answers
737 views

Grouping entities of the same component template to linear containers

EDIT: Looks like people are actually doing this! http://www.randygaul.net/2013/05/20/component-based-engine-design/ Another example of using this data accesing pattern. I've done a lot of research ...
7
votes
4answers
2k views

Game Messaging System Design

I'm making a simple game, and have decided to try to implement a messaging system. The system basically looks like this: Entity generates message -> message is posted to global message queue -> ...
20
votes
6answers
3k views

Is Test Driven Development viable in game development?

As being Scrum certified, I tend to prone for Agile methodologies while developping a system, and even use some canvas from the Scrum framework to manage my day-to-day work. Besides, I am wondering ...
15
votes
2answers
1k views

Where should collision detection logic be placed?

I am developing a small 2D game engine. The characters have a paint method which currently does the following: Calculate the new position of the character as per its speed, etc. Update the collision ...
8
votes
2answers
4k views

How to structure a simple game server for a multiplayer game?

I would like to create a simple multiplayer game server for a simple game: The game is supposed to be similar to Command & Conquer, you have a few tanks and a few soldiers. You can select one ...
7
votes
2answers
3k views

How to structure game states in an entity/component-based system

I'm making a game designed with the entity-component paradigm that uses systems to communicate between components as explained here. I've reached the point in my development that I need to add game ...
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) ...
16
votes
4answers
1k views

Game engine: a decent way, architecture-wise, to implement scripting support?

I am developing a simple game engine (in C#, if it matters), and I can't think of a decent enough way to implement scripting in terms of architecture. It's a simple turn-based strategy with custom, ...
15
votes
3answers
4k views

Finite state machine in C++

So, I've read a lot about using FSMs to do game state management, things like what an FSM is, and using a stack or set of states for building one. I've gone through all that. But I'm stuck at writing ...
11
votes
3answers
12k views

MVC (Model-View-Controller) Game Engine Architecture - Yes or No?

I am reading one great book, Game Coding Complete (http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&qid=1295978774&sr=8-1), and that book strongly ...
9
votes
1answer
894 views

Am I on the right track with this component architecture?

I've recently decided to revamp my game architecture to get rid of deep class hierarchies and replace them with configurable components. The first hierarchy I'm replacing is the Item hierarchy and I ...
9
votes
1answer
2k views

Separating physics and game logic from UI code

I'm working on a simple block-based puzzle game. The game play consists pretty much of moving blocks around in the game area, so it's a trivial physics simulation. My implementation, however, is in ...
8
votes
3answers
622 views

How often to update a Game Client about the World?

Using socket.io, I have a communication similar to that of other MMORPGs, a steady connection with messages. In my design so far, the client sends the player's position and animation frame with every ...
6
votes
1answer
2k views

Developing a card game framework

What sort of design patterns and ideas might one use to build a somewhat general purpose card game framework? This stems from I made an attempt to build a clone of the popular Steve Jackson game ...
5
votes
2answers
1k views

Should I use inheritance or composition for modelling game objects?

In terms of game engine modeling, please give your pros and cons for two types of interfacing: class MySceneObject_Model1 : public IRenderable, public IScriptable, public IAnimatable { ... } class ...
5
votes
6answers
2k views

How to implement a component based system for items in a web game

Reading several other questions and answers on using a component based system to define items I want to use one for the items and spells in a web game written in PHP. I'm just stuck on the ...
3
votes
2answers
250 views

How to implement special weapon and armor effects (ex: vampiric, holy, damage shield, thorns)?

I'm working on the inventory system for my game, and am interested in how do I implement additional weapon and armor properties that are not just damage or armor? If all I have is damage and armor, ...
16
votes
5answers
871 views

Dictionary of common names for code objects [closed]

I'm looking for a common dictionary of terms (much like design patterns have a common language for how things interact) that are specific to games. For instance, if I'm making a game of pong with a ...
15
votes
5answers
954 views

Game actions that take multiple frames to complete

I've never really done much game programming before, pretty straightforward question. Imagine I'm building a Tetris game, with the main loop looking something like this. for every frame handle ...
10
votes
5answers
3k views

How to properly handle collision in a component-based game?

Trying to wrap my head around the ways to properly handle collision in a game designed around components. I see many examples have some sort of PhysicsComponent that gets added to the entity's list ...
8
votes
2answers
861 views

How to manage all the NPC/AI objects on the server?

I'm writing a simple MMO, and currently have the the server-client architecture in place for multiple users to see each other and be able to move around together...now its time to add enemies. Was ...
8
votes
2answers
3k views

Information on seamless MMO server architecture

I'm looking for any material on seamless MMO servers! I do have a few articles in the "Massively Multiplayer Game Development" books and "Game Programming Gems 5." Has anyone experience on that topic ...
8
votes
5answers
1k views

Why use asset manifest files?

Sometimes you'll see people recommend that rather than using graphics/sound files/etc. like this... // Game code Image myImage = new Image("path/to/image.png"); ... you should use a manifest file ...
7
votes
3answers
445 views

Profiling and containing memory per system

I have been interesting in profiling and keeping a managed memory pool for each subsystem, so I could get statistic on how much memory was being used in something such as sounds or graphics. However, ...
6
votes
2answers
2k views

MMO architecture - Highly Scalable with Reporting capabilities

A friend of mine is asking me to help out on a project of his, I have done a small amount of game development before, but mainly do application and enterprise development these days. He is asking me ...
5
votes
2answers
1k views

Component based game engine and dependencies - singletons [closed]

I am thinking about how to create component based game engine. I understand that all things should be very similar as in Data Oriented Design (each object is a collection of various structures as ...
4
votes
2answers
767 views

How do I store Items in MySQL?

I'm working to my first game containing items (built a small one before, strategy type but not very complicated). I was thinking something like this for the db design since it will be almost the same ...
13
votes
2answers
701 views

How should I check if a player has completed an achievement?

I'm making an MMO game and I just got to a point where I need to implement achievements... How do I do that? The most straight forward thing to do would be to run this once every 100ms,: for a in ...
7
votes
2answers
2k views

Book about Entity System?

I'm really interested about the capabilities of Entity System. I'm trying to search for a good book on this one, but failed. I don't want to get lost on learning this paradigm so a book will be a big ...
4
votes
3answers
2k views

Player sprite animation in 2D platform game

It's pretty easy to get animations rolling from a sprite sheet. Though which ways there are on combining the animations with player dynamics and motion? I've figured there's two starting points ...
9
votes
2answers
534 views

What role does developing with events have in games?

Most application development is based around developing with events, but considering the game-loop style of developing games and the (often) need for high performance/throughput, what role does ...
8
votes
4answers
953 views

“Time Control” in a 2d Platformer

I am making a 2d platformer where the player can press a button, and restart the level, only their previous character will also run the level at the same time, like they are traveling back in time. I ...
6
votes
4answers
266 views

Should references between assets be handled by name or ID or something else?

How should content or asset items be referenced in their serialized form? For example, a material might need to reference several textures. The simplest way would be to use a path, relative to the ...