text:
Where should the animation be done?
Let's say I want to make a character (an animal) with a stick in its mouth.
I dont understand if the animation (done in Blender) should have the stick in its mouth or if it should be done in Unity/Shiva, etc.
Is there any place where I can read the theory behind it? How shall I do interaction between two objects like an animal eating something?
Thank you

I don't know where you could go to read about it, but the best way to go if you don't intend for the dog to always have the stick in its mouth is to make the stick a separate object, animate the dog as if the stick were in the mouth, and along with the dog have a "locator" for where the stick should be (including its orientation) as the animation progresses.
It's ok to put the stick in the dog's mouth while you export it, but only if you can do it in such a way that they remain two separate objects for the export.  E.g. in Maya you would reference in the stick, and then your exporter would know not to export referenced geometry.

I don't understand from this answer if the animation is done in Unity or in Blender. Can you clarify?

@ashes999 you author the animation in an authoring tool (e.g. Blender) and play it back in your game engine (e.g. Unity).

I prefer to create an EMPTY in blender, that when Unity Imports the .blend file considers a separate object at the position of your EMPTY.
From there, I would assign the world/global-space location to the stick via "Transform.position" of the EMPTY, of which you could also create separately in Unity itself.
As long as you're using "Transform.position" in your code, your stick should always be able to position itself at the point of the empty(if you place it in your "public void Update" code section).


text:
Cross-platform independent development
Some years ago, if you wrote in C and some subset of C++ and used a sufficient number of platform abstractions (via SDL or whatever), you could run on every platform an indie could get on - Linux, Windows, Mac OS of various versions, obscure stuff like BeOS, and the open consoles like the GP2X and post-death Dreamcast. If you got a contract for a closed platform at some point, you could port your game to that platform with "minimal" code changes as well.
Today, indie developers must use XNA to get on the Xbox 360 (and upcoming Windows phone); must not use XNA to work anywhere else but Windows; until recently had to use Java on Android; Flash doesn't run on phones, HTML5 doesn't work on IE. Unlike e.g. DirectX vs. OpenGL or Windows vs. Unix, these are changes to the core language you write your code in and can't be papered over without, basically, writing a compiler. You can move some game logic into scripts and include an interpreter - except when you can't, because the iPhone SDK doesn't allow it, and performance suffers because no one allows JIT.
So what can you do if you want a really cross-platform portable game, or even just a significant body of engine and logic code?
Is this not a problem because the platforms have fundamentally diverged - it's just plain not worthwhile to try to target both an iPhone and the Xbox 360 with any shared code because such a game would be bad? (I find this very unlikely. I can easily see wanting to share a game between a Windows Mobile phone and an Android, or an Xbox 360 and an iPad.) Are interfaces so high-level now that porting time is negligible? (I might believe this for business applications, but not for games with strict performance requirements.)
Is this going to become more pronounced in the future? Is the split going to be, somewhat scarily, still down vendor lines? Will we all rely on high-level middleware like Flash or Unity to get anything cross-platform done?
tl;dr - Is porting a problem, is it going to be a bigger problem in the future, and if so how do we solve it?

Section 3.3.2 of the iPhone Developer Program License Agreement allows for game scripting now, though it is still a bit convoluted. - "Notwithstanding the foregoing, with Apple’s prior written consent, an Application may use embedded interpreted code in a limited way if such use is solely for providing minor features or functionality that are consistent with the intended and advertised purpose of the Application."

Apple changed the license agreement again yesterday, and game scripting is now totally a-okay. - "Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exception to the foregoing is scripts and code downloaded and run by Apple's built-in WebKit framework."

I'd say that you've lumped a bunch of things together that don't belong--mobile devices, consoles, PCs, and web-based games? Consoles and PCs, sure, should be able to share a codebase with some tweaking. Mobile devices are vastly different in capability from dedicated computing hardware (in terms of raw graphical power, storage, threadedness, etc.), and so you wouldn't really even be able to use the same solutions. And web games are, you know, web pages. What do you want? The fragmentation here is across device paradigms, not mere computation architectures.

Actually I said nothing about web games. I think it's reasonable to want to run some of the same code on all devices - input mapping, or an abstracted graphics API, or an entity system, file parsing, networking - these are all the same basic paradigms regardless of platform. But the question is also 8 months old, and was borne out of concerns that don't apply much since NDK gathered more support on Android and Apple stopped their stupid policies.

I mean, you did mention HTML5...that's kind of intended for web games, right?

The Unity engine gets you a huge chunk of the way there. Write once and you've got Mac/Windows Standalone and webplayer based.  Tweak your inputs, and mind your draw calls and you're on iOS/Android.

