# Question
Title: What are some tried-and-true combat models?
I'm thinking about starting a text-based RPG game using Javascript (Similar to a text adventure, but with a much more refined item/fighting system). I've had some experience with playing RPG games, but before I begin, I want to find out what some good "combat models" are. When I say combat model, I mean a tried-and-true system of how a player's strength and weapons affects his attack, defense, etc. There are a few points I'd like to hear some more about:

* How would I create a good attack for a player including weapons and traits?
* What about defense?

Thanks, Elliot Bonneville

# Answer
> 3 votes
When you say you've played RPGs, do you mean computer-based ones?

I ask because there are plenty of pen-and-paper systems that are complete and readable in ways existing games are not. Look into d20-based systems (a.k.a. a rule system from Wizard Of The Coast), GURPS, RoleMaster, etc.

# Answer
> -1 votes
Try playing SMT Nocturne. It have a fairly balanced combat(if you know your way around the system that is) save for the secret and final boss fights.

---
Tags: rpg
---


# Question
Title: How does OnLive work, and is there anything special Game Developers need to do?
The OnLive service works by "cloud rendering", which is very different from the traditional model of "on-premise rendering" that we are all familiar with. How does this work at a technical level, and is there anything special game developers or artists need to do to optimize their game for the platform? As a developer, I'm a bit skeptical that everything is as magically working as they seem to suggest.

# Answer
> 3 votes
The released a SDK for independant developers.

> The OnLive developer community is growing rapidly, with many, many titles in the works. If you’re an Indie developer interested in accessing our vibrant, growing community, check out our partner page or email us at partners@onlive.com to request the OnLive SDK.

Source http://blog.onlive.com/2010/09/15/celebrating-independent-game-developers/

You "just" have to write a wrapper for your game so OnLive can communicate with your program.

---
Tags: networking, rendering, client-server
---


# Question
Title: Reduce the number of edges of a graph, keeping it connected
I'm designing a game with random generated dungeons. I'd like to view this as a **connected, undirected graph** in which nodes are rooms and edges are doors or corridors. Then I choose a "side" node as the dungeon entrance, I calculate the distance between this entrance and all other nodes, and decide that one of the farthest nodes is the "goal" of the dungeon (the location of the treasure, boss, princess, etc.).

I saw 2 ways to generate the final dungeon topography:

* Generate first a random graph, then try to fill the 2d world with rooms at random locations, respecting the edge connections. I figured this would be sometimes difficult because the room generation could be "locked" trying to fit rooms in impossible places.
* Generate first rooms, placing them randomly where they fit, then map the result to nodes and edges. I decided to try this.

My idea consists in :

* First generate a big room that would contain the whole dungeon.
* Put a wall inside the big room, at a random location, dividing the big room into 2 smaller rooms of different area.
* Then I continue to divide each room into 2, until they are too small, or the total number of room reach a maximum (or any other condition). Each new room is a node.
* Once finished, I check each room and find all adjacent other rooms, marking the 2 nodes as connected by an edge.

That way I ensure that all rooms have a possible location in the 2D world, and are correctly mapped by a connected graph.

My problem is that there are too many doors and corridors connecting the rooms.

So I'd like an algorithm that **reduces the number of edges of a connected undirected graph**, but **keeping it connected** (all nodes stay reachable) in the end.

# Answer
Use Prim's Algorithm to obtain the minimum spanning tree for your graph (add randomized weights, or add the higher weights near the entrance, or do an algorithm of your choice) and re-add some doors/edges at random. This way you'll have all the rooms connected and a few extra redundant paths.
> 14 votes

# Answer
You could also try Kruskal's Algorithm
> 1 votes

# Answer
Some of the dungeon generators on this list from Inkwell Ideas are open source or provide documentation on their algorithms. Google will also give you plenty by a search for '\[programminglanguagename\] dungeon generator'. Unfortunately my favorite is not findable by either of those methods, despite being the most well documented I ever encountered, and I cannot remember its name as I lost it to a hard drive crash recently. I will update this answer after I perform recovery on that drive.
> 0 votes

---
Tags: algorithm, procedural-generation, random, topography, graphs
---


title: In-Game Level Design with XNA?

