How code is structured. For questions on the internal design of a game engine.
1
vote
2answers
44 views
How can we test a section of a game?
I'm making a clone of an old atari 2600 game, so it's simple, only slightly more complex than the original.
I'm realizing that even the simplest of games have different "parts", what is a good ...
0
votes
0answers
37 views
Why should I use memory manager in my 2D game engine? [on hold]
so, that's the question. Someone says allocate big size of memory and then manage it is faster than allocate small size of memory, but other say memory manager can be an overkill.
I'm writing a 2D ...
0
votes
0answers
26 views
Best practices for indoor lighting for Archviz applications in Unity3D 5
I'm trying to develope an archviz application for a building and I'm not an expert at Unity but i managed to learn and build functionalty of scenes.
My main problem is enlightening rooms that cannot ...
0
votes
0answers
31 views
Apparently Bizarre Behaviour of Instantiate() and if()
To begin, let me note that I have scoured this website for answers that may speak to my situation and have not found any that immediately satisfy my curiosity. In a very basic game, I have written a ...
0
votes
0answers
52 views
Good practices for game script structure? [closed]
I'm working on a third person platformer in the vein of the Ratchet and Clank / Jak and Daxter genre. I'm using Unity and learning as I go.
One thing that I'd like to get sorted out before I get too ...
0
votes
0answers
26 views
How to handle entities when switching scenes in an Entity Component System
I originally asked this question on Reddit, but it did not get much traction. I thought it might help if I tried another audience.
https://www.reddit.com/r/gamedev/comments/5bnttf/...
0
votes
1answer
36 views
Homing Fireball - Seiken Densetsu 3 style
I'd like to reproduce the fireball spell of Seiken Densetsu 3.
The Fireballs don't follow the target directly, but encircle it more or less until they hit the target.
I have no idea how to ...
0
votes
1answer
26 views
Drawing in SFML outside of the main function (passing the window over to other fuctions) doesn't work
Why does the drawn Sprite only appear in the Window when drawn from the main-function, but not when drawn from an external function and how can I change this?
class Class {
private:
sf::Sprite ...
0
votes
1answer
49 views
Best practices for simple physics?
looking for most optimized ways of handling simple physics. By "simple" I mean not more than 1-2 actions per object, and most algorithms are linear.
For example, I have an UI element that implements ...
0
votes
1answer
40 views
Interfacing Entity component systems with networking/saving/serialization
I have a game engine using ECS. I have figured out how could I serialize the data contained in the ECS. Simply Have a system that registers serializers for different component types.
I want to create ...
0
votes
0answers
41 views
A central game controller responding to events vs global event system
Say you have combat mechanics and your projectile object fires an EnemyHit game event. You'd like to hook up a UI element indicating damage numbers. I've got two options:
Receive that event in my ...
0
votes
1answer
38 views
Class Structure for upgrades that depend on other upgrades
This game involves making buildings that can be upgraded. Sometimes a building's upgrade isn't available until another building is either created or upgraded to some specific level.
For simplicity's ...
1
vote
1answer
59 views
Terrain and Path Architecture
I am trying to figure out how to not break the SOLID principles with a collection of classes I am writing.
Currently, I have two stacks of classes that cater for editing and rendering Terrain and ...
0
votes
1answer
52 views
Is it a good idea to use a single sqlite database to store all occurring multiplayer matches?
I have a turn based strategy game for desktop and mobile, the game app uses a sqlite database to play local games. There's nothing special about the database design, I have tables to keep track of ...
-5
votes
1answer
47 views
Why isn't this glsl program working? [closed]
Why isn't this glsl program working ?
#shader vertex
#version 430
layout (location = 0) in vec4 position;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 texture_coordinate;
...
1
vote
1answer
70 views
Access Violation on Application Exit
Currently I'm writing an Engine.
How I have it right now is that, the engine is written in a project and exports a dll. On another project in the same solution as the engine, there is a sandbox ...
4
votes
2answers
157 views
OpenGL threaded loading
I'd like to introduce seamless level loading which means I need multiple threads. The main thread is for rendering the current scene (or for non-seamless level loading a progress bar) while the other ...
1
vote
0answers
174 views
ECS + QuadTree component storage
I like the Unity's entity-component-system approach, I'm working on something similar. However I'm not sure where and how I should store the components.
An easy answer would be: "store the components ...
0
votes
1answer
37 views
Separation of game logic - extending game state to include location information?
I'm currently making a conversion of a board game I have - I don't intend to release it, it's merely to sharpen up skills. I'm currently refactoring it to completely separate game logic from ...
1
vote
0answers
86 views
What techniques do MMOs use to support extremely large game worlds? [closed]
Most popular game engines available to public access like Cryengine , UE4 , unity etc have very small map size compared to MMO and MMORPG's out there.
This question is specific to unreal engine 4 but ...
1
vote
1answer
41 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
53 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
31 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
100 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
65 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
27 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
39 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
85 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
203 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
235 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
137 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
71 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
86 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
37 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
100 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
121 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
58 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
74 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 ...
5
votes
3answers
131 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
140 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
91 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
87 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
51 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
178 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
56 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
273 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
176 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
118 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, ...