For a small indie developer, with limited funds/time (and maybe more of a focus on 'making something cool' than 'making something profitable'), trying to go cross-platform from the start could be counterproductive. It takes a lot of effort to engineer solid cross platform tools and tech (different graphics APIs, endianness, input devices, and more) - time that could be spent on the more creative side of game development.
But you probably want to make sure you've got a great game that works really well on one platform before worrying too much about getting it onto as many platforms as possible! If the game is a flop, there's no point wasting time and effort making it a multi-platform flop, is there?
If you're coding in C/C++, mostly from scratch, then as long as you keep the code fairly modular and make sensible decisions about data formats and middleware/libraries, then supporting other platforms later shouldn't be too painful.
If third-party cross-platform tech/tools (e.g. Unity) is an option for your project, then it's certainly worth considering.
The main 'problem platforms' for indies would seem to be Xbox360 Indie Games (C# only, limited network access, etc), and possibly Android (massive differences in device performance/screen size/input devices).  If you're determined to support these, expect a more sizable porting job, or plan to focus on them exclusively.

Yeah, Unity3D rocks. www.unity3D.com

I agree with @bluescrn - better to know almost everything about almost nothing, than knowing almost nothing about everything: Jack of all traits, master of none.

You say cross-platform independent development. The biggest hurdle then is resources, and that means a lack of time most of the time, but also lack of know-how and possibly finances (license fees, buying devices, etc).
Indie or not, the biggest hurdle is actually design. As you say, a game that runs on Xbox360 and iPad might work, but they also need to be fundamentally different in terms of design. The 360 has a controller, the iPad a touch screen. Also, development for the 360 is done in Windows using C# as language, the iPad can only be targeted on Mac OS computers and using C, C++ or Objective-C. Or Javascript, if you prefer. Some things just don't mix that well whatever you do.
What you say about the different platforms holds true today. Use C/C++ and SDL and you can write your program cross-platform on PC-like machines, probably much more smoothly than years ago. However it was always a problem and will always remain a problem to port games from PC to console to mobile, and vice versa. It has just become more pronounced in the recent years by allowing Indie developers to program for consoles (or developers hacking access to it to create homebrew games) and by the rise of mobile devices powerful enough to run games.
Porting has the same problems it ever has, but there are more devices to port to. And some ports just don't make sense without re-designing the core of the game. This is not a problem that can be solved, it's one you have to consider from the outset even before you write your first line of code. Then it will be manageable, no more, no less.

Actually, I would say time to port is one thing an independent developer/group is more likely to have than a large publisher-driven studio.

There are plenty of game designs that make sense on all platforms - turn-based virtual board games, for example, are consistently a hit on all platforms. So are many falling / matching block puzzle games. These can't even be "ported" in the traditional sense anymore - moving a game from e.g. XBLIG to the iPhone is a guaranteed rewrite of all the code.

A simple, portable and open interface framework is really needed, I think. Some musings:
There currently seem to be four common kinds of game input methods: Keyboards, Mice, Controllers and Multi-Touch Surfaces. (I'll gloss over the issues of differing capabilities between, for example, gamepads and joysticks for now, though that should eventually be addressed.)
Ideally, our developer would be able to specify in a general way a few different UIs that make sense for the kind of game being written. (They might decide to provide a Keyboard and Mouse UI, a Mouse Only UI and a Multi-Touch UI, as an arbitrary example.)
The framework is then responsible for mediating IO between the platform and the game code, similar to how cross-platform GUI frameworks like QT and GTK function.
Having such a framework wouldn't solve the incompatible language requirements problem, but would at least encapsulate all the system-specific calls behind a common API, which should make language porting much more straightforward.
Well, now that I've written all of that: Does anyone know if a framework like that already exists?

With projects like MonoTouch and XNATouch it was looking like XNA might get you on most platforms with a bit of tweaking. Unfortunately Apple kind of torpedoed that when they changed their Terms and Conditions to restrict which languages you can use. Unity goes across pretty much everything now, although on XBOX it will get you on XBLA but not XBLIG, so not an option for smaller indies.
One approach might be to create a framework that uses the same conventions across multiple languages/platforms, then it is just a matter of tweaking syntax to port games. You might want to launch your game in Flash, which can be developed quickly and reach a large audience, then if it is successful port to iPhone, XNA etc. This way you know you have a fun game before over-committing yourself.

stupid apple, who restrict programming languages! WHO?!?!

I think this is an economic problem, not a technical problem.  Platforms like xbox360 have a strong incentive to be exclusionary, because they're trying to get users choosing their platform instead of some other platform.  "We have these cool exclusive games" is way more interesting than "we can also play these games that everyone else has".  The ecosystem is dominated by the hardware manufacturers.
I suspect this will change when social-networked gameplay matures, because there's potentially a lot more money in getting everyone into the same social-gaming system than in making yet-another-FPS-with-sexy-graphics.

I just discovered Haxe and NME. It claims to be a cross-platform app that supports all major desktops and mobile devices, and Flash, from one code-base. Worth a look.

A cross-platform development tool that is so new I don't necessarily recommend it is http://www.monkeycoder.co.nz/
It hits every platform you mentioned.
While it is too new to really judge, it has a great pedigree: it's creator previously made Blitz3D and BlitzMax, which were great development tools for indie game developers.

I've had luck with the airplay SDK - at least on x86 and apparently targets iPhone well (although I still have yet to put an app on an iPhone yet).

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/2.5/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Deal with mini states in game
Hi :)
I want to ask what is the best way to deal with "mini-states" in game? For example I making game like Simcity, i can build buildings, roads, rails, or I can change something in economy.
I am making something like:
enum
{
  ROAD_CONSTRUCT,
  BUILDING_CONSTRUCT
  VIEW_MAP
  etc..
}

and in the game loop big switch. But the code is getting big. Is there some solution for all popular languages? I am asking because I am writing in C++, AS3 and sometimes in C.

are you using this enum to decide which view is presented to the player? like in sim-city when you are adding plumbing you see the water-flow instead of seeing the buildings?

I write for example SimCity, I writing something more simple.

In an OOP language, the standard answer is to use polymorphism:
// Current game state. Should *not* really be a global var.
// This is just for demonstration. The current state can be
// changed by setting this to a new instance of a class that
// inherits State.
State * state;

void gameLoop() {
    while (true) {
        state->update();
    }
}

class State {
public:
    virtual void update() = 0;
}

class ConstructRoadState : public State {
public:
    virtual void update() {
        // Do stuff...
    }
}

// Other states...

In C, you can accomplish the same thing using a callback for the current state.

I don't know if the polymorphic solution is for "OOP languages" or just some of them. It's what I'd do in C++, but in Python or another language with convenient higher-order functions I would just use callbacks again, and in new C++ compilers I might use functors, if I was only managing a single function.

Definitely this: I do it all the time and twinge with pain every time I cross code using switch for state handling...  The advantage of this is also that you can have each state "store state", initialize, deinitialize, etc, when it transitions in and out.

Callbacks work in an OOP language too, but these "states" are likely to have some state of their own, which makes polymorphic classes a good fit (unless you're more comfortable with closures than most OOP programmers are).

In Python there is no significant difference between a method and a function, so you can pass a bound method to a callback system and keep it unaware of your instance's state. C++0x also takes some steps in this direction with lambdas and functors; I have not played with it enough to know if it's a good idea to do that yet (which means it's not; compiler support for them is bad). I would only use a polymorphic type if my interface consisted of more than one function.

It sounds to me that the problem isn't the states but the way you're handling them.
Why do you need a big switch in the main loop? The only things that generally change are the mouse cursor and the click behaviour. Both of those should be wrapped up in separate functions.

This question may be identical to Game State 'Stack'?, but I'm not sure what you mean by mini-states.
My answer to the question (Game State 'Stack'?) works regardless of how "important" the state is. When states are sets rather than a single global or stack, you don't have to worry about one state unexpectedly excluding another. If you do want a convenient exclusion mechanism for state sets, you can use e.g. the top eight bits of the enumerated value to enforce state uniqueness. Thus states don't need to explicitly know about other states, but just compare their own masked bits to other active states.

I don't think the OP means states such as menu, gameplay, options. I think he means something in-game, such as 'overworld map', 'road view', 'underground view', et al. SimCity-esque.

My point is that such things are not necessarily different in a system using state-sets.

I think about in games mini-states. They aren't big states like GameScreen , MenuScreen etc, I think they are to small, to making classes for each other.

In a state-set system a state is just an enumeration mapping to a single function or set of functions. When it comes time to do the thing that varies per state (or mini-state), you just call all active state functions. It doesn't really get simpler than that, except by making it all explicit with a switch statement; but that is what you asked to get away from.

Hm...Ok :) But I have for example something like that:
pseudocode :
class Game <>---- class Map (Game has Map)
map<State, pFunc> states;
state = construct
statesstate;
I click somewhere on screen, where I want to build something, and how to make this building process in extern func ?

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/2.5/


text:
Box 2D Set Origin
I'm trying to set the origin of a box2d shape. By default, a shape rotates around the center. But I'm trying to get it to rotate around the left of the shape. Like a clock for example.
I've heard of things like SetXForm but that function doesn't seem to even exist. I'm using C++ just in case you needed to know that.
Thanks in advanced, any help is appreciated.

There are two kinds of shapes and three ways to make them in Box2D.
A b2CircleShape always has its center at the center of the circle. If you want to make a "lopsided circle" you must fix the circle to another object (e.g. a tiny circle inside it) with a joint.
A b2PolygonShape may be initialized with SetAsBox. SetAsBox by default places the origin in the middle of the rectangle, but you can pass a b2Vec2 as the third argument to place the origin elsewhere.
A non-box b2PolygonShape is initialized with the origin at local coordinates 0,0. To make a shape that extents only one direction, e.g. right and up, simply specify coordinates like (0, 0), (0, 5), (5, 5), (5, 0), constructing the shape only along local coordinates that move up and right (and in CCW winding order).
Remember, the origin of the shape is always local coordinate (0, 0). If you try to think of it as "moving the origin" you are just going to confuse yourself - what you are doing is offsetting the other vertices relative to the origin.

Never mind, I fount the answer. Apparently in the b2PolygonShape, when you call the function
SetAsBox()
There's a 2 overloads. And one of them is:
SetAsBox(halfwidth, halfheight, center, angle);


text:
How can I copy or back-calculate definitions for an entire b2World?
I'm working on a platformer where I'd like to be able to move or copy bodies between multiple Box2D b2Worlds. The desire has cropped up three times now - moving objects between documents in my editor, moving the player between levels in normal game play, and giving the player a preview of a non-trivial projectile they can shoot in the game, which seems to be most accurately done by simulating the world for a few seconds ahead.
It looks like I can make a parallel world the "long way" - for each body in the world, copy the body data back into a def and re-create it, then copy the fixtures on it in the same way, then do the same for joints; re-set all the velocities; and if it's a "move" rather than a "copy" delete the original one.
I was wondering if someone has already written this code (and if so, was it actually a workable design or not?), or if Box2D has some affordance for doing this within its API which I am missing.

Please edit your posting to be a question.

@Pavel He actually does ask a question even though he is lacking a question mark.

At least to me it wasn't clear what he was asking for.

"if someone has already written this code" Someone can answer "Yes" to the wondering of Joe Wreschnig and it will be legal answer. But I suppose he doesn't going to appreciated that.

@Pavel Yes, I am sure he expected someone to explain what made it a workable design or not even if he didn't ask for it explicitly. As an answer of "Yes" would be downvoted more than likely. Also, being petty helps no one.

Thanks for reminding me about this.
The answer, is no, you can't do this in stock Box2D. Joints don't have enough accessors to get back a correct JointDef. You can back-def-ify simple bodies, but nothing jointed, and the simple bodies are usually trivial enough you wouldn't need to do a copy of the world to predict their motion accurately anyway.


text:
importing 3ds max ( .max) file into blender
I got couple of 2 .max files that were created on 2008 version of 3ds Max. The files are really very simple 3d models of room and furniture item.
I am using blender 2.53 beta.
I have 3ds Max 2011 version. Using this version I exported the model to Autodesk Collada (.dae file) and also to .OBJ files but neither work with blender 2.53. In blender I can import the files but most details are gone and wall edges look like annoying zig zag pattern and look worse than a silly cartoon.
Even tried exporting to old .3ds format but that gives more problems.
I looked at 3ds max collada plugin :
http://update.multiverse.net/wiki/in...COLLADA_Plugin
but it is not compatible with 3ds Max 2011 version.
So I am confused what to do as I am new to blender and 3d. What is the best way to export from 3ds max when opening exisitng 3ds max 2008 version models and importing to blender 2.53?
The models have simple lights and no animation is involved.

Unfortunately the only way to export 3DSMAX files is with a plugin (or script) running inside of 3DSMAX itself.  The Collada file should be the way to go, and maybe the Blender importer is just incorrect.  OBJ and 3DS files are very simple and should Just Work, maybe you can export to OBJ and edit it by hand to "fix" problem areas?  (It's just a text file so you can edit it in a text editor.)


text:
How to find two perpendicular lines given a single plane
Hey guys, i was wondering how i would go about finding the perpendicular lines relative to a surface normal.
For instance say i have (0,0,1) the expected output would be (1,0,0) and (0,1,0). What would be the best way of achieving this?
I realize that i will be using the cross product, but that requires two vectors, how do i get my first perpendicular line?
Thanks!

Firstly, the vectors you find will not be unique.  Any two perpendicular vectors in the plane can be rotated to find two more.
To find an arbitrary pair of perpendicular vectors, just find another vector that is not a scalar multiple of your normal.  You can do this by adding a constant value to one of your components (check that the other two aren't zero -- if they are, then add the constant to one of the zero components).  Now that you have this other vector compute the cross product of this vector with the normal to get a vector in the plane.  Then compute the cross product between this vector and the normal to get a second vector in the plane - and you are done.

how do i get my first perpendicular line?

Cross the normal with any arbitrary vector. We'll call this result1 and it is on the plane & perp to the normal.
Cross the normal & result1 and this result (result2) is perpendicular to both normal & result1.

If the normal & the arbitrary vectors are unit length, and you normalize result1, your results will be a basis for an orthonormal rotation matrix.
edit - for the arbitrary vector, make sure it's not parallel to the normal.

If any of your normals have 0 in them, then a perpendicular vector will have a non zero component in that direction. IE (0,1,1) will be perpendicular to (x,0,0) for all x!=0. Other than that you can try (y,-x,z) for a perpendicular vector.
Also, lines are not vectors, so you are really finding perpendicular vectors.

I realize i am finding directional vectors, but what if none of my vectors contain a zero component

The zero component is the edge case for the second part of my post (Switching two components and negating one). The only difference between my answer and the others is that this vector is for sure on the plane already but requires a check that you aren't switching or negating 0s.

One common application of this is to create a 'look-at' matrix for a camera
In this case you can start with your camera direction vector, and the world up vector as your second vector, and do something along the lines of:
vForward = normalize( vAt - vFrom )
vRight   = normalize( cross( vForward, vWorldUp ) )
vUp      = cross( vRight,   vForward )

And those vectors become the 3 rows of a 3x3 rotation matrix.
Beware of the case where vForward == vWorldUp!


text:
In Pong, how do you calculate the ball's direction when it bounces off the paddle?
I'm trying to wrap my head around this very Hello World-y problem in game development. I've created a TicTacToe game in XNA so I guess the next step would be a Breakout clone.
Keep in mind that I have no knowledge on game programming or even what maths I should apply to where. That's why I'm asking this question.

To the question: How can I determine where the ball should bounce when it hits the paddle at the bottom of the screen?
I'd imagine it would be something like:

Capture speed and angle from incoming ball.
Detect where it touched the bar (far left, far right, center) and according to that give it a higher speed if it touched the outer areas.
This is where I'm stuck. Hehe.

Any insights? I realize this is not a straightforward answer type question, but I'm sure it's one everyone faces at some point.
I'm reading the book Linear Algebra that was recommended on this website, but I still have no idea if I should apply it here.

Write pong before breakout, you could then export the ball, wall and paddle classes and extend them such that they work with the different types of bricks and powerups. Plus, I would consider pong simpler than breakout.

Here's the relevant logic I used on the pong on my homepage: (please go play it before reading, so that you know the effect I'm achieving with the following code)
Essentially, when the ball collides with the paddle, its direction is completely disregarded; it is given a new direction according to how far from the center of the paddle it collided. If the ball hits the paddle right in the center, it is sent away exactly horizontal; if it hits right on the edge, it flies off at an extreme angle (75 degrees). And it always travels at a constant speed.
var relativeIntersectY = (paddle1Y+(PADDLEHEIGHT/2)) - intersectY;

Take the middle Y value of the paddle, and subtract the Y intersection of the ball. If the paddle is 10 pixels high, this number will be between -5 and 5. I call this the "relative intersect" because it is in "paddle space" now, the ball's intersection relative to the middle of the paddle.
var normalizedRelativeIntersectionY = (relativeIntersectY/(PADDLEHEIGHT/2));
var bounceAngle = normalizedRelativeIntersectionY * MAXBOUNCEANGLE;

Take the relative intersection and divide it by half the paddle height. Now our -5 to 5 number is a decimal from -1 to 1; it's normalized. Then multiply it by the maximum angle by which you want the ball to bounce. I set it to 5*Pi/12 radians (75 degrees).
ballVx = BALLSPEED*Math.cos(bounceAngle);
ballVy = BALLSPEED*-Math.sin(bounceAngle);

Finally, calculate new ball velocities, using simple trigonometry.
This might not quite be the effect you're going for, or you might want to also determine a speed by multiplying the normalized relative intersection by a max speed; this would make the ball go faster if it hits near the edge of a paddle, or slower if it hits near the center.

I'd possibly like some code on what a vector would look like or how I could save the variable of the vector the balls has (speed and direction).

A vector contains both speed and direction, implicitly. I store my vector as a "vx" and "vy"; that is, the speed in the x direction and the speed in the y direction. If you haven't taken an introductory course in physics this might seem somewhat foreign to you.
The reason I do this is because it reduces the per-frame calculations necessary; every frame, you just do x += vx * time; and y += vy * time; where time is the time since last frame, in milliseconds (therefore the velocities are in pixels per millisecond).

Regarding implementing the ability to curve the ball:
First of all, you'd need to know the paddle's velocity at the time the ball hits; which means you'd need to keep track of the paddle's history, so that you can know one or more of the paddle's past positions so that you can compare them to its current position to see if it moved. (change in position / change in time = velocity; so you need 2 or more positions, and the times of those positions)
You now also need to track an angular velocity of the ball, which practically represents the curve along which it is traveling, but is equivalent to the real-world spin of the ball. Similar to how you would interpolate the bounce angle from the relative position of the ball on collision with the paddle, you would also need to interpolate this angular velocity (or spin) from the velocity of the paddle on collision. Rather than simply setting the spin like you do with the bounce angle, you might want to add or subtract to the ball's existing spin, because that tends to work well in games (the player can notice the ball is spinning, and cause it to spin even more wildly, or counter the spin in an attempt to make it travel straight).
Note, however, that while this is the most common sense and probably easiest way to implement it, the actual physics of a bounce doesn't rely solely on the velocity of the object it hits; an object with no angular velocity (no spin) which hits a surface at an angle, will have a spin imparted upon it. This might lead to a better game mechanic, so you may want to look into this, but I'm not certain of the physics behind it so I'm not going to try to explain it.

That effect is what I'm going for; the faster speed as it hits the edges of the bar. Thanks a bunch for taking the time to write this out. I'm having some trouble understanding a few things though; for example, in the first snipper, what is 'intersectY'? Also, 'paddle1Y' is the height of the bar correct?

intersectY is the position of the ball where it intersects the paddle. I do an overcomplicated calculation which I honestly don't even understand right now, but essentially it is the Y value of the ball at the time it collides. paddle1Y is the Y value of the paddle, from the top of the screen; PADDLEHEIGHT is the height of the paddle ("bar").

What would you have to add in order to allow "curve" balls? For example, when the ball is about to hit the paddle you move the paddle in order to make the ball curve. Something like this: http://en.wikipedia.org/wiki/Curve_ball

See the edit, and let me know what you think (if you need more info about something, don't get something, etc.)

Thanks! Superb answer, I've always wondered how to do achieve that effect!

@ricket : Nice site :) but the ball of the pong game flicks on Chrome...

@Raveline I've found that the smoothness depends heavily on the speed of your computer. When I first visit the site (in Chrome) the ball stutters for a few seconds (maybe as the JavaScript hotspot VM is compiling to native code?) and then it's completely smooth. This is on my 4-year-old Core 2 Duo Win7 notebook. My iPod and Android phone are both completely smooth in moving the ball, too. But on older/slower computers I expect the ball wouldn't be as smooth.

I drew a diagram to aid the math and I'm getting that ballVy is -cos(bounceAngle) rather than -sin(bounceAngle). Here's a picture: http://i.imgur.com/JmZpR7L.jpg what am I doing incorrectly?

It has been a while since I've done this, but I think I've got this right.
Given a perfect collision, the angle of reflection is equal to the angle of incidence.
You know the normal of your paddle (presuming a flat surface): N
You know your original position of your ball (at the beginning of your timestep): P
You know your new position of the ball (at the end of the timestep): P'
You know your point of collision: C
Assuming that you calculated that the segment P -> P' passes through your paddle, your new reflected postion (P'') would be:
P' + 2 * (N * (P' dot -N) )
The N * (P' dot -N) subexpression calculates the depth along the normal of collision the ball traveled.  The minus sign is to correct for the fact we're checking for depth opposite the direction of the normal.
The P' + 2 * the part of the subexpression moves the ball back above the plane of collision by 2 times the depth of the collision.
If you want a less than perfect collision, change the factor 2 to be (1 + (1-k)) where k is your coefficient of friction.  A perfect collision has a k value of 0, causing the reflection angle to be exactly that of the incoming angle.  A k value of 1 causes a collision where the ball would stay on the surface of the plane of collision.
Your new velocity vector, V'', direction would be P'' - C.  Normalize it and multiply by your incoming velocity and your resultant velocity magnitude would be the same, but in the new direction.  You can monkey with that velocity by multiplying it by a coefficient, l, that would either increase (l > 1) or decrease (l < 1) the resulting velocity.
To summarize:
P'' = P' + (1-k) * (N*(P dot -N))
V'' = l * V * ((P'' - C) / |P''-C|)
Where k and l are coefficients of your choosing.

The reflection can either be done "right" or done "easy."
The "right" way is to compute vectors perpendicular to the walls.  In 2D that's pretty easy and you could probably just hard code them.  Then, the reflection step essentially leaves the "parallel" component of the motion intact and reverses the "perpendicular" component.  There's probably detailed information on the web for this, maybe at MathWorld even.
The "easy" way is to just negate the X or Y motion when you hit a wall.  If you hit the side walls, you'd negate X.  If you hit the top you negate Y.  If you want to speed the ball up, just increase whatever you want; you can speed it up in its current direction by multiplying both the X and Y speeds or you can speed up only on one axis.

Aren't the "easy" way and the "right" way described above essentially the same??

They are exactly the same if the walls are along the major axes. If the walls are not all along the X, Y, and Z axes then no, the two are completely different.

I'm making an arkanoid-ish game myself too and I think the solution on how the ball should behave when hitting the paddle is quite simpler and faster than getting into the sin/cos approach... it works fine for the purposes of a game like this. Here's what I do:

Of course, since the ball speed increases in time I interpolate the before/after x,y steps to keep accurate collision detection, looping through all "stepX" and "stepY" which are calculated dividing each speed component by the modulus of the vector formed by the current and future ball positions.
If a collision against the paddle occurs I divide the Y speed by 20. This "20" is the most convenient value I found to get my resulting maximum angle when the ball hits on the sides of the paddle, but you can change it to whatever your needs are, just play with some values and choose the better for you. By dividing, let's say a speed of 5, which is my initial game speed by this number (20), I get a "rebound factor" of 0.25. This calculation keeps my angles quite proportional when the speed increases in time up to my maximum speed value which, for example, could be 15 (in that case: 15/20 = 0.75). Considering that my paddle x, y coords are midhandled (x and y represent the center of the paddle), I then multiply this result by the difference between the ball position and the paddle position. The greater the difference, the greatear the resulting angle. Besides, using a midhandled padlle, you get the correct sign for the x increment depending on the side the ball hits without having to worry about calculating the center. In pseudo-code:

For n = 0 to modulus
  ...
if collision_detected then
    speedX = -(speedY / 20 )  * (paddleX - ballX);
    speedY = -speedY;
    exit;
  end if
...
x = x + stepX;
  y = y + stepY;
end for
Remeber, always try to keep things SIMPLE. I hope it helps!

The paddle in Breakout, when it follows the style you're describing is usually modelled as a curved surface. The angle of incidence changes based on where on the paddle it hits. On the dead center the tangent line to the curve is absolutely horizontal, and the ball reflects as expected. As you move off the center, the tangent to the curve becomes increasingly angled, and the ball reflects differently as a result.
The key point is that the angle of reflection, not the ball speed, is what changes. The ball speed generally just increases slowly over time.

You say as a curved surface and that sounds logical in my head but once I try to think of it in terms of code things get fuzzy fast. How could I even declare that in code as a variable or something.

Something like angle = 1 - 2 * (ball.x - paddle.left) / paddle.width will give you a number between 1 and -1; this (times some value tweaked for your game mechanics) is the slope of the tangent line at the point the ball collided. Reflect off that line rather than the strictly horizontal one.

Nolan Bushnell gave a keynote at SIEGE this past weekend and talked about a similar issue with the original pong. You don't have to do alot of complicated calculations. If you hit on towards the left portion of hte panel, send the ball left. Do the same for the right side.
To start off with you can make the angle for the left and right sides 45 degrees. Once you finish the game you could if you want go back and make this more complicated but make this as simple as you can to begin with.

I saw that keynote too, his point was that this was a design decision not a math decision: "angle of incidence = angle of reflection" would be correct but make for weak gameplay. Additionally in the original Pong and Breakout, speed was a function of how many ball/paddle collisions there were (so it speeds up over time). They also reduced paddle size after a certain number of hits, too. I would avoid allowing the ball to go straight up though, then you could leave the paddle there indefinitely.

Breakout is a classic beginners work for starting to dive into the world of physics based game programming.
Basically the ball has a bounce motion when it hits on the wall. As somebody above suggested the angle of incidence is equal to the angle of reflection.
But when you consider the ball hitting the paddle. The logic is divided into 3 sections.
1.) The ball hitting the center portion of the paddle.
2.) The ball hitting the leftward portion of the paddle.
3.) The ball hitting the rightward position of the paddle.
When you consider the center portion: You need not differ the bounce effect of that which is applied when hitting the ball. The ball just gets deflected normally.But, when either direction is hit, the case is different.
When the ball is hit on the leftward side, ie consider the ball coming from the leftward side of the screen and you are coming with the paddle from the right side. Then when you hit the ball with the leftward portion, the ball should reflect to the direction it came from .ie.leftwards with the same angle it came from. Same is the case vice versa. In the rightward portion also the same thing applies.
This movement of the ball towards the leftward or rightward direction when it is being hit  makes it more believable.
Hope you got the idea,at least logic wise.Thank you

