Questions tagged [software-engineering]

Software engineering is the design and development of software as it applies to the game development field. Questions using this tag should be about theoretical concepts and practices as relates to the task of creating or designing software. This tag should not be used simply because a question involves programming or contains code.

Filter by
Sorted by
Tagged with
1 vote
1 answer
73 views

How to clean up list entries when objects are destroyed in Unity?

We are developing an economic sandbox somewhat similar to a mixture of The Guild and Kenshi. In this game, both the player and the NPCs will often create and destroy (consume) various objects. The ...
stack_ndx's user avatar
0 votes
0 answers
18 views

Beginner-to-Advance Study path/progression to make 3D character customisation/creation [closed]

Firstly, I would like to apologise in advance if my question is too inappropriate for my level or this website. I’m not here to make anyone upset. I am coming from an unfamiliar angle, that which to ...
PoppySickleSticks's user avatar
0 votes
3 answers
92 views

What is the best way to implement a scene manager?

I'm trying to create a scene manager system for a small framework I'm writing on top of SDL2. I have implemented a scene management system that works, but I am not sure if it is structured how it ...
Sphereishere's user avatar
0 votes
0 answers
63 views

Data driven battle logic

Concept I am designing turn-based boss battles and want each boss to have different behaviors and skills they perform during a battle. The boss is selected randomly and is identified by a unique ...
VoidTwo's user avatar
  • 103
0 votes
0 answers
46 views

GameObject optimization in backpack behavior

I am trying to design the item part of my game. My original design was just to treat them as a gameobject and to give every item an item (or some derived) component,...
YX L's user avatar
  • 1
0 votes
0 answers
50 views

Sequencing interaction between rendering/animation and game logic in Poker game

I am building a two-player(CPU-User) Poker application with C++ and OpenGL. Currently the application just renders the graphics, keeps track of which button is pressed, value entered in textbox ...
Incompleteness's user avatar
0 votes
1 answer
90 views

Store and call multiple functions consecutively

I am looking to create a "stack" of functions that I can call at will. In my game, multiple events can trigger at the same time. These things should not be shown at the same time however, ...
Davy's user avatar
  • 103
1 vote
2 answers
138 views

Is it appropriate to design heroes as items in game development?

If you were to design a multi character game like "Genshin Impact", would you design the character(hero) as a item? What is an item: in our game design, an item is an object within the game ...
Criwran's user avatar
  • 111
0 votes
1 answer
262 views

How to implement rogue-lite skill system

I am creating a roguelike/lite game where in a player has a freedom to learn a number of skills. For example, I have a projectile skills and I can learn three different behaviours. Behavior 1: shoot ...
PeytonFarquhar's user avatar
2 votes
2 answers
171 views

Considerations when applying C++ Core Guidelines in game development

I'm curious about the impacts of applying the C++ Core Guidelines to game development. When I try to discuss about this, and point out that we should check return values, or validate user data, or ...
phydthekid's user avatar
0 votes
1 answer
93 views

Accepting user input in continous game loop

I have a game loop that simply iterates through every entity and calls entity.update() ...
Michael Moreno's user avatar
3 votes
1 answer
398 views

How to implement a function that normally returns a float, but can sometimes fail?

In Godot GDScript, I have a function that returns a float. Inside the body of the function, I use the built-in method find, that ...
Life after Guest's user avatar
0 votes
0 answers
49 views

How to render using Mesh Component and Transformation Component in Entity Component System

I was developing a game engine using DirectX11. You want to use the Entity Component System (ECS) in your existing method OOP. By the way, I have a question about the rendering system of ECS. I was ...
tot4766's user avatar
1 vote
1 answer
82 views

cyclic dependency error in roblox survival game