text:
# Question
Title: In-Game Level Design with XNA?
I am wondering about in-game level design. My current situation revolves around Tiled - I have many different layers with different types of objects in them (for anyone who isn't familiar with Tiled, an object is nothing more than a coordinate with arbitrary properties assigned to it).

I am currently re-compiling the game every time I make a little change to my map file to see if everything is positioned properly. Is there a way for me to have my game automatically re-load the level if a map file change is detected? Does XNA even allow for this, or does the way the content pipeline work not allow for dynamic content in such a way? Any tips or suggestions are absolutely welcome.

# Answer
> 8 votes
I assume your map files are processed via the Content Pipeline, and then loaded at runtime with Content.Load. You have two options:

* Save your maps as a XML file, via IntermediateSerializer.Serialize. Then, at runtime, you can read them with IntermediateSerializer.Deserialize to see the changes.
* This is a tougher one: calling MSBuild at runtime to recompile your files into proper XNBs, and reloading them with the ContentManager. This sample does that.

# Answer
> 2 votes
You could also use Karvonite if you want to get this up and going really fast.

It's an agile persistence framework. I'm not sure if the new version will work on windows phone 7 or xbox.

You would create a persistence definition with their persistence editor (it's pretty easy, you just import the assembly and check the fields/properties on the classes/structures you want persisted) You initiate an ObjectSpace in code and add/remove/get objects from it. (these objects are persisted)

If you could create an abstraction so that the tile engine or whatever it is you call it doesn't care exactly how it gets the map, just that it gets the one it asked for. Then you can go back and use the XmlSerializer or the Intermediate one. (whichever you prefer) All you'd have to do to implement those other serializers is create another implementation of the abstraction (an interface or abstract class).

I think there is an example of how to build content at runtime on the XNA creator's club website. It might not be built with the latest framework though. That way you could keep your old code if you already use the content pipeline. Here's the link : Winform Series 2: Content Loading

---
Tags: xna-4.0, tiles
---


# Question
Title: Is Flash development for Android below 2.2 feasible?
Apparently you need to install AIR in your mobile to use Flash apps, and AIR requires Android 2.2 while my Milestone is a feeble 2.1.update1.

There is seriously no Flash lite or other alternative?

# Answer
Flash for Android 2.1 Download:

> http://www.androidapk.net/?p=53

A Comparison Between FlashLite 4 on Android 2.1 vs Flash 10.1 beta on Android 2.2 can seen here:

> http://www.dailymobile.se/2010/05/23/flash-lite-4-on-android-2-1-vs-flash-10-1-beta-on-android-2-2/

How to install Flash Player 10.1 on Android 2.1:

> http://www.addictivetips.com/mobile/how-to-install-flash-10-1-on-android-2-1-eclair-devices/
> 1 votes

---
Tags: android
---


title: Camera Rotation using angles

text:
# Question
Title: Camera Rotation using angles
I currently try to rotate a camera (using gluLookAt()) around a point , i successfully do it for rotating around one global axis.

But when i want to use more than one axis , I'm stuck . I've searched around and it's seem i need to use something like axis-angle or quaternion (that i don't understand at all for now)

for rotating my camera i have 3 angles (using accelerometer and geomagnetic values).

How can i determine the point of view , using three angle and the radius ? knowing the the camera itself is at the point of origin (0,0,0).

I prefer using gluLookAt() than moving the whole scene if possible(event if i know that almost the same thing).

# Answer
> 1 votes
I got it !

i simply used conversion from Spherical Coordinate (rho,phi,theta) to Cartesian coordinate.

for those who need it , here my function in java:

```
void angleToCartesian(double rho, double phi, double theta) {

    coords.x = rho * Math.sin(phi) * Math.cos(theta);
    coords.y = rho * Math.cos(phi);
    coords.z = rho * Math.sin(phi) * Math.sin(theta);

}

```

the rho is the radius , phi is the zenith angle (so be careful if like me your angle start at azimuth (90° from zenith)) and theta is the longitude angle (starting from +z). the angles are -of course- in radians.

it's explained here for those who want : http://mathworld.wolfram.com/SphericalCoordinates.html (pay attention to the fact that their xyz axis are not the same)

# Answer
> 1 votes
I would suggest keeping track of the pivot (that is, what the player is looking at in `gluLookAt`) explicitly. If the player looks left, rotate the pivot to the left around his head. If he looks up, move it up. Every frame use `gluLookAt` with the adjusted pivot. This is a bit wasteful compared to other techniques, but it has the benefit of being easy to visualize. You can even show a primitive at the pivot position to verify it's where you think it is.

In the long run, it's probably worth investing in learning quaternions. Using multiple angles along fixed axes (called Euler Angles) will end up causing you more trouble than you can imagine, as the rotations will be interdependent. I'm sure you've seen it happen in examples, you look up, then turn around. When turning around you turn around along the current up-axis instead of the vertical, and you end up looking down. There's also the matter of gimbal lock, but in practice that's not nearly as annoying as the above.

Here is a decent tutorial on quaternions.

# Answer
> 0 votes
if you have three angles, then the first thing you need to do is figure out what they represent:

your problem sounds like a conversion from euler angle to matrix, and if that's true, then you need to find out what order your angles are meant to be applied in.

see this wikipedia link for details of building the matrix once you have found out what order the axes are in.

If they're not euler angles, then what are they? Are they axial north bearings?if so, then you've got to generate a lookat from a calibrated north-world transform, and that's not going to give you a single solution, but a set of solutions that lie in the plane of the north axis. Normally you'd take this plane solution and use it to provide an update to a kalman filter, or marry it with accelerometer readings to give the correct downward direction thus prodiving the extra constant required for a single solution or mere pair of solutions.

---
Tags: opengl, camera, rotation
---


# Question
Title: is it feasible to make chess application in 2 months?
We are final year B.tech students wanted to just ask that if we work 2 months on making chess application,will it suffice ?

Wanted to know if it is feasible given -

```
   1.Logic implementation is not a problem (will use AI)
   2.We are C++ programmers.
   3.We want to make 2D GUI, didn't selected any language for this purpose and we
     need to learn just that part of the language which will help in making GUI for the application.

```

# Answer
> 6 votes
Absolutely.

The main factors of the development time I would say is:

* How skilled you are as programmers - **Edit: this may be the biggest problem for you if you aren't experienced with your programming language of choice.** I'm stressing this here because I did not realise that you were saying you didn't have much experience in the language you are going to use. If that's the case I'd consider the project high risk.
* How you decide to display the game (console, GUI, 3D?)
* How good you are at communicating and working together as a team
* If you decide to implement AI.

The boards representation in memory will be probably one of the first things you will consider. This link presents one way to represent the board and may be useful in general. In most cases it is not so important as to the specific board storage mechanism used as it can be abstracted away.

One way to do AI would be to use the minimax algorithm to look a few moves ahead. You'll benefit here if you kept your worldstate separate to rendering, input etc.

---
Tags: game-design
---


# Question
Title: Are there important cases when one needs to know how to program sort algorithms in game programming?
Well I already read a little about sorting algorithms on wikipedia, the subject seems vast, especially when dealing with some cases where some algos are faster than others.

That might need some quick sum up, but before that, can somebody tell me if there are subjects of game programming where sorting is necessary ? (or optional, for execution time matters).

Maybe in a depth buffer?

# Answer
> 19 votes
I'm going to say yes, to your question as phrased, but with important caveats.

Yes, you need to know how to sort things in programming game development. There's lots of sorting goes on, in a wide variety of situations. No, you don't need to know the details of how all (or even many) the various sorting algorithms work, it's almost always sufficient to look it up in a reference (online or book) when you need to.

What's important is not the how and why of each algorithm, it's a deeper understanding of why some algorithms work better in some situations. It's understanding exactly which situation you have (do I need to sort in-place, can I insert items in the list cheaply). It's knowing the most common and flexible algorithms, not so much the details of how they work, but more the situations where they should not be used.

And finally, it's knowing when sorting performance is important (when you have many, many items and you need to sort them a lot) and when it's not so important (when you have just a few items, and/or you only need to sort when the list changes). In the latter case, just throw the list through quicksort. If your objects are large, then sort a list of indices to the objects rather than the objects themselves. In the last dozen or so years I've been developing professionally, I can count the number of times I've needed a more tuned or specific sorting algorithm, and it's probably less than 20.

# Answer
> 9 votes
Yes, you sort things all the time. One common example is graphics calls.

Whether you need to know how to implement every sorting algorithm off the top of your head is another question, but you should at least be able to answer questions like:

* What sort do I use if I need an in-place sort with minimal stack overhead? (Iterative or tail-recursive quicksort.)
* How can I sort a large list of strings as fast as possible? (Burstsort, radix sort, or quick sort depending on architecture.)
* How do I sort these assets in dependency order? (Topological sort.)
* I just need to sort some unknown data in a reasonable way? (Timsort, quicksort.)

All of these situations come up in all kinds of software, including games.

Again, you don't need all of these memorized, but you need to be able to open a book of sorting algorithms, read a brief description of each one, and pick the right one. That means understanding time and space (big-O) requirements, and having an idea of how different sorting algorithms work (merging, selecting, swapping).

Sorting algorithms also feature prominently in job interviews; usually the questions are not "implement quicksort", but "here's a description of the kinds of input, what sorting algorithm works well for this?"

# Answer
> 5 votes
There are lots of cases where you might need to sort things, depending on what kind of game programming you are doing:

* Sort opaque objects by distance from camera before drawing (reverse painter's algorithm)
* Sort transparent triangles by distance from camera before drawing them in reverse order.
* Topological sort of goal dependency graph to work out a sensible order to attempt to achieve goals in (useful in AI, or in giving automated hints).
* Sort objects along some co-ordinate for fast collision testing.
* Sort events by time to work out which one to handle next.
* Sort objects by unique id to get canonical order for comparison or serialization.
* Sort profiling statistics to work out which areas would be most profitable to optimize.

It's rare that you'll need to implement your own sort algorithm: generally you'll just pick an appropriate function from a library. But studying and writing sorting algorithms is good general practice for writing and analyzing algorithms, and your knowledge will come in handy when it comes to picking a good algorithm from a library, or spotting the (rare) cases where the special features of your problem mean that you could improve on the generic library routine.

# Answer
> 1 votes
I'll just add a short answer here: HIGHSCORE table...

# Answer
> 1 votes
Most languages come with a good general purpose quicksort implementation.

They don't necessarily come with implementations of stable sorts, sorts that don't compare values directly, sorts that don't suffer when used on pre-sorted data, sorts that work well on disk-based data, sorts that work better if given lots of memory, sorts that work without requiring any extra memory at all, partial sorts that efficiently sort just a subset of the data, partitions that only sort data relative to a pivot threshold, and so on.

These are all useful from time to time.

# Answer
> -1 votes
As a more general answer, even if you never actually write your own sorting algorithm "in the field" (after all, as you've no doubt seen on Wikipedia, your average garden-variety sorting is a problem that's already been solved), sorting is one of the core aspects of computer science that helps in the kind of computational thinking that a programmer needs. Think of it as the "wax on, wax off" that you learn before you realize you can use that skill for karate, too :)

---
Tags: algorithm, software-engineering, graphics-programming
---


# Question
Title: As an indie game developer, how can I have (quality) music/sound done?
Besides the story itself, a game needs code, graphics and music/sound effect. I can program and I knew a few graphics designers in the web app era. However, I don't know whether to find music and sound freelancers/professionals/partners.

So how's music/sound typically done? Do you finish a game and hand it to some musicians? Seek help via Facebook? Call the secondary school music teacher? .. Please advise. Thanks!

EDIT:

I'd like to rephrase the question a bit to clarify the objective. Let's start with example. Say, there is designer which have finish a great UI concept design, and ask: "how can I find programmers to transform this design into an app?"

It won't help him much by telling where github is and how much great codes can be learned from... He needs the judgement of what are good code, in addition to how to use the code, and most importantly, the ability to modify/enhance the code to fit his need.

As a programmer, all I know a game needs some good music. The question is not about where to find music. The question is how to find musician who knows music, the music which fits my game. It's similar to the design is looking for a programmer who can turn Photoshop into .app rather and programming books and code samples.

Simply put, where did you find your game's musician? ;-)

p.s. I found my graphics designer on deviantart.com Where is the deviant *music*.com? XD

# Answer
I don't see how being an indie developer changes the problem set other than probably having a smaller budget.

Your list of options probably fall something like this:

* Have a sound guy on staff to do all custom stuff
* Contract out a sound guy from one of the many sound studios
* Get lucky and "know a guy" (online or in meatspace) who does music who will do it for free
* License existing music (the popular indie game Braid did this with a lot of success)
* Use free music

Honestly the "know a guy" is probably the least likely to pan out. More than likely you'll get better free music that already exists. It's mostly just going to take time to sort through the gobs of stuff already out there and seeing if it applies to your needs.
> 10 votes

---
Tags: sound, music, assets
---


# Question
Title: Clipping Sprite Sheets with Variable Placement
I was looking at some sprite sheets at sprite sheet database. I noticed that some of the sprite sheets had several different objects placed together in one file. Some of the sprites, such as movement animations were placed next to each other so that they were of the same height. However, sometimes next to them are larger sprite objects that take up a different amount of space.

These sprite sheets have no apparent information such as cell width and height. It seems like you would have to clip them through trial and error. Is there some sort of algorithm to figure out how to clip them without external sprite grid information?

http://sdb.drshnaps.com/display.php?object=7604

# Answer
> 3 votes
Almost all sprite sheets ripped from old games that you will find online contain images that have been rebuilt from the original, smaller (usually 8x8 or 16x16 pixels) tiles. Below is an image of a tile editor without the color paletted adjusted to illustrate what i'm saying.

So, to use those graphics in your game, you *should* have the sprite origins and sizes stored in some way, for performance's sake. But, if you *still* want to get the sizes programatically, do something along this pseudocode:

```
var current_line = 0
var current_column = 0

while (IsEmptyLine(lines[current_line]))
{
    current_line++
}

var top_line = current_line

while (!IsEmptyLine(lines[current_line]))
{
    current_line++
}

var bottom_line = current_line

while (IsEmptyColumn(columns[current_column]))
{
    current_column++
}

var left_column = current_column

while (!IsEmptyColumn(columns[current_column]))
{
    current_column++
}

var right_column = current_column

// rectangle(x, y, width, height)
rectangle bounds = new rectangle(left_column, top_line, right_column - left_column, bottom_line - top_line)

```

IsEmptyLine/Column determines if a line or column is entirely made of fully transparent pixels. Also keep in mind that this is a generic code, and won't work for special cases, like non-vertical sprite tiling.

# Answer
> 0 votes
You will most likely have to either (a) create a mapping of the sprite sheet or (b) rearrange the sprites based on your application's mapping convention using some sort of graphical editing application (such as Adobe Photoshop or GIMP); most modern graphical editing applications support adding guidelines and rulers which make both (a) and (b) much easier to do.

---
Tags: sprites
---


title: Xbox 360 Network Communications

text:
# Question
Title: Xbox 360 Network Communications
So I read in another thread that:

> ...the Xbox is a closed system. Forget any direct TCP/IP interaction, you can only communicate with other consoles present in the Xbox Live! network, and you can't do raw HTTP connections.

This makes me curious as to how an app like Last.fm for Xbox LIVE works. I would think it would require network communications with Last.fm servers, for user identification and for receiving audio streams.

Any ideas? Thanks in advance.

# Answer
Either MS or CBS are running an XLSP farm and proxying all the traffic to the Last API.
> 2 votes

# Answer
The Xbox 360 is certainly capable of making connections to any remote host just as your personal computer does, however, as a security measure, it is likely that Microsoft requires you to be an official Xbox licensed developer to do this. In addition to this, official Xbox titles are required to go through stringent validation to ensure a secure system.
> 1 votes

---
Tags: networking, xbox
---


title: How to make a chat lobby in my game?

text:
# Question
Title: How to make a chat lobby in my game?
I'm writing my own RTS game in Delphi. Single-player part is almost done and works well and I'm thinking about adding multi-player to it now. There's going to be a lobby where players should be able to chat and organize games. I tried googling for a convenient way to do it, but couldn't find anything related ..

My idea looks like follows:

* Players are identified by Names they choose and their IPs
* There's **main chat** area where all players meet
* There are **rooms**, where players may select game options (map, teams, flag colors, etc..).
* After everything is settled players exchange IPs and multi-player engine starts.

I want to avoid usage of server-side software. Currently I'm looking into running everything through SQL database where each player commits posts and his state and reads other players posts/states.

Whats the common practice of organizing in-game chat lobby?

# Answer
As far as I'm aware an SQL database used as you described is server-side software.

In any case, the database seems like a really bad idea since you will not be able to restrict how it may be altered.

Common practice is to have a custom program running that relay messages in a meaningful manner. For basic purposes it shouldn't be a big coding job, you can keep everything in memory, though everything is not a lot since you can ditch a message as soon as it has been sent to all receivers.
> 3 votes

# Answer
If your going to have a database somewhere, you minus well have your own custom server application running.

You could have all of the matches listed in a database and the messages as well, but if you go with your own server application, it'll be far safer in terms if authority. (it's not a fool proof option, but definitely a better one)

