All Questions

139
votes
11answers
36k 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 ...
255
votes
11answers
89k 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 ...
324
votes
20answers
344k views

Where can I find free sprites and images? [closed]

I need sprites and images, such as characters, landscapes and others. Where can I find them?
175
votes
1answer
40k 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 ...
35
votes
2answers
12k 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 ...
9
votes
3answers
4k 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 ...
64
votes
9answers
23k 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." ...
304
votes
28answers
150k 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 ...
33
votes
4answers
6k 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 ...
40
votes
5answers
9k views

Should actors in a game be responsible for drawing themselves?

I am very new to game development, but not to programming. I am (again) playing around with a Pong type game using JavaScript's canvas element. I have created a <...
130
votes
3answers
79k views

How should I write a main game loop? [closed]

How should I write a main game loop? What are some things that you should do in the game loop, and what are some things that you shouldn't do in the game loop? I've written plenty of them, but I've ...
49
votes
4answers
66k 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 ...
32
votes
5answers
7k views

How can I protect my save data from casual hacking?

What options are there for saving game data in a secure manner? I'm interested in solutions specifically tailored for C++. I'm looking for something that is fast and easy to use. I'm only concerned ...
12
votes
1answer
5k 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 ...
11
votes
3answers
3k 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 (...
129
votes
13answers
226k views

Where can I find free music for my game? [closed]

I'm in need of some tunes for my game. Where can I procure some, preferably for free?
52
votes
10answers
19k views

Game State 'Stack'?

I was thinking about how to implement game states into my game. The main things I want for it are: Semi-transparent top states-being able to see through a pause menu to the game behind Something OO-I ...
28
votes
1answer
15k views

Orienting a model to face a target

I have two objects (target and player), both have Position (Vector3) and Rotation (Quaternion). I want the target to rotate and be facing right at the player. The target, when it shoots something ...
126
votes
10answers
175k views

Where can I find free sounds for my game? [closed]

I need some sound effects for my game. Where can I find some? Or any programs that can easily generate them?
113
votes
22answers
69k views

Why is it so expensive to develop an MMO? [closed]

I want to develop an MMO, like World of Warcraft, but some basic research says that it is going to take a lot of time and money. I'd like to know why. Why is it so expensive to develop an MMO?
23
votes
1answer
8k views

Isometric rendering and picking?

I've been looking for a formula to plot (world->screen) and mouse pick (world->screen) isometric tiles in a diamond-shaped world. The ones I've tried always seem to be, well, off. What's the usual/...
15
votes
2answers
13k views

How can I rotate about an arbitrary point in 3D (instead of the origin)?

I have some models that I want to rotate using quaternions in the normal manner, except instead of rotation about the origin, I want it to be offset slightly. I know that you don't say, in 3d space, ...
163
votes
16answers
130k views

What math should all game programmers know? [closed]

Simple enough question: What math should all game programmers have a firm grasp of in order to be successful? I'm not specifically talking about rendering math or anything in the niche areas of game ...
42
votes
2answers
65k views

How to make a character jump?

I am currently making a game in C# using Direct X 9.0. The game remake is Donkey Kong NES. I have nearly everything completed, but I am having problems with the physics of Mario's jump. I have ...
49
votes
6answers
18k views

How can I promote my game? [closed]

I am a beginning indie developer, and I want to get the word out about my game. What sites can I go to to ask about reviews of my game, and where might I be able to talk about and get feedback on my ...
66
votes
6answers
27k views

Why do we use scripts in development?

In my current project, Lua scripts are called by the C++ functions on the server side. After that, the scripts again call the C++ functions still in that solution. Why should we do such things and not ...
31
votes
6answers
8k 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 ...
13
votes
3answers
1k 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 ...
81
votes
8answers
30k views

How many threads should I have, and for what?

Should I have separate threads for rendering and logic, or even more? I'm aware of the immense performance drop caused by data synchronization (let alone any mutex locks). I've been thinking of ...
67
votes
7answers
14k views

How does A* pathfinding work?

I would like to understand on a fundamental level the way in which A* pathfinding works. Any code or psuedo-code implementations as well as visualizations would be helpful.
52
votes
4answers
20k views

How do I find artists to work on my game? [closed]

I ask "how" rather than "where" because there are undoubtedly lots of artists that are just plain lousy or unreliable. Let's assume both paying and non-paying (mods, free games/open-source) positions....
43
votes
10answers
14k views

How can I prevent false score reports to global highscore tables?

Browser and mobile games commonly have global highscore tables. It's also common for those tables to contain scores of 2,147,483,647 — where people have figured out the webservice call that ...
117
votes
12answers
104k views

How to develop RPG Damage Formulas?

I'm developing a classical 2d RPG (in a similar vein to final fantasy) and I was wondering if anyone had some advice on how to do damage formulas/links to resources/examples? I'll explain my current ...
73
votes
7answers
42k views

Good resources for learning modern OpenGL (3.0 or later)? [closed]

I stumble upon the search of a good resource to start with OpenGL (3.0 or later) . Well, I found a lot of books but none of them can be considered a good resource! Here two examples: OpenGL ...
75
votes
11answers
20k views

How to design a replay system

So how would I design a replay system? You may know it from certain games like Warcraft 3 or Starcraft where you can watch the game again after it has been played already. You end up with a ...
106
votes
6answers
35k views

Version control for game development - issues and solutions? [closed]

There are a lot of version control systems available, including open-source ones such as Subversion, Git, and Mercurial, plus commercial ones such as Perforce. How well do they support the process ...
74
votes
5answers
13k 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: ...
56
votes
3answers
14k views

Optimizing an XNA 2D game

Does it make sense to implement the logic to skip rendering objects outside the viewport or should I not care about it and let the Framework do it?
33
votes
4answers
53k views

How to not freeze the main thread in Unity?

I have a level generation algorithm that is computationally heavy. As such, calling it always results in the game screen freezing. How can I place the function on a second thread while the game still ...
32
votes
3answers
10k views

How do you approach resolution independence in raster based graphics content?

Those games that are not fortunate enough to run on a locked platform spec, like handhelds, need to run across various resolution formats and aspect ratios. In a 3D game you might have a HUD or menu ...
18
votes
5answers
16k views

How can I develop my Android game for different phone resolutions?

For instance, the Motorola Droid is as wide as the G1, but has more height. Should I try to spread the UI out across the extra height found on the Motorola Droid? How do others handle this problem? ...
8
votes
3answers
3k 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^...
2
votes
1answer
2k views

Any way to combine instantiated sprite renderers into one texture so I can apply into a plane at runtime?

So I am procedurally generating a tile set in Unity by instantiating different tiles that only have a transform and sprite renderer components. I managed to pack the sprites using unity sprite packer ...
426
votes
17answers
35k views

How can I effectively manage a hobby game project? [closed]

What are your tips and tricks to successfully finish a hobby game project in your freetime? How do you motivate yourself to keep it up and drive right through to the finish without losing interest or ...
155
votes
8answers
47k views

Why are MVC & TDD not employed more in game architecture? [closed]

I will preface this by saying I haven't looked a huge amount of game source, nor built much in the way of games. But coming from trying to employ 'enterprise' coding practices in web apps, looking at ...
88
votes
15answers
51k views

What are some good learning resources for OpenGL? [closed]

I have been using the OpenGL ES on the iPhone for a while now and basically I feel pretty lost outside to the small set of commands I've seen in examples and adopted as my own. I would love to use ...
26
votes
5answers
31k views

How can I calculate the angle and proper turn direction between two 2D vectors?

I am working on some movement AI where there are no obstacles and movement is restricted to the XY plane. I am calculating two vectors, v, the facing direction of ship 1, and w, the vector pointing ...
27
votes
7answers
4k views

Continuous weighted random distribution, biased toward one end

I am currently contributing to a particle system for our game and developing some emitter shapes. My uniform random distribution along a line or along a rectangular area works fine - no problem. But ...
19
votes
9answers
16k views

How do I sort isometric sprites into the correct order?

In a normal top-down 2D game one could use the screen y axis to sort the images. In this example the trees are properly sorted but the isometric walls are not: Wall 2 is one pixel below wall 1 ...
79
votes
5answers
33k views

How does Dwarf Fortress keep track of so many entities without losing performance?

In Dwarf Fortress you can have hundreds of Dwarves, animals, goblins, etc in game at any one time, each with their own complex AI and pathfinding routines. My question is how does this not produce ...

15 30 50 per page