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

learn more… | top users | synonyms (2)

1
vote
1answer
57 views

How to manage state in a component-based game engine?

I'm working on a small, data-driven game engine with some friends. We use GameObjects (a.k.a. Entities, Actors, or whatever it is called in your favorite engine) to represent every entity in the ...
0
votes
1answer
58 views

How to make “Events”/ Scripted Scenes

I want to make cutscenes etc, in my game. I thought of a similar System like in the RPG Maker: If you enter a certain Area, a list of commands and arguments is played. E.g. like this: [Move ...
0
votes
0answers
64 views

Should an Entity own its components? [closed]

I have an Entity component system(ECS) set up. I store the components as void*, and based on what component it is, it has to have a given base class. For example: A "Renderable_deferred" component is ...
2
votes
2answers
57 views

How can I represent prerequisites of different type of game objects?

In a strategy game, I want to declare prerequisites for various types of game objects to limit when they can be acquired/executed: technologies, buildables, resources, actions, etc. Any of these types ...
2
votes
2answers
136 views

Efficient removal and adding of Components in ECS

i'm working with the Ashley Entity-Component-System (related to libGDX) to program a server-side simulation for an online game and i stumbled upon a serious performance drawback, that is probably ...
0
votes
2answers
68 views

entity component - get object from entity system without knowing it's ID

Ive been building a game using a Entity Component system, but im having a bit of an issue finding a specific object in my entity system without knowing the Entity's Id. My game is organized in ...
3
votes
1answer
122 views

Branching quest system

I've started working in a quest system for my game, but I stumble in a zone where I have to many, if/else conditions to handle a quest, whether you have X and Y item in your inventory, whether you ...
4
votes
1answer
76 views

Cram search results into viewport (of a search minimap)?

I'm no coder, nor do I try to be. I just had one of those "it's impossible" arguments with folks who love to argue with me before they even understand what the argument is about :) So I need to ...
1
vote
0answers
38 views

How do I add scripting logic to my dialogue tree? [closed]

I'm creating 2D RPG game and I want to implement branching dialogue system which can also change player stats, add items and so on. Also I want to implement conditions for some answers so player ...
4
votes
3answers
210 views

Sphere to plane collision never rearching resting contact

I have been trying to have a sphere to plane eventually lead to the sphere coming to a resting contact, but my sphere will end up always bouncing forever. It will bounce correctly for the first few ...
1
vote
1answer
106 views

Property replication vs RPC notifications

I'm not talking about something such as an object position, which changes very often. I'm talking about some object state that may be changed infrequently, such as a door opening and closing. Would ...
2
votes
2answers
63 views

How to setup animation based events without depending on an animation?

How can I have events based off animations without relying on them? Take for example reloading in a FPS game. You'd hit a button to reload your weapon, the animation will play, then animation will hit ...
4
votes
2answers
230 views

How does Unity's Entity-Component System Work In Practice? [closed]

On the surface Entity-Component seems like a good way to program games. Everything is a game object and those game objects are made up of components. The attraction is components are very flexible, ...
4
votes
2answers
85 views

Best way to deal with a large variety of items?

I am currently working on my first java game and I am having trouble figuring out how I should implement my classes that will have heavy variety. For example, I am considering having an abstract item ...
0
votes
1answer
112 views

Solitaire Game: Transferring Cards Design in C++

So, I'm working on a Solitaire game. I already created a the classes: Card, Pile, Stock. Each work as expected on it's own. My question is: What possible design for managing moving card(s) between the ...
0
votes
0answers
47 views

Browser Game - Model or not Model

I'm planing on making a browser game just for fun and to improve my skills, but I have an issue regarding the Software Architecture of the game: I will be using an ORM to communicate with my ...
4
votes
2answers
307 views

How should entities in a game reference each other?

I've been reading a lot about design patterns, but in using these patterns there's one question that I keep coming back to. How should my entities access information about each other? Let's say I'm ...
0
votes
1answer
41 views

Client code handling its own generics when returned by an engine

I'm writing a game engine in Java 8, and have prototype client code written in Groovy. New Game objects can be created with a builder which defines everything which fills in the blanks. To simplify ...
0
votes
0answers
30 views

Deal with double coordinates and graphics

I want to draw some vectors and few sprites in a 2D world.Problem is that they should be precise. For example a vector has position (5000000.65,556666). That depends on user. He might want to add ...
0
votes
0answers
65 views

Hiding actual IP of a Game Server [closed]

I've developed a game server which has 3 layers Login Server(That connects AI Server) AI Server(That connects game logic server) Game Server I want to prevent DDOS attacks as much as possible and ...
0
votes
0answers
70 views

Manage map like The sims game

I'm trying to create a (light) tool to create houses like in the Sims game but I don't know how to manage data/make a valid architecture. For now, I think about something like that: Map: Player's ...
2
votes
1answer
204 views

How should my game characters store their abilities/spells?

I'm new to game development and a bit confused about how to effectively store an object's access to certain spells/abilities. The player and mob objects are all generated from the same class. ...
0
votes
2answers
60 views

Custom key binding/mapping

Currently I am starting to develop my first serious game. Before the games are all training, and learning how to do things in a good way. Unfortunatly, I've missed a big part in my preparation: Key ...
1
vote
2answers
121 views

Bubble shooter clone, structure for storing/adding of bubbles

Im having a few issues trying to figure out what the best data structure to use for storing bubbles on the grid, and how to connect new bubbles to the grid when a moving ball collides with a ball on ...
0
votes
2answers
51 views

Questions about property-centric game object runtime

I was reading Game Engine Architecture by Jason Gregory So according to him, I should use an array of entities, and arrays for each property, such as an array gameObjectsPosition, ...
0
votes
0answers
63 views

2D Drawing architecture

I want to create something like a game but I am going to use Direct2D and GDI for drawing API.My problem is that I want to separate drawing code from objects. For example lets say I have conduit ...
0
votes
1answer
66 views

Resetting scene state

i was wondering what are the best practices for restarting the game, say for example in a platformer game when you die the game restarts and you have to reposition all the characters or reset the ...
0
votes
1answer
89 views

Double buffer - Managing Collision

I'm thinking about how I should manage collisions in my game. I'm thinking about having a "Collision" class that checks for collision, and in case takes actions to resolve them. My problem is this: ...
1
vote
2answers
246 views

Elegant ways to handle rendering with DirectX 11

I'm looking for a design pattern that's going to help me to elegantly handle the rendering of my game objects. Lots of game development guides talk about how to handle the game objects themselves, ...
21
votes
3answers
2k views

Command Ordering Architecture of Dwarf Fortress

What is the most elegant way to implement a command ordering system for AI? for example in dwarf fortress when you mark a forested area for wood cutting, the dwarfs then would do the following ...
0
votes
2answers
211 views

Good Configuration Manager System Design for medium-large sized projects?

I've create smaller games which simply needed a class which basically opens an INI file (with feather-ini-parser library) with config values for the whole game (rendering ops, music, bindings). But I ...
41
votes
3answers
4k views

Why do tutorials use different approaches to OpenGL rendering?

http://www.sdltutorials.com/sdl-opengl-tutorial-basics http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/ These two tutorials use completely different approaches to ...
3
votes
1answer
148 views

How do I let a game support different rule sets?

I'm making a MUD game engine that supports D&D , Pathfinder and other tabletop-RPG rule sets. I am starting to build out how characters interact with the world (e.g. dialog, battle, searching for ...
0
votes
1answer
57 views

Application components dependancy and decoupling

In my client application I have two major components: GameCore - wrapper that handles everything about running the actual game NetworkClient - A layer that takes care of ...
0
votes
1answer
125 views

Client/Server best way of telling client which player it is

I'm making a client/server, everything works grand its very simple, a simple login system, ID, empty variable and the X and Y positions of the player. Should my server tell my client who it is? and ...
0
votes
2answers
128 views

Do I really need a render() method in the game loop if the view subscribes to the models?

For a game that I'm working on, we've followed the MVC paradigm. However, in classic MVC, the view subscribes to the model and when the model updates it informs the view. We've implemented this as an ...
0
votes
1answer
323 views

Organising data of a turn-based strategy

I'm intermediate in Java but novice in everything which is on the server-side. I've set myself a task to rewrite an old game, so learning Java is more fun. It is a space turn-based strategy. The ...
0
votes
1answer
79 views

In lockstep networking game, how to handle sudden lags and disconnection?

I am trying to implement a game similar to "Street Fighter" by using lockstep networking model so that two players can play remotely via Internet. I have read a lot of articles about lockstep ...
2
votes
3answers
330 views

How do you filter entities in an Entitiy Component System?

I am currently writing my own ECS in C++ and I am using std::bitset. I register a component at compile time and give it an ID. Position has ID 1 Direction has ID 2 .. ...
5
votes
3answers
229 views

Decoupling AI from game logic

Imagine a game with different types of characters or "actors" which can perform actions like walking and shooting. They are implemented using the state pattern to reduce the amount of coupling: each ...
6
votes
2answers
206 views

Decoupling assets, instances and the rendering module [closed]

I am trying to redesign a home-grown hobby engine. It became apparent that it was far too tightly coupled and so I'm trying to redesign it in a more modular way. Unfortunately, I'm baffled by the ...
0
votes
0answers
49 views

Is there such thing as a design pattern for game character attributes? [duplicate]

I'm toying with the idea of a character based game. The characters, robots, monsters, heroes (and weapons I suppose) will all have various attributes as per a D&D game for example. They player ...
2
votes
3answers
125 views

Is this a viable architecture for lag compensation?

In some games/engines (such as Source), the server compensates for latency by applying player inputs in the past. Whenever the server receives a player's input for a frame, it rewinds the game to the ...
0
votes
1answer
321 views

How to create sandbox game [closed]

I have a lot of experience with programming but I'm new in game development world, so I don't know what I don't know. I want to create a MMORPG sandbox game. When I say sandbox game I have something ...
0
votes
1answer
142 views

Render system should know entity manager?

in an ecs based game architecture, I think the entity manager is a "high-level" system, and the render system a "low-level" system. When I move my entity (that means I edit the position component of ...
14
votes
4answers
3k views

Should a socket server and game server be separate processes?

Assume a simple standard client/server game. For the server, is it worthwhile to have a separate process that listens for connections and messages from clients and sends the data via local sockets or ...
2
votes
1answer
133 views

Where should I put the SDL_Renderer* using the ECS with SDL2 and C++?

So I'm still learning about ECS (Entity Component System) and whenever I'm thinking about the architecture and actual implementation, I just can't figure out where should I put the SDL_Renderer*. So ...
9
votes
1answer
619 views

Implementing a Graph-Based Material System?

I'm trying to wrap my head around how material systems like this, this are implemented. These powerful and user-friendly, graph-like systems seem to be relatively common as a method of allowing ...
2
votes
1answer
257 views

Modular enemy behaviour in a shmup - Delegates unsuitable?

I'm creating a shmup type game and trying to implement the enemy wave system, which includes the associated enemy behaviours like their movement and bullet patterns. I've tried to separate the ...
0
votes
1answer
198 views

Modeling object oriented snakes and ladders

I'm trying to create a basic clone of Snakes and Ladders using object oriented design. I'm struggling to model my objects and their relationships. For the time being I'm interested in moving players ...