It seems like you only want the server to relay messages and match making. It wouldn't be a huge pain to get something simple up and running. It'll be worth it in the long run when you start having concurrency problems and people messing with your database.

There really is no point in avoiding server software when your going to have a database somewhere any way. Don't restrict yourself for no good reason.
> 0 votes

---
Tags: game-design, multiplayer
---


title: How do I model a gooey sprite?

text:
# Question
Title: How do I model a gooey sprite?
I happened to see this structure of a gooey player character made in flash.

Can anybody suggest onto what computer science concept I should use to

1. make a goo
2. make it behave like a goo

Thanking You,

Vish

# Answer
If you look carefully at the game you linked to, you can see that it's just a triangle fan with all the vertices merely ray casting to the collision in the world. This is why sometimes the goo looks a bit thin. Gish seemed to have more volumetric stability, probably through being constructed from a flexible mesh of points.

To emulate the movement of the linked-to game, all you need to do is sum the forces (highly damped I guess) that are being exerted on the centre of the character by the ray cast collisions that are pretty obviously being used to power the character rendering. The sideways forces are simple as they apply whether on ground or not, and jumping can be managed through making the lower springs more tensile, but, that said, personally I'd actually return to platformer game physics and use some impulse system to directly affect the vertical momentum rather than try to get the physics to behave right for gameplay.
> 4 votes

# Answer
The game you posted looks "heavily inspired" by Gish, a quite famous indie game from some years ago. You might want to look at the source code of Gish, which was published after the huge success of the Humble Indie Bundle.

Edit: I googled this blog entry, it mentions the physics engine at some point and recommends using Box2D instead. It might be useful to look how the tar ball was modeled in Gish and then try to implement that idea in another, better, physics engine of your choice.
> 6 votes

# Answer
Those two games don't really have much to do with each other, and World of Goo doesn't actually contain anything that I would call "goo" since all the characters are just points. The closest I can think of to a generic answer to this question is that a "goo" is usually just a high viscosity fluid and could probably be modeled using a vector space. That wouldn't be particularly fast though, so you could probably cheat and use a triangle mesh with some extra vector data for each vertex.
> 2 votes

# Answer
You can check out the source for the game I made for PyWeek, "Bouncy 2". I'm sure there are better/more efficient solutions but it worked quite well for us.

http://www.pyweek.org/e/Bouncy2/

http://www.youtube.com/watch?v=UsUa0LGHxbM
> 1 votes

---
Tags: game-design, physics
---


title: Font to polygon or triangle mesh

text:
# Question
Title: Font to polygon or triangle mesh
I've been happy using bitmap fonts for games so far, but now I find I really need the polygon edge in some form. I saw the freetype engine some time ago, which can provide rastering of truetype fonts from within your engine, but what I think I really want for my current project is some way of converting from truetype to a triangle mesh.

# Answer
> 2 votes
I think you want FTGL, which can convert font outlines to meshes and extruded meshes, among other formats. I don't know if it only generates triangle meshes; you might need to run a triangulation algorithm on the output.

---
Tags: 3d-meshes, fonts
---


title: How long does it take to ceate a game?

text:
# Question
Title: How long does it take to ceate a game?
I know that this question depends really very much on plenty factors: 2D-Pong and a MMORPG are two totally different worlds; it also depends on creators' experience, on game quality, on the available technologies, on target platform and so on, but well, I guess we can categorize games and study the average (or maybe focus on real-world examples).

How long, in **man-hour**, does it take on average to create a:

* AAA MMORPG
* AAA non-MMO game (like a RTS, an FPS etc, RPG)
* Indie game
* Game for mobiles
* Amateur desktop game

What phases can we split the game creation process in (story designing, writing the engine, creating art, testing ...) and how long would each of these take (for the above categories)?

Examples of real games would be apprecciated!

# Answer
> 6 votes
You'll have to define AAA. For some people it's a budget scale definition, to others it's a team scale definition, to others it's a art-resources quality scale definition. Anyway, your question is too broad.

Let's choose indie games. The variety of different games (that are often their own type) is bigger than in the industry and it's a lot more than most people even can imagine.

How to answer your question knowing that?

Anyway what you're asking for is more related to the alchemy between those factors :

* Budget (to use to modify the other factors)
* Target deadline
* Team experience
* Team size
* Features count
* Features complexity
* Platform constraints

For examples on time taken to make games (published or not) I recommend searching for Post-Mortem articles on http://gamasutra.com \- lot of wisdom and feedback there.

# Answer
> 4 votes
In my general experience, this is what companies will allocate, based on how much profit they expect to make:

* AAA game - 2 years, 5-10 programmers, 10-20 artists, 3-6 designers
* Regular mmo/fps clone, respectful console game - 1 year, 3-6 programmers, 5-10 artists, 2-3 designers
* Console shovelware/live arcade/home/etc - 6 months, 2-3 programmers, 3-5 artists, 1-2 designers
* Mobile/web shovelware - 3 months, 1 programmer, 2-3 artists, half a designer (part-time)

Keep in mind these are very ballpark.

# Answer
> 1 votes
There can't be any anwser.

It's a bit like saying how much time it will take to build a house, without knowing what type of house, how big it is, who will live in it, who will built it, in which country you are, ect...

The best thing you can do is to analyse the project, split it into small component and analyse the time it will take for each component.

---
Tags: development-speed
---


title: Collision Resolution

text:
# Question
Title: Collision Resolution
I know quite well how to check for collisions, but I don't know how to handle the collision in a good way.

Simplified, if two objects collide I use some calculations to change the velocity direction. If I don't move the two objects they will still overlap and if the velocity is not big enough they will still collide after next update. This can cause objects to get stuck in each other.

But what if I try to move the two objects so they do not overlap. This sounds like a good idea but I have realised that if there is more than two objects this becomes very complicated. What if I move the two objects and one of them collides with other objects so I have to move them too and they may collide with walls etc.

I have a top down 2D game in mind but I don't think that has much to do with it. How are collisions usually handled?

*This question is asked on behalf of Wooh*

# Answer
> 16 votes
Daniel Kodicek covers this topic in great detail in his book, Mathematics & Physics for Programmers.

Kodicek does two things to achieve natural-looking collision resolution:

* His collision detection function calculates the exact time two objects will collide.
* He recalculates new velocities at the time of collision, so objects never overlap.

I uploaded a demo based on Kodicek's collision detection and resolution.

**update:** Here's a collision detection & resolution algorithm that is very similar to Kodicek's method. With source code. I still recommend Kodicek's book, as his algorithm is implemented slightly differently and much more thoroughly explained.

# Answer
> 6 votes
What if you check the collision before the objects move, instead of afterwards? Or, in other words, you reject the new position if the objects collide, reusing the old one in that case?

Pseudocode:

```
  tmpPosition1 = Obj1.position
  tmpPosition2 = Obj2.position
  updatePosition(Obj1)
  updatePosition(Obj2)
  if collided(Obj1,Obj2) then
      updateVelocities( Obj1, Obj2 )
      Obj1.position = tmpPosition1
      Obj2.position = tmpPosition2
  endif

```

This way the objects will bump with each other when they are *about to collide*, if your update step is small enough the player shouldn't notice anything strange in the representation.

# Answer
> 6 votes
Whenever two objects overlap, check if they are moving towards or away from each other. Do the collision only if they move towards each other.

It's pretty easy with vector math, simply calculate:

dot\_product(B.position - A.position, A.velocity - B.velocity)

If the result is positive the objects move towards each other.

