Engine-design related questions. How code is structured.

learn more… | top users | synonyms (2)

2
votes
2answers
159 views

Handling of data sharing between framework module

I am currently developping a 3D game using C# / XNA 4.0 and i am currently thinking about how i should structure my game. The actual game is in fact not really important as the framework i am working ...
4
votes
3answers
528 views

Finding the right directory structure for version control

Recently I've started thinking about how to layout the directory structure for my game engine. And well, I kinda hit a little snag. There's going to be 2 people working on this project. Me and one ...
6
votes
1answer
186 views

Applicability of Business Architectures in XNA 4

I've done a lot of C# programming and the architecture we use of late is a MVC => PresentationService => Domain Service And/OR DataService => Repository with a UnitOfWork and a messaging bus. In web ...
1
vote
2answers
101 views

Refresh a single view

The game I'm working on is based on different levels. I can use different activities or only one activity with different layouts ( or maybe only one layout, you have to apologize me but I'm studying ...
0
votes
1answer
201 views

Handling Latency in Multiplayer Shoot-em-ups

I had an idea for an architecture, and I was wondering if anyone has implemented something like this or has used AWS or some other service to help? I thought about using NodeJS + SocketIO to handle ...
3
votes
1answer
517 views

C++ game architecture

I'm trying to make a game, but I'm not sure of the best way to set up the main loop and classes. For really small games, I could put everything in the main() loop, including event handling, collision ...
2
votes
2answers
733 views

Architecture for html5 multiplayer game?

Hello I want to write a HTML5 multiplayer game in which there are rooms with two players answering a series of questions with 3 possible answers, 10sec/question, which are being downloaded from a ...
8
votes
1answer
537 views

Separating logic and data in browser game

I've been thinking this over for days and I'm still not sure what to do. I'm trying to refactor a combat system in PHP (...sorry.) Here's what exists so far: There are two (so far) types of entities ...
93
votes
1answer
14k views

Role of systems in entity systems architecture

I've been reading a lot about entity components and systems and have thought that the idea of an entity just being an ID is quite interesting. However I don't know how this completely works with the ...
4
votes
3answers
538 views

How can I efficiently create/store/implement animations as I add to my game?

My game's characters are made up of different parts (head/body/legs/etc), and whatever items they have equipped. As I'm creating the animation system for my game, I want to try to anticipate a large ...
2
votes
1answer
228 views

How many UDP ports for an MMOFPS

I'm designing an MMOFPS. I'm not sure whether to use one UDP port for all clients or one UDP port per client. Or is there another alternative? Currently UDP is only being used for position data ...
4
votes
1answer
294 views

How to synchronise the acceleration, velocity and position of the monsters on the server with the players?

I'm building an MMO using Node.js, and there are monsters roaming around. I can make them move around on the server using vector variables acceleration, velocity and position. acceleration = ...
3
votes
0answers
519 views

Any recommended books/resources on component-based design? [closed]

I come from a background with heavy use of the classical object-oriented paradigm for software development. The company I am a part of switched to Unity not too long ago, and we're all very excited ...
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 ...
8
votes
3answers
1k views

Best peer-to-peer game architecture

Consider a setup where game clients: have quite small computing resources (mobile devices, smartphones) are all connected to a common router (LAN, hotspot etc) The users want to play a multiplayer ...
6
votes
1answer
2k views

Game editor integration with the engine?

What I am trying to figure out is what is the best way to integrate the editor(level, effects, model, etc...) in the most effective way? Now the first thing I thought would be to create the game ...
0
votes
3answers
157 views

How can I save state from script in a multithreaded engine?

We are building a multithreaded game engine and we've encountered some problems as described below. The engine have 3 threads in total: script, render, and audio. Each frame, we update these 3 ...
51
votes
7answers
15k views

Why don't more games use vector art?

It would seem to me that vector art is more efficient in terms of resources/scalability; however, in most cases I have seen artists using bitmap/rasterized art. Is this a limitation put on the artists ...
10
votes
4answers
1k views

Circular class dependency

Is it bad design to have 2 classes which need each other? I'm writing a small game in which I have a GameEngine class which has got a few GameState objects. To access several rendering methods, these ...
0
votes
4answers
717 views

Separating game logic from animation

For non-game applications the model-view-controller pattern is typical where data, logic, and visuals are separated. But for a game how would you architect the game logic and the animation system in ...
1
vote
1answer
162 views

How do I keep user input and rendering independent of the implementation environment?

I'm writing a Tetris clone in JavaScript. I have a fair amount of experience in programming in general, but am rather new to game development. I want to separate the core game code from the code that ...
0
votes
2answers
806 views

Game Logic - Tree Based Game Design

I'm trying to write an easy to use and extremely modifiable game engine in C++. I was thinking about using a tree to store game data. All objects would inherit a from the Node class and would have ...
7
votes
2answers
1k views

Tactics for moving the render logic out of the GameObject class

When making games you often create the following game object from which all entities inherit: public class GameObject{ abstract void Update(...); abstract void Draw(...); } So in you update ...
8
votes
5answers
546 views

Managing lists of different types of entities - is there a better way?

I am developing a 2D space game for mobile devices, but it gets realy complex and my solution is realy confusing and produces lots of repeated code segments. I hava a world class in which i have ...
1
vote
1answer
271 views

Class design for instantly switching between free-roaming world to/from battle world?

I plan to have an isometric world, which can be freely roam around. However, I desire the system to instantly apply the grid onto isometric world for battling system on any random encounter. ...
7
votes
1answer
2k views

Game programming: common methods and design patterns

I begun writing a very simple game engine so that I can learn OpenGL 3.x better but since my inexperience and my sparse knowledge of how a 3D game should be designed, I usually get into problems where ...
1
vote
2answers
241 views

