158 votes
Accepted

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

Technical Reasons: Game made platform specifically: When some developers are making their games, they can sometime rely on platform specific functions. While the game engine might be able to build ...
user avatar
  • 3,551
89 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 ...
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 ...
user avatar
  • 1,299
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 ...
user avatar
  • 112k
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 (...
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,...
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 ...
user avatar
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 ...
user avatar
  • 9,937
19 votes

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

There are good answers so far, but let's get to the bottom line. According to Steam's June 2017 Hardware survey, 96.24% of users sampled used Windows. Of Windows users, 87.37% are either Windows ...
user avatar
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 ...
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 ...
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 ...
user avatar
  • 18.9k
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 ...
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 ...
user avatar
  • 112k
13 votes
Accepted

How to profile CPU and GPU performance if I have a monster PC?

They're called profilers. Visual Studio has both CPU and GPU profilers built in to recent versions. A profiler will give you an idea of how much time your app is taking and where that time is being ...
user avatar
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 ...
user avatar
  • 112k
12 votes
Accepted

What can I do to avoid one-off flags and checks throughout my code?

Have you looked into entity component systems and event messaging strategies? Status effects should be components of some sort which can apply their persistent effects in an OnCreate() method, expire ...
user avatar
  • 454
12 votes

Separating Game Engine from game code in similar games, with versioning

Create an engine module/folder/whatever, that contains everything that can be generalized and is 100% independent from the rest of the game. This would include some code, but also generic assets ...
user avatar
  • 29.1k
11 votes

What can I do to avoid one-off flags and checks throughout my code?

RobStone is on the right track, but I wanted to elaborate since this is exactly what I did when I wrote Dungeon Ho!, a Roguelike that had a very complex effects system for weapons and spells. Each ...
user avatar
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. ...
user avatar
  • 112k
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.: ...
user avatar
  • 29.1k
10 votes
Accepted

Decoupling input from game states / entity behavior

Input is hard. Most of the simple patterns you see frequently in game dev just don't work well for input, at least at the low level. Typically, for any kind of GUI, you need to have some concepts of ...
user avatar
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 ...
user avatar
  • 2,350
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 ...
user avatar
  • 112k
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 ...
user avatar
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 ...
user avatar
  • 1,683
7 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 ...
user avatar
  • 202
7 votes
Accepted

Technical differences between square and hexagon for a grid?

I'd consider a Square-based grid as a "base" type of tiles in any game. Such grid is simple to imagine and moves over this grid are simple to understand. It's also ...
user avatar
  • 1,320

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