Imagine you calculate the distance between the center of the paddle and the point where the ball Y hit and call it d. Let's suppose d has a positive value when the ball hit above the center of the paddle. You can now add d * -0.1 to the Y velocity of your ball and it will start changing direction. Here is an example in javascript that can be easily translated into c#!

var canvas = document.querySelector('canvas');
var resize = function () {
  canvas.width = innerWidth;
  canvas.height = innerHeight;
};
resize();
var ctx = canvas.getContext('2d');
var ball = {
  size: 3,
  x: 1,
  y: canvas.height/2,
  vx: 2,
  vy: 0
};
var paddle = {
  height: 40,
  width: 3,
  x: canvas.width/2,
  y: canvas.height/2
};
addEventListener('mousemove', function (e) {
  paddle.y = e.clientY - (paddle.height/2);
});
var loop = function () {
  resize();
  ball.x += ball.vx;
  ball.y += ball.vy;
  if (ball.x > canvas.width || ball.x < 0) ball.vx *= -1; // horiz wall hit
  if (ball.y > canvas.height || ball.y < 0) ball.vy *= -1; // vert wall hit
  if (ball.x >= paddle.x && ball.x <= paddle.x + paddle.width && ball.y >= paddle.y && ball.y <= paddle.y + paddle.height) {
    // paddle hit
    var paddleCenter = paddle.y + (paddle.height/2);
    var d = paddleCenter - ball.y;
    ball.vy += d * -0.1; // here's the trick
    ball.vx *= -1;
  }
  ctx.fillRect(ball.x,ball.y,ball.size,ball.size);
  ctx.fillRect(paddle.x,paddle.y,paddle.width,paddle.height);
  requestAnimationFrame(loop);
};
loop();
body {overflow: hidden; margin: 0}
canvas {width: 100vw; height: 100vh}
<canvas></canvas>

