Engine-design related questions. How code is structured.
0
votes
0answers
16 views
Node.js Lockstep Multiplayer Architecture
Background
I'm using the lockstep model for a multiplayer Node.js/Socket.IO game in a client-server architecture. User input (mouse or keypress) is parsed into commands like 'attack' and 'move' on ...
3
votes
1answer
174 views
How should game objects be aware of each other?
I find it hard to find a way to organize game objects so that they are polymorphic but at the same time not polymorphic.
Here's an example: assuming that we want all our objects to update() and ...
2
votes
2answers
132 views
What common interface would be appropriate for these game object classes?
Question
A component based system's goal is to solve the problems that derives from inheritance: for example the fact that some parts of the code (that are called components) are reused by very ...
2
votes
1answer
76 views
Multi-Threaded Pipelined Game Engine Data Synchronization Questions
Let's say I'm setting up a worker pool based game engine with pipelining. Let's say I have 4 stages in my pipeline as such:
Stage 1: Physics
Stage 2: AI/Input
Stage 3: Game Logic
Stage 4: Rendering
...
2
votes
1answer
96 views
Material, Pass, Technique and shaders
I'm trying to make a clean and advanced Material class for the rendering of my game, here is my architecture:
class Material
{
void sendToShader()
{
program->sendUniform( ...
1
vote
3answers
100 views
HTML5 2D Game Renderer
i have a question on designing a HTML5 2D game renderer.
I've read that it's better to not let entities draw themselves but instead put all the drawing functions in the renderer. After coding for a ...
14
votes
5answers
443 views
How can I design lots of different attack types that can be combined?
I'm making a top down 2D game and I want to have a lot of different attack types. I'd like to make the attacks very flexible and combine-able the way The Binding of Isaac works. Here's a list of all ...
3
votes
1answer
146 views
Separating components and logic
I've been working on how to build some of my game systems using components and systems. I'm having a little trouble following the approach that components should just be bags of data and systems ...
1
vote
3answers
71 views
Can I use a translate function to implement a viewport?
I read this great question and its accompanying great answer about rendering a viewport in a top down 2D game:
As for actually drawing the objects the camera can "see", you now draw all objects ...
0
votes
1answer
190 views
Where to save enemy positions in C++?
I'm wondering how and where to save the positions my enemies should spawn.
My idea was to use a struct such as:
struct enemy{
int x,y,type;
}
And save an array of it in a .dat with fwrite() ...
5
votes
1answer
193 views
Implementing Vehicles in your game
In the game i am creating as an hobby (learning is the primal goal of it all) i plan to implement a space ship that the player can enter and use to explore it. I tried to search the internet for the ...
1
vote
0answers
61 views
Abstraction/architecture between interface and “scene” in adventure game
I'm tinkering with an idea for an adventure game but am unsure how to define scenes and tie them to the game. I've got an idea but it doesn't feel quite right.
To save repetition, T&D = ...
1
vote
2answers
151 views
Implementing Explosions
I want to add explosions to my 2D game, but im having a hard time with the architecture. Several game elements might be responsible for explosions, like, lets say, explosive barrels and bullets (and ...
0
votes
2answers
144 views
Game Architecture doubt on variable access
Im having a hard time figuring out a solution to a problem that seems it should be easy to answer but since i cant come up with a good solution I bid your knowledge:
In my game i have a state manager ...
2
votes
1answer
165 views
Using an Entity System Architecture with Task Based Parallelism
Background
I have been working on creating a multithreaded game engine in my spare time and I currently trying to decide the best way to work an entity sytem into what I have already created. So far, ...