158 votes
Accepted

Why are games built on cross-platform engines sometimes exclusive to Windows?

Technical Reasons: Game-code made platform specific: When some developers are making their games, they can sometime rely on platform specific functions. While the game engine might be able to build ...
user3797758's user avatar
  • 3,641
88 votes
Accepted

When is the best time to consider performance?

Engineering for Performance Follow vendor recommendations. Use the correct data structures. Implement the correct usage patterns. Don't do anything stupid. Optimization When already written code is ...
Maximus Minimus's user avatar
80 votes
Accepted

How do bullets work in video games?

I can certainly see why you would think that it would be hard to simulate those, but there are enough constraints on bullets (all projectiles, really) to make them easier. They are generally ...
Tom K's user avatar
  • 1,319
58 votes

How do videogames store information offscreen?

Usually you should separate the logical state of your game environment from the visual representation. The player might only see a small part of it on their screen, but you still keep the state of ...
Philipp's user avatar
  • 119k
45 votes

How do bullets work in video games?

Probably one of the most efficient ways to implement bullets is using what is known as hitscan. It is rather simple in its implementation - when you fire, you check to see what the gun is aiming at (...
Seta's user avatar
  • 1,388
37 votes

How do videogames store information offscreen?

You are going at it backwards. You start with the logical state of your game and model that. The whole logical state of the entire world will almost certainly be too much to be held in memory at once,...
Polygnome's user avatar
  • 803
31 votes

Why are games built on cross-platform engines sometimes exclusive to Windows?

Because being available doesn't mean being free & instant. Supporting one more operating system, in its most simplistic form, means one more platform to provide technical support for. The more ...
starikcetin's user avatar
  • 5,275
22 votes

When is the best time to consider performance?

If you want to do optimization at the right times, have slow machines and use them. For a small shop, a good option is to use a slow laptop on the commute and a fast desktop in the office. As an ...
Peter's user avatar
  • 9,925
19 votes
Accepted

Is it a good option to simultaneously work on a game and a game engine?

Consider using a framework, like MonoGame. It is a kind of a middle ground between "nothing" and a full-blown engine like Unity or Unreal. It saves you from the really finicky implementation details ...
htmlcoderexe's user avatar
17 votes
Accepted

How likely will I be able to get a job in game design with a masters in computer programming?

You should notice that game design is nothing that is necessarily related to programming. It also applies to board games, card games and every type of game, computer games being one of these. It's a ...
Philipp Fromme's user avatar
16 votes

Is it a good option to simultaneously work on a game and a game engine?

You, of course, can use a third party solution. You can develop C# games with (in decreasing complexity) Unity, Godot, Monogame, OpenTK, among other solutions. Making a game without a third party ...
Theraot's user avatar
  • 26.6k
14 votes

Why are games built on cross-platform engines sometimes exclusive to Windows?

The other answers here are good, but here is one that wasn't mentioned. I'm having this problem right now - my team is about to release a game made in Unity for Windows/Mac. We've gotten lots of ...
Cody's user avatar
  • 241
14 votes
Accepted

When or why would someone use a programming language (Swift, Java, C++, Rust etc...) over an engine like Unity?

You need to write a game without an engine when you have a game with very unique technical challenges which are not sufficiently covered by general-purpose game engines. General purpose game engines ...
Philipp's user avatar
  • 119k
13 votes

What do I need to consider before making any class singleton?

Do you think you don't need more than one or do you think there must never be more than one? The singleton pattern is mostly useful in situations where the existence of more than one instance of a ...
Philipp's user avatar
  • 119k
11 votes

AI multithreading

Implementing logic by threads is almost always a very bad idea. Multi-threaded programming is difficult! You will run into race conditions and deadlocks resulting in impossible to reproduce bugs. ...
Philipp's user avatar
  • 119k
11 votes
Accepted

Should items in an RPG be hardcoded or loaded in some other way?

Weapons are data. You shouldn't really ever keep data hardcoded. Your structs / classes should accommodate all necessary parameters to build a weapon's data from scratch, e.g.: ...
Engineer's user avatar
  • 29.5k
10 votes

Introduction to game engines for children

I found the good old rpg maker quite good when I was at that age myself. It's not that powerful compared to the big name engines but for a plain game it is more than enough. And it focuses more on ...
Zibelas's user avatar
  • 4,291
9 votes

Do retail games use "inversion of control" and "dependency injection"?

I'm writing this at a time when the accepted answer is by a contributor who strongly opposes the concept and I wish to provide a different view: Dependency injection is indeed not widely used in game ...
Cygon's user avatar
  • 222
9 votes

When is the best time to consider performance?

No, you don't have to check after every line because not every line is performance-relevant. It mostly depends on how often a line is executed. A code section which takes 1 ms to be executed is ...
Philipp's user avatar
  • 119k
9 votes
Accepted

Which parts of Doom (1993) are open source and which are not?

Doom is divided into two components: The game engine. The game data. Of these, the source code which was released is for the game engine only, and as the readme notes, only for the Linux version, as ...
Maximus Minimus's user avatar
9 votes
Accepted

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

A lot of systems in a game that needs to be updated are things that are not rendered and don't need any input, they simply need a call to their update function every frame. They don't have any ...
DMGregory's user avatar
  • 134k
8 votes
Accepted

Are there technical reasons to use short variable names in shader code?

I've noticed the same trend, I've found the following reasons apply: Shadertoy in particular is just that a toy. You will often find people don't bother with good coding standards and do what ever ...
Krupip's user avatar
  • 1,763
7 votes

AI multithreading

Create a thread for each player is an overkill, 5000+ threads will trash your server performance. My suggestion is to create a job queue where you put all your 5000 players state then you can launch ...
pinco's user avatar
  • 421
7 votes

How do bullets work in video games?

I'm by no means an expert, but to answer your question, yes, you would need many of those things you mention. For your 2D example, you could have a position and velocity for a bullet. (You might ...
user1118321's user avatar
  • 2,632
7 votes
Accepted

Is an ECS viable in garbage collected languages?

The Garbage Collector (GC) is not really an obstacle to implement an Entity-Component-System (ECS) architecture. All you need is a root object for your ECS. It would hold references to the containers ...
Theraot's user avatar
  • 26.6k
6 votes

How do bullets work in video games?

Wouldn't it be hard on the processor to process thousands of these objects being instantiated, then destroyed (when on-hit effect is triggered)? RAM space? I think you're underestimating just how ...
pjc50's user avatar
  • 433
6 votes

How do I avoid writing Manager classes?

When you read the blog post you linked to in the comments, then you will see that "being a Manager if by another name" is exactly what it wants you do to. It's general consensus in software ...
Philipp's user avatar
  • 119k

Only top scored, non community-wiki answers of a minimum length are eligible