Hi I have been recently tried to make a ball game and figured out a solution for this.
So what I did:
The paddle is moving while we are playing the game. My coordinate system is left as it is, the top-left point of the canvas is 0,0. The paddle is moving in this coordinate system. The x axis points from 0 to canvas width, and y axis is pointing on 0 to canvas Height.
I created a paddle with fix size 100 width and 20 height. And then I draw an imagined circle around it. When the ball hits the paddle I compute paddle's Centerpoint
double paddleCenter=Squash.paddle.getXpos()+Squash.paddle.getPaddleWidth()/2;

Then I subtract the center from the ball's current position this way the coordinate system will be at the center of the paddle, ballCenter is the point where the ball hit the paddle (-(paddlewidth+r)..0..(paddlewidth+r)) this is nothing but rescaling the hitting point on the paddle
double x0 = ballCenterX-paddleCenter;

compute the circle's intersection point with the help of the ball's hitting point (x0) this is a recomputation , we ask for the y coordinate on the circle with the x0 already known coordinate and  there was needed a flip for the y axis
double y0 = -Math.sqrt(paddleRadius*paddleRadius-x0*x0);

compute the derivate of the normal equation of the circle which is defined around the paddle with radis paddleRadius f(x,y)=x^2+y^2-r^2
double normalX=2*x0;
double normalY=2*y0;

normalize the N vector, to get a unit vector for the surface normal
double normalizer=Math.sqrt(normalX*normalX + normalY*normalY);
normalX=normalX/normalizer;
normalY=normalY/normalizer;

now we have the normalized (unit) surface normals for the paddle. Compute the new direction with these surface normals, this will be computed with the help of the reflection vector formula: new_direction=old_direction-2*dot(N,old_direction)*N, but instead with the surface normal pointing always upwards, the normal's will be changing from point to point where the ball hits the paddle
double eta=2; //this is the constant which gives now perfect reflection but with different normal vectors, for now this set to 2, to give perfect reflection
double dotprod=vX*normalX+vY*normalY;
vX=vX-eta*dotprod*normalX;//compute the reflection and get the new direction on the x direction
vY=-vY;//y direction is remain the same (but inverted), as we just want to have a change in the x direction

I've published my solution to this problem. For more details and for the complete game you can see my github repository:
https://github.com/zoli333/BricksGame
written in java with eclipse. There is another solution for this commented out in Ball.java, where the rescaling not happen I don't move the coordinate coordinate system to the paddle's center point, instead I compute all of these above from the topleft 0,0 coordinate system relative to the paddle's center point. This works also.

based on @Ricket's answer, I solved it basically with Pythagorean theorem. You want the size of the final vector to be 1, so you can multiply it to have your final ball speed. Following Python code:
At first, u take the intersect of the paddle-(bar) and the ball. So it's the X vector.
relativeIntersectX = (self.bar_x + (self.bar_width/2)) - self.ball_x

Then you normalize it. So it is value between -1 and 1.
normalizedIntersect = (relativeIntersectX/(self.bar_width/2))

So, the ball_vx (x-velocity) is basically the vector itself. Velocity is any positive number based on, how fast you want the ball.
self.ballvx = -normalizedIntersect*self.velocity

The ball_vy is just expressed from the formula vx^2 + vy^2 = 1.
self.ballvy = -math.sqrt(1-normalizedIntersect**2)*self.velocity

You might want to care about special cases, so you just go something like this.
if normalizedIntersect > 0.95:
     normalizedIntersect = 0.95
elif normalizedIntersect < -0.95:
     normalizedIntersect = -0.95

this will help http://www-classes.usc.edu/engr/ee-s/477p/s00/pong.html you simply invert x and y depending on where it hits the screen. if its going up, and hits the top, it inverts the y velocity while keeping the x velocity

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How can I easily test & visualize different math things?
For example, I've asked about the breakout formula to calculate the ball bounce. Inside of XNA, I don't know where I would code this and to even display something I would need a lot of code.
Is there something simple way visualize math formulas such as the one above?

If you're up for learning a new language, the R language is designed specifically for visualizing pure math. Processing.js is another language geared toward visualization.

You can use MatLab, but I personally dont. Whenever I want to type out a bunch of quick code to test a formula, I actually use the python interpreter. Python is great for something like this, and running something in the interpreter is really quick and easy.

I asked something like this some time ago in Stackoverflow.com and the answers are pretty good. I ended up using Octave and it was awesome.

For graphing formulas I usually use https://www.desmos.com/calculator which is straightforward to use, and free.

I tend to reason through problems on plain old pencil and paper. There's just nothing quite like it; it's completely unstructured.
Otherwise, I mean, there are math problems like Maple, Matlab or Mathematica (those are the popular three) but they of course have a learning curve.
Figuring out that particular problem was mostly just a matter of reasoning; define exactly what you want to accomplish, what variables you need (intersection point, velocity of ball, distance of intersection from center of paddle, minimum and maximum speeds), and then determine how to go from what you have to what you want.
Sometimes maybe it just takes being familiar with the math too, or having solved similar problems or understanding different angles of the problem. For example, I had already seen similar problems like this one in my Calculus classes, so it was pretty easy for me to tackle. Math is important in game development.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Error on new XNA 4.0 game project - No suitable graphics card found
Any ideas on how to fix this? According to what I remember about XNA 3 was that when running the application from scratch, I would get a blue colored windows with nothing rendered.
Any suggestions?

EDIT!
I right clicked the project and selected Properties and changed the Game Profile from Use HiDef to Use Reach. Now the familiar blue tint window is showing as expected.

What am I losing if I choose the limited API and why did I even have to choose this for it to work?

