Engine-design related questions. How code is structured.

learn more… | top users | synonyms (2)

0
votes
1answer
219 views

Xna “Game.Run” method appears to be using up a lot of resources in my game, is this normal?

The question really is in the heading, but i have been using the visual studio profiler to optmisie my game, i have noticed that the game.run method is eating through 93.6% of the overall game ...
0
votes
2answers
291 views

Attribute ownership in Entity Component systems

How do you typically handle data ownership in these systems? Right now I just have a map that maps type(std::string or hashed int)->void* where outside sources can add attributes via a simple ...
0
votes
0answers
70 views

What's the most efficient way to manage auras & buffs? [duplicate]

I would like to know, for a game that does NOT use a grid (1-dimensional movement, in fact); what is the cleanest way to manage buffs that change a unit's variables? My current system is going to be ...
3
votes
2answers
508 views

Does it make sense to use Lua scripting in a game developed in Python?

Well for C++ written games using Lua scripts for easy changing ai, quets etc is very reasonable and it's common. However now I'm going to write a game in pure python and I don't know if I should use ...
1
vote
2answers
418 views

Powerup Best practices [duplicate]

In a turn based game each player has a set of properties, e.g attack, defence, speed and these can all be used to work out who should go first and how much damage should be dealt. That all works fine, ...
1
vote
1answer
268 views

How can you implement Lua into your game? [closed]

I am trying to implement Lua into my game, but am having trouble. Say I have a weapon class, which is just a hollow shell, lacking real functions. I was thinking of creating an onFire function, which ...
0
votes
2answers
127 views

XNA Game arhitecture, sharing vertices between objects

I'm practicing primitives rendering in XNA and I want to create something like pipe or tunnel. I have base class called PipeSegment from which I inherit classes like RotatingSegment and NormalSegment ...
4
votes
2answers
682 views

Game Editor plugin architecture

I'm creating 3D Game Editor for my own use. As rendering i took Ogre3D and MFC as UI. I faced with architecture problem. I am using Document/View architecture and for each Doc. i create new ...
3
votes
3answers
330 views

How do I prevent memory-modification cheats?

There are many memory-altering programs out there nowadays (Cheat Engine & co). Is there an efficient way to keep a constant variable actually constant? I had two ideas: Make a separate thread ...
5
votes
3answers
478 views

Why should I use separate initialization and clean up methods instead of putting logic in the constructor and destructor for engine components?

I'm working on my own game engine and I am currently designing my managers. And I've read that for memory management using Init() and CleanUp() functions are better then using Constructors and ...
1
vote
2answers
382 views

adventure game architecture

I would like to make an adventure type game functioning similarly to machinarium or broken sword. The only way I can think of doing this is to draw an image as a background on a canvas and use some ...
4
votes
2answers
400 views

Game state management: the buck doesn't stop “here” soon enough

I realize there are already many Q&As on this site about GameState/GameScreen management, state machines, state stacks, etc. This question is meant as a follow-up: Suppose hypothetically I ...
1
vote
2answers
250 views

How to store different abilities in player class?

So, I have a player class with basic actions. During the gameplay he unlocks new abilities. I don't know how to store new actions within the player class. To be precise - I know how, but my method ...
-1
votes
1answer
524 views

How to store data in a data-driven RPG [duplicate]

Possible Duplicate: Would it be better to use XML/JSON/Text or a database to store game content? I'm working on a 2D data-driven RPG. I intend for it to be modabble; my intention is to ...
1
vote
3answers
262 views

Actors with multiple Textures - class Hierarchy?

In my 2D side-scroller game I have a bunch of actors being drawn, each of which has a single, non-animated Texture (a png image). These actors all inherit from a base GameActor class. I want to add ...
1
vote
1answer
260 views

Server architecture software side

I'm making a game some like Terraria. I have a couple of prototypes, but most of them use a "entity-component-system"(ESC) and some custom terrain implementation. Now I've reached the part where I ...
1
vote
4answers
536 views

What is a good way to load more than a million images for a collectible card game?

I'm using C# with MonoGame and I'm wondering what would be an efficient way to load more than a million card images for a collectible card game. More cards would be continuously added in future ...
16
votes
5answers
859 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 ...
1
vote
0answers
142 views

What part of my engine should load images and fonts? [duplicate]

Right now, I have an AssetLoader interface, which has one implementation per platform. There can only be one instance of it, because it has some state (e.g. the path to the APK on Android). It has ...
7
votes
2answers
3k views

Tips for Component Based Entity System message handling

I'm trying to implement a component-based entity system but am a bit confused on how I should handle the messaging. There are two problems I'd like to resolve so I can test the system. Below is the ...
1
vote
1answer
210 views

Alternative to JSF for browser-based 4X game [closed]

I intend to make browser based MMO game. Something from Master of Orion genre but with more accent on command ship operations. I've done some tests and research and turns out that indeed, for ...
0
votes
2answers
139 views

Good Tools & Methodologies for designing Game Arch

I'm currently developing a multiplayer and turnbased silverlight card game and using WCF Polling Duplex communication. I've almost finished the game but I'm still dealing with the methods and ...
0
votes
3answers
112 views

Passing information between states created at different times

I have two states, a configuration state and a gameplay (simulation) state. After configuring the game details (gametype, scoring type, win condition, etc. etc.) As each state is isolated, what is a ...
10
votes
3answers
306 views

Sound effects system design

