Engine-design related questions. How code is structured.

learn more… | top users | synonyms (2)

2
votes
2answers
410 views

handling errors in a framework

I'm writing a D3D11 framework and I'm trying to clean it up a little, and I'm unsure how to handle errors and return codes in my classes/code. What is the "best" and cleanest way to implement error ...
1
vote
2answers
527 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 ...
12
votes
2answers
3k views

Inheritance vs Composition

I make my money in C# Generally in that language I like to decouple everything to the high heavens using interfaces. This has served me well in enterprise code but in writing games in C# I find myself ...
-1
votes
1answer
550 views

Want to develop my own primitive physics engine, don't know how to start with its high-level architecture. Suggestions? [closed]

Few years ago I tried to make a simple 3D game - billiards. Completed like 50%, stuck with physics. Basically, I only need to calculate balls rolling over flat surface, but it would be nice to make ...
4
votes
3answers
684 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 ...
1
vote
3answers
1k views

XNA Entity Component Design: Lost on how to include Sprite Animation

I've been reading about Entity Component design and thought it's pretty neat. I've been trying to write a quick 2D engine in XNA. I think I've laid the proper groundwork for registering and updating ...
-1
votes
1answer
285 views

What engines and tools do high end games use?

First of all, I am a beginner developer so please don't get me wrong. I just want to know what programs do high end games use. By high end I mean games that me and you would buy, say Splinter Cell, ...
2
votes
3answers
2k views

Using SQL for a Realtime Multiplayer Game Server's Working Data (Fast Enough?)

The game I'm working on currently has a Client in Flash AS3, and a Server in C# (multithreaded). Currently I use mySQL to handle logins (Raw access: no middleman for accessing the database) which ...
2
votes
3answers
707 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
1answer
678 views

Separating Sprites from Models with PyGame

So I'm trying to code a game using the Model-View-Controller pattern, and therefore have a need to separate the models for my game objects with their sprite representations. The problem that I'm ...
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 ...
17
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, ...
8
votes
2answers
426 views

Manage a large number of independent actors in real-time

I am working on a large scale real-time strategy game - ideally with thousands of units active at once - but I am having trouble managing all of the units at once without it becoming astonishingly ...
4
votes
2answers
1k views

Container classes in tile-based games.

I've recently begun working on a tile-based tactical game, and I have questions regarding a couple of key moments. Is it feasible to organize the tilemap as an array of containers, which can hold the ...
11
votes
3answers
699 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: ...
8
votes
3answers
694 views

I would like to know how an OpenGL driver will be implemented to learn opengl internals?

I'm learning OpenGL and really like to know how the interaction with the Graphics card will be. I feel understanding how it was implemented in the Graphics driver, will let me know complete internals ...
3
votes
1answer
452 views

Engine Design for Rendering Reflections

I have a very simple game engine. A GameObjectManager stores a collection of all the GameObjects. When I want to render, I just call GameObjectManager.render() from the rendering context. This works ...
0
votes
2answers
334 views

Obtaining a certain type of object with component based design

I'm trying to design my game to be component based rather than overly hierarchical. Essentially, every high level object in the game (like gun, or whatever) inherits and implements the interfaces that ...
6
votes
3answers
485 views

How can I have my game engine track player history?

I'm in the very early stages of designing a browser-based text RPG. The project is basically just something I'm doing for fun and as a learning experience. I'm starting to wrap my head around the ...
3
votes
1answer
584 views

Organizing platformer game into classes

I'm making a platformer game and I'm having some trouble wrapping my head around how to organize my classes. I'm wondering what the best way to have everything interact would be without passing ...
10
votes
2answers
453 views

Should the engine for an eventual web-based game start as a web-service?