As a sidenote, I wonder why they chose to call it "Reach"... I just got done playing some Halo: Reach so that came to mind immediately. But I suspect it's more because of the symbolism of "reaching" more devices?

Sorrry,but i dont know where are these project properies. Could someone tell me?

@Romantyk12 - http://i56.tinypic.com/2iqeu6t.png Hopefully this image helps. After clicking properties on the right-click pop up, the first tab labelled 'XNA Game Studio' has settings near the top to choose Reach or HiDef profile.

To answer your follow up question:

What am I losing if I choose the limited API?

This blog post explains the differences between Reach and HiDef. In a nutshell, the Reach profile does not allow the use of some of the more advanced graphics card features. But it runs on more hardware.

after changing properties to reach same error is appearing

@maryam It's possible that your graphics card does not support the requirements of even the Reach profile, which requires at least Shader Model 2.0, and a few other features which should be common on GPUs of that era - see the table linked in my answer for details. (Unless the error message itself still says "HiDef profile" - then you've not changed the setting correctly / for the correct project.)

XNA Framework HiDef profile requires a DX10 capable video card.
If you have a DX10 capable card, make sure your latest display drivers are installed.
If you don't have a DX10 capable card go into project properties and change the profile from HiDef to Reach.
Edit: I see you answered your own question, but to answer your question about what you will be missing:
Probably antything related to DX10. I can't remember the exact differences in my head, but lighting and particle effects are two areas where DX10 excels over DX9.

It needs a card that had most of the capabilities that a DX10 card has, but it still runs on DX9.

Between DX9c and DX10 there are increases to the max texture size,  increases to the maximum # of texture references, increases on the number of shader commands to name a few.


text:
Difference between Vorbis OGG and M4A/MP4/AAC?
From what i know m4a and aac are the same thing with mp4 allowing video while the former only allows audio.
Whats the difference between vorbis ogg and m4a? I looked it up and it seems that m4a/aac are patent free. What are reasons i may want to choose one from the other?
Assume source will always be lossless (wav/aiff/flac) and i am choosing the encoding to distribute with my game/demo

Ogg Vorbis is soup-to-nuts Open Source. Every bit of the Ogg Vorbis specification is available and there are no known patents that apply to Ogg Vorbis. It is often free and easy to work with. (That is, if your platform/framework of choice supports working with it. For instance, XNA/XACT don't support Vorbis, but if you are using XACT you will be giving it your lossless files anyway and using its built-in compression.)
AAC is the product of a working group of corporations with several commercial goals in mind. M4A/AAC is not patent-free, it is patent encumbered:
http://en.wikipedia.org/wiki/Advanced_Audio_Coding#Licensing_and_patents
You don't need to pay patent royalties to use AAC files as a consumer, but if you were to deploy an AAC codec, for instance as a library dependency in a game, you may need to get a patent license and pay for it. (I am not a lawyer. You should talk to a lawyer.) That said, many platforms that you might be working on may already have an existing codec in place. XNA supports AAC in many places, and so does many Apple libraries, as two examples. Developing a cross-platform game with AAC is a bit more difficult (and you may want a lawyer involved).
In terms of "quality", just about every music codec out there is sufficient at a high enough bit-rate. In my experience the "good" bit-rates for normal music listening for Ogg Vorbis and AAC are reasonably similar. I think Ogg Vorbis is a good format and certainly a useful one when you need something open source and free as in beer and speech. (I have a good chunk of my personal music library in Ogg Vorbis, in fact. I like supporting strong open source efforts when I can.)

doom3 uses ogg files, and I guess idtech 4 does the same...

From the wiki and from this page http://www.vialicensing.com/aac_faq.aspx it looks like you can distribute freely but only pay to encode or decode. However wondering that VLC can play it i looked at #5 and it appears you only pay when you SELL something. So a free demo/game would be allowed. So for developers it appears you can encode all you want (automated build, manual or even on a website backend for users to upload) but you need to pay for an encoder unless its offered free. It only affects you if you are decoding or encoding inside of a bin being sold.


text:
What are good JS libraries for game dev?
If I decide to write a simple game both text and graphical (2d) what libraries would I use? (Assume we are using a HTML5 compatible browser)
The main things I can think of

Rendering text on screen
Animating sprites (using images/css)
Input (capturing the arrow keys and getting relative mouse positions)
Perhaps some preloading resource or dynamically loading resources and choosing order
Sound (but I am unsure how important this will be to me at first). Perhaps with mixing and chaining sounds or looping forever until stop.
Networking (low priority) to connect a user to another or to continuously GET data without multiple request (I know this exist but I don't know how easy it is to setup or use. But this isn't important to me. Its for the question).

Pretty complete list of html5 game libs https://github.com/bebraw/jswiki/wiki/Game-Engines

What? You can do all that with just pure JavaScript. Socket.io for networking, though.

You may find Stage.js interesting (I'm its author).

jQuery and MooTools are awesome JavaScript libraries; I prefer jQuery myself. Either one will assist you in your JS game development if you use the DOM. If you go with Canvas rendering, I still think you should use one of those libraries, but you will need to learn the Canvas functions. Here is a tutorial which introduces you to canvas by creating a Breakout clone, so it might be exactly the kind of thing you're looking for (and it uses jQuery).
Animating sprites is a matter of changing an image src, or preloading several images and swapping them out, or in a canvas just drawing frames of an animation. The above libraries can help with any of these cases. The libraries also help with input (look into events such as onkeypress and onmousemove).
For preloading resources, I've seem some games that use a single "sprite sheet" image (here is the one for Google's Pacman game). I believe they basically create a DIV of one tile size, with the CSS background-image property set to the sprite sheet and the background-position property set to the offset of the tile on the sprite sheet. I haven't seen a library that will do this for you, but jQuery or MooTools can help you as far as dynamically creating the DIV and manipulating its CSS. Otherwise, preloading images is a matter of creating <img> tags of the images you want preloaded, and not adding them to the page (or adding them invisibly). Here's a blog post that has some code for a function using jQuery to preload images for you.
SoundManager 2 seems to be the JS sound library to use; I know Vanthia uses it, and Google's Pacman used something similar (or at least the same technique, of using a hidden Flash file on the page to play sounds).
For networking, jQuery can handle AJAX for you, or if you want much more real-time networking (and have the server to do so), look into JavaScript sockets. I don't know if there's a stable library out there for it, but you might look into this or this. Essentially it uses a hidden Java or Flash file on the page so that you can do true socket communication with JavaScript, which is much quicker than AJAX polling and slightly more efficient than "AJAX Push". However, most likely, AJAX Push will be what you want, and APE (Ajax Push Engine) is probably the library to use.
Also, here is a Google tech talk about "Building a JavaScript-Based Game Engine for the Web". It looks neat.

This answer is a bit conservative; if he wants to use html5 browsers only then he can go for canvas and use one of the html5 libraries (see my comment on the question). Using DOM & CSS for games seems like a hack (though a workable hack in some cases).

What makes it seem like a hack? Google had no problem using pure DOM & CSS with their PacMan logo and I quite like my pong game on my homepage. Actually to be honest, canvas seems like a hack, hacking a square of graphics rendering into a page otherwise dominated by the DOM. But alas with the push towards that and WebGL it's clear the browser will become the heavyweight do-everything app if it isn't already. I digress...

If he wants to use audio, networking, text rendering he will have to use html5 ready browser. Alas canvas would be a good pick. If you stick with DOM&CSS you are limited in so far as these technologies already make up a presentation layer with certain assumptions (text flow, layering, kind of a scene graph for a text document). Whereas with canvas you can manipulate pixels in any way you see fit, which is closer to 'normal', raw game engines on top of SDL or opengl.

The audio and networking libraries I provided don't require HTML5. And actually I see the text flow, layering and scene graph likeness as benefits. Most games are just sprites (images) being positioned and moved around and don't need direct access to pixels. It really needs to be evaluated based on the game that you want to make though, and also if you are personally more comfortable with canvas or DOM, if you want to support older browsers, if you need the extra power canvas provides, etc.

yeah, it depends on the game. But he asks for HTML5 and your answer is mostly about Flash and DOM level 1 :) If he wants to do bleeding edge HTML5 development then don't lure him back.

