All Questions
Tagged with programming or software-engineering
645 questions
12
votes
1
answer
1k
views
Destroying the parent when all children are destroyed
I have a spell system where a the spell is a self-contained game object handling all the logic. When done, it destroys itself. This works great
Then I added a second game object handling animation, ...
1
vote
1
answer
272
views
Creating composite transformation matrix to apply in vertex shader
What I'm puzzled about, is why most tutorials on graphics programming speak of creating a composition of transformation matrices - which are then applied in a single loop (to each vertex).
I did the ...
1
vote
0
answers
69
views
Common Methods to Restrict User Movement and Prevent Other Objects from Acting in Games
I am a web and mobile app programmer. Compared to web and mobile app source code, I haven't seen much game programming source code.
In web applications, all elements are essentially static (?), and ...
7
votes
3
answers
2k
views
How do you determine what order to process chained events/interactions?
I'm trying to write a top-down tactics RPG game in python, and run into the first major decision I can't make with my limited knowledge of RPG fundamentals.
In our game you create a team of characters ...
1
vote
1
answer
209
views
Correct way to manage managers and controllers in Unity
I am having a bit of a headache right now about my controllers:
Ive got a bunch of managers in my game, for example
A MasterController to manage most serious stuff like pausing or turning off input
...
3
votes
2
answers
1k
views
Decouple game entity from its owner when logic depends on it
In my real-time multiplayer game, there are multiple entities that are very interrelated and whose logic is very related to the player who owns them. I don't think I can decouple the classes from each ...
0
votes
0
answers
98
views
How to implement graphics API functions like setUniform on a cross-platform shader in VLang?
I've been working on a C++ game engine for a while, but I decided to scrap the project because doing it in C++, despite my best efforts, I could feel the technical dept building. As such, I switched ...
1
vote
1
answer
309
views
How do programmers distribute their games from custom game engines?
I am currently reading tons of books about game engine, real time rendering, animation, physics... but I could not find any description of how game developers who built their game with their own game ...
1
vote
1
answer
219
views
When should I call the physics simulation within the game loop?
I am thinking about where to call the physics simulation. The current situation is that I first update the entities and then the physics immediately before rendering. As you can see in the following ...
2
votes
1
answer
236
views
Programming Singletons vs Static classes
I've been developping a 3D app for some time and I remember at some point I started to need to pass data arround in unrelated areas of the program, where it wouldn't make much sense to pass them ...
1
vote
0
answers
144
views
When to use the same class for both client and server versions of an object, vs. when they should differ
I am learning about networking for game development and need some insight.
My knowledge of Unreal Engine is that it uses RPCs and replicated variables for actors. I also know that Unity has Networked ...
1
vote
1
answer
545
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 ...
0
votes
0
answers
127
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 ...
0
votes
0
answers
77
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 ...
1
vote
2
answers
197
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 ...
2
votes
2
answers
276
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 ...
3
votes
1
answer
1k
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 ...
3
votes
1
answer
847
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 ...
2
votes
1
answer
76
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 ...
0
votes
2
answers
972
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 ...
0
votes
1
answer
1k
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 ...
0
votes
0
answers
51
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 ...
0
votes
1
answer
120
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 ...
0
votes
0
answers
81
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 ...
0
votes
1
answer
415
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 -- ...