How code is structured. For questions on the internal design of a game engine.
1
vote
0answers
23 views
Design pattern for allowing components to interact with main state machine
I am making a game using Unity in which I have a main game state machine that controls the current game scenario.
My question is how do I handle communication between different components of the game ...
0
votes
0answers
21 views
How to keep it simple? [on hold]
This question is formed with 3 tightly coupled smaller questions:
1st
"Everything should be made as simple as possible but not simpler." - A. Einstein
Is this quote applicable to game deveopment? ...
0
votes
1answer
42 views
Finite State Machines for Enemies (AI vs. Entity States)
Finite State Machines are a great tool for simplifying a system where an Entity has many states it can be in with different conditions that determine what state to transition to. This works well for ...
0
votes
1answer
73 views
How do I go about implementing different behaviors on items?
How do I go about implementing different items with different behaviors?
I plan on having an inventory where those items are stored, but I can't figure out how do I go about implementing different ...
0
votes
1answer
102 views
How could I implement programming as a mechanic?
I am wondering how I could manage to execute programs made by players in my game via some sort of in-game computer. I have been trying to figure it out but I have no idea how it is even possible.
...
1
vote
1answer
40 views
How to stop diagonally in an event driven input system?
Example scenario:
Assume 2 dimensional top down movement system.
Given that I have 4 directional keys ( UP / DOWN / LEFT / RIGHT ), I am able to move in 8 different directions 4 perpendicular and 4 ...
0
votes
0answers
20 views
java server + javascript client via websocket
I'm thinking of 2D (with camera 'from the clouds', to earth - like civilization) MO, but easy to expand to MMO live game. I already have tomcat, and websocket connection to javascript and game must be ...
3
votes
0answers
75 views
Alternative in-game dev console implementations
I'm developing a dev console for my game. Currently I have a simple parser which is basically a regex which accepts words with dashes and dots (ie. list, 1.0, list -i) or simplistic arrays and maps (...
16
votes
6answers
7k views
How do videogames store information offscreen?
I'm trying to make a videogame from scratch, but I'm really new to this and keep running into basic issues. Most importantly, how do videogames store offscreen information? What I mean is, how does ...
-1
votes
1answer
102 views
Game engine + editor + gameplay dependency
I've tried to find my answer here but the other "similar topics" were different or just wasn't able to find the right one.
This is mainly a design (and some c++) question about the dependency between ...
1
vote
1answer
82 views
What architecture should I use to support extensions in my game?
What is the proper architecture for the game, that support extension modules, written in other languages?
I mean I have a simple game - written in Groovy (basically Java), heavily relying on Game ...
0
votes
0answers
75 views
Sharing game code between client and server
I'm having a code design problem involving synchronization between the server and clients. I have a class GameWorld that handles all of the simulation details (positions, velocities, projectiles, what ...
0
votes
1answer
44 views
Values or Struct-Like Location Class?
I'm currently working on a 2D RPG, where the player character moves on a tilemap but is not constrained to the individual tiles. Every tile in a room is referred to by x and y coordinates to an Array. ...
4
votes
2answers
130 views
Implementing Story and Quests in RPG
This question in very similar to this question, however I am still confused about how one would implement a story and quests in a finite state automaton RPG.
This is my first game that I am making (...
2
votes
1answer
55 views
Behaviours: Should I always return a reference to the behaviour on its methods? [closed]
I'm writing a small game to sharpen my programming skills, and I've chosen to use behaviors (that basically is a class that modifies its parent, to do things like movement, damage and stuff) to avoid ...
4
votes
2answers
248 views
Separating game logic and rendering
I know this has been asked before but I would like some things cleared up.
I understand that game logic and rendering should be separated but my problem is more or less how? For instance, should the ...
5
votes
1answer
105 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 ...
0
votes
1answer
110 views
Proper system architecture in a game engine?
This is my first time attempting to create a game engine. I came across a theoretical problem and would like to solve it before implementation. Right now I have a WindowSystem, which opens the window, ...
1
vote
0answers
35 views
Renderable object abstraction
In my engine I have 2 types of 2D renderables: sprites and groups (and maybe primitives later). Sprites are just textured quads and groups are multiple renderables grouped in a single object. I have ...
6
votes
1answer
110 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 ...
0
votes
2answers
109 views
How do I make a game over screen like Temple Run or Subway Surfer?
When you die in one of these 2 games I took screenshots of (Temple Run and Subway Surfers), what exactly comes up to say "Game Over" and posts your score and all-time high score?
Is it a different ...
2
votes
1answer
111 views
How to code a multi level isometric map?
I have already worked with isometric grids in the past, but in my current project I found an issue I am not sure on how to solve. I am trying to produce something similar to what's in the below screen:...
0
votes
2answers
107 views
2D top down RPG animation architecture problem
I have a problem with my sprite animations right now. I have different animations and sequences for each character so an specific archer might do a ranged attack in which he just plays one animation ...
2
votes
2answers
46 views
Handling input through callbacks or through game loop?
I've tried to figure out how to handle player input properly, but without luck so far.
As far as I have figured out, I can either:
Call the respective methods directly through the callback fired ...
0
votes
0answers
11 views
How should I structure power ups if they come in all shapes and sizes? [duplicate]
There are Items. These Items can hold multiple enchantments. These enchantments can do widely varying things. A few examples:
Boots: Double Jump
Sword: Poison Damage
Helmet: Increased Experience
...
-1
votes
1answer
79 views
How can I handling rendering of entities with an entity/component system?
I'm implementing an entity system in a game engine which is based on the Artemis framework. My question is, how can I wrap an existing rendering engine (like Ogre or Irrlicht) under this framework?
...
1
vote
0answers
81 views
Modern examples of Multiplayer Network Architecture [closed]
There's a lot of documentation on Multiplayer Network Models for games from the early 2000's (Quake3, Unreal, Counter-Strike, Source Engine) which go through concepts such as client-server ...
5
votes
1answer
316 views
Data structure to store breakable parts of a mesh
I have a wall mesh that is divided into destructible pieces. As it gets destroyed, the wall can collapse into separate objects with physics that can be destroyed as well. (Cut the wall in half ...
11
votes
2answers
416 views
How do I avoid writing Manager classes?
I seem to keep reading it's a bad idea to use XxxManager style classes in game engine programming, yet even when I try to avoid their use I always end up with something that holds all the actors/...
1
vote
0answers
37 views
Instanced based game with multiple node instances
I have a nginx load balancer with 4 nodejs instances behind it, and one Redis server to share certain memory.
My game is an instance game, similar to Diablo 2. Players can create "games" if you will ...
1
vote
1answer
78 views
Entity-components pattern and memory management
I indent to use a level-entity-components hierarchy in my c++ game engine where level is just a placeholder for entities. However, since I'd like to setup all the levels at once (and thus entities and ...
3
votes
0answers
119 views
Tick frame: update order problems
Sorry, it's a bit long story but I hope you can help me.
First of all: I have an entity class called SceneObject. The SceneObject has components (eg. RenderableMesh, Camera) and transformation data (...
1
vote
1answer
85 views
Targeting logic for 100.000 units army
I am making an army fight for my website armyfight. There can be fights of hundreds of thousands units. I am looking for better unit targeting. in jsfiddle is an example.
var enemy = {
2: {
...
0
votes
0answers
32 views
Platformer command queue - not sure how to proceed
While trying to figure out how to implement platform agnostic input handling for a platformer, I've discovered the command pattern and I liked the idea so I wanted to take it a step further.
I got ...
3
votes
1answer
117 views
Ability/Skill Data and Method Structure (C#, Unity3D)
So I've come to design my game which players will be having a unique set of skill or ability to come with. I can store skill name, mana cost, cooldown, etc in database which each skill have in common, ...
1
vote
2answers
136 views
TCG Board Architecture
While I was, sort of, studying the various TCGs around, concepts, similarities, differences and how they could be implemented, if designed to be in a virtual environment (e.g. PC game) I obviously ...
9
votes
3answers
391 views
Entity component system - game progression
I'm quite new to game development (but not to programming) and I'm trying to figure out what would be the best way to handle inter-world communication. What I mean is this:
I've been reading about ...
1
vote
0answers
80 views
When NOT to use ECS architecture? [closed]
I'm familiar with the notion of entity-component-system architecture, and its advantages over traditional class trees. That being said, are there scenarios where one wouldn't want to use entity-...
2
votes
0answers
72 views
How can I connect multiple explorable regions into one large map?
I am planning a 2-D science fiction game involving spaceships. A major thing that I am having trouble figuring out is how to create a 2-d array of smaller maps that the player can explore.
My ...
2
votes
0answers
42 views
Moving Draw functions out of GameObjects
This is basically the issue as in Tactics for moving the render logic out of the GameObject class with the topic already discussed here and here
However I'm not really satisfied with the given answers....
1
vote
1answer
56 views
Global variables in a multiplayer environment
I would like to know what's the best approach to solve this problem.
In a racing game, i need to create the final result chart.
In a single environment i've tought something like:
private string [] ...
0
votes
0answers
32 views
NodeJS timed update approach
My game has users building buildings, recruiting units, trading resources and sending attacks. All of this functionality takes a certain amount of time to happen and I'd like help with deciding on the ...
1
vote
1answer
47 views
game server - fault tolerant
If you have for example an MMO with 2000 players, and players are constantly removing / creating / swapping items (and doing some other important things that can't be lost).
If the updates are saved ...
0
votes
1answer
81 views
Is window creation decoupled from game engine?
I'm new to game development, and I was wondering about a architecture question.
The window creation code in C++ is given by doing the following:
Fill out a WNDCLASS struct
Register the window class ...
1
vote
1answer
42 views
How can I reduce writes-per-second when saving player data to a database?
Consider a game where the player has some profile or save data stored in a database. What I want to understand is, for things that effect the users score or level, there could be so many factors that ...
1
vote
0answers
67 views
How could I achieve an iOS high detailed level design for a platformer?
I'm seeing a lot of games that use a predefined and repeating set of tiles for their level (like FlappyBird or the Super Mario game series).
I'm a graphics designer so I would like to create levels ...
0
votes
1answer
65 views
How to desing an RPG system with regard to PVP [closed]
When you design a RPG system focused on PVE, one usually goes "mob of level X has Y hp and Z damage". How about when we do PVP with multiple classes?
Lets say we go Diablo, so we have STR/DEX/INT/VIT,...
0
votes
0answers
37 views
What are the benefits of decoupling the input system from the gameplay system?
I want to decouple as many systems as possible from the main loop. Probably the most beneficial would be to decouple the renderer and the gameplay system.
But I am wondering about what I should do ...
0
votes
2answers
204 views
Backend for data-driven multiplayer game
I am working on a match-based (5v5) multiplayer steam game that is similar to TF2, LoL, Dota 2, etc.
I am planning a data-driven approach where character/abilities/items/etc are defined in data (JSON)...
0
votes
1answer
100 views
How should my engine Identify objects
I'm making a fairly basic openGL 3D engine, at the moment, when you load an object, you would write
manager->LoadObjFile("cube.obj");
manager->AddParent("uvmap.bmp", "cube.obj", "cube", glm::...