When I evaluated JavaScript engines a little while ago my favorite was Crafty:
http://craftyjs.com/
There were a loooot of options I had to consider, and some others I liked were:
http://easeljs.com/
http://www.limejs.com/
http://code.google.com/p/casualjs/
(Incidentally, another option that looks pretty slick initially is http://impactjs.com/ but considering it costs money and the other options I looked at were open-source engines there were some glaring omissions, like the inability to attach display elements in a heirarchy.)

UPDATE: It's been almost 2 years since I posted that answer and the situation has changed slightly (this is a nascent area of technology.) Although Crafty is still a great choice, in the past year EaselJS has picked up a lot of momentum (especially considering Adobe hopped on the EaselJS train.) I'm gonna switch to that tool for future projects (also note that it has a new website)

what you suggest today ? after 4 years

Well the Update was from 1.5 years ago, and I still suggest that.

The Effect Games engine (javascript) is fantastic for 2d, tile/sprite-based games. The website doesn't do a very good job of describing what's so great about it, but as soon as you dig into the excellent documentation you'll see how much has been covered for you:

spriting
collision detection
level editing
asset management
audio
input and control
tileset creation and management
layering
animation
performance (lock to a framerate)
cross-browser support and abstractions
hosting
embedding
HUD support

I really can't provide an exhaustive list as it's so fully featured. One thing that's missing is the ability to create in-game menus and UI (eg. equipment managers etc), but it's supposedly on the todo list.

Unfortunately the effect engine appears to be completely abandoned.

I maintain a canvas 2D game engine called JawsJS - http://jawsjs.com/
Source @ https://github.com/ippa/jaws
cliffnotes:

Readable, documented code
12+ bundled documented examples
Useful constructors like Sprite(), SpriteSheet() and Animation()
Game states - Separate sections of your game for better organized code
Assets - Jaws will preload all your assets before the game starts
Does not depend on any other javascript library
Builds on lessons learned from years of developing Chingu, a Ruby game lib

Impact is going to be sick! Just take a look at the demo game, Biolab Disaster.

I've been doing some research in this area lately myself, so let me chip in my $0.02:
PlayN Is a cross platform library from Google, which compiles an object oriented game from Java to javascript/Flash/Android. It will handle JSON (AJAX), data models, and has sane semantics for updates and rendering. Very cool stuff.
Processing Is a simple to use library that is aimed at designers and artists. It's exceptionally simple to use and can give you great results. I've used the Java version for scientific modelling, and it is a delight to use. The 3D scenes will need WebGL, but the 2D scenes work without.
Three.js Has some great looking demos. It requires WebGL, but the result seem worth it. There are some exiting examples online too.
Here are some of the other items in my personal linkdumps that relate to WebGL:

http://www.glge.org/
http://scenejs.org/
https://github.com/itsnotlupus/webgl-mmo
http://www.c3dl.org/
http://creativejs.com/

Akihabara is a framework that I've seen come up in a number of places. A friend of mine also created a series of tutorials and documentation for the framework.

http://rocketpack.fi/ seems to have something coming up.

Another one I recently have been looking into with great interest is CreateJs.
It is a collection of open source libraries to include...

EaslJs: Html5 Canvas helper
TweenJs Animation helper
SoundJs:Sound
PreloadJs: Asset Loading and Management

Additional it EaslJs Plays well with Box2D JS

Impact JavaScript Game Engine for iOS looks promising. The link shows a demo, but it has not been released, yet.

Pixie Plugins
The creators of Contrasaurus have released a lot of their individual components!!!
They have code to do matrix transformations, canvas abstractions and many many more interesting things.
Their code is great and their libraries are really useful.

Strange that Google Closure Library hasn't been mentioned. It has a huge API, allows more object oriented coding style and has the compiler.
I have used so far only the compiler but I am planning to study rest asap.

I usually use jawsjs because it's really easy to set it up and start developing a game in minutes. It has lots of really useful default classes (Tilemap, Viewport, Sprite, and others) that really help with game development.

You've got plenty of them actually, but it first mainly depends on which kind of game engine you're looking for. I can give you some references of the most noteworthy.
2D Game Engines

Cocos2D tends to be a bit more fashionable at the moment. I saw Cocos2D questions popping up here and there on Stackoverflow recently.
Impact, you can see a benchmark running on the official website.

3D Game Engines
Mozilla foundation has been working on a 3D game engine named Paladin. It's Mozilla that it can't really hurt I guess.

Matrix.js is good if you want to get Flash style matrix transforms.

There is also gameQuery, a jQuery based game engine.  Has decent documentation on their API, as well as, a few sound wrapper APIs they link to on their site.
http://gamequery.onaluf.org/

Mozilla Gaming has a list on its Resources pages. It links to Diggy, which is a DHTML game engine I built a while back. Live demo here!

Tom here from Scirra, we are a 2 man team that have created Construct 2, the HTML5 game maker.  (Free version available).
You might want to consider an engine like ours as it does a lot of the legwork for you.  For example to do collisions in code yourself can be really tricky (think polygon collisions).  Everything on your list is easily achievable with Construct 2.


text:
What is a good linear algebra book for game programmers?
I was told that I should start learning Linear Algebra in order to create good games with good physics.
I'm reading Linear Algebra book and it's completely foreign to me. The author starts out with solving linear equations (two equations, two variables) and I remember learning about that in school, but almost immediately he jumps into other things that seem to be taken directly from the Necronomicon.
What book can I read to learn some good math, but starting from the fundamentals?
Thanks a lot for the help.

https://amzn.to/3h6ksNv For beginners is best, no1 maths book from Springer publisher, even I too dont have any CS or maths background.

Sergio you might want to aim more toward a Game Development math book like
Essential Mathematics for Games and Interactive Applications, Second Edition: A Programmer's Guide
Instead of the classical Linear Algebra you would learn in college.  Also like Ron Warholic said, stating what your math comfort level is would better help us taylor a specific book.

+1,  highly recommended.  This book is "anchoring" a lot of the fundamental concepts in ways they never were before.

Not a book, but you should check out the math curriculum over at the Khan Academy. I'm in the process of using these videos to brush up on my own math skills. They cover an extremely broad range of material, and the author has been praised for his teaching style.
IMO, truly an amazing resource.
http://www.khanacademy.org/#Linear Algebra

I agree entirely, that looks amazing.

Thank you for adding the link to Khan Academy,It is going to be very useful to me. +1 for this reply.

What level of math are you at? Do you understand things like vectors and matrices?  What about geometry and trigonometry?
I have Mathematics for 3D Game Programming and Computer Graphics 2nd edition by Eric Lengyel and it's a great refresher on math related to games.  It starts with a very basic introduction to linear algebra with vectors and matrices and works through more advanced things like illumination, visibility determination, computational geometry, and game physics systems.
The only downside from a programmers point of view is that it is very equation heavy.  If you are the type that gets scared or frustrated by equations I would look elsewhere for reference.
The one thing you need to make sure to do regardless of the book you choose is to do the exercises!  You can't learn unless you actually do them.  For fun you could even implement them to allow you to see how the math maps to code.

Frank D. Luna provides a brief but comprehensive introduction to the applicable concepts of linear algebra in his books on game development with Direct3D. You might want to take a look at his latest book, Introduction to 3D Game Programming with DirectX 10.

The Best world class course in linear algebra is MIT's one with the great Gilbert Strang
It is about 34 lectures
You may face few calculus examples which you can ignore them
check the syllabus for his text

I really liked Eric Lengyel's Mathematics for 3D Game Programming and Computer Graphics. It's been my constant desk companion since school.


text:
How to prepare a sprite for a game?
For example, I created my character drawing on Paint.NET using the Pencil tool and now it's a sprite like asset.
If I want him to move do I need to create many different poses for him and render them according a timer? Or do I need to have each pose side by side in a single image, then render the rectangle I need, thus loading the picture only once?
Thanks.

Usually you try to have them in a single file(maybe even fit multiple characters/backgrounds in just 1 image) and then do all the magic in memory.
This files with a lot of images are called Sprite Sheets and you can find a lot of them online.
There are many tools out there to manage sprites and aprite sheets both language/framework specific or general use.
Some of the things to consider is if you have things of different sizes, perspectives, how do you represent that information about the sprite sheet.
Depending on the platform and type of game it might be more or less important to use optimization in this area, I would suggest to always Keep It Simple if possible.


text:
TitleSafeRegion isn't available on XNA 4?
I'm following the book Microsoft XNA Game Studio Creators Guide v2. and there is a snippet in the book that is used to return a Rectangle that represents the safe area you can draw without the fear of 'drawing' outside the screen.
Except in my IDE Visual Studio 2010, that method doesn't show up in intellisense and in fact doesn't show up anywhere.
Here is the snippet:
private void UpdateAsteroid(GameTime gameTime)
{
    // time between frames
    float timeLapse = (float)gameTime.ElapsedGameTime.Milliseconds;
    if (move == true)
    { // asteroid centered at the middle of the image
        Rectangle safeArea = TitleSafeRegion(rockWidth/2, rockHeight/2);

      // asteroid right edge exceeds right window edge
    if (rockPosition.X > safeArea.Right){
        rockPosition.X = safeArea.Right; // move it back
        rockSpeed *= -1.0f; // reverse direction
    }
// asteroid left edge precedes the left window edge
else if (rockPosition.X - rockCenter.X < 0){
rockPosition.X = rockCenter.X; // move it back
rockSpeed *= -1.0f; // reverse direction
}
// asteroid within window bounds so update rockPosition
else
rockPosition.X += rockSpeed * timeLapse;
// Scale radians by time between frames so rotation is uniform
// rate on all systems. Cap between 0 & 2PI for full rotation.
const float SCALE = 50.0f;
rockRotation += rockRotationSpeed * timeLapse/SCALE;
rockRotation = rockRotation % (MathHelper.Pi * 2.0f);
}
}

Hey guys, I am also reading the same book, and that method is defined as a procedure in the game class ( File Game1.cs) as
Rectangle TitleSafeRegion( int spriteWidth, int spriteHeight )
{
    #if XBOX
    // some televisions only show 80% of the window
    [... code here ...]
    // ensure image drawn in safe region on all sides
    return new Rectangle( [... code here ...] );
    #endif

    // show entire region on the PC or Zune
    return new Rectangle( 0, 0, [... Code here ...] );
}

It isn't part of Viewport, the author implemented his own method to show compatibility with XBOX, PC, and Zune.  It is found on Chapter 4, page 44.  Hope this answered your question.  Sorry, for the late post.

Are you sure that method isn't defined earlier in the book? From your calling code example it's an instance/static method of the class that UpdateAsteroid is a member of - it doesn't appear in MSDN as a member of the Game class (for 4.0 or 3.1).
Alternatively, Viewport.TitleSafeArea property might help.

Now something weird is happening. The Viewport bit is recognized, but as I type Titl- nothing appears on the Intellisense as if that helper property doesn't even exist. Then if I just manually type it in and wait a bit, it's detected and mouseover gives me the information for it.

Hm that is strange. Intellisense could just be lagging. Try forcing it by pressing Ctrl+Space. The normal candidates for missing intellisense like missing references and using directives would generally cause compile errors...

TitleSafeArea is an instance method if Viewports, it sounds like you're trying to use it as a static method on the Viewport class.

Ah yeh as Martin said, the class you're writing your code in probably has a Viewport property i.e. public Viewport Viewport { get; } so when you type 'Viewport.' you get the static intellisense (which doesn't include TitleSafeArea - an instance property) and when you type in manually it resolves to the instance property Viewport (and its instance property TitleSafeArea)