I'm creating a RPG/RTS game in Unity. There are a lot of characters and potentially a lot of different environments. I'm fairly confident with the coding part (so this question isn't really tied to ...
4
votes
2answers
191 views

Flow/design of steering behaviors implementation

I am implementing some simple steering behaviors like: follow the leader, separation, cohesion and flee(from the leader when he walks in our direction - aka spread the group for him). I am having ...
2
votes
2answers
592 views

In an Entity-Component System, how to represent the world/level/gameboard?

I am trying to learn more about Entity-Component Systems, and something that kinda stuck out at me was the question of how to represent the world in such a system? More specifically, I'm trying to do ...
1
vote
2answers
180 views

persistence of objects between game states

What are the possible ways of sharing different objects between game states and how do other engines implement such system? Lets say a game has a couple of states (a menu state and a game state for ...
15
votes
4answers
1k views

Why do MMORPGs still use multiple servers?

MMORPGs, some MOBAs like League of Legends or even StarCraft 2 usually force you to pick a server. Usually they are US, EU and SEA, in MMORPGs many per location. I can see that that was necessary a ...
2
votes
3answers
486 views

Component / Entity-based design => no inheritance at all?

[I understand that this this could be seen as a rather theoretical question, but I think it has real-application impact]. "Academic" base With a component-based design one wants to get rid of the ...
2
votes
1answer
875 views

Code structure in Android 2D game

Well I've finnaly decided to start Android game dev, and my first project will be simple 2d canvas based game. I have some experience in game developing with C# and XNA, and I'm a bit confused now. ...
3
votes
2answers
445 views

Making character's skills and abilities as commands, good practice?

I am designing for a game that consist of characters who have unique offensive skills and other abilities such as building, repairing, etc. Players can control multiple of such characters. I'm ...
6
votes
4answers
2k 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 ...
1
vote
1answer
206 views

Game design and SoC

I've been working on a little game for the last few months, trying to approach it as a software engineer and employ best patterns and practices in my coding. I have gotten to the point where I have to ...
1
vote
3answers
97 views

DirectX Objects in a struct

I am playing around directx lately and I am learning from rasterek.com tutorials. He passes pointers to directx objects (like ID3D11Device, ID3D11DeviceContext etc.) for almost every class he creates. ...
-3
votes
1answer
395 views

Real-Time-Strategy control structures/achitecture [closed]

I am looking at building a real time strategy game (of at least the framework for one) in Unity, and was wondering what control structures and/or architecture I should focus on using. current ...
9
votes
1answer
2k views

Implementing a camera / viewport to a 2D game

What is the most practical way to implement camera/viewport to a 2D-game? I've read, that I should store the object world position instead of position relative to the screen? Current situation: I ...
-2
votes
2answers
197 views

What can go wrong with this technique/game architecture? [closed]

So this is something kind of new, as I've never saw anywhere, but maybe already exists: The game is divided in 3 pieces: the actual game logic (game), the visual part (view) and something that link ...
4
votes
2answers
535 views

Why is keeping a constant FPS harder than keeping high FPS?

I've noticed this ever since I started playing games, and now see it in my own experiments. If I don't do any capping my game runs at 200~250 FPS, with random drops to 150FPS, but if I cap the FPS to ...
4
votes
2answers
679 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 ...
0
votes
1answer
261 views

Behavior Trees and Animations

I have started working on the AI for a game, but am confused how I should handle animations. I will be using a Behavior Tree for AI behavior and Cocos2D for my game engine. Should my ...
2
votes
1answer
331 views

Abstract skill/talent system implementation

I've been making small 2D games for about 3 years now (XNA and more recently LWJGL/Slick2D). My latest idea would involve some form of "talent tree" system in a real time game. I've been wracking my ...
4
votes
1answer
412 views

XNA Moddable Game - Architecture Design and Reflection

I've decided to embark on an XNA moddable game project of a simple rogue style. For all purposes of this question, I'm going to not be using a scripting engine, but rather allow modders to directly ...
0
votes
1answer
100 views

Efficiency concerning thread granularity

Lately, I've been thinking of ways to use multithreading to improve the speed of different parts of a game engine. What confuses me is the appropriate granularity of threads, especially when dealing ...
2
votes
3answers
1k 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 ...
1
vote
1answer
171 views

How should I organise classes for a space simulator?

I have pretty much taught myself everything I know about programming, so while I know how to teach myself (books, internet and reading API's), I'm finding that there hasn't been a whole lot in the way ...
2
votes
3answers
825 views

Question on the implementation of my Entity System

I am currently creating an Entity System, in C++, it is almost completed (I have all the code there, I just have to add a few things and test it). The only thing is, I can't figure out how to ...
3
votes
3answers
1k views

SceneManagers as systems in entity system or as a core class used by a system?

It seems entity systems are really popular here. Links posted by other users convinced me of the power of such system and I decided to try it. (Well, that and my original code getting messy) In my ...
2
votes
4answers
508 views

Is there an isometric 2d game that doesn't use tilemapping? [closed]

Is there an isometric 2d game that doesn't use tilemapping? I want to do this in tilemap but the client doesn't want to use it (since it's easier to design maps without using tiles). I've tried to ...
-2
votes
1answer
1k views

The best way to structure/design game code [closed]

My question is quite broad and related to the 2D game code design/architecture/structure. Usually the main game consists of the main loop where you update & render your world states. However, ...
5
votes
1answer
476 views

Component based design, but components rely on each other

I've begun stabbing at a "Component Based" game system. Basically, each entity holds a list of components to update (and render) I inherit the "Component" class and break each game system into it. ...