Frequent Questions

155 votes
11 answers
69k views

How closely can a game legally resemble another?

Most games build on other games' successes and many are downright clones. Where is the limit of imitation before legal issues come into play? Is it down to literary or graphic work like characters and ...
Fuu's user avatar
  • 2,358
15 votes
3 answers
9k views

NullReferenceException in Unity

Since many users are facing the NullReferenceException: Object reference not set to an instance of an object error in Unity, I thought that it would be a good idea ...
Hellium's user avatar
  • 2,949
68 votes
2 answers
32k views

I'm rotating an object on two axes, so why does it keep twisting around the third axis?

I see questions come up quite often that have this underlying issue, but they're all caught up in the particulars of a given feature or tool. Here's an attempt to create a canonical answer we can ...
DMGregory's user avatar
  • 139k
271 votes
11 answers
114k views

When should I use a fixed or variable time step?

Should a game loop be based on fixed or variable time steps? Is one always superior, or does the right choice vary by game? Variable time step Physics updates are passed a "time elapsed since last ...
Nick Sonneveld's user avatar
14 votes
4 answers
9k views

Why use Time.deltaTime in Lerping functions?

To my understanding, a Lerp function interpolates between two values (a and b) using a third value (...
AzulShiva's user avatar
  • 679
185 votes
1 answer
51k views

What is the role of "systems" in a component-based entity architecture?

I've been reading a lot about entity components and systems and have thought that the idea of an entity just being an ID is quite interesting. However I don't know how this completely works with the ...
bio595's user avatar
  • 1,961
320 votes
1 answer
182k views

What are good games to "earn your wings" with? [closed]

I believe that in order to become a good game developer, you need to make games. From a programmer's perspective, what are some good entry level games to get your hands dirty? What skills and ...
13 votes
4 answers
7k views

How can I launch a GameObject at a target if I am given everything except for its launch angle?

I am trying to launch an object at a target, given its position, its target position, the launch speed, and the gravity. I am following this formula from Wikipedia: $$ \theta = arctan \bigg( \frac{v^...
Evorlor's user avatar
  • 5,870
74 votes
9 answers
41k views

What's a way to implement a flexible buff/debuff system?

Overview: Lots of games with RPG-like statistics allow for character "buffs", ranging from simple "Deal 25% extra damage" to more complicated things like "Deal 15 damage back to attackers when hit." ...
gkimsey's user avatar
  • 1,013
16 votes
3 answers
4k views

What's the largest "relative" level I can make using float?

Just like it was demonstrated with games like dungeon siege and KSP, a large enough level will start to have glitches because of how floating point works. You can't add 1e-20 to 1e20 without losing ...
jokoon's user avatar
  • 5,253
109 votes
6 answers
187k views

What is the proper way to handle data between scenes?

I am developing my first 2D game in Unity and I have come across what seems an important question. How do I handle data between scenes? There seems to be different answers to this: Someone mention ...
Enrique Moreno Tent's user avatar
87 votes
5 answers
24k views

What is the point of update independent rendering in a game loop?

There are dozens of articles, books and discussions out there on game loops. However, I pretty often come across something like this: ...
Sam's user avatar
  • 843
33 votes
4 answers
9k views

Legal issues for a "fangame" of a commercial franchise? [duplicate]

I've played around in the past of the 2D Flash fan-made version of the popular Valve game Portal. It has basically the exact same mechanics, but as a 2D side-view flash game. Lately I've toyed ...
Justin L.'s user avatar
  • 854
45 votes
8 answers
45k views

How do I create a weighted collection and then pick a random element from it?

I have a loot box that I want to fill with a random item. But I want each item to have a different chance of being picked. For example: 5% chance of 10 gold 20% chance of sword 45% chance of shield ...
Evorlor's user avatar
  • 5,870
19 votes
1 answer
13k views

What makes scaling pixel art different than other images?

Recently I was coaching a developer who's new to making pixel art games, and realized there's some "conventional wisdom" around scaling pixel art that's not obvious to a newcomer, and might not be ...
DMGregory's user avatar
  • 139k

15 30 50 per page
1
2 3 4 5
339