Questions tagged [architecture]

How code is structured. For questions on the internal design of a game engine.

Filter by
Sorted by
Tagged with
7
votes
2answers
502 views

How does flash store (represent) movieclips and sprites?

When we draw any object in flash and convert it into a movieclip or a sprite, how is it stored or represented in flash. I know in vector art it is stored or represented as line segments using formulae....
7
votes
1answer
6k views

CPU usage, game loop and sleep()

I've read about this topic on numerous discussion sites, but I can't seem to find a clear definitive (up-to-date) answer, and hopefully this will me some more insight: I've read the excellent game ...
7
votes
4answers
4k views

Retrieving components from game objects (entities)

Using C# and XNA 4, I've made the decision to go for an entity-component based design for my game after reading such posts as this and this, but I'm now struggling to find how to retrieve components ...
7
votes
1answer
5k views

How to integrate the game editor 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 ...
7
votes
3answers
436 views

How to design a separated tutorial mode?

I'm working on a "social" game that's about 90% completion. One of the remaining features is the tutorial mode. Basically, the tutorial mode will restrict the user to access some parts of UI and ...
7
votes
1answer
821 views

Net code: What are your expected and max latency and packet loss targets?

When doing the net code for a video game what sort of latency targets and packet loss rates do you design around? To be more specific I have my net code working local network only at the moment. I ...
7
votes
1answer
394 views

Is it a bad idea to couple action and animation?

I'm making an ARPG (like Legend of Zelda but with more action), and this question raised during the development: Should action and animation be coupled? Or should they be independent? With this I ...
7
votes
1answer
832 views

Optimize state changes within a render queue

I am refactoring some parts of the game engine I am working on. This engine is made in C# with XNA. The part I have trouble with is shader/material and the render queue. In the new version I will ...
7
votes
2answers
414 views

Draw and update order in 3d graphics

In all of the code samples that I have looked at, the game loop looks something like this: while(true) { InputAndUpdate(); Draw(); SwapBuffers(); } ...
7
votes
1answer
1k views

In XNA, should I use the built-in game component classes?

I'm just getting started on an XNA game for Window Phone 7. For my Flash games I have my own framework that I was just going to port from AS3, but I have just found the built-in game component stuff ...
7
votes
2answers
2k views

How to design a multi-step game menu system?

I am getting started with game programming. I am designing a game that starts by taking you through a series of menu screens. I am interested in learning how this is typically structured in ...
7
votes
2answers
2k 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 ...
7
votes
1answer
2k views

2d, Top-down map with different levels

So, I'm creating a 2d, top down, sprite based (tiled) game, and right now I'm working on maps (well, a map editor at the moment, but it will be creating my maps, so basically the same thing). The ...
7
votes
3answers
4k views

Entity Component System for HUD and GUI

This is a very rough sketch of how I currently have things designed. It should, at least, give an idea of how my ECS is currently designed. If you notice in that diagram, I have basically split the ...
7
votes
3answers
520 views

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

I have read a lot 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 ...
6
votes
4answers
371 views

How do I leverage code and experience across alternate platforms?

I continually build complex engines and libraries within a single platform and technology, to allow me to build increasingly bigger and better games. How do I continue this when development crosses ...
6
votes
3answers
6k views

GameState management hierarchical FSM vs stack based FSM

I'm reading a bit on Finite State Machines to handle game states (or screens). I would like to build a rather decent FSM that can handle multiple screens. e.g. while the game is running I want to be ...
6
votes
3answers
2k views

Clicker economy and bonus system

How is an economy system implemented in clicker games? Obviously, you can't store values like 1 Quintilian in long type. I understand that there might be some string operations or even better, some ...
6
votes
1answer
3k views

What underlying character stats would you put into your “character” object in an RPG engine

basically I'm making my own RPG/TBS engine named Uruk (making an rpg themed about the epic of gilgamesh) and I am thinking of a combat system similar to the Disgaea franchise or the Super Robot Wars ...
6
votes
5answers
1k views

What is Java missing that might make it difficult to develop fully-featured 2D games?

Without using any external libraries, does Java, including all officially supported APIs give you enough to develop fully-featured 2D games? The reason I ask is that I hear a lot of "bad-mouthing" ...
6
votes
3answers
704 views

Abstracting multiple math libraries with C++

I would like to create some level of abstraction above math in my code. I mean I don't want to be dependant on the implementation of math operations or even on class names, which are provided by some ...
6
votes
3answers
5k views

Is a custom coordinate system possible in Unity

Is it possible to create a custom coordinate system (i.e the one using double for coordinates or the one dividing the world into 'chunks' of safe size) not ...
6
votes
3answers
891 views

When should I load my resources?

I'm making a game, and right now I'm working on the user interface. I'm just wondering when I should be loading my resources. Should I do it in small pieces at a time? Load resources for part 1 of ...
6
votes
2answers
248 views

Should I store a value for every damage type even if zero, when using the Decorator pattern?

