23
votes
1answer
750 views
How do you turn a cube into a sphere?
I'm trying to make a quad sphere based on an article, which shows results like this:
I can generate a cube correctly:
But when I convert all the points according to this formula (from the page ...
23
votes
2answers
569 views
Algorithm for spreading labels in a visually appealing and intuitive way
Short version
Is there a design pattern for distributing vehicle labels in a non-overlapping fashion, placing them as close as possible to the vehicle they refer to? If not, is any of the method I ...
23
votes
3answers
2k views
Random seed function for map generation?
I am looking for a function to generate a random tile-based map as the visual boundaries of the map change (by going through the map). I want the map to be infinitely large, and have maze-like ...
23
votes
3answers
9k views
Workaround to losing the OpenGL context when Android pauses?
The Android documentation says:
There are situations where the EGL
rendering context will be lost. This
typically happens when device wakes up
after going to sleep. When the EGL
context is ...
23
votes
1answer
2k views
Methods for generating a map
I'm looking to create a simple, "randomly" generated map for a small game.
The game consists of a top-down view of a world, with land-mass and ocean areas. Think of a simple outline map of the world ...
23
votes
2answers
979 views
Is there a way to procedurally generate the history of a world?
I am somewhat intrigued by the diagram found here representing 1800 years of cultural history in an imaginary world some guy created.
This sort of thing would seem to have strong applications for ...
22
votes
10answers
2k views
What makes a game look “good”?
I am working on a 3D space game using OpenGL and C++ and I am planning to focus on giving the game modern, eye-catching graphics, but the more I think of it the more I realise I don't really know what ...
22
votes
10answers
9k views
What is the fastest way to work out 2D bounding box intersection?
Assume that each Box object has the properties x, y, width, height and have their origin at their center, and that neither the objects nor the bounding boxes rotate.
22
votes
7answers
2k views
Do retail games use “inversion of control” and “dependency injection”?
Many of the more diligent software developers I know are moving to inversion of control and dependency injection to handle references to objects. Coming from a Flash games perspective I don't know all ...
22
votes
6answers
850 views
Have any video game designs used non-uniform random numbers in interesting ways?
A variety of video games use uniformly distributed numbers to decide the outcome of an event, such as a "50% chance to hit" almost always means to check if a random floating point number from 0-1 is ...
22
votes
5answers
4k views
What are the pros and cons of incorporating Lua into a C++ game?
I have a C++ game programming book and it has a Lua section in it. I've started to read the Lua section, and it sounds interesting, but I can't determine the pros and cons of using Lua in my C++ game. ...
22
votes
2answers
620 views
Should I have a public development blog?
I'm making a game and I believe it's going to be pretty innovative. Should I keep a public development blog, or should I just write something about the progress in private, for the sake of someone not ...
22
votes
9answers
3k views
How can I prevent cheating on global highscore tables?
For browser games and those on a mobile phones, it's common to have a global highscore table. It's also common for those tables to contain scores of 2,147,483,647 - where people have figured out the ...
22
votes
4answers
2k views
Where to start when building a 3D terrain editor?
I'm looking to build (for start) a simple tool, that could raise, lower, smooth and texture the terrain.
So, what are the things I have to go through in order to make such terrain editor?
And maybe ...
22
votes
6answers
2k views
Who does the AI calculations in an MMO?
I am building an MMO and want to add NPCs. The thing is I don't know the basic design. What does the calculations, the clients or the server? I would understand the server calculating events and ...
22
votes
4answers
2k views
Momentum and order of update problems in my physics engine
This question is a "follow-up" question from my previous one, regarding collision detection and resolution, which you can find here.
If you don't want to read the previous question, here's a ...
22
votes
5answers
6k views
why would you use textures that are not a power of 2?
In the early days of OpenGL and DirectX, it was required that textures were powers of two. This meant that interpolation of float values could be done very quickly using shifting and such.
Since ...
22
votes
6answers
4k views
A way to store potentially infinite 2D map data?
I have a 2D platformer that currently can handle chunks with 100 by 100 tiles, with the chunk coordinates are stored as longs, so this is the only limit of maps (maxlong*maxlong).
All entity positions ...
22
votes
4answers
1k views
game story event programming
I have developed a game engine in c/c++ and DirectX.
I have a tile engine for the maps, animated player/npc sprites, talking to the npc, menus, and level changing but there is no game, it just feels ...
22
votes
6answers
2k views
Game programming books that don't teach programming? [closed]
I am an normal programmer with about 3 years of experience, who is interested in getting into game development. The problem that I face is that when I look at these "beginner" books, most of them ...
22
votes
12answers
10k views
Isometric game engine in JavaScript/HTML5 [closed]
Is anybody aware of any stable-ish (ie out of alpha) isometric drawing engines for JavaScript/HTML5? I have done some Google searches and found a few, but they were mostly in alpha/invite-only ...
22
votes
7answers
4k views
About floating point precision and why do we still use it
Floating point was always troublesome for precision on large worlds.
This article explains behind-the-scenes and offers the obvious alternative - fixed point numbers. Some facts are really ...
21
votes
10answers
2k views
How does one escape the GPL?
DISCLAIMER I don't pretend to know anything about licensing. In fact, everything I say below may be completely false!
Backstory:
Recently, I've been looking for a decent game engine, and I think ...
21
votes
10answers
3k views
What are the most commonly used programming languages? [closed]
When I took my Java courses a year ago, I was told that Java is used mostly in the overseas gaming companies while C++ is used here in the US. What languages should I focus on learning in-depth?
21
votes
8answers
2k views
Why is permadeath essential to a roguelike design?
Roguelikes and roguelike-likes (Spelunky, The Binding of Isaac) tend to share a number of game design elements:
Procedurally generated worlds
Character growth by way of new abilities and powers
...
21
votes
10answers
2k views
Effects to make a speeding spaceship look faster
I have a spaceship and I've created a "boost" functionality that speeds up my spaceship, what effects should I implement to create the impression of high speed?
I was thinking of making everything ...
21
votes
4answers
1k views
Why does my object move faster at 45 degrees than at 90 degrees?
I have objects in my game that move faster at 45 degrees then at 90 degrees.
Each object has
Point (x,y) position
Vector2D (x,y) direction
Int speed
And what I do during a update is that new ...
21
votes
7answers
1k views
Does an inventory limit in an MMORPG make sense?
I am currently developing a simple 2d MMORPG. My current focus is the inventory system.
I am currently wondering if I should implement a limit on what a player character can carry. Either in form of ...
21
votes
11answers
2k views
How do you start development of a game?
When you start a new game project, what do you do first? How do you begin? What gives you the best head start toward completing the project rather than burning out before it gets anywhere?
Mods ...
21
votes
9answers
11k views
Texture packing algorithm
What is a good texture packing algorithm? Technically, bin packing is NP-hard, so a heuristic is what I'm really after.
21
votes
3answers
4k views
Difference between orthogonal map and isometric map
I am laughing at myself ignorant on this. Google didn't produce an obvious answer. Could someone explain what orthogonal map and isometric map are, and how they are different?
21
votes
4answers
3k views
How is load balancing achieved in MMOs?
I believe it's a common requirement of MMOs that processing for a single shard or realm can be done over several servers to ease the load. I'm curious as to how this can be done whilst maintaining a ...
21
votes
3answers
2k views
Is there a faster sine function?
I am working on generation 3d perlin noise. The C# Math library seems like overkill for what I need since most of its functions use double percision. I use Math.Sin() in several places to generate the ...
21
votes
13answers
2k views
How to implement “bullet time” in a multiplayer game?
I have never seen such a feature before, but it should provide an interesting gameplay opportunity.
So yes, in a multiplayer/real-time environment (imagine FPS), how could I implement a slow ...
21
votes
2answers
2k views
Is it safe to use Sleep() in game loop (on Windows)?
Is it safe to use Sleep() function on Windows in game loop (C++)? I want to have fixed frame rate.
21
votes
3answers
4k views
How can I make this style of 2D “glowing” graphics?
I'm comfortable with the basics of building a 2d sprite based game in XNA, where all my objects are simply .png images that I move around.
What things do I need to learn next to be able to develop a ...
21
votes
8answers
852 views
Is there a simple way to stop enemies standing in the same spot?
So: top-down game, my enemies chase the player, when they get within a certain distance they stand still and fire. If they're all coming from the same direction they all end up standing in the same ...
21
votes
5answers
1k views
Is it worthwhile recording your own or buying stock sound effects?
A unique graphical aesthetic is obviously important when developing a game. I wonder if the same is true for audio? Is it worth investing my time in recording, producing my own sounds or should I ...
21
votes
9answers
1k views
Techniques to prevent non-official clients in network gaming?
In multi-player network games, what techniques exist to try to ensure that users are connecting with the official client application, and not some hacked client app?
I realise there is probably no ...
21
votes
2answers
698 views
Out of bounds in AAA games
In many common AAA titles (Source engine games especially), when the player reaches an area 'un-catered' for, such as out of bounds, or noclipping under the map; a strange effect occurs on the screen ...
21
votes
3answers
1k views
How does a 2D game like Zelda handle the character being behind buildings where only part of him is shown?
I'm trying to develop a simple Zelda-style game. I found this very useful topic
How was collision detection handled in The Legend of Zelda: A Link to the Past?
that I'm using as reference to develop ...
21
votes
3answers
497 views
How to break the feeling of busywork in a game
I don't know if this topic has been explored before but in a handful of games I've played there comes a point where trying to explore everything, doing sidequests, or even trying to get gear starts ...
21
votes
9answers
3k views
OpenGL optimization tips
What tips or tricks do you have when it comes to making the OpenGL more efficient?
21
votes
6answers
2k views
Implementing a wrapping wire (like the Worms Ninja Rope) in a 2D physics engine
I've been trying out some rope-physics recently, and I've found that the "standard" solution - making a rope from a series of objects strung together with springs or joints - is unsatisfying. ...
21
votes
2answers
5k views
Understanding Perlin Noise
I'm toying with Perlin Noise after some work with Diamond Square. I followed the implementation by Hugo Elias that basically, makes a series of functions with x,y as input to throw each coordinate ...
21
votes
4answers
991 views
Randomly generated story
I'm developing a game at the moment and I had an idea where the game's story line would randomly generate as the player progressed and their actions would affect the story.
Would this be a bad idea ...
21
votes
6answers
841 views
Spell casting - How to optimize damage per second
Imagine we have a wizard that knows a few spells. Each spell has 3 attributes: Damage, cool down time, and a cast time. Pretty standard RPG stuff.
Cooldown time: the amount of time (t) it takes ...
21
votes
3answers
5k views
Double buffering on HTML5 Canvas game?
My simple canvas game seems to work fine on Chrome and FF on Mac/Linux. I haven't had chance to test it on smart phones or Windows environments yet. It doesn't use double buffering but I have seen ...
21
votes
1answer
824 views
Determine position of a rotated element in Tetris
Tetris-Tiles are stored as a 4x4 boolean matrix. Each rotation step has it's own matrix, the representation of the T-Block would look like this:
[
0, 0, 0, 0,
0, 1, 1, 1,
0, 0, 1, 0,
...
21
votes
5answers
1k views
Doing powerups in a component-based system
I'm just starting really getting my head around component based design. I don't know what the "right" way to do this is.
Here's the scenario. The player can equip a shield. The the shield is drawn ...