text:
Keeping Android Screen bright during Game
I have a game that uses the accelerometer to move a guy back and forth on the screen.  After a few seconds the screen goes dim.  Is there any way to keep it alive and bright during the game activity?

With the PowerManager API, you can acquire and release locks to:

prevent your device to pause;
prevent your device to dim;
force brightness
...

Warning you must add one permission:
<uses-permission android:name="android.permission.WAKE_LOCK" />

I try like that in oncreate on activity start
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
            WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

This blog post covers the three ways of achieving this:
http://blog.blundell-apps.com/tut-keep-screen-onawake-3-possible-ways/
Basically, you either:

tell android through your layout xml that you want to keep the screen alive
tell android through a call to window manager to keep the screen on during oncreate
use wakelocks to force the device to use full power at all time (and drain batteries)


text:
Local to World coordinates in 2D and back
I'm getting back into hobby game programming after a long 4-year hiatus from college and I find that my understanding of coordinate systems is somewhat lacking.
I'm trying my skills at creating a simple skeletal animation system but I'm having a hard time wrapping my head around converting local coordinates (of say, a joint) to world coordinates, particularly when it comes to rotated sprites.
I'm trying to create a test app in XNA and accomplish this using their built-in matrix class.  Can anyone assist me in either linking a resource or helping me understand the operations I'd need to do to convert any point that is Scaled/Rotated/Translated from a local to a world coordinate and back?

Here is a good summary of how to go back and forth between world and local coordinates:
www.enchantedage.com/xna-transforms
Here is another good discussion of transforms:
How to think about 2D scaling/rotation transformations

Interesting.  Thanks for the links.  After staring at this stuff all day I'm starting to wrap my head around the concept of Local and Global coordinates and how they relate to each other.


text:
How can I get the palette of an 8-bit surface in SDL.NET/Tao.SDL?
I'm looking to get the palette of an 8-bit surface in SDL.NET if possible, or (more than likely) using Tao.SDL. This is because I want to do palette swapping with the palette directly, instead of blitting surfaces together to replace colours like how you would do it with a 32-bit surface.
I've gotten the SDL_Surface and the SDL_PixelFormat, however when I go to get the palette in the same way, I get a System.ExecutionEngineException:
private Tao.Sdl.Sdl.SDL_Palette GetPalette(Surface surf)
{

// Get surface.
Tao.Sdl.Sdl.SDL_Surface sdlSurface = (Tao.Sdl.Sdl.SDL_Surface)System.Runtime.InteropServices.Marshal.PtrToStructure(surf.Handle,
    typeof(Tao.Sdl.Sdl.SDL_Surface));

// Get pixel format.
Tao.Sdl.Sdl.SDL_PixelFormat pixelFormat = (Tao.Sdl.Sdl.SDL_PixelFormat)System.Runtime.InteropServices.Marshal.PtrToStructure(sdlSurface.format,
    typeof(Tao.Sdl.Sdl.SDL_PixelFormat));

// Execution exception here.
Tao.Sdl.Sdl.SDL_Palette palette = (Tao.Sdl.Sdl.SDL_Palette)System.Runtime.InteropServices.Marshal.PtrToStructure(pixelFormat.palette,
    typeof(Tao.Sdl.Sdl.SDL_Palette));

return palette;
}

When I used unsafe code to get the palette, I got a compile time error: "Cannot take the address of, get the size of, or declare a pointer to a managed type ('Tao.Sdl.Sdl.SDL_Palette')".
My unsafe code to get the palette was this:
unsafe
{
    Tao.Sdl.Sdl.SDL_Palette* pal = (Tao.Sdl.Sdl.SDL_Palette*)pixelFormat.palette;
}

From what I've read, a managed type in this case is when a structure has some sort of reference inside it as a field. The SDL_Palette structure happens to have an array of SDL_Color's, so I'm assuming that's the reference type that is causing issues. However I'm still not sure how to work around that to get the underlying palette.
So if anyone knows how to get the palette from an 8-bit surface, whether it's through safe or unsafe code, the help would be greatly appreciated.

Maybe this can help you:
http://www.libsdl.org/docs/html/sdlsurface.html
On the documentation, the struct SDL_Surface have an attribute SDL_PixelFormat *format.
And the struct SDL_PixelFormat have an attribute SDL_Palette *palette. I think you just need to do this:
SDL_Surface* targetSurface;
SDL_Palette* myPalette = targetSurface->format->palette;


text:
What languages are used to develop MMORPGs like EVE Online and WOW?
As I understand it, MMORPGs are games that run on your computer like any other normal 3d video game but, with each action that happens with in the game, changes are made to the universe via HTTP calls to the server. So the players computer does all the heavy lifting in terms of rendering the graphics and animations but, web frameworks do the online communication.

So I am wondering what web frameworks, web servers and databases are being used to create MMORPGs like EVE Online and W.O.W.?
Also, what programming languages and 3d game engines are being used to make the client side (3d graphics/animation/sounds) part of the game?

I think that pretty much every MMO starts out with off-the-shelf technologies and then customized the hell out of it once they grow to a certain size and start to really specialize their tools. Stackless I/O in EVE Online is a fantastic example: http://www.eveonline.com/devblog.asp?a=blog&bid=584

Do you mean TCP calls to the server? HTTP(HyperText Transfer Protocol) is used by web servers and browsers for web pages and has nothing to do with MMOs unless you mean a browser based game like urbandead.

Michael Stum, Is Stackless I/O made with Stackless Python?

@Adam no idea if these two are related or not.

@Michael Stum Just found out that it is from this video http://us.pycon.org/2009/conference/schedule/event/91/

@stonemetal Good point, but most MMOGs use UDP not TCP. The difference is that UDP can lose a few packets and will sync back up after a gap, letting the game state get on with things. TCP will try to reconstruct the data, which will utterly crush your performance. Lag is WAY worse than a few stutters here or there or a "rubber band" effect once in a great while.

Most companies use C++. Eve is an outlier, the core graphics engine is in C++, while the game logic is, as others have noted, in Python. CCP also makes a lot of contributions to Stackless itself, which is in C for the most part. WoW is C++ for the game itself, though the UI is scripted in Lua. Cryptic (Champions Online, Star Trek Online) uses plain C, but that it is somewhat rare in the industry. Java pops up every now and then, ex. Runescape, but I can't think of anything AAA. Disney has used Panda3D (a Python-based engine written in C) for a number of their MMOs, but as with Eve thats uncommon.
Overall it seems like C++ for the game logic and engine, with Lua for client scripting is the closest you will find to a standard.
As for the web side, it is all over. We (Cryptic) use a mix of PHP, C, and Python (Django) for various bits. CCP uses ASP for the website itself, and Python to power the backend (slowly drifting together though). WAR and LOTRO both use PHP for their site, though it isn't clear what particular frameworks they are using (if any).
You mentioned that MMOs work via web API calls though, which isn't the case. An HTTP-based protocol would be far too inefficient, and HTTP is not designed for long-running connections. Pretty much all MMOs (that aren't web based like Kingdom of Loathing or Urban Dead) use custom servers and custom protocols. The clients are highly stateful, doing something like bringing up an inventory UI isn't going to fire off a request to the server since all that information is cached on the client.

coderanger so when you say 'the clients are highly stateful' you mean that the client app is storing all the data there and not always sending requests to the server? also, how does one learn about developing custom servers and custom protocols?

Yes, to reduce network traffic the client caches a lot of information locally (unlike in a web game where usually everything comes directly from the server). The server is still authoritative though, to prevent cheating. As for learning about how to develop this kind of thing. I would look for a book on "network programming". There are a lot of tools out there that can help though, Twisted, Protocol Buffers, etc etc. A lot of depends on what language and frameworks you are most comfortable in.

Panda3d is programmed in C++, not C.

A few links for EVE Online:

Making Our Backside Bigger
Networking changes on TQ
Apocrypharrrrrdware!
My node was equipped with the following...

Basically, EVE Online runs on SQL Server 2005 and some other Microsoft software.  The client backbone is mostly written in Python however (Stackless Python to be exact, from what I can remember) and some C++ most likely.
As for World of Warcraft, I do know they use Lua for all of the client GUI stuff, but aside from that I don't think they use Lua for anything else.  C++ is likely what is used.
WoW, I would think also uses some Windows boxes but it seems likely that they would have some other types of boxes specific to certain tasks that may not be Windows-based at all.
Not a lot of info, but hope it helps.
A lot of these games seperate servers based on functionality, so they would have a database server that is only responsible for storing objects/whatever and the servers that actually run the game world (validate player actions, etc.).