# Answer
> 4 votes
I could be misunderstanding, but it looks like you're asking two questions: 1. what are some general ways of dealing with collision resolution the term you're looking for is 'impulse based simulation', and there are a bunch of papers that can do it better justice than I can.

In summary you want to euler step your physics simulation in momentum space, which is mass times velocity (don't do things force based, your integrator isn't doing it right anyway).

For angular response, luckily the greatest and least moments of inertia can always be reduced to two orthogonal axes (in 2D), which means a matrix multiply will work generally, and if you line these up with the X and Y axes, it turns into a 2D vector.

When you have collision you figure out response based on the linear and angular moments at the point of collision, and a good fudge factor is, if you have interpenetration, to apply some penalty force (as mentioned above) to get the two bodies apart.

From the point you'll end up adding more and more rules to control aberrant behavior, like capping maximum angular momentum so things don't spin like tops, etc., but this is a good start.

Keep it simple if you can.

1. How do you solve multi body collision problems

The only real way to do this is with a system of linear equations and a lot of solving. The practical way to do it is have a system like the one above, and have the physics just naturally resolve over time.

Most games that do things like rolling, or standing on moving surfaces, have a hybrid model where your feet are attached to a surface (or wheels to the road) to accomodate for the physics time stepping (which would result in interpenetration-response cycles and wouldn't work).

Hope this helps. If you need any math examples, let me know.

# Answer
> 3 votes
The way this is usually solved in physics engines is by applying a penalty force. Moving the rigid body after inter-penetration will not look good if your rigid bodies are moving at higher velocities (you will see momentary jerking motions), although as a first step, you should try that and see if it suits your requirements.

A `penalty force` is applied like a spring-damper, where the penalty force is increased the more you have inter-penetrated the rigid body and is lessened in subsequent frames. Think of it as springs. When two rigid bodies inter-penetrate, they each encounter an invisible spring which dampens their progression (that is, prevents more inter-penetration) and applies the previously mentioned `penalty force` until the bodies are no longer penetrating.

It is a broad topic but hopefully the above information will get you started.

---
Tags: collision-detection
---


# Question
Title: How to implement 2d explosions that will cause damage taking into account covers and distance?
How can I implement a 2D explosion in a way that it will cause less damage to characters that hide behind crates or other cover? Ideally damage will depend on the strength of the cover (e.g. metal wall will protect better then wooden crate). Ideally damage will decrease with distance as well.

I am going to use a port of Box2D physics engine - Farseer.

Thank you.

# Answer
> 8 votes
One relatively simplistic way of doing this is to draw a ray from the center of the explosion to the center of every entity where `DISTANCE(explosion,entity) < exlosion.max_radius` (pseudo-code).

For each entity, follow this ray, decreasing base damage as you go. Whenever you hit an object subtract it's cover value from the damage (essentially shortening the ray).

When the ray hits the entity, whatever damage is left is your explosion damage.

For this approach, you probably want a pretty high base damage that decreases rapidly with distance (inversely proportional to the square of the distance should do nicely).

---

Another approach is to draw a sector fully containing the entity; but no wider; and all the way out to `.max_radius`. Subtract from the area of this sector the area covered by any cover between the explosion and the entity, multiplied by its cover value. The remaining area is your blast damage.

One neat side effect of this is that the closer the entity is to the explosion, the wider the sector gets, and the more damage you take (as you count all of the area of the sector, and just subtract the area of cover between the entity and explosion.

It could also be useful to treat cover as entities; and simply subtract damage taken by closer entities from those further out, but that might get gnarly.

---

There undoubtedly exists an even more elegant and clever approach, but it probably requires some pretty nasty calculus. It always does.

# Answer
> 0 votes
Damage decreasing with distance should be a simple task. When you create the explosion you should know the coordinates of the centre of the explosion. Since you are working in 2d, it will be just x and y.

All you need to do is calculate the player(s) distances from the coordinates of the centre of the explosion using Pythagoras' theorem then use that against the max radius to calculate a percentage of the total damage.

For example, take the coordinates (x1,y1) as the centre point of the expliosion, and (x2,y2) as the coordinates of the player. We can then calculate the damage taken as follows:

```
Distance from centre = sqrt((x2-x1)² + (y2-y1)²)
Damage taken = (Distance from centre/Explosion radius) * max damage

```

As for things in the way, I'm too tired to think of the answer, but you'd basically be looking for intersections along the line from the centre of the explosion to the player.

---
Tags: physics, box2d, farseer-physics-engine
---


title: Securing JavaScript / PHP game data

text:
# Question
Title: Securing JavaScript / PHP game data
Followup to securing-http-data-from-a-javascript-game-to-server.

I'm working on something similar, in that I have a PHP backend and a JavaScript frontend, which plays around with the HTML5 canvas element for drawing.

There will be some heavy client-server communication required, as the player will get timely updates from the server with regards to actions that other players are taking. In turn, the client will update the server with his actions that have been taken.

My question is what is the best way to secure such data? Since the client is basically JavaScript, what are some good ways to secure my game data / game states from being tampered with.

I had a thought (spurred by answers to the previous question), about generating a hash based on the currently active session, storing that in a game state database, and validating it server-side. However, I would imagine that any data sent back to the server via AJAX can be scrubbed for any key that I send back.

# Answer
> 17 votes
Don't trust the client.

It's as simple as that. Any safeguard you can put in place can be broken; and truly safe methods are impossible within the scope of JavaScript.

The best approach is to only trust the client with drawing what you send it and *retrieving* user input. Giving it anything more is just asking for trouble.

Any information you send to your client should be considered compromised, and any information you receive from your client should be considered a potential attack.

# Answer
> 5 votes
about knowing other players' data:

The only *real* way to prevent the client from knowing something, is not telling it to him.

**\*ANY\*** other kind of doing it will be breakable with a variable amount of effort, depending on how strong your system is.

---

about user's own data:

Anything you need to store, you need to store it on the server: anything that comes from the client are lies.

When the client does something, the server should immediately check if he can do it, and allow him to do it if he can. Save the result on the server if you need to later know what happened. The client should never be authoritative about pretty much anything other than what he would like to do.

# Answer
> 1 votes
I would make the server code validate any information sent by the clients.

For example, if a player can only move 5 px per turn, then if the server receives a request to move more than that, it should either reject it or move the player the maximum amount in the intended direction.

Basically, just prevent the client from having full control to do whatever it likes, and limit it to only the actions you want it to perform.

Having said that, you can never make it 100% secure, if someone hacks the webserver and modifies the server code, that's not your fault (unless you're also responsible for security at the data centre!) So make it clear to the client that you can't be held responsible for all eventualities!

---
Tags: javascript, client-server, security, php
---


# Question
Title: Visual script editing software tool for creating game behavior logic
Is there a visual script editing software tool in any game engine similar to Visual3d for creating game behavior logic by non-programmers like designers?

# Answer
> 1 votes
The obvious answer is kismet in Unreal engine.

---
Tags: scripting, tools
---


# Question
Title: how to apply a texture to a 3d scene background?
i don't really know the exact term for that (i thought it was hdr but no...).

i want to put a texture as a background in opengl-es , and when we rotate the view , the background rotate too (obviously) but when there is translation , the background doesn't change.

like if i was inside a sphere and the texture are stick to it.

(and i don't think the sphere idea is the best way to do it).

I have certainly not explained the problem correctly , I'm sorry for that and thanks a lot if you understand me (even more if you have the answer :p)

# Answer
> 8 votes
There are three ways to do this:

* Sky box
* Sky dome
* Sky plane

With a `sky box`, you have a giant box that is surrounding your scene. This will make it seem as if you are in a 'box'. With a `sky dome`, you have the same box, but this time the projection of the texture onto the cube is spherical. Problem with this technique is that the projection does not cover the bottom of the cube (which is not a problem in most cases). You can also go with a literal dome, that is, a sphere (which Kromster suggested), although it comes with its own share of problems (pinch points). Then there is the `sky plane` where only one (very large) plane is rendered. The drawback here is that you will see the horizon, so you can only use this technique in closed areas.

As for keeping the sky where it is when you move etc. Kromster suggestion is correct. You will want to, however, make sure that all your objects are rendered on top of the sky. This is very easy to do, simply render your sky first, then without swapping buffers, render your scene.

> **NOTE:** All the sky types have their polygon normals inverted. So if you have a box or a sphere mesh, invert the normals otherwise you will not see anything.

# Answer
> 4 votes
I guess you mean some sort of a environment map, skybox, environment sphere, cubemap.

Simplest way would be to make a big low-poly sphere (or a segment of it, depending on view area restrictions), face its polygons inside and attach to camera position, so wherever your camera is going the sphere will remain around it. And map texture to this sphere.

---
Tags: opengl-es
---


# Question
Title: How can I make my score-based game addictive?
I need some ideas to make players interested in the game result. Otherwise, the player plays again to get high score. My game is a calculation game that measures the speed of calculations that the user makes.

I added in the result:

1. The number of right answers
2. The number of wrong answers
3. Score of player
4. High score of all players - "Mochi High score"

What shall I add to entice the player to play the game again?

# Answer
> 3 votes
A high score list in which player can see their rank relative to other people may give some motivation. I am not sure if this works for your game, but it may be possible to collect stats like total number of right answers summing up all played matches.

If you use an internet based high score list, it may be a good idea to split it into "recent players" and "all times". The standard approach of only displaying a all time list has the issue that it will be really hard for new players a couple of month after release.

# Answer
> 5 votes
Make it very easy to play again, and less easy to quit. For example, as soon as the game is over, display the user's current score and best score. Have them simply click the mouse (anywhere, not on a particular button) to play again. This will greatly increase the 'one more time' factor.

Of course, the most important thing is for the game to be fun. Nobody will play it again if it isn't fun. If they got a little adrenalin rush at the end of the last game, they'll be eager to give it another shot. Even calculation games can be fun.

High score lists with worldwide players only provide motivation to very skilled players. A beginner will simply be discouraged that he's ranked 8 millionth in the world. Early on, it's better to compare the user with his own previous efforts.

Also, it's nice to have intermediate goals. Provide the player with something to play for. It can be as simple as additional skins, powerups, or skills. Tantalize the user so he's sure he can get that next prize with 'just one more turn.'

# Answer
> 2 votes
First I am going to assume that that evaluation is going to be shown to the player, if so, I would enumerate all the accomplishments he had on that playing session, lets say winning a certain amount of virtual money, reaching a certain level, it can congratulate the player if it was the best game he played so far, and tell him he beat his previous scores.

But if you wanna evaluate him to keep track of him for analyzing it later on, you can store how he plays (style, or player profile), frequency, times at which he plays, and other measures.

# Answer
> 1 votes
You could award badges for achievements. So each time the user finishes a games you could make calculations and let them know if the have been awarded a badge or are close to being awarded (eg: play again to qualify for a new badge!)

Look at the badges on this site for some ideas. Some badge ideas

* Beat your own high score for the day (week etc)
* Beat your own high score 5 games in a row
* Played 10 days consecutively
* Highest score for the day (week etc)

# Answer
> 1 votes
Apparently Zynga (Farmville) is very good at generating user compulsion.

Check out an analysis of their techniques here. (URL shortener used because stackexchange doesn't handle URL's with apostrophes very well. Goes to http://meidell.dk/archives/2010/11/25/what-i-learned-from-farmville-so-you-don’t-have-to-play-it/)

---
Tags: game-design, flash, mathematics, actionscript-3, game-center
---


title: Porting an HLSL 3.0 shader to 2.0?

text:
# Question
Title: Porting an HLSL 3.0 shader to 2.0?
I have a couple of .fx files from a Shader-Based 2D Shadows example. I want to utilize the same kind of technique with XNA 4.0's Reach profile, which if I understand correctly needs to have HLSL 2.0 shaders. I am not familiar with shaders, so obviously I need to learn HLSL, but what I'm wondering right now is how to tell what shader code is 3.0 and what is 2.0, because I need to port those shaders to 2.0 and utilize them in my project. Can FX Composer be used to know such a thing?

A sub-question - Is it possible that they would not perform well when ported to 2.0? If I want to utilize a similar effect to what is presented in the link, do I need to bump my project up to the HiDef profile and use HLSL 3.0, or should I be able to get away with 2.0?

# Answer
The main differences between SM 2.0 and 3.0 are the instruction/register limits and the presence of vertex texture fetch functions (for accessing texture data from the vertex shader). Wikipedia has some nice tables with the capabilities of the different shader models.

The shaders in your link do exactly what you are trying to achieve; some are compiled for SM 2.0 and the main one is for 3.0. You can see it clearly at the end of the FX files:

```
technique Distort
{
    pass P0
    {
        VertexShader = compile vs_2_0 FullScreenVS();
        PixelShader  = compile ps_2_0 DistortPS();
    }
}

technique DrawShadows
{
    pass P0
    {
        VertexShader = compile vs_3_0 FullScreenVS();
        PixelShader  = compile ps_3_0 DrawShadowsPS();
    }
}

```

Seeing that the DrawShadows functions are quite lenghty, and knowing that Catalin Zima is an experienced XNA programmer (and MVP too), I'd say that you can't just force the shader to an inferior SM, probably because it surpasses the instruction limit. So you would need to learn some HLSL and strip the shader of unwanted functionality to cram it into SM 2.0 limits.
> 3 votes

---
Tags: graphics, shaders, xna-4.0, hlsl
---


# Question
Title: Can I do server side programming with unity?
Another thought to my last question. If i were to do a client/server game with unity3d would i be able to do serverside programming with unity? if not can i use C# .net? if not then is there some sort of package or lib i can use with C++? is the communication just raw sockets?

# Answer
> 9 votes
Unity's built-in networking is RakNet. As far as I know, inside Unity it's only really for peer to peer games (i.e. you can't really run a standalone server).

Most web games I know of that use Unity and have multiplayer use Exit Games' Photon. Paradise Paintball uses it. So does Atmosphir. You write server code in .NET that gets compiled to a DLL and run with their server software. There's a client DLL you can just drop into Unity along with your own specific code.

You can't distribute the server since it's licensed per machine you're running on, but if you just want clients to be able to connect to your servers then it's a proven solution for that.

# Answer
> 2 votes
There are multiple tutorials on network-based programming:

Network programming can be done in C#/Boo, not sure about JavaScript.

Another way to get client/server programming done is with Unity Pro/C++ Plugin

# Answer
> -1 votes
You can using this

Master server can facilitate connecting to your server.

Which would be most useful for fps or rts style games where players connect to each other to play a game.

---
Tags: unity, client-server
---


title: Why is this animation jerky?

text:
# Question
Title: Why is this animation jerky?
I am trying to create a simple game on android but I am unsure the best way to do the game loop. Looking at the LunarLander sample the game loop just loops like a variable time step loop (elapsed = now-lastupdate). I tried using this method to draw a circle that grows in size to a max radius then shrinks to a min radius and repeats. However, when I run the program the growing stage is very choppy and slow (it takes longer than it should to get to max radius).

My Code:

```
    public void updateSize(double elapsed) {
        if (mGrowing == true && mRadius > mMaxRadius) {
            mGrowing = false;
        }
        if (mGrowing == false && mRadius < mMinRadius) {
            mGrowing = true;
        }

        if (mGrowing == true) {
            mRadius += mDRadius * elapsed;
        } else {
            mRadius -= mDRadius * elapsed;
        }
    }

```

mDRadius is the number of pixel the radius should change per second and elapsed is the number of seconds that has passed.

I tried putting in a sleep of 2ms and 5ms in my game loop and I get the same result.

I converted my loop to a fixed time step (only run physics update if now-lastupdate \> TIME\_STEP) and the animation was a lot smoother.

UPDATE: I change the sleep to 15ms and it's a lot smoother. Every other example I've seen of an android game does not have a sleep in the main loop. Is this because my sample is just so simple that it takes virtually no time to update and all other examples just have a longer update time or am I missing something?

# Answer
> 4 votes
Ok, I was doing something stupid. I was using an integer for mRadius instead of a double. When the time steps are very very small as it was in my case, the increment was \< 1px so it was behaving strangely because of that. I changed mRadius to a double so that it would increment properly.

---
Tags: android, java
---


# Question
Title: What is the best implementation of an automated tournament?
Here are the specs so far to give you an idea to the question.

* should be fully automate-able
* should not inconvenience the player with regards to time
* should allow for a voted wild card system
* should involve skill
* will be done on a limited time frame

Was thinking of using a ladder like system similar to battle net 2.0 but it would seem to need some tweaking to meet all of the above.

Any suggestions on what would be an ideal tournament implementation for such requirements?

# Answer
> 2 votes
You leave out a ton of important information from your question. Namely, do you have a set number of competitors? Is this a seasonal system or is it a one-time deal? Etc.

If this is a tournament (i.e. a one-time deal with a known number of competitors), round robin is theoretically the fairest way to run it. After the round-robin phase, you move into the single or, preferably, double elimination phase.

Now, since you mention Battle.net, you need to realize that Blizzard uses the Elo system for stuff like WoW arenas (and a similar algorithm for Battle.net SC2 seasonal rankings). Elo is pretty simple, and Wikipedia gives a great overview of how it works.

A simpler (and Microsoft thinks better) algorithm is TrueSkill. Read (a lot) more about it in Jeff Moser's blog by clicking here. The math may look scary, but it's really not that interesting.

I'm not really sure what you mean by "voted wild card system", so I'm afraid I can't address that part of your question, but both Elo and TrueSkill (and to a lesser extent round robin) should meet most, if not all, of your requirements.

---
Tags: game-design, tournament
---


# Question
Title: Does anyone have a sample for drawing a subdivided icosahedron in javascript, that they would be able to share?
Does anyone have a sample for drawing a subdivided icosahedron in javascript, that they would be able to share?

# Answer
> 1 votes
https://github.com/mrdoob/three.js

# Answer
> 0 votes
You could probably find some code off of this SO question: https://stackoverflow.com/questions/561093/how-to-generate-a-subdivided-icosahedron and do the conversion to JS yourself.

---
Tags: webgl
---


# Question
Title: Name of the model in memory that you use for map collision detection?
I'm trying to remember the English name for a memory model of a map built exclusively for handling collision detection. I think this is especially frequent in tile-based platform games.

I believe the Spanish term for it is "Mapa de durezas".

If you have a *Super Mario* tilemap like this:

```
    C     +        'P' = Pipe
         +++       '+' = Brick
        +++++      '@' = Ground
   P   +++++++     'C' = Cloud
 @@@@@@@@@@@@@@@@  ' ' = Air

```

Then the `<ENGLISH EXPRESSION THAT I'M LOOKING FOR>` of that map would be:

```
          *       '*' = Solid
         ***      ' ' = Traversable
        *****
   *   *******
 ****************

```

Any clues?

# Answer
The term you are looking for may be "collision map".
> 6 votes

---
Tags: collision-detection, maps, terminology
---


# Question
Title: Method for creating a next gen MMORPG out of thin air?
Update August 2012: thank you all for your answers. I started small as suggested, creating first a Facebook Game about it, the next step will be to port it later on PC for a 3D version, and much later as a MMORPG as I would have build credibility and funding. The upcoming FB game will be done by Blup Blup Game Studio (my studio). Thanks.

Original Question: Background: I am documenting since a few months a game design document (GDD)(sci-fi & fantasy MMORPG) all by myself, without any real game design background (I am just a Chartered Accountant (CA and CISA)). For now, it looks more like a proposal document.

The question: If you would have a series of amazing ideas that would revolutionized MMORPGaming how would you create that company out of thin air? Focus on creating the initial core team that would create the mockup that would be present to capital venture companies for major financing.

You may not be financial expert here but you did a massive amount of games in the past, of various types and platforms. With our different backgrounds we are complementary.

Cheers,

Raistx

P.-S. Edited for a leaner question. Removed elements linked to money as it's not the core question. I know how to get money and convince cap venture CIES, but I need a mockup / high pitch to do so.

# Answer
> 6 votes
I think trying to find $200M in venture capital for a new company, with no shipped products and a CEO with no experience in the industry would be... impossible. Unless you come across some Nigerian billionaire widow looking to escape a repressive government.

I would suggest you start small. Take a couple of your ideas (obviously not the ones that will totally revolutionise the gaming industry, just some of the smaller ones that merely make you better than everyone else) and develop some social-media or iPhone/Android games to take funding from micro-payments. The "classical" MMO (ala Evercrack, WOW) is a massive undertaking over year, with teams of dozens and hundreds - and then a massive amount of competition. You need a ready-made fanbase to enter that market, or some intellectual property sure to draw in hundreds of thousands of subscribers to get *any* funding in the market. You won't have that, so you'll have to start self-funded.

What is unarguably the most successful MMO out there, World of Warcraft, has somewhere in the region of 14 million active subscribers. Assuming they get $10/mnth from each, and that's a generous assumption when you take into account the multi-period subscriptions, their payment processing costs, and the amount retailers take from game time cards - then that's a cash flow of $140M / year for Blizzard from WoW. Now consider their costs for servers, software developers, legal, publisher agreements, regional distribution, bandwidth and support...

To think you'll get $200M in venture capital is... frankly ridiculous, sorry. Start small. Build up a fan base. Revolutionise the industry one remarkable, patented game mechanic at a time.

# Answer
> 7 votes
I used to envision `The greatest game ever™`, I think a lot of gamers do that. The exercise is pretty simple just ad in all the features (you think) you want in your favourite game, and voila it's there in your mind, ready to be made. The problem is, this does not tackle any of the hardcore stuff, gameplay and balancing are very vague concepts to most people, but they are decisive in making an entertaining game.

I suppose you have tried starting to play a game with a specific feature which you think is cool, but after a short while discovered that it is not, or at least not something that really makes the game worth playing. The art of game design could a little simplified be boiled down to making that discovery, without playing the game.

Seeing you list features

> Every citizen will be able to fight, hunt, work, date, exercise, dance, paint, sculpted, sing, learn, play games, do illicit activities, die and so much more.

my best prediction for most of it is cool for 5 minutes and then meh. A lot of this stuff may work as gimmicks that get the social activity going, that is if it is well implemented, but it won't do much for the core gameplay.

# Answer
> 6 votes
This industry is littered with new companies that tried to make an MMO and failed. Hell even the big established companies like EA have regularly failed to make successful MMOs.

As a quick list of big closed MMO's include:

* APB
* Tabla Rasa
* Auto Assault
* Asheron's Call 2
* Hellgate: London
* Matrix Online
* Sims Online
* Fury
* Motor City Online
* Earth & Beyond
* Chronicles of Spellborn

This doesn't count the huge number of cancelled MMO's that died before launch. Any investor who does even the most cursory due diligence isn't going to invest in this space unless you've shown that you've successfully built an MMO before, and even then it's a hard sell.

All of those games were made with big budgets & experienced teams, and you can bet they all thought they had a really good idea or they wouldn't have spent ~5 years and $40m+ to try and make it happen.

The reality is that the success of all games and MMO's in particular has far more to do with execution than high concept. When WoW launched it really wasn't that fundamentally different than Everquest, but on an execution level from art direction to mission design it was very well crafted.

The same can be said for many of the "WoW-killers" that have been attempted in recent years. Most have feature parity with WoW or (WoW minus some Xpacks) but they fail to get of the ground because the execution really isn't there.

Ultimately I would suggest starting with small games to really make sure making games is what you want to do. However, if you really want to make this game idea you have, re-write the concept for Free-to-Play on Facebook. There is a lot of investment interest, budgets sub-$1m, short dev cycles give a shot at fairly rapid ROI, and lots of teams out there to do contract work.

# Answer
> 5 votes
To answer your question and not question your question and idea: You'll find a great number of interested developers and artists all over the internet. Get one or two friends or acquaintances interested, preferably one coder and one artist. That way you can start prototyping with their help. Be clear what your intentions are and be sure their intentions are on the same path. I've found that a great artist can spark a lot of interest with nice conceptual art.

**My thoughts**

I would say that's an awesome start up team. You've got control over business model, financial strategy and do the stuff you're good at. Your coder can start coding the prototype according to his belief and your artist can start drawing, modelling, sculpting etc.

When you have some assets done and a trailer or teaser, start building interest via a community. Check out www.interstellarmarines.com for an example of an interesting way to do this. Keep in mind that it took them about 4 months to complete the first playable demo (the one where you can shoot stuff, not run around) and they are all very, very experienced. They have a nice fan base already and have actually sold the game even though it's not even near completion. It's not even sure it will be completed either. Right now they are rounding up capital, with all that as a portfolio. From what I hear it's actually still hard to get capital with reasonable conditions for them.

You do this in whatever way fits you, but I'd look at how others are doing it today.

Good luck! Don't forget to upvote this answer if you liked it :) (I'm a sucker for rep)

# Answer
> 5 votes
I suspect you won't care for this answer - fantasies are always more fun than reality checks. :) But if you really want to *accomplish* something, as opposed to dreaming:

* Forget Venture Capital! And forming a large team, etc.
* Make something that is *publishable*, quickly, and release it. This may require learning a lot of new skills on your own.
* Read Ready, Fire, Aim by Michael Masterson. His thesis (to cram it into one sentence) is that you should release a semi-marketable product/service as fast as possible - then use market feedback to fine-tune further changes to it, *rather* than spending years planning for perfection.
* Look at the games in my answer to Why MMOs are hard. Those games were developed by a single person (or two people), and without a $200M budget.

Just making and publishing a game, even a simple one, will give you a *much* better idea of the issues involved, and what does or doesn't work in gameplay (and a simple game will *force* you to have good gameplay, you can't cover it up with graphics). You'll be much better prepared for making a *larger* game, or at least know whether it's possible or not.

# Answer
> 4 votes
Check this site from Tom Sloper : http://www.sloperama.com/advice.html. It contains lots of wise advices about the game development business from an industry veteran.

Don't mind the ugly design of the pages. Review all the articles: many don't apply to your case but several do.

# Answer
> 2 votes
I recommend buying a lot of WoW boxes and gluing new names on them, and then hoping people don't ask a lot of questions. You will probably need more then $200M to cover the ensuing legal fees, but it is a place to start.

---
Tags: game-design, mmo, demo, venture-capitalist
---


title: Making a symbol appear on any colour

text:
# Question
Title: Making a symbol appear on any colour
I'm developing an RPG/roguelike-style game. Instead of having maps like:

```
.........
.........
....@....
...h.....

```

Oh look, a dwarf.

I was having solid background tiles, So sort of a tile based RPG without drawn tiles. I like the idea of having ascii tiles for creatures and things. It saves a lot of artist time. I can change the tiles so I get some kind of symbol slightly more...related? But better than having 4 directions for each separate thing.

If I did this in white, and had a snow area, you wouldn't be able to see. So make it black. As soon as you reach a dark place, you're again stuck as to where your character is. Is there an algorithm or something that can say 'this is too dark between the tile and the NPC' and change the colour to something seeable, but not going to a bright cyan from a pale pink or whatever?

# Answer
Assuming you have one bright and one dark color for each character, you can check the difference in luminance, by converting the tile color and the NPC colors to HSL. Pick the NPC color with the greatest luminance difference from the tile.

If you don't want to manually assign both colors, you can simply hardcode:

```
if (tile_color.l > 0.5)
    character_color.l = 0.1;
else
    character_color.l = 0.9;

```

And assign HS pairs rather than RGB triplets to each character.

You could also just provide a lighter outline around dark characters, and a darker outline around light characters, all the time.
> 9 votes

# Answer
This is assuming you are storing the ASCII art as bitmaps instead of text rendering, which is better for performance, flexibility, and can facilitate easy to implement custom tile-sets.

**Instead of changing the colors depending on the background colors, make all the ASCII art light toned, and have a slight drop shadow effect pre-rendered onto the bitmaps.**

This will make the characters and items show up nicely on all colors/shades/tones.

*Edit: Here are some examples*

With a shadow

Without a shadow
> 5 votes

---
Tags: algorithm, tiles, color
---


# Question
Title: Lost on OpenGL versions, which to start?
I was reading about OpenGL, and found out the Red Book is a great book for me to read to learn. I then read that even though they have 3.x and 4.x versions, I should still stick to 2.x so I don't create an artificial limit on who can play my game (older computers with older but powerful graphics cards would not be able to run 3.x and 4.x GL software).

So where do I start? I'm lost. Which book? I have no problem reading the 2.x version of the Red Book, which I believe is this one: http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321335732/ref=sr\_1\_2?ie=UTF8&qid=1290869828&sr=8-2 but I won't know whats deprecated :(

*cry for help*

# Answer
> 3 votes
http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321712617/ref=sr\_1\_1?ie=UTF8&s=books&qid=1290941052&sr=8-1

With shaders, it's possible to use OpenGL 2.1 without the fixed function pipeline that is deprecated in versions 3.x and later.

# Answer
> 14 votes
I have used OpenGL 2 for many years, and I have just recently learned the basics of OpenGL 3. Having learned both, I would recommend without a doubt that you learn OpenGL 2 first. And I wouldn't even say "avoid using functions which are deprecated in OpenGL 3", because *pretty much everything* is deprecated in OpenGL 3. Basically, OpenGL 3 is ridiculously hard for a newbie to learn, so you should first learn OpenGL 2 and then read up on what it takes to get OpenGL 3 working.

In OpenGL 2, there are two modes of sending mesh data to the GPU -- "immediate mode" (glBegin, glVertex, glEnd) and "retained mode" (vertex buffers and so on). And then there are two ways to have your meshes displayed -- "fixed functionality" (the graphics card will automatically transform your vertices into the correct place on the screen, perform simple lighting calculations, etc) or "custom shaders" (you must write all the transformation and lighting calculations yourself in a language called GLSL).

So whenever you use OpenGL 2, you must make those two orthogonal choices: immediate vs retained, and fixed functionality vs custom shaders. Immediate is easier than retained, and fixed is easier than shaders. But the immediate mode is awful for performance (as you must send the full mesh data to the GPU every single frame), and the fixed functionality will not work for any effects you might have seen in the last 8 years or so, like bump mapping and phong shading. So both immediate mode and fixed functionality have been removed from OpenGL 3.

That's why I recommend you learn OpenGL 2 first. Maybe try immediate mode with fixed functionality. Then go up to retained mode (use vertex buffers). Then try writing a custom vertex and fragment shader in GLSL. Only once you have mastered all of that will you be able to even *think* about not using any of the deprecated functions (since in OpenGL 3, you must *always* use retained mode and write your own shaders). Finally, you will be able to switch over to OpenGL 3.

If you are actually releasing a game, OpenGL 2 is fine and will be supported for many years. But there is still a good reason to be using retained mode (speed) and custom shaders (better lighting and cool effects).

---
Tags: c++, opengl
---


title: Finite state machine in C++

text:
# Question
Title: Finite state machine in C++
So, I've read a lot *about* using FSMs to do game state management, things like what an FSM is, and using a stack or set of states for building one. I've gone through all that. But I'm stuck at writing an actual, *well-designed* implementation of an FSM for that purpose. Specifically, how does one cleanly resolve the problem of transitioning between states, (how) should a state be able to use data from other states, and so on. Does anyone have any tips on designing and writing a implementation in C++, or better yet, code examples?

# Answer
> 12 votes
I wrote a FSM based off of a chapter in "Massively Multiplayer Game Development" Edited by Thor Alexander. Inside is a chapter labelled "Parallel-State Machines for Believable Characters". This is written in python, but the concepts are easily translatable into C++. I highly recommend checking this out, even though this is about character states, not game states.

What I created is here: https://github.com/swganh/mmoserver/tree/master/src/ZoneServer/GameSystemManagers/State%20Manager look under StateManager for implementation details, but basically you have different 'base states' that you can use. Then from there you have the specific states that you transition to as a character, so every state is a class. You then check if can transition from one state to another and then on 'enter' you make your switch, you can also easily do things like put in events after moving to a state. I found this worked out really well for the game so far.

What I have implemented is what the book calls a parallel state machine, which is essential multiple fsm's working together, in this case you can transition into one state, that blocks all other states (ie: CreatureState\_Dead). I'm not going to go too much more into detail as I don't think it would really help you, but if you'd like I can elaborate.

# Answer
> 8 votes
Programming Game AI By Example (http://www.ai-junkie.com/books/toc\_pgaibe.html) has an example implementation that's pretty straightforward and just handles the basics. Transitions are handled in a single method call (first Enter(), then Execute() every update, Exit() when transitioning)\> I don't know what you'd need besides that. I would implement more complicated transitions as states of their own that are just designed to execute once and move to the next state in sequence.

I'll take a stab and assume you're looking at FSMs for AI, if so I recommend you take a look at behavior trees. AIGameDev has some great articles on it.

# Answer
> 5 votes
**If C++ template magic and potential long compilation times is not a problem for you and you already have Boost installed to work with**:

Boost now have an efficient (in speed and size) **meta-state-machine library** that have the advantage of letting you set the transition table separately from the states structures : you have a table that describe when to go from wich state to witch other state. You just have to read it to understand what's going on in the state machine.

The other advantage is that it have been tested by several enterprises even in embedded softwares with high-performance software (see the boost mailing list for details). As the implementation is already there, it might be a good choice if you need a generic state machine implementation that Just Works(tm).

It also support orthogonal states (parallel states) and other useful UML-based features.

It also provide several ways to express the transition table, one being experimental but interesting on the expressivity side (although limited by current compiler performance -- too bad!)

---
Tags: c++, architecture, software-engineering, game-loop, state
---


title: Is semantic games a good idea?

text:
# Question
Title: Is semantic games a good idea?
I wish to address the low re-usability of game technology (at least provide a theoretical solution).

I'm considering an approach using a semantic game format, effectively decoupling the story and logic of games from its presentation and art. I can see a few immediate advantages:

* Completely platform independent games (think SCUMM games)
* Optionally: presentation independent games (cheaper and more flexible)
* Game editors can provide different specialized game construction UI's, but producing the same game format. (think bytecode)
* Game engine technology (voice synthesis, facial synthesis, skeleton animation etc. etc.) can be reused across games as a part of (or extensions to) the semantic game format/language.
* Game art and game technology can be licensed extensions, paid by game distributors, independent of client platforms.

Apart from the huge resources needed to establish such a game format/language, are there any theoretical limitations that should stop this concept?

# Answer
I can't imagine working in an environment like that and getting the results I want.

Either you're expressing things on such a high level that everything starts to feel the same (because you're not providing enough detail to be different), or you're going into so much detail that you might as well be working in a more expressive system.

As Joe said, separating the "model" and the "view" of games isn't that easy. AI is coupled to animation. Animation is coupled to gameplay (for example, reload speed of weapons). Art and design are tied together. You have a prop in a level and it serves many purposes: correctly fitting in with the style, fitting in with the theme, and being the correct height for cover.

Not to mention the fact that graphics are still an arms race. Separating the game from the hardware might seem like a noble goal but it isn't going to fly in the AAA console world where you want to take as much advantage of the platform as possible.

Maybe it might work for a tiny subset of games with a known problem set in the hobbyist market. I could see this working in, say, a DND-style RPG world. But for games in general, no.

That's not to say that the existing tools don't need help. There's lots of work that needs to be done there. I just don't see that direction really helping the majority of games.
> 5 votes

# Answer
So instead of coding the game using a real programming language, you have to code it into a new very specialised language that as of now nobody knows.

I can't picture \*anyone\* willing to do that.

Even if someone for some weird reasons would accept to do that, development will sooner or later crash against something that that language does not implement, or does not implement it well.
> 2 votes

# Answer
Decoupling a game from its hardware is hard, most games dont even trust the operative system it runs on to provide functionality. How is this not like a java openGL application bundeled with some libraries(platform independant)? I think maybe the assumption that there is low re-usability in game development is wrong.
> 1 votes

# Answer
Cross-platform Game Maker???

It sounds like you're just describing a suite of really well integrated libraries with scaffolding and language binding for some special intuitive language. This applies to Torque2d, DarkBasic, Game Maker, and many other tools. What's different about your idea? Scratch looks like another variant on Carnegie Mellon's Alice or Game Maker.
> 1 votes

---
Tags: architecture, assets, cross-platform
---


# Question
Title: Hardware for iPhone 2d games development
Do I need the cutting edge MacBook Pro or iMac for 2D games development?

Would a iPod touch (with Wi-Fi support) do instead of a full-fledge iPhone?

# Answer
> 5 votes
Any modern Mac that runs Snow Leopard is adequate for 2D games development.

There's nothing particularly hardware intensive about 2D game development for iOS. The most intensive things you will be doing is compiling your code and running the emulator and debugging tools - my Mac Mini did all of these tasks with ease.

The iPod touch is sufficient for testing games destined for the iPhone. The devices have the same screen resolutions, CPUs and iOS versions. The latest iPod Touch does have less memory than the latest iPhone (256MB as opposed to 512MB) so this is something you should be aware of.

# Answer
> 2 votes
Well we're using Mac Minis for the iPhone development (kinda old macs, Core 2 Duo 2Ghz, 2GB RAM, integrated graphics) and it's fine. OS: Leopard / Snow Leopard.

---
Tags: iphone
---


title: What algorithm to use for path mapping?

text:
# Question
Title: What algorithm to use for path mapping?
I am making a turn based game with tiles, much like Final Fantasy Tactics. I am trying to develop an algorithm for mapping out a list of available tiles to walk on. So for example, I am at (0,0) and I have a range of 2 - ie I can walk to any tiles that within two tiles away from me.

Things to account for:

* I have a set number of steps I can take - which was 2 in the example above
* There may be enemies or walls that will block my path
* The tiles are hex-based so I have 6 possible places to move to

The plan is basically to

* determine the places I can walk to
* if the tile is available, add it to a list of walkable tiles from this location - so that I can use it in a pathfinding algorithm and so that I don't have check this location again

Basically I need an algorithm to map possible paths from a location. I thought of the A\*,dijkstra, bfs,dfs but I think they require knowing the nodes beforehand.

Any help would be appreciated, thanks!

P.S. Path-mapping would be a better tag but I can't make a new one.

# Answer
Breadth-first or depth-first search would do this job more efficiently than your answer suggesting that you will use A\*. You can search each node with one run of the algorithm instead of one run for each node.

Pseudocode for a depth-first approach might look like this:

```
reachable_places_list = empty list (or set, or map, or something similar)

function find_all_reachable_nodes(current_node, distance_travelled):
    for each node adjacent to current_node that is reachable:
        add node to reachable_places_list if it's not already there
        if distance_travelled + 1 < 2:
            find_all_reachable_nodes(node, distance_travelled + 1)

find_all_reachable_nodes(player_position, 0)

```

You also don't need to use 'a very high value' to exclude blocked nodes from a graph search (whether A\*, DFS, BFS, or whatever) - simply don't add them to the list or queue of nodes to be queried in future.
> 8 votes

# Answer
> I thought of the A\*,dijkstra, bfs,dfs but I think they require knowing the nodes beforehand.

You can use those just fine. Your problem set is small enough I'm sure that you don't need to precompute anything. Just run A\* every move and you'll have your paths computed given whatever the state of the board is.
> 2 votes

# Answer
Thanks Tetrad, I found out how to do it. Basically, for all the tiles in my range, I apply A\* from that tile to where I am standing on. Also assign a very high value to walls/enemies. Then if I can reach my location within 2-moves, then that tile is valid. Then I can add it to my list of nodes.

Its sort of like applying A\* but in the opposite direction
> 0 votes

---
Tags: tiles, path-finding, turn-based-strategy
---


# Question
Title: Should I put a soundtrack behind my strategy game? Which games need music and sound
Shuffling cards and impact noises are cool (it is a card based game), but should I invest the time/effort in hooking up background music? I have found Play Audio from Stream Using C# which could be used to allow hooking to DI if online or similar code could be used to play local MP3s, but is it worth the effort? Which game generes need it and which can do without? Release it without it and add it as a .5 feature?

# Answer
> 7 votes
Well, solitaire (that comes on Windows machines) doesn't have background music.

Despite that, I think if you can find a decent background music loop that fits the feel of the game and is not obnoxious (i.e. can the user tell when the song is starting over again? and again? and again?), then you should add it. Just be sure to add an option to turn it off.

# Answer
> 8 votes
Games need to provide feedback to the player to let them know what's happening. Chiefly feedback is provided in one of 3 ways:

* visual feedback (graphics, flashes)
* aural feedback (sounds)
* tactile feedback (vibration/rumble)
* (... maybe one day there'll be taste + smell feedback too)

Feedback can be given for aesthetic reasons as well as for practical reasons:

* set mood/ambiance eg. music track (aesthetic)
* alert the user that something is happening (pragmatic)

They key to providing great feedback is recognizing whether you're sending the player appropriate feedback and whether it is useful and aesthetic. You don't want to annoy the player - so adding the ability to tune music/sfx ratios as well as turning these off would go a long way to helping your players.

So considering appropriateness of feedback is an important question, some of that appropriateness is segmented by 'genre', but ultimately it comes down to figuring out what emotional response you want of your players. Taking your card game as the genre, here are a few examples:

* Are you doing a horror card game? Sound track should match your goals. Horror cards might be silent, have the odd clank and some scary sudden sounds.
* Is it a fun/jaunty card game? The jaunty game could be enhanced by a fun/bouncy/wacky soundtrack
* Is it casual? Perhaps you want to add a background track that just sounds like a bunch of people in a restaurant eating and interacting. Perhaps the sound of a railway with slight screen shakes every now and then when the train passes. Are you playing at dusk with the sounds of crickets chirping? etc.
* Is it suspenseful? do you have a timer counting down? Background sounds can become more climatic as the countdown gets closer to zero. "Who wants to be a millionaire" did this brilliantly.

# Answer
> 6 votes
I'd say games should always have sounds. In 90% of cases they add to the experience. Have an option to mute it and then you will be catering for the people who don't like it as well.

Just as an example Canabalt is a game that uses music very well.

# Answer
> 3 votes
Regarding letting the user specify local MP3s to play.

The only reason I see to do this is if the background music needs to stop (or reduce in volume) at certain points (say while some voice-over dialog is playing) then it is good because the game maintains control of the BG music but the user can pick the type of music they like.

If user-selected BG music will have no interference with gameplay, just let them play the music themselves, its not like your game is the only time they listen to music, they will have a method of playing it if they want to.

# Answer
> 1 votes
I'd would say it's all a matter of opinion.

Personally, As a gamer I tend to turn off the ingame music and play something I want to listen to on winamp/spotify in the background. That is, unless the game music is actually really good and not looped to the point of irritation.

Using an online radio stream might remove the repetitiveness, but a player could stream their own music separately anyway (and pick their own streaming preferences).

# Answer
> 1 votes
Put SOME sort of continuous background soundtrack in there. It disturbs me when games are completely silent but I haven't told it to mute anything. Always have the option to turn it off of course, but don't just leave it with a sparse range shuffle noises.

If you're going for the Windows Solitaire feel, then this question is already answered for you: it'd be better to have no sound at all. But then you should ask yourself, why are you remaking Windows Solitaire? This is your game--make it interesting!

Not that there's anything wrong with remaking Solitaire. But it feels to me like that'd be a stepping stone to bigger games, and if so, start making those!

---
Tags: architecture, music
---


title: Can you record raw sound data in XNA?

text:
# Question
Title: Can you record raw sound data in XNA?
XNA 4 includes the Microsoft.Xna.Framework.Audio.Microphone class which can seemingly read the raw sound data off the microphone via its API as documented:

> **GetData** \- Gets the latest recorded data from the microphone.
>
> **GetSampleDuration** \- Returns the duration of audio playback based on the size of the buffer.
>
> **GetSampleSizeInBytes** \- Returns the size of the byte array required to hold the specified duration of audio for this microphone object.

Can I read sound data using this class, record it in an array and then play it back? On the Xbox 360?

# Answer
> 7 votes
You could try submitting the data from the microphone to a Dynamic Sound Effect.

I just wrote some code to test this, it works.

```
DynamicSoundEffectInstance sound;

protected override void Initialize()
{
    sound = new DynamicSoundEffectInstance(Microphone.Default.SampleRate, AudioChannels.Mono);

    Microphone.Default.BufferReady += (a, b) =>
    {
        byte[] data = new byte[Microphone.Default.GetSampleSizeInBytes(Microphone.Default.BufferDuration)];
        Microphone.Default.GetData(data);

        sound.SubmitBuffer(data);
    };
    Microphone.Default.Start();

    base.Initialize();
}

protected override void Update(GameTime gameTime)
{
    if (gameTime.TotalGameTime.TotalSeconds > 5)
    {
        Microphone.Default.Stop();
        sound.Play();
    }

    base.Update(gameTime);
}

```

# Answer
> 2 votes
As a supplement to Martin's answer (can't comment yet, otherwise I would just do that):

http://create.msdn.com/en-US/education/catalog/article/dynamic\_audio

---
Tags: xna, xbox360, sound, audio, voice
---


# Question
Title: What are some ways of sorting through zero-experience programming candidates?
I work for a relatively small company. We don't get a lot of resumes from people with experience, yet we're in a position where we should hire people to grow. We pretty frequently get resumes from people just out of school.

We'd like to try to find the diamonds in the rough, but flying non-local people out and taking a day out of several people's week to do a sit-down, in person interview is expensive. We also do phone interviews for any semi-promising candidates, but those can take a while to set up, and are usually a couple of man hours lost.

We've considered implementing a programmer test, but we have yet to figure out a good one that other studios aren't using.

What are some practices that your studios use to look through these people, with minimal internal overhead?

# Answer
> 12 votes
We have a mixed art/tech environment, but hiring process is always the same. Cull interesting resumes and offer candidates a task from start to finish on his own where you give him only a high concept. For programmers a small game that can be made in several days (can use programmer art or stock) where you give him a concept of what it should do and tech to do it with. A really basic game. For artists it's either a spec work or a pitch for concept.

They can work on their own on that, can use whatever help they need (google, ask around, whatever) as long as they finish on scheduled deadline. Test consists of first cull if project is actually what it was supposed to be (does it work at all etc.) and where you go through process he used to make it and code review where you discuss his decisions while making it.

# Answer
> 9 votes
What the heck... :)

How to Recruit Great Developers

What process do you use to recruit programmers

What is the best way to tell an excellent programmer in a job interview?

How long should it take a senior developer to solve FizzBuzz in an interview?

# Answer
> 6 votes
No professional experience doesn't mean no experience at all. Check if the candidates have participated in any local/global event such as the global game jam, the independent games festival or they just come up with a website with their portfolio.

On the other hand, some programmers just love programming competitions; check that too (ACM, TopCoder, Google Code Jam, UVa, SPOJ, to name a few). Experience on this kind of competitions make up for any weird test in fashion and will probably help you get some resumes out.

All in all, I think this post from Joel Spolsky always help.

# Answer
> 6 votes
The quickest way to cull candidates is a 10 minute phone interview. Usually within the first few questions I know if this is going to be a good candidate or not.

1. Do you know C++ or C?
2. Can you tell me the difference between these two variables?

```
int a;
int* b;

```
3. What's the difference between `a++` and `b++`?

I consider knowledge of pointers to be the absolute minimum level of competency. If you are applying for a professional game job and you don't know how pointers work, you are going to be in way over your head.

# Answer
> 4 votes
One of the things that is quickly making the rounds as a easy filtering mechanism is codility.

http://codility.com/

It's a service you pay for to give automated timed programming tests. The bad thing is that there are a fixed number of tests. The good thing is that the tests are automatically graded by unit tests. So for culling a large number of people this might be a good approach.

---
Tags: management, hiring
---