I've recently decided to start writing an engine for a card game. I'm not a big "cards" player, but a friend introduced me to the game (it's a spin on the game Danish), and I fell in love. I want to ...
5
votes
3answers
806 views

Game Classes design

I'm trying to create a simple 2D sprite game. The problem I'm having now is how to design my game. I was thinking of using a Sprite class that will be my base class for all the different types of ...
2
votes
1answer
2k views

N64 SDK and Coding

Recently I've been looking into developing games for N64 emulators and modding existing ROMs and I wanted to know if there are any tools out there which can be used to write the code for the emulators ...
2
votes
2answers
606 views

2D AI Engines/ Resources?

i'm wondering if there's any 2D AI source code or engines out there. I'm inspired by the Euphoria engine, and want to use whatever is already out there to make something like it in 2D, where the ...
4
votes
2answers
680 views

Material vs Material Pass

I am trying to figure out the difference between a "Material" and a "Material Pass" (in theory). Is it basically that a Material will have multiple "Material Pass"'es, along with a name. Then the ...
-5
votes
2answers
462 views

Is it possible to integrate Action Script 3.0 with Java Script and PHP for an online browser game?

My client wants a browser based online game, languages which are known to me are Java Script PHP and Action Script and also My Sql. Game is quite like Farmvile as far as functionality is concerned.I ...
22
votes
4answers
2k views

Appropriate level of granularity for component-based architecture

I'm working on a game with a component-based architecture. An Entity owns a set of Component instances, each of which has a set of Slot instances with which to store, send, and receive values. Factory ...
4
votes
2answers
277 views

How to store the state of the world for a fixed time step?

Most of the posts on fixed time steps say something like this: State previous; State current; while ( !quit ) { double newTime = time(); double frameTime = newTime - currentTime; if ( ...
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 ...
8
votes
1answer
781 views

Which 3D file format should my engine use if I don't want to have to change it later?

Is there a de facto format for exporting a 3D model from modeling software to a game engine? I know it varies by engine and situation, but what is the general idea that comes to a skilled game ...
9
votes
3answers
1k views

Best way to manage in-game events?

I'm working on a game where some in-game events need to happen once in a while. A nice example would be a tutorial. You start the game, and at several points in the game an event occurs: You ...
1
vote
1answer
693 views

Game State / Screen Management

What's the best way to handle game states / screens? My problem is this: PlayGameScreen adds a new InventoryGameScreen to the game during it's update. This immediately adds InventoryGameScreen to ...
7
votes
4answers
854 views

Any learning/studying material for C/C++ that use game programming as learning context out there?

As most of game programming is done - I read on this very site - in C/C++ I was wondering if there is any learning/studying material for C/C++ that would target specifically game programming. I am ...
0
votes
2answers
286 views

Question on methods in Object Oriented Programming [closed]

I’m learning Java at the minute (first language), and as a project I’m looking at developing a simple puzzle game. My question relates to the methods within a class. I have my Block type class; it ...
28
votes
3answers
3k views

Several classes need to access the same data, where should the data be declared?

I have a basic 2D tower defense game in C++. Each map is a separate class which inherits from GameState. The map delegates the logic and drawing code to each object in the game and sets data such as ...
25
votes
5answers
2k views

Doing powerups in a component-based system

I'm just starting really getting my head around component based design. I don't know what the "right" way to do this is. Here's the scenario. The player can equip a shield. The the shield is drawn ...
4
votes
6answers
843 views

Is dynamic casting Entities A good design?

For my game, Everything inherits from Entity, then other things like Player, PhysicsObject, etc, inherit from Entity. The physics engine sends collision callbacks which has an Entity* to the B that A ...
17
votes
2answers
3k views

How are physics or graphics components typically built in a component-oriented system?

I have spent the last 48 hours reading up on Object Component systems, and feel I am ready enough to start implementing it. I got the base Object and Component classes created, but now that I need to ...
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 ...
3
votes
4answers
368 views

Software Design/Modelling method and tool for games?

I've heard that UML is a great modelling language for software design. However, for software, such as game, that will certainly encounter major changes during the development, I doubt that UML will ...
7
votes
3answers
455 views

Where does the Framework (XNA) end and the API (DX) begin?

I have read alot of interesting questions asking about XNA vs. OpenTK vs. SlimDX vs. OpenGL vs. DX, and while it is really useful to get others general impressions from 100s of hours using these ...
4
votes
2answers
1k views

Implementing a 3d tile engine

I have a pretty decent experience with tile based 2d games and I would like to try to create a mixed 3d-2d game. To 3d elements will be very simple (ground, walls and water), all other elements will ...
6
votes
3answers
570 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
875 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 ...
10
votes
5answers
826 views

Nested input in an event-driven system

I am using an event-based input handling system with events and delegates. An example: InputHander.AddEvent(Keys.LeftArrow, player.MoveLeft); //Very simplified code However, I started wondering ...
6
votes
6answers
994 views

video card architecture

Can anyone point me to some information on what a modern video card architecture looks like? I'm particularly interested in understanding how my rendering engine will be executed by the GPU. Ideally, ...
0
votes
1answer
572 views

How to manage game components and their attributes?

Currently I am working with cocos2d for the iPhone. I want to make my game structured and consequential. How to manage all the game components? What do I mean with game components? A game component ...
15
votes
2answers
2k 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 ...
4
votes
1answer
598 views

Communication between objects in games?

I want to make a simple game where I have some characters fighting on a plane (level). I find the trickiest part as figuring out who should do what here. I want my terrain to have friction (so you ...
2
votes
3answers
1k views

Pub/Sub or message passing in multiplayer server backend?

For my masters thesis I'm going to develop a scalable multiplayer server for locationbased games. It's going to be a "service oriented architecture" e.g. one dedicated service for positions, one for ...