I'm not quite sure about EVE and WoW, but I've seen MMO games use C++, C#, Java and even PHP for server (the latter only for simple browser-based games, though).
Client is most often written in C++ (or Flash if it's a browser-based game); I've worked with a .NET-based client once (C# mixed with C++/CLI).
And almost always some kind of dynamic scripting language is used to facilitate developing "designer" content - e.g. abilities, quests, etc - things that change often, and can be changed by game designers as opposed to programmers.

First, MMORPGs or any online game does not use HTTP or "web frameworks" in the first place.
A server is programmed just like the game itself, in C++, and communication is achieved by using sockets to transmit packet over the network.
Servers often run another OS, and include only game code, so a lot of player can play on a single server smoothly.
I don't know how blizzard manages their servers, I don't know if they use clusters or not.
Of course when I say "sockets" and "C++", I'm talking about the real time game, not other services the game might offer, like the armory with WoW for example. They might just use a database which can be read from multiple services, like the forum, the armory, the game, the account administration etc, but my thought is that they have dependent databases, which seeks for new entries etc, so everything can sync up nicely.
I think the guy in charge of the network part of WoW might be a real badass.

"I think the guy in charge of the network part of WoW might be a real badass." Small server populations and client-side movement don't really make for bad-assery, in my opinion. Although hindsight is also 20/20.

For EVE, they gave a talk about StacklessIO on PyCon 2009: http://us.pycon.org/2009/conference/schedule/event/91/

There are dozens of game engines out there. The two that pop into my mind are Unreal engine and Source.
As for languages, that depends on the task. The rendering and other performance critical parts are usually done in one of native languages. C++ for example.
But it is common to use some dynamic language to define scripts because this code is more likely to change and is often written by less 'hardcore' programmers :-)
Lua, Python, Ruby - they all can be used here.

WoW uses Lua for all their internal scripting as well. I'm not sure if they modified the language itself, but I wouldn't doubt it so it could suit their needs. You can bet they have different tools that make it easy for their designers to modify/tweak scripts.
This is insider information from friends of mine that are/used to be WoW devs.

when one modifies a language like Lua, you mean they are creating their own personal framework that is based on Lua. Correct? If so, does this decrease the performance/speed of the programs developed?

@J3M7OR3 - It is my understanding that they created their own internal framework based on Lua, but I could not possibly say about performance/speed.


text:
How to use Irrlicht with Objective-C?
Irrlicht uses namespaces, a C++ feature not available in Objective-C:
/*
In the Irrlicht Engine, everything can be found in the namespace 'irr'. So if
you want to use a class of the engine, you have to write irr:: before the name
of the class. For example to use the IrrlichtDevice write: irr::IrrlichtDevice.
To get rid of the irr:: in front of the name of every class, we tell the
compiler that we use that namespace from now on, and we will not have to write
irr:: anymore.
*/
using namespace irr;

How can I still use Objecive-C with Irrlicht? Thanks.

There is a forum thread in which some people are trying to get the OpenGL ES branch to compile for iPhone; there are some instructions there, so you might have success with it in Objective-C.
Here is another thread which covers some Objective-C Irrlicht problems.
At this point it's probably blatantly obvious I'm just searching around to try and help you. If these didn't help I'll just delete my answer, since I am obviously not (yet) a Mac guy. :(

I don't want to write for OpenGL ES. I didn't even mention something about iPhones. Objective-C is a platform-indepenent language. Sorry. (:

Sorry! I forgot, I always associate Objective-C with iPhone. Does the forum thread help? If not I can just delete my answer.

Well great! Glad I could help you then.


text:
How do I make an extensible engine in XNA?
I making a new engine for my game, based on the component system. Every game object is a set of some components, like render, physics, AI, etc. I want to make my game extensible; I now how to make a plugin system with .NET, but how do I make my game able to add new resources from plugins, at runtime? How should such the plugin that stores content look? I want to make simple system, like "Total Annihilation" has, to be able to add new units.

You might want to add what systems you are targeting (PC, 360, Phone7) since that has a big impact on what libraries you can use.

PC , and mayby xbox, but I don't know how plugin system can look on xbox, is it posible ?

You can create as many instances of ContentManager as you like. Just create a new instance for each plugin and set its root directory to something specific to that plugin.
For example, you could organise your plugin directory like this:
Plugins
|
+- TotallyCoolPlugin
   |
   +- TotallyCoolPlugin.dll
   |
   +- Content
      |
      +- TotallyCoolImage.xnb

Presumably your plugin will have some kind of plugin object that you can use reflection to find and instance. Tell it its base path, so then you can have it create a content manager (or something like this - it depends on your implementation). For example:
[PluginMainClass]
public class MyTotallyCoolPlugin : Plugin
{
    public override void LoadPlugin(string basePath)
    {
        ContentManager content = new ContentManager();
        content.RootDirectory = Path.Combine(basePath, @"Content");
    }
}

Once you have something like this working, you could expand it with other clever things. One possible example is to use ResourceContentManager to embed your content in the DLL itself. Read this and this.


text:
What other components would one have to combine with Ogre 3D render engine to make a full fledged custom game engine?
I have heard that Ogre 3D is not actually a game engine, rather it is a 3D render engine. I have also heard people claim that one can piece it together with other components (engines?) to create a full featured game engine. So my question is:

What are the other types of
components/engines one would have to
add to Ogre 3D to create a game
engine?
Also, what are the most popular and
powerful examples of these other
components/engines?

For your second point, is there a specific platform(s) you are targeting?

Ari Patrick, I am planning on making a first person MMO adventure game for the XBOX 360/Kinect, PS3 and Wii. Thanks for asking.

This question is pretty much 'what is a game engine'. Game engines are whatever software is needed to make a game, and there is no accepted checklist of what needs to be in such an engine for it to qualify.
That said, any simulation-style game will essentially do three things: acquire input, perform simulation, and present output.
For input you need to consider spatial peripherals such as mice, keyboards, joysticks, joypads, tablets, touch-screens, computer vision systems like Kinect, Wiimotes, etc. You might also consider audio peripherals such as microphones and indeed speech-to-text one layer up from that. The network is also another potential form of input.
For simulation, a lot of this is game-specific so it's hard to provide generic functionality that suits all games. But systems that may exist for this purpose could include physics simulation, pathfinding and planning algorithms, hooks for script-based decision-making, different types of time-based animation, and so on.
For output, the classic one is graphics - typically divided into the presentation of 3D models (which in turn tends to divide into environments and vehicles/characters) and 2D sprites and particles, but often with some overlap between the two and additional functionality for post-processing. There may also be support for video streaming support, multi-monitor displays, a GUI/HUD system, etc. Beyond graphics you have sound, usually including positional and non-positional sound effects, streamed music, and maybe filters to apply to the sound. Other forms of output include networking (again), force-feedback devices, log files (often more complex than you think), on-screen debugging aids and overlays.
There will also be some systems that exist outside of or parallel to the simulation which are useful for development - eg. tools for creating and manipulating game assets, persistence of game state (for save/load), script editors, internationalisation and localisation tools, test suites, etc.
How many game engines contain all of the above? Probably none of them. I expect some of the commercial offerings come pretty close however.
What would you have to add to Ogre to get a full game engine? Well, you find out what you need for the kind of game you want, see what Ogre provides for you, and add the rest.

+1 for the detailed and accurate response. Excellent work, Kylotan!

Kylotan Thank you so much. I have a good idea of what to look for now.

I'd say the most important are:
Sound
Physics
Networking
Of course, depending of the kind of game you want to do, you have to choose how to implement the game architecture and the AI. I don't really know if there is a common way to program AIs of such or such kind. And you may also strike out networking if you want to make a solo game.
Of course there are dozens and dozens of other feature you might want to implement in a game engine, but those are subject to how you plan to design your game engine. Things like game file loading, GUI...
Sound: Fmod, IrrKlang
Physics: Havok, Bullet, PhysX
Networking: I don't really know if there exists a popular networking engine... networking in a game has already several architectures to choose from and even then, it depends a lot on the architecture of the game (I think).

Thanks for pointing out a few examples of Sound and Physics engines.

Unlike most software libraries, gaming-related libraries are often proprietary, mainly because the problem they solve are hard to solve, but also because the software built is not software for the industry, but for the entertainment, and with a tons of other reasons: unlike traditional software, game code always evolve because the language available on the platform are not always all-featured C++, but also, the speed of execution changes a lot, and there are a lot of different things that becomes available when a faster machine is there (without thinking about embedded consoles).

I agree that thinking about making an engine based on existing robust libraries is a noble task and idea, but in the absolute, the fact that the game programming task evolves a lot and the fact that platforms will always be an implementation barrier, you will quickly understand why applications like Unity are the only way to abstract those problems: code alone will not ease the task of the programmer. The best way I can think about when easing the task, is come of with your own basics to handle the task, but making maintainable enough, obviously meaning doing it the K.I.S.S. way.


text:
How to develop a concept to receive funding?
I have a game concept which I wish to develop but don't have the funding to begin it.
What should I do?

I would also alter the title; currently it looks like an auto spambot. Maybe 'How to develop a concept and gain funding' might be good?

Since I can't seem to edit my comment, I would also like to say @gary: It may be business oriented, but trying to get a game concept funding is quite a different process to most business type ideas. If I worded that right and read the right stuff.

Deleted my comment before realizing you responded to it... to make you not look crazy, it went something like this: pitch the idea to someone to get funded or start a company. (The question was poorly written at the time of me commenting so my comment was very general.)

I recommend that first, you really evaluate your concept. What are the issues in funding it? Why do you need someone to fund it, are you capable of building it yourself (or with some friends) sans-funding?
To put it the best, and nicest way, I can. No one, will fund a AAA quality game (if this is what your concept is in your head) if you don't have a track record of quality selling games.
So what do you do if you are in that boat? The only way to get funding is to make, well... pretty much all of the game without funding. Then you could get people to possibly reimburse you and handle marketing (but you'd be giving away most of your IP in the process more than likely) but if funding is what you need that's where you are.
In the event that you need funding to pay people to develop your idea because you are just an idea guy, you are going to need to learn some if not all of the skills (to some capacity) necessary so that you can make the demos that attract people to work on your titles.
But yes, this question has been asked time and time again. I recommend you read.. well everything here:
Sloperama Game Development Advice FAQ

+1 for the Sloperama link. Definitely a must-read for anyone pursuing a career in the game industry.

Without specific details about your game development background, your game, etc, it is difficult to answer your question. Could you please edit your question with details about the following:

What is your game development background?
Have you ever made a game before?
Is your current game idea similar (or smaller) in scope to previous games you've developed?
How large is the game idea scope?
What specifically are you trying to raise funds for?

Understand that although these questions are fairly personal, they just scratch the surface of what any potential investor might ask. I'm not asking that you disclose your complete game idea, just the information necessary for people here to give you answers that are accurate for your situation.
Below are some resources I think you may find useful:

Sloperama - Excellent advice for anyone interested or currently working in the game industry
Fundraising 101 for the Game Sector - A quick overview of things to know/do, if you want to get funding
Global Video Games Investment Review - Analysis of the MMO, casual, mobile, console, and online gambling markets, from an investment perspective