Description In my game, I have have 3 module files: "PlayerList.lua", "PlayerData.lua" and "WorldData.lua". PlayerList.lua = a list of PlayerData classes (requires ...
saist's user avatar
  • 11
3 votes
1 answer
582 views

Characters ai code organization

I want to create a an ai with finely customizable character. The ai should be able to handle generic behaviors, like scheduled activity, shared across all character, but have specific override for ...
user29244's user avatar
  • 327
1 vote
1 answer
88 views

Reduce coupling between various singletons

I'm working on a game that makes use of several singletons such as a game manager, audio manager, and a level loader. The game manager I created has references to the audio manager, level loader, and ...
Mav's user avatar
  • 99
2 votes
1 answer
46 views

How to organize game entities that are stored inside other entities?

In my GPS based game, there are certain structures the players can build that store units. For example, airbase structures store aircraft objects. Currently, the way I have this organized is the ...
user204468's user avatar
0 votes
1 answer
146 views

Would it be okay to try to reverse engineer Spore as an experiment and publish the results on-line?

Game in question is Spore. I'm fascinated by space and this game has been my favorite for years. Now, I would try to reverse engineer as much as I can as an experiment because I am interested in ...
Sergej Zivkovic's user avatar
0 votes
2 answers
493 views

Interactable actors should be implemented via components or inheritances?

I am new to game development and I am learning Unreal Engine right now. When a player character APlayer wants to interact with other actors (such as ...
The Real Masochist's user avatar
0 votes
1 answer
93 views

What is the expected software maintenance pattern when switching Unity versions?

What is the typical upkeep of a project made in Unity, specifically how often/how much the code needs to be updated/changed/added when a new Unity version is released and/or when your currently used ...
CinnaMonster's user avatar
0 votes
1 answer
220 views

How would you implement card effects in a card game?

I'm making a card game right now and I am hesitating in how to design my cards. Let me explain I have a card that draws two cards from the deck when played. The way I'd code it is I'll create a class ...
younes alaoui's user avatar
2 votes
6 answers
204 views

Modelling Two Way Relationship in Unity for Scriptable Objects

How does one model two-way relationships for scriptable objects? Let's say we have a number of items in-game, and each item can be obtained by different conditions. Some may require you to complete a ...
qris's user avatar
  • 53
0 votes
0 answers
37 views

Is it better to spawn an object after from same gameobject or handle the spawning in different gameobject?

So basically I am spawning the object lets say the enemy at random position on screen. Should I handle the spawning in a different gameobject or in enemy. So when enemy is destroyed it calls the ...
Nomi's user avatar
  • 33
1 vote
1 answer
152 views

How to handle duplicate logic in a state machine for a platformer player?

I'm trying to implement a platformer character using a finite state machine, but I have troubles understanding what kind of logic goes into a state and what logic goes into a main player class ...
Rinat Veliakhmedov's user avatar
0 votes
1 answer
76 views

How to build a system for ammunition being fired out of cannons when player characters and crewmates can also be ammunition?

I'm currently working in Unity building a game inspired by the niche DS game, Dragon Quest Rocket Slime. It's a Zelda-like forced-perspective top-down game where the primary combat mode is you ...
Cross's user avatar
  • 1
1 vote
0 answers
49 views

Is it worth creating engines for simple projects? [closed]

I know, this question has already been answered in several places on the internet and the answer is NO. But there are some points, I probably don't have the experience of half of you but I love C++ ...
Samuel Ives's user avatar
0 votes
0 answers
64 views

What is the best approach for achieving DI / testability in Unity development?

Sorry for the fairly open-ended question, but I'm hoping I can get some insight on how to tackle automated testing in Unity. I've been quite surprised to not find a "definitive" approach on ...
Timothy Nielsen's user avatar
0 votes
1 answer
123 views

Is there a good practice for defining names programmatically?

In my use of Unity so far, I've been defining element names programmatically with classes like this: ...
Timothy Nielsen's user avatar
0 votes
1 answer
203 views

Draw a graph as a world map in UI?

What's a good way to take a graph of nodes and draw it in your UI as a map? I already have a graph and I'm happy with how it's generated. However, it doesn't have any positional data for the nodes -- ...
idbrii's user avatar
  • 683
0 votes
1 answer
333 views

How do you use configuration files to describe the contents of an entity in an ECS-system?

One of the advantages that's often brought up when talking about ECS-systems is that they allow a higher degree of flexibility in regards to Data vs Code. Without the limitation of hard-coded types, ...
JensB's user avatar
  • 147
3 votes
2 answers
831 views

How do different compositions/types of entities interact in an ECS-system?

I have a working ECS-system set up, largely inspired by this brilliant article (not at all required reading to be able to answer my question) on https://indiegamedev.net/ showcasing an ECS-system with ...
JensB's user avatar
  • 147
2 votes
2 answers
811 views

How to program different types of monsters

I'm working with a group of programmers and I'm trying to program different types of monsters in Unity. I want to make it so that all the monsters have values like attack power, attack speed, moving ...
Howler's user avatar
  • 169
3 votes
1 answer
594 views

Should you avoid memory allocation and deallocation while the game is running?

I recently read this answer on this site, which says the following: making sure no allocation/deallocation is being done while the game is running is a golden rule of thumb. I interpret this as ...
JensB's user avatar
  • 147
2 votes
1 answer
1k views

What should be an entity/component, and what shouldn't?

I've recently been reading the book Game Programming Patterns by Bob Nystrom, and one chapter I've found a bit hard to grip is the chapter about the Component pattern. In the example he uses (which ...
JensB's user avatar
  • 147
3 votes
1 answer
155 views

Storing stateful function-based actions in a JSON

System: My game uses an "ECS + event queue" architecture where every tick, various events change the state of JSON-able data. Plain JS objects. Problem: I want to be able to save the game-...
Hypergardens's user avatar
0 votes
0 answers
160 views

How can I efficiently and safely represent and query game state in the logic programming paradigm?

After learning Dialog, I've discovered representing game logic using the logic programming paradigm is a lot of fun; the composability and non-locality makes it feel like some kind of superior ECS. ...
smallobsession's user avatar
0 votes
2 answers
153 views

Naming convention for loop modules

Question about game engine object oriented design. Let’s say I have an engine with a main loop, and many handlers that will be executed by the main loop every time on next iteration of main loop. So ...
Dmytro Brazhnyk's user avatar
2 votes
1 answer
380 views

Is it better design to store event effects within an Entity itself, or within a system?

I'm developing a 2D roguelike with an Entity Component System (ECS) and I've been struggling with this question a lot the past week. For example, let's say you have various effects that occur when an ...
Ryan Peschel's user avatar
2 votes
1 answer
93 views

Should ammo limitations be controlled by the game class or the weapon class?

I have a simple shooter game with a GameLevel class and a Shooter class. The shooter has a set amount of ammo, and every time the ...
Gary Allen's user avatar
0 votes
2 answers
2k views

What data structure do I use to store Archetypes in ECS?

I am implementing an ECS with "archetypes" similar to how they are defined in Unity: A unique combination of component types is called an Archetype. For example, a 3D object might have a ...
EnderShadow8's user avatar
1 vote
1 answer
174 views

How to reduce code duplication in a cross-platform renderer without tying the interface to one specific API?

I'm working on a game engine as a fun project over the spring+summer. I've decided that to allow myself to explore rendering APIs I'm unfamiliar with, and force myself to write reusable code, I'd ...
Ethan McTague's user avatar
2 votes
2 answers
893 views

Is it a good idea to use a hash table in an ECS?

I've had an idea for optimising my ECS engine. Instead of storing components in an array, store components in a hash table as <id> => <component>. ...
EnderShadow8's user avatar
0 votes
1 answer
402 views

How to pass data between game states?

Lately I've been using game state stack implementation from a book SFML Game Development and I've stumbled upon a problem with passing data between states. In this implementation State constructors ...
wixy0's user avatar
  • 67
0 votes
1 answer
107 views

How to deal with data that needs to be accessed by all objects?

I have a World class that currently only has one instance. It has data and methods that need to be accessed by all other game objects. Right now I'm hardcoding a ...
EnderShadow8's user avatar
5 votes
3 answers
2k views

Is an ECS viable in garbage collected languages?

I've done some research on Entity Component System architectures. Right now I have a convoluted OOP implementation which I'm planning on rewriting, so I was considering switching to a different ...
EnderShadow8's user avatar
0 votes
1 answer
239 views

Refactoring fighting game Movement class responsibilities

I'm a web developer, new to C# and trying to learn Unity. I've learned the C# syntax, I understand how to write working code, although I'm having a hard time understanding when and to what classes ...
Adam's user avatar
  • 3
1 vote
1 answer
7k views

How to get the source code for a game?

I read here a spectacular story of someone (scrappily) fixing some things in a game's source code, making it load 4 times faster! How did the developer get the source code in the first place? Is there ...
stevec's user avatar
  • 113
0 votes
2 answers
146 views

How to replace if/else/switch with polymorphisim

For a long time Robert Martin has been advising against if/else/switch branching logic and instead rely on the polymorphic behavior of different types. ...
Ken's user avatar
  • 6,096
1 vote
0 answers
325 views

How to design a character damage system with ECS architecture?

I am developing an game with ECS architecture and trying to design a character damage system. Does the following design fits into ECS conception and will it be extendable in future? I have an ...
Nikolai's user avatar
  • 27
0 votes
1 answer
181 views

It is possible to process data on relay servers?

I have a small game engine done in Java, and re-creating it on C++. While re-creating it i've decided on adding basic p2p online multiplayer. However, after reading more about networking, there are ...
Luiz Henrique's user avatar

1
2 3 4 5
13