Game states affecting each other's objects

If I had given this question any other title it would have immediately looked like a dupe of this one. Although that has some nice ideas none of the answers actually address what I need. I'm ...
2
votes
2answers
315 views

Scroller game level map advice

I'm started a XNA project to make a game similar in gameplay to Super Spy Hunter on a NES, which is used as a feature reference. The first thing I thought of is how to store and display level. ...
2
votes
3answers
389 views

C++ Namespace vs Reference passed around like crazy - Implement a quest journal

May sound funny, but that's what the question is about. Suppose you have this situation: http://i48.tinypic.com/whl6pk.jpg Red squares are data types. Hexagons are methods and Journal is the main ...
1
vote
0answers
62 views

Implementing Tools in a Toolkit

I've been building a toolkit for my game and recently decided I needed a history system as well as clean out the mountain of event handlers building up in my code. To do this, I've started using ...
2
votes
2answers
243 views

How can I store a set of concrete components and implement “GetComponent<T>()?”

I would like an abstract class, AbstractComponentAggregate, which has many AbstractComponents. Users of my framework will create their components by extending AbstractComponent and appending the ...
3
votes
3answers
302 views

Loadbalancing Questions

I have been learning networking for about 4 months. Wrote a single standalone Multiplayer server and succeeded with authoritative approach. Now I want to extend it by splitting the single server into ...
3
votes
1answer
440 views

How to design a character animation system?

I'm searching for suggestions and resources on the possible ways to design a character animation system. I mean a system built on top of the graphics engine (as graphics engine I use Ogre3D, that ...
2
votes
2answers
217 views

Debug data visualization best practices

I found debugging games especially hard for some obvious reasons. It's hard to monitor some internal values in dynamic, conditional breakpoints helps somehow, but only to detect some specific ...
0
votes
1answer
2k views

GameObject and Components

I am creating a relatively simple game engine in C++ and Qt. I am using Irrlicht for graphics, and as of now, I will not be using any physics or audio libraries. For time's sake, I am using ...
7
votes
1answer
2k views

Turn-based JRPG battle system architecture resources

The past months I've been busy programming a 2D JRPG (Japanese-style RPG) in C++ using the SDL library. The exploration mode is more or less done. Now I'm tackling the battle mode. I have been unable ...
7
votes
2answers
1k views

How should I structure my turn based engine to allow flexibility for players/AI and observation?

I've just started making a Turn Based Strategy engine in GameMaker's GML language... And I was cruising along nicely until it came time to handle the turn cycle, and determining who is controlling ...
1
vote
2answers
450 views

Best practices, extending classes

I'm developing a game in XNA(C#) and I wonder what are the best practices for having different types of pads. For example I have 2 types of pads: Pad that just moves left (decreasing X coordinate) ...
5
votes
2answers
2k views

What are the disadvantages of using multiple inheritance to implement components?

I've been doing research on component-based game engines and would like to use that model for future game projects. From what I gather, objects in a component-based system are just collections of ...
9
votes
3answers
2k views

How to implement the logic of a trading card game's “special effects cards”?

I am trying to write a kind of a trading card game here, in some way, it is similar to Magic The Gathering, or the Yu-Gi-Oh! card game. For those of you who are not familiar with it, basically, in ...
2
votes
2answers
361 views

Would it be too much overhead to keep a HashMap of variables on a server per object for the purpose of syncing object changes with the client?

I am currently writing a server for a multiplayer game. I am trying to find a good solution for synchronizing GameObjects across the server. The server sends each client a snapshot of every object in ...
1
vote
1answer
259 views

Unit selection - logic & screen communication

I'm building a game using SFML, with disconnected logic & screen systems that run on different threads and communicate through synchronised buffers. Now, this system worked perfectly well when I ...
5
votes
2answers
513 views

Changing background texture by drawing on it?

Actually I'm sorry for the title, I'm not sure which short phrase will describe situation best. I'm porting (or remastering, I don't know which word suits better, maybe both) a Win32, pure C, DirectX ...
3
votes
2answers
164 views

Making online battles take time

Let's say I have an account on an MMORTS and I send my 10,000 strong army to a location on the map. I then shut off my computer. Another player gives orders to his 10,000 strong army to walk to the ...
1
vote
5answers
1k views

Most efficient language for rewriting a tile-based board game as a video game? [closed]

I've been working on a hex-based board game. Every time I make changes, especially changes that require redesigning the map, it takes a good chunk of time and money. It might be more efficient to ...
35
votes
5answers
3k views

How to avoid the GameManager god object?

I just read an answer to a question about structuring game code. It made me wonder about the ubiquitous GameManager class, and how it often becomes an issue in a production environment. Let me ...
2
votes
2answers
746 views

Writing a dynamic achievement system without hardcoding rules into the application

I really enjoyed the solution provided here for groundwork on writing an achievement framework. The problem I have is I have game designers that would like to be able to insert achievements into a CMS ...
1
vote
2answers
858 views

Basic game architechture best practices in Cocos2D on iOS

Consider the following simple game: 20 squares floating around an iPhone's screen. Tapping a square causes that square to disappear. What's the "best practices" way to set this up in Cocos2D? Here's ...
3
votes
1answer
283 views

Architecture of an action multiplayer game from scratch

Not sure whether it's a good place to ask (do point me to a better one if it's not), but since what we're developing is a game - here it goes. So this is a "real-time" action multiplayer game. I have ...
9
votes
1answer
557 views

How to keep a data structure synchronized over a network?

Context In the game I'm working on (a sort of a point and click graphic adventure), pretty much everything that happens in the game world is controlled by an action manager that is structured a bit ...