How code is structured. For questions on the internal design of a game engine.
-6
votes
1answer
35 views
what is this 64 bit thing Star citizen fans are hyped to the brim about? [on hold]
Does it refer to 64 bit floating point precision in CPU calculations or 64-bit GPU calculations?
How is it ground-breaking when even 32-bit CPU can handle 64 bit float (double precision)? In other ...
1
vote
1answer
32 views
How should renderer class relate to the class it renders?
I am working on making a Pong clone as a practice project. I have a PongState class with members like Ball, Paddle, Board and Score. I want to structure my code so that each object doesn't have to ...
0
votes
4answers
49 views
Track first time leveling up
Broad question, but I'm looking for some better ideas.
Currently I have a Player class and booleans for hasSeenLevel2, hasSeenLevel3, etc. When I give a player exp I call a checkLevel method that ...
0
votes
0answers
30 views
What are the main reasons to use scripting in games? [duplicate]
I'm trying to understand the appeal to scripting in large games.
Is it ease of development by avoiding lower level coding like C++? Thus avoiding the long compile times?
It seems scripting doesn't ...
1
vote
1answer
84 views
Make a 2d top down game with round map
Currently, I am making a top down game using Unity. Here is the problem that I’m trying to solve: The player in my game is always centered on the screen, and the since the map is rounded, the agents ...
0
votes
4answers
59 views
Passing Globally View Matrix and Projection Matrix
This is a general question, and can have multiple answers. However, when doing engine development, what is the best method to share the projection matrix and view matrix with all graphic entity shader'...
0
votes
0answers
24 views
How to keep user logged in in web-based game
Imagine web-application (eventually game) built according to the following architecture:
The Back-end consists of a service, that is loading the world and managing the world attributes and entities.
...
0
votes
1answer
35 views
Assigning jobs to in-game entities to carry out tasks (move object, build item etc.)
I'm not really sure what to call this so I'm struggling to Google for solutions.
Basically my game will have resources (wood, stone, etc) that are "delivered" to a point on the map. I want worker ...
1
vote
1answer
81 views
Design API-agnostic classes
I don't know if the title is clear enough - well, i'll have to explain what i mean anyway.
Suppose i am writing a "game engine", or rather a framework of reusable classes.
What i've done so far was ...
1
vote
2answers
164 views
Good way to manage multiple game modes?
/UPDATE:
I took one of the suggested solutions and tried to implement them. I implemented a BaseGameWorld class that contains the basic tetris gameplay. Every game mode extends this base class. If any ...
1
vote
3answers
136 views
Multiplayer game servers architecture
I'm trying to create MMORPG with huge world divided by chunks. I was thinking a lot about servers architecture. I don't want my main game server to have direct access from clients and I do want to ...
1
vote
3answers
134 views
What is a cheap (better free) way to make multiplayer in a shooter?
I'm a newbie indie, so I don't have a budget for a game. But I'm making a 3rd person shooter and I need multiplayer for it.
It's a mech shooter, so it won't have very fast movements, meaning I don't ...
1
vote
0answers
60 views
Create a stack driven coroutine based state machine for Unity
I am working on a game where I am using a coroutine based state machine which is mostly a multi class implementation of this link. I am using it because it allows me to create multi frame sequences.
...
0
votes
1answer
80 views
How should you structure your graphics system around your logic system?
C++ & Cocos2d-x, but I think the issue is language-independent.
I just recently finished up writing the foundational logic for my game. The way I've decided to keep my logic and my graphics ...
2
votes
0answers
36 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
1answer
68 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
75 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
116 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.
...
2
votes
1answer
57 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
43 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 ...
4
votes
0answers
87 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
127 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
89 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
83 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
49 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
155 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
268 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
2answers
159 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
115 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
36 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
120 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 ...
0
votes
2answers
143 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
151 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
128 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
57 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
88 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
125 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
318 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
428 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
46 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
82 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
139 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
86 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
38 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
184 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
142 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
509 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 ...