My game characters take damage by the method TakeDamage(Damage amounts), and the Damage struct has every type of damage (...
6
votes
3answers
3k views

Complex system-component dependencies in entity-component-system?

I am trying to design a data-oriented ECS engine. The issue I am struggling with is that my rendering system have to rely on two different sets of entities to actually do rendering. My current idea ...
6
votes
6answers
317 views

Where are the requirements documents for console game software?

I hear that the console game platforms have strict requirements for their games. For example I just read an answer that stated loading screens must have an animation on them so that the game doesn't ...
6
votes
2answers
2k views

Brick Breaker Game Structure

I am working on a brick breaker style game (i.e., like Arkanoid) in C#/XNA. As I add more features such as powerups, special brick types, etc I am running into problems figuring out how the whole game ...
6
votes
3answers
764 views

Deleting a game object causing an access violation

I tried doing this but it cause an access violation. ...
6
votes
3answers
691 views

Mismatch of Entity System and Savegames

There is a theoretical mismatch of the entity system and the savegame system, which is think is common, but I haven't found resources about that. Therefore I will explain both systems first, as short ...
6
votes
2answers
2k views

Where to generate data in an Entity-Component System?

So I'm making a small game where I generate 2D landscape using perlin noise when the game first loads. I've got it working in a OO way, but want to move over to an ES architecure, and I'm just ...
6
votes
2answers
2k 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: ...
6
votes
2answers
2k 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 "...
6
votes
2answers
721 views

Architecture of networked game engine

So after working on my game engine for 2 years, I've decided to step into the networking environment. I just don't know if it's a good idea to rewrite the engine, or how much work it will take (but ...
6
votes
2answers
1k views

Book on designing game architecture? [closed]

I would like to make nice games with good architecture that are easy to support and extend. But when i write code it all gets messy and hardcoded, so when I want to add a feature it becomes a huge ...
6
votes
1answer
478 views

What are the benefits of designing a KeyBinding relay?

The input system of Quake3 is handled using a Keybinding relay, whereby each keypress is matched against a 'binding' which is then passed to the CLI along with a time stamp of when the keypress (or ...
6
votes
1answer
211 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 ...
6
votes
4answers
888 views

How should I go about abstracting away the graphics device?

I would like to be able to move my game from using a XNA graphics device to possibly an OpenGL device in the future. So I'd like to have a somewhat abstract interface to submit polygons to. Its ok if ...
6
votes
1answer
1k views

Keeping game model and graphics/animation separate but in sync

Suppose I'm building a chess game where I want to have animations. Pieces glide to their new squares when moved. Pieces perform attack animations when capturing other pieces. I'm not sure how to ...
6
votes
3answers
685 views

Game AI Implementation

I'm very new to game development, but an experienced software engineer. As an introduction to game dev, I'm making a 2D zombie game in Python, using pygame. The game is almost done, but I still have ...
6
votes
2answers
3k views

Low-level game engine renderer design

I'm piecing together the beginnings of an extremely basic engine which will let me draw arbitrary objects (SceneObject). I've got to the point where I'm creating a ...
6
votes
3answers
661 views

Trophies programming design pattern [closed]

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 ...
6
votes
2answers
341 views

Are there existing software frameworks for traditional “Roll dice and move pawn” boardgames? [closed]

I am looking for a library or framework for creating software versions Roll and Move board games -- games where the basic play centers around players rolling a dice and advancing a pawn along a path. ...
6
votes
1answer
466 views

Love2D game and editor in two separate programs

I'm building an engine in Love2D and I need to build an editor who will create scenes with game objects I wrote in lua. The thing is that there's this guy in my team who said : "Don't include the ...
6
votes
1answer
417 views

LWJGL Eclipse Resource Deployment

I'm still experimenting with some OpenGL in LWJGL, and as I get to know more and more about OpenGL, I start to do more complicated things like multi texturing, shadowmapping and more. Now, right now I'...
6
votes
2answers
633 views

How tightly should I stick to entities in a component based game?

I apologize if the question is a little vague, It was hard to explain it in a short sentence. I'm currently writing a component based game, it's getting along great but I'm starting to wonder how ...
6
votes
1answer
569 views

What structure is best used to model maps for games like Bard's Tale / Dungeon Hack?

I would like to create or use an existing JavaScript engine to build a game in the spirit of Dungeon Hack, Eye of the Beholder and older Might & Magic games. Going off my memory playing these ...
6
votes
2answers
2k views

Handling collisions with ground

How do you usually solve collisions between entities and the ground? Sending collision events hardly seems appropriate since almost everything touches the ground at almost all points in time. Calling ...
6
votes
6answers
1k 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, ...
6
votes
2answers
593 views

How can I separate entities from their actions or behaviours?

I'm having a go at creating a very simple text based game and I'm wondering how I can design the entities (characters, sentient scenery) with regards to the actions those entities can perform. As an ...
6
votes
1answer
803 views

How to nest one Unity project into another?

I'm creating an AI course in Unity. With regard to my question, there are two important properties of the course: Each tutorial is a separate Unity project that can be loaded up, allowing the student ...