text:
How come the 3d graphics and animations of MMORPGs are usually worse than non-online 3d games?
I have noticed that in general it seems like the 3d graphics and animations for MMOs and MMORPGs seem not as seductive and polished as the graphics for normal, non-online 3d games.

How come this is the case?
or
Is my judgement inaccurate?
If my judgement is inaccurate please provide examples of MMORPGs that render 3d graphics and animations that are superior to normal, non-online 3d games.

I'd like to say it's generally true but not always the case e.g. lineage II came out in 2003, and for it's time had great graphics. http://www.youtube.com/watch?v=JVXlC1hQ1X0&feature=fvst

The main reason is that MMOs blow away any attempt at asset budgeting.
Take a game like Crysis or Gears of War, with top-end graphics. They have a fixed number of player models. The enemy types are often broken down by zone or level; often those enemies will share textures or materials with other things in the environment, to save memory. At most you're going to have a dozen people (by far the most expensive things to render) on-screen at once.
By sharing textures and only having a handful of models, these games can afford to have more polygons, more shader effects, and more detailed animations. So when they fix their budget at, say, 512MB of RAM and a 3.2GHz processor, they know exactly what the most expensive scene in the game is, and can make sure that machine can play it at an acceptable framerate.
In MMOs, you don't have that luxury. The levels are large. Enemies can be trained from one end of the map to the other. Players can wear whatever they want, and expect that to appear on their character model - meaning their models are often many separate models in practice. You need to be able to render dozens or hundreds of players and enemies at once. You're animating more, and you need to be prepared to render any character model or texture at any time.
When figuring out the budget for an MMO, you have no idea what the most expensive scene is. Fifty players in your frustum? A rare item you didn't expect to need to load? Better have the graphics memory and CPU resources ready!
But these are exactly the kind of situations players love - as many people as possible at the same place, drawing myriad mobs into the middle of a town, showing off as much sparkly alpha-blended light-emitting gear as possible.
What everyone else has said about MMOs targeting lower hardware is sometimes true, but it really comes down to that. The worst rendering scene in an MMO is not known at development time and you can count on players to try to make it as bad as possible, no matter how good their hardware is. The "worse" graphics you have, the more you can scale up before the game becomes unplayable.

that is such a great answer, to me the reasoning always was that lower graphics equal more accessible game, but then you look at WoW and, for the cartoony graphics that it has, it always required a good rig to run

I was about to give a bounty to this answer, then I noticed it's an anonymous user :/

@Lohoris Award it anyway, why should we burden ourselves with non-anon usernames when we could be writing answers?

Having done A LOT of research on MMO creation the single biggest issue on graphics is that a designer really has no way of knowing how much content will be present in an area at any given time.
In a single player, or even a multi-player with under 12 players, the designers can control how much content needs to have drawcalls made on them at any given time.  Additionally they can control fully how many textures any scene, or area if you will, has.  Since they can fully control these assets they are able to turn the model detail far up the spectrum with High poly model and richly detailed textures.
The problem in an MMO is you have little control over how many "assets" are going to be in a given area at any given time since players can wear what they want, where they want, when they want.
Take a game like Skyrim, single player game, lush graphics, high detail.  But if you pay close attention, there are seldom more than 5 or 6 moving "characters" at any given time on screen, and when there are more if you carefully look around you'll often notice that they've cut back a little on the amount of material present in the scene.  Additionally games like Skyrim know's exactly what every character will be wearing in each scene.
In an MMO, by contrast, a zone can be devoid of any other players other than yourself, or there could be hundreds, and each and every character is often wearing different texture and shader combinations.  MMO's, however, can look very nice if the creater get very clever and efficient with their use of well designed meshes that are applied to models.  And this can compensate a lot on the graphics difference between mmo's and stand alone games.  But in the end the graphics detail level of an MMO will never be the detail level of a stand alone game with equal system requirements.  Resource management just doesn't permit it, at least not if you want an MMO framerate above 5.

Nice answer and welcome to GDSE.

This is a very good answer, pity borg didn't stick to this site. However I'm puzzled: this whole answer is basically re-telling everything that has already been said in the user744's answer. Quite odd, if I may.

The other answers are quite good.  Another reason for MMOs to be low-tech in the graphics department is that they are often designed to be played by low-end hardware, to increase the possible user base and encourage gameplay on laptops or while multitasking.

Games like Age Of Conan, Vanguard, Aion were all high-tech when they were released.

Indeed - the "MMOs run on low-spec systems" mantra seems to be an artifact of the fact MMOs have a long lifespan, so the most popular ones are always many years past release. I can't think of any AAA MMO that was not spec-competitive with other top-spec AAA titles at its release.

I said "often," not "always."  I'm not just counting AAA MMOs.  Plenty of MMOs are top-of-the-line when released; plenty are low-spec, including many, many free-to-play B-grade games.

I don't think it's useful to compare B-grade MMOs to A-grade non-MMOs and then conclude MMOs have worse graphics. There are plenty of B-grade non-MMOs with "bad" graphics too.

I concur.  However, I'm offering a reason why the querent may have that impression.  In my (not-at-all-scientific) estimation, B-grade MMOs tend to advertise much more (and to a wider audience) than B-grade games.

I think the answer is in the definition of MMO:  Massive Multiplayer.  These games are typically aimed to run on as wide of a player base as possible, including low-end hardware, laptops, netbooks, etc.  So the graphics usually don't take advantage of the latest advances in hardware and CPU tech.  All the reasons above are also good as well.
P.S. - Looks like Gregory beat me to it :)
Edit: Vote down if you want, but I'm not stating an opinion, it's an absolute fact.  WoW has 11 million players and Blizz has stated many times that they want to keep the game so that it can run on low-end hardware.  Age of Conan, Aion, where are those games now?  They're not so massive, if you get my drift.  Name a successful MMO, one that actually has, you know, players, that requires a high end graphics card and then we'll talk.

You're looking at a 6 year old game and saying it doesn't have high requirements for today's computers. That's absolutely true, but WoW was not a min-spec darling when it came out in 2004. Aion was a commercial success, as long as you don't compare it to a game that's had six years to accrue a social circle and nearly outsells every other PC game combined.

MMOs often have much more content than traditional games. If you think about it, your traditional one-player game has a mostly linear storyline, so the levels are very straightforward, linear, small and restricted. They can be scrutinized and made to a high level of detail. A MMO, however, has an entire world's worth of content, so a lot more art and content is required to match that same level of detail.
It is also the case that MMOs often have many things on the screen at once; this can differ based on the game, but some games allow many people to be standing in one area (for example if there is an important event or party). That is a lot of polygons; so each character must be low detailed in order to be able to draw them all on the screen at once. Similarly, even in the fighting areas there can be a generous number of NPCs/mobs on the screen at once. Level-of-detail algorithms can be used to tune the detail levels based on how much is on screen, but then you are introducing even more content that needs to be made (each thing would then need to be made several times -- or an algorithm can try to do it automatically).

Your point is valid. But keep in mind that a MMORPG has more models, textures and animations than a normal game; making those assets in a very high resolution would need a lot of disk space, and they wouldn't be easy to stream to system/graphics RAM. So they are kept low-res to easily load a higher part of the world, and to make the development of the game shorter.


text:
Applications programmer - Where to start?
So far I've done web design/development and applications programming and of course video games has always been one of those things that I've wanted to take a stab at but never tried outside of a few minor and failed incursions. The only notable game programming I can say I have done was a little puzzle-ish game for the NES written in 6502 assembly so that doesn't exactly count for much.
Basically, what would be a good jumping off point for me? I do know C++ and Java if that gets me anywhere.

The only notable game programming I
  can say I have done was a little
  puzzle-ish game for the NES written in
  6502 assembly so that doesn't exactly
  count for much.

Don't say so, if you had had to make one game, then you know "how" game programming is different from conventional programming. And i guess, it might be the reason you want to make more. Cheers!!
In my opinion nobody was born as a game programmer, everybody started with some application programming language like c, c++ or java.And I feel becoming a game programmer is like getting a promotion from your current designation called programmer.  So if you know these languages thoroughly , you can make a great start by first learning the distinctions of a Game versus an Application.
You should read this, it is a really good fundamental guide page. And this is one page i just completely adore.It provides you with the inspiration and tells you to start with what.
Best Wishes

modetn object orientated gui application development is not actually that different from games programming, the toolkit is just doing a lot of the work for the programmer. In gamedev the effeciency of a more custom solution for the main event loop (game loop in gamedev terms) is important. And so the developer codes it himself rather than relies on a generic toolkit provided variant.

@ewanm89: i disagree with what you said game programmers are equivalent in skill to general programmers. In an ordinary programmer's coding life, whatever he does is atleast a concept that is well-defined in the software programming universe be it sql updations or web application development. But a game programmer has to "invent" each and every line of code in his game which according to me is a lot more tougher than conventional programming

Also being a game programmer is the result of a creative genius instinct making Out-of-the-box ideas.Whereas a conventional programmer never does make a totally-impacting software by self, unless he belongs to the category of "Linus Torvalds"ian human being.

If an app developer depends on writing his sql updates or web frameworks from scratch, sure there's not much thinking - but these days frameworks takes care of that tediousness and the focus is on solving the business problems that no-one else has solved - which requires creativity and a lot of work to be done well, just like games. And then try writing high-frequency trading systems where nanoseconds count and then come back and say it doesn't require as much or even more skill than general game development...

@oskar: hmmmm, no comments, but +1

Vish, that's a pretty conceited argument to be making. Not to mention, utterly false. Game programming, application programming, web service programming, Os programming, high-performance large-scale programming etc all have their quirks. All measure success in  different manner. If anything, time pressure and a certain only-the-results-matter-we-don't-need-to-maintain-it attitude ensures that game code is among the worst piece of spaghetti-infested crap I've ran into.

I said application programming, web development is very different in how it works due to http connections being stateless and the fact that it's little more than an interface to a data store. The way a gui works is actually the same, and from time to time a programmer may need to delve into the api.

A game and a gui are both event based programming at the end of the day. The difference is that event/gameloop tends to need to be more customized for the game developer for performance reasons.

As for the need for making software by oneself. Most game developers work in teams. As does Linus Torvalds, he is lead programmer mostly now, he started two project and manages development of one project, the other he gave over to another team.

Both of the links give 404

@gyozokudor gamdev.net  has changed its urls a bit  they have moved most of their pages to the archive section, am sorry. But, you'll find it if you search within gamedev archives.

Links are dead...

@Troy, thanks for pointing that out, but gamedev.net apparently needs a prefix of archive.gamedev.net to acces older content

It sounds like you're in the same boat that I was in a few years back.  I wanted to dabble in game development, but my professional experience was mostly with enterprise/line-of-business applications.  I decided to ease my way in by choosing a game of a familiar genre could be built using similar architectural principles to what I was used to.
I ultimately decided on a "simultaneous" turn-based strategy game (similar to Master or Orion or Birth of the Federation) for the following reasons:

TBS games are highly stateful, and there is very little "ambient" processing.  Almost all logic executes either in direct response to player commands or as part of the "turn processing" phase following each turn.
The synchronous, turn-based nature of the game lends itself well to a client/server system in which all logic/processing takes place on the server, with the changes later pushed back to the clients.  There is no real-time interaction between players, so clients can issue orders locally and then transmit those orders in a single batch at the end of a turn.  Since the turns are synchronous, the server will not process the turn until all clients have transmitted their orders.  It becomes almost trivial to avoid synchronization/currency issues between clients: do all processing on the server and have each client download a new game state at the beginning of each turn.
Most network communication occurs at the beginning and end of each turn, with clients downloading the game state and transmitting orders, respectively.  There is very little network traffic in between.  Thus, there is no need for the kind of high throughput, low latency networking system that realtime games often require.  A service-based design built with WCF would be sufficient, and it would also free me from having to do any low-level network programming.
My design called for a detailed and highly interactive UI not unlike those required by many enterprise applications.  The design was also heavily 2D and was not very demanding in terms of graphics capabilities.  I built my client using WPF (then code-named "Avalon"), which enabled me to create a highly stylized UI (something that looked like a game) while leveraging a very rich set of controls and APIs for input processing, eventing, and commanding.  I followed the same UI architectural patterns that I would use for any other application (MVP or some derivation thereof).
Since I would be building the game using the same language and framework that I use for my day job (C#/.NET), the project could double as a sort of "sandbox" for trying out new development tools and frameworks in a "real world" application that was not also a "mission critical" application.

Long story short, my decision worked out very well.  I've been working on the project for a few years now (in my spare time), and I'm pretty happy with what I've come up with.  Moreover, I learned a lot, and not just about game development--I took every opportunity to get hands-on time with new development tech, and I've become more effective at my day job as a result.  A lot of code originally written for my game has evolved and found its way into some of our enterprise applications.
So I guess my advice would be to choose a project relevant to your existing skill set, and then use that project as a vehicle to dive deeper into game development.

Since this is a hobby project, pick something you want to do. If you are motivated, it will be easier to pick up the skill you will need.
Beware of projects that require a lot of art and content. Things like adventure games etc. consist for a disproportionate amount of artwork and level design. Especially for a developer starting out, these can be the kiss of burn-out death.
Pick something with a defined scope and measurable goals in between. The sense of accomplishment you get from finishing every little milestone along the way will go a long way in keeping you motivated throughout the project and into the next.
For me, this advice led to re-creating a 3D version of a popular 1980s game. But your interests are different, so you will most likely end up somewhere else.
I would say, think about it for a while and come up with the simplest possible project that you still find compelling. If you need assistance figuring out what technology/platforms to use to make it, just post another question. We love arguing about technology around here ;)

As other told you, my advice is to start from something simple. For example a 2d scroll based game, maybe using pre-done art found with Google Images, or OpenGameArt.org.
Use a framework/library. XNA for Windows or SDL for cross platform development.
Look also at SDL.NET if you want to do your game in managed C#.

source: Stack Exchange

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

sort: votes


text:
What's wrong with this OpenGL model picking code?
I am making simple model viewer using OpenGL. When I want to pick an object OpenGL returns nothing or an object that is in another place.
This is my code:
GLuint buff[1024] = {0};
GLint hits,view[4];

glSelectBuffer(1024,buff);
glGetIntegerv(GL_VIEWPORT, view);

glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
gluPickMatrix(x,y,1.0,1.0,view);
gluPerspective(45,(float)view[2]/(float)view[4],1.0,1500.0);

glMatrixMode(GL_MODELVIEW);
glRenderMode(GL_SELECT);

glLoadIdentity();
//I make the same transformations for normal render
glTranslatef(0, 0, -zoom);
glMultMatrixf(transform.M);
glInitNames();
glPushName(-1);
for(int j=0;j<allNodes.size();j++)
{
    glLoadName(allNodes.at(j)->id);
    allNodes.at(j)->Draw(textures);
}
glPopName();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
hits = glRenderMode(GL_RENDER);

Do you have an ATI card? I think they deprecated some portions of OpenGL (picking included) a long time ago.

I have Ati on laptop :/ Thx :/ I will check this

So what can I use ? Test collision mouse-ray with triangles from meshes ?

Yeah, you'll have to do you own picking. If you want tight results use triangle picking, or you can test against bounding boxes/spheres if you don't need that much precision.

OpenGL picking using the selection buffer is deprecated. If your scene is small enough, you should use colour-based picking; otherwise, you can use gluUnProject to obtain a world coordinate from a mouse coordinate and a depth read from the depth buffer using glReadPixels().

No one use OpenGL picking this days, you have to implement it yourself. Transforming from camera to worlds space is a bit tricky, here is a good article http://trac.bookofhook.com/bookofhook/trac.cgi/wiki/MousePicking

Ok, but for 3d viewer application opengl isn't better ?
My doesn't work, beacouse I have two mistakes:
1.
gluPerspective(45,(float)view[2]/(float)view[3],1.0,1500.0);

2.
gluPickMatrix(x,view[3]-y,1.0,1.0,view);

So it is looking that picking still works on ati, my friend said my that picking can be making by software implementation of opengl.

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


text:
Problem with arcball
I making graphics viewer, and I want to use "arcball" to manipulate object.
I using OpenGL + CML ( for math ). My arcball don't want work, it is skewing not rotating :/ And I don't know why, I use formulas from http://www.csi.ucd.ie/staff/hcarr/home/teaching/comp4004/slides/05_arcball.pdf .
My code:
cml::vector3f u,v;

u[0] = 2.0 - prevX/(0.5f * width());
u[1] = 2.0 - prevY/(0.5f * height());
u[2] = sqrt(u[0]*u[0] + u[1]*u[1]);

v[0] = 2.0 - currentX/(0.5f * width());
v[1] = 2.0 - currentY/(0.5f * height());
v[2] = sqrt(v[0]*v[0] * v[1]*v[1]);

cml::quaternionf qu,qv,q;

qu[0] = 0;
qu[1] = u[0];
qu[2] = u[1];
qu[3] = u[2];

qv[0] = 0;
qv[1] = v[0];
qv[2] = v[1];
qv[3] = v[2];

q = qv * ( qu.inverse());

cml::matrix44f matrix;

matrix.identity();

cml::matrix_rotation_quaternion(matrix,q);

//Drawing

glLoadIdentity();
qlTranslate(0,0,-zoom);
qlMultMatrixf(matrix.data());

I will assume you are manipulating the camera, but the explanation applies to objects as well.
The reason it is not rotating on the sphere properly is because you are not assuming that there is a fixed yaw axis (which is usually Y). So what ends up happening that with each frame the new yaw axis skews the next frame's calculation a little bit. Over a few frames the camera goes through an unintended motion, which I believe is what is happening in your case.
For proper/predictable arcball rotation, such as the one seen in Autodesk Maya/Max, you will have to assume that your up vector is fixed for the calculation of the direction and right vectors (in a 3x3 rotation matrix each column represents the 3 orthonormal vectors, and is entirely dependant on how you have setup your co-ordinate system. Usually in OpenGL it is Right, Up, Direction) and then calculate a new up vector for the camera to work properly. Every frame, you assume your up vector is unchanging and stays fixed at (for example) [0,1,0].
The above poses a problem when looking straight down or straight up, in which case your assumed Up is now parallel with your Director and will make it impossible for you to calculate the orthonormal vectors properly. That is a special case and you will have to get around it. You can restrict the rotation of the camera beyond that point, or you can skip that particular rotation.


text:
jquery ondrag map load only what has not been viewed
When a person mouse down, moves the mouse, and mouses up the system gets the different in the mouse down coord and the mouse up coords and loads in the new map items. However, the problem is it loads them every time so I want a way to track what has been loaded without too much work on checking or storing checks.

Most promising. Came up with while typing this. Section the screen into 250x250 sectors and check if that sector has been loaded.
Keep track of each corner of the screen and see if there is an area of those that have not loaded.
Keep a record of the corners of the screen. When mouse up coords are greater then load the different. Problem is if they are at coord 10,000 then it will load from -10k to 10k positive and that is a lot of items to load.
Check every item on the page to see if it is loaded. If I do this I might as well reload the whole page.

If anyone has some suggestions; feel free to pass them on.

You might just want to look at a Javascript based "slippy map" library like Polymaps or OpenLayers. These already do the kind of tile-based sectioning that you (correctly) surmise would work.

Unless I misunderstand your question, I would expect what you describe to be desired behavior. It seems to me, like you are streaming the mapping data as the user pans around the map. As soon as it's off the screen, I would unload those resources and then load up resources for the newly visible sections.
If you don't unload resources as the user pans around, eventually, the user will have the entire map loaded into memory, and this would defeat the purpos of streaming data to the user in the first place.
If the actual streaming of the map is what's got you stumped, I think your first approach is best. Put the map into sections (usually called Tiles) as the user pans around, determine which tiles should be loaded and unloaded, then render all of the loaded tiles.


text:
Has Java 3D changed much since 2005?
I'm thinking of picking up the book called "Killer Game Programming" by Andrew Davidson, but its pretty old, now. I know Java, and I've been messing with jMonkeyEngine for a few days, but I'm curious to see if I would benefit from the 3D chapters of this book.
The book was published was in 2005. Has Java changed to the point where this book would now be obsolete, assuming it was up to date at time of publication?

It certainly isn't obsolete but Java3D is a PITA and for games it's a very poor choice. Imo the book is really nice to learn the basic concepts of game programming and that stuff but if you already know all that and your focus is 3D you'll probably be disappointed.

@Raoul: thank you for introducing me to a new acronym.

@Gnemlock, I think I understand what you were aiming to do with this edit, but I think in this case it invalidates existing answers (since they were written years before 2015 and so don't directly address the updated framing of the question). As I understand the conventions here, we usually try to preserve aspects of questions that are relevant to existing answers, even if that means leaving some questions a bit imperfect.

@DMGregory, I had missed the updated years entirely. I'll edit this to focus on the original publication.

A better question might be: why are there no new books on Java game programming? Java got pushed out of the in-browser experience by Flash and was never able to steal away C++ game developers in a big way. Nevertheless, Minecraft is completely fun. Both those books convey design principles that are applicable to any language or environment and the hand holding is not overbearing. Reading them will not instill any bad habits in you, so I say go for it.

You can actually find a number of the chapters for free at the book's website.
Java 3D was a neat API, but has since been "put on hold" in January 2008. It's not looking good, 3 years later and with no apparent progress towards starting up again. I would probably recommend looking into JMonkeyEngine or LWJGL instead (the former being closer to Java 3D, with a scene graph, while LWJGL is OpenGL in Java so it'd be more low-level).
Also it's extremely unfortunate that Java 3D is/was hosted at java.sun.com because the Oracle acquisition messed up some of the webpages. For example, many of the links at the Wikipedia article for Java 3D are now broken thanks to Oracle. So hopefully you will be able to get to all the downloads and documentation you need; but you might want to check now, before you buy the book!
Personally, I found Java 3D to be rather neat. I didn't do much with it, but I did buy this book and another about Java 3D in an attempt to learn it. It seems to be a well-made API with similar goals to Java (cross-platform - working on all machine, screen, etc. configurations).
One last note: there was one Java 3D game I knew of, called Magicosm (later renamed to Cosm). I was excited about it! But, well, you can read the story on that page. Still, archive.org has a copy of the old website which explained all the game ideas and progress of the game. So it appears that it is definitely possible to make a game in Java 3D.

+1 for jMonkeyEngine and LWJGL - far more suitable for games than Java 3D ever was.....

It might be a good foundation and it discusses concepts that are not often discussed in context of Java.  If you follow the author's work you'll be impressed with what he has gone on to do with Java and Computer Vision (CV).
You can get some older and unpublished chapters to Killer games here.  Also the code from the book is there too.
He has also gone on to do some interactive gaming with Kinect and has written a lot about it.

Has Java changed to the point where
  this book is now obsolete?

Never, apart from few changes in the JDK, it is nowhere near the word "obsolete".
IMHO, its always better if you know about the old technology and how it evolved well in hand before you start learning the new technology.

"IMHO, its always better if you know about the old technology and how it evolved well in hand before you start learning the new technology."
Well, I'm certainly glad I didn't start learning .NET 1.1 when 2.0 was out.
Anyway, with java the biggest recent change was the introduction of generics in 1.5. So if the book is older than that you won't be learning any good templates.

What I actually meant by "learning" was not that it would make a difference if i learnt .net 1.1 before .net 2.0. What i meant was if you learnt the technology used before as compared to now. Like if i gave an example , if i had been using structure pointers to refer to a game object in an old technology, now i am using classes for referring to the same game object. So i meant this, knowing (not learning) the old things does provide you with an edge over knowing only the new things

You may want to learn javascript and webgl instead.  Combined with HTML5 that will allow you to develop platform-independent games for mobile and computer.
It doesn't really answer your question, but it might be better for you.

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


text:
How can I get the WAV data from the whole song?
I'm using FMOD (with C++ syntax, not C) and I'm having trouble getting the wave data of a whole sound file.
Channel::GetWave() only gets the wave data of the area on which it is currently playing.
The documentation says:

Do not use this function to try and display the whole waveform of the
  sound, as this is more of a 'snapshot'
  of the current waveform at the time it
  is called, and could return the same
  data if it is called very quickly in
  succession.
See the DSP API to capture a continual stream of wave data as it
  plays, or see Sound::lock /
  Sound::unlock if you want to simply
  display the waveform of a sound.

Unfortunately, the Sound::lock and unlock functions are pretty confusing,  at least to me.
Lock:
FMOD_RESULT Sound::lock(
  unsigned int  offset,
  unsigned int  length,
  void **  ptr1,
  void **  ptr2,
  unsigned int *  len1,
  unsigned int *  len2
);

offset
Offset in bytes to the position you want to lock in the sample buffer.
length
Number of bytes you want to lock in the sample buffer.
ptr1
Address of a pointer that will point to the first part of the locked
  data.
ptr2
Address of a pointer that will point to the second part of the locked
  data. This will be null if the data
  locked hasn't wrapped at the end of
  the buffer.
len1
Length of data in bytes that was locked for ptr1
len2
Length of data in bytes that was locked for ptr2. This will be 0 if the
  data locked hasn't wrapped at the end
  of the buffer.

Unlock:
FMOD_RESULT Sound::unlock(
  void *  ptr1,
  void *  ptr2,
  unsigned int  len1,
  unsigned int  len2
);

ptr1
Pointer to the 1st locked portion of sample data, from Sound::lock.
ptr2
Pointer to the 2nd locked portion of sample data, from Sound::lock.
len1
Length of data in bytes that was locked for ptr1
len2
Length of data in bytes that was locked for ptr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer.

But as I said, my goal is to be able to get the wave data of the beginning of a song to the end.

The way I read it, the last four parameters are output parameters. So you basically pass in 4 variables of the requested type and after the function has finished, these are populated with the data you need.
What you do is something along these lines:
void  *pointer1;
void  *pointer2;
unsigned int length1;
unsigned int length2;

// lock the buffer
mySound->lock(0, lengthOfYourSoundInBytes, &pointer1, &pointer2, &length1, &length2);

// when we're here, pointer1, pointer2, length1 and length2 will be populated.
// do something with the sound data found in pointer1.
// the sound data will have a length stored in length1

// unlock the buffer once you're done
mySound->unlock(pointer1, pointer2, length1, length2);

From my understanding you won't need pointer2 and length2 at all.
The only thing you'll have to figure out is the length of your sound data (see lengthOfYourSoundInBytes above). Once you locked the buffer, you'll get a pointer to the data and you can do whatever you want with it.

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


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

@fireDude67: I'd do it if i liked the answer :( or if it wasnt a wiki like question

Congrats, you went up 16.7%

Unity's built-in networking is RakNet.  As far as I know, inside Unity it's only really for peer to peer games (i.e. you can't really run a standalone server).
Most web games I know of that use Unity and have multiplayer use Exit Games' Photon.  Paradise Paintball uses it.  So does Atmosphir.  You write server code in .NET that gets compiled to a DLL and run with their server software.  There's a client DLL you can just drop into Unity along with your own specific code.
You can't distribute the server since it's licensed per machine you're running on, but if you just want clients to be able to connect to your servers then it's a proven solution for that.

hmm, good link, +1

There are multiple tutorials on network-based programming:

Unify MMO Tutorial - This uses SmartFoxServer
Unity iPhone Multiplayer Tutorial - While this applies to iPhone development, the networking part of it still applies
Unity Networking Example - An example project which shows how to use NetworkView's
Can I Make a MMORPG in Unity? - UnityAnswers question about making MMO's with Unity

Network programming can be done in C#/Boo, not sure about JavaScript.
Another way to get client/server programming done is with Unity Pro/C++ Plugin

You can using this
Master server can facilitate connecting to your server.
Which would be most useful for fps or rts style games where players connect to each other to play a game.


text:
Learning to write a solitaire game
Many years ago I did some programming in TurboPascal (on DOS!), but have not programmed since. Since retiring, I have "invented" a few solitaire games that I have given to people who sell solitaire collections. Recently I've invented a game that is different enough from existing solitaires that it does not "fit" into these collection packages. I would have no difficulty writing a simple program to do the job in TP, but that is no longer an option. I purchased BlitzPlus, but would like some help getting started. I hate the idea of reinventing the wheel; ie, learning from scratch how to shuffle decks, assign graphic files to cards in the program, etc, so, ideally, I'd like some basic source code from a very basic (ie, nothing fancy required) solitaire program, but, if necessary, would start from just tutorials on some of the procedures likely to be required. As I said, I've already purchased BlitzPlus, but would be willing to use some other language if that would be better or offer more tutorial assistance. Any help greatly appreciated.

Welcome, but you might want to rephrase your question - there is a rule of 'not asking how to make an entire game'. Maybe 'What resources exist for solitaire like games?'

I've never coded a card-game but I feel like encouraging a beginning game programmer. So I just accumulated little bit of resources from the internet.
This is a solitaire game in java and since I thought you might not be familiar with concepts like svn i am including a link to the source code directory which you might find useful.The site above I mentioned uses the Java programming language.I think the only things you might need to do will be

Modifying the art assets in the above project
Changing the game-play to suit your ai.

Best Wishes.

Here's a few links that might help. One is C++ and the other is in Visual Basic, but you may be able to glean something from them and get started. The C++ site is a project assignment from a college and is pretty much just an outline.
Visual Basic
C++

You could try using Actionscript 3.0 (flash) to build 2D card games. Here are a couple of tutorials:
1)http://www.emanueleferonato.com/2007/12/30/guessnext-complete-flash-game-with-highscores/
2)http://www.developphp.com/Flash_tutorials/show_tutorial.php?tid=221
3)you could check out: http://www.gotoandplay.it/ (it has a lot of tutorials)


text:
What platform is best for Android and iPhone development?
I've been developing non-mobile apps for linux; mainly stuff like interpreters, compilers, database engines and business apps.
I've been told that if I wanted to learn how to develop iPhone/iPad applications, I should buy a Mac since Apple has all it's development tools for iPhone/iPad on Mac.
Now, what about Android phones / tablets?  Are the development tools better on Mac or PC?
I need to buy a new laptop, and I would like to factor in mobile development in my choice of PC or Mac.

The "can I make iPhone games on Windows" question is here: http://gamedev.stackexchange.com/questions/5403/can-we-develop-a-game-for-iphone-on-windows-platform

For iPhone / iPad development, you are going to need a Mac. See Tetrad's comment for relevant "Can I use a Hackintosh" discussion.
For android development the development tool is the same, it is the Eclipse IDE, and it is available across all three primary OS choices.
You can find the relevant information about it here: http://developer.android.com/sdk/index.html
and you will find eclipse here: http://www.eclipse.org/
--
Personally, I haven't noticed any major operating differences using Eclipse between any of my systems (Linux Laptop, Windows Desktop, Mac Laptop) outside of menus being placed in a few different places on the Mac.

iPhone/iPad development requires Mac OSX for deployment/debugging. Android can be developed anywhere.

@Nate: Yeah, but the only question in there (outside of the title) was "Are the development tools better on Mac or Windows for Android" But I'll add something for mac.

android works best in what?

If you really want to have your options open, just buy a Mac. You could always bootcamp it into Windows if you really need to be on the PC side of things. That way you get a proper native iPhone dev environment, and a really good Android environment (since, like was already said, it's very Unix-like). And the option to switch over later if you really need to.
Of course this costs the most amount of money.

If you intend to create games, which is a fair assumption IMO given this website's main theme ;) , there are also multiplatform engines both for android and iphone, like unity3d, although you still need a Mac because Xcode is used in the compilation and code signing.
So, the easy way to develop in both plattforms is buying a mac, cause the Android SDK, and specially the Android NDK (Native Development Kit) fits an unix-like environment like Mac very well

While it's true that Apples SDK only support Macs for iphone-development, i know of atleast one alternative that works on Windows. Airplay SDK: http://www.airplaysdk.com/
It's a cross plattform SDK and that comes with it's own advantages and disadvantages.

Corona Sdk and Unity 3d both support iOS and Android. You still have to run on OSX for iOS development, but supposedly you don't need to re-write your code for each platform.
Corona runs on windows, so you can try it out now without spending a lot of money.
http://www.anscamobile.com/corona/
http://unity3d.com/

As an alternative to buying a mac, you could also consider http://www.macincloud.com/
Not tried myself, so I can't vouch for it, but the idea of renting a mac for developing iPhone apps seems reasonable.
I once had plans to develop mobile apps and bought a mac mini. Unfortunately, I haven't had time for that, and my mac mini is collecting dust.
I don't want to upset apple-fans, but if you already have a Windows PC as your main machine, buying a mac solely for the purpose of developing apps is only worth it if you are committed to developing apps.

I strongly urge you to check out Unity 3D. Buy a MacBook and an iPhone Unity license and you'll be happy.

I recommend u cocos2dx, corona or marmalade.
In cocos2dx if you know c++ it is easy to learn, developing in c++ you can deploy it directly to ios with a MAC and to Android using ndk, you can also use Lua for scripts.
http://www.cocos2d-x.org/ I use this.
Corona and Marmalade are also cross platforms too.
Marmalade I think it is difficult to learn, the configuration and all of that, because it also uses c++.
http://www.madewithmarmalade.com/
And Corona I don't really know how easy or hard is to use, but it is cross platform too :)
http://www.coronalabs.com/products/corona-sdk/

If you could edit this answer to include the reasoning behind using those platforms and probably links to them, this answer would be a lot better.

Use Adobe Air. It's the best way to develop real multi-platform games!


text:
Arc'd jumping method?
Okay, so I'm making a platformer, and I wanna know how I can make a arc'd jump easily. Like what Mario does in super Mario Bros 1. Any ideas on a simple way to accomplish this?

Interesting question; having taken Physics classes, I take this sort of thing for granted, when really it is an intriguing idea.
The key point is that X and Y movements are distinct from each other. An object in motion will sustain its X motion, and its Y motion will be affected by gravity at a rate which you set.
You should track the sprite's X and Y velocities. When standing still, the sprite has an X velocity of 0; when moving, it has a constant velocity. When touching the ground, the sprite has a Y velocity of 0. When the jump button is pressed, give the sprite a Y velocity.
Now every frame, reduce the Y velocity by some amount; this is your gravity magnitude. But if the sprite is touching ground, set the Y velocity to 0 so that the sprite doesn't move into the ground. And then modify the sprite's position by (velocity*time).
Here is a decent-looking Physics lesson which demonstrates these separated velocity components: http://www.physicsclassroom.com/class/vectors/u3l2c.cfm

If this was not the answer you're looking for, and you actually mean something more complicated by an "arc'd jumping method", then please elaborate!

You should add a note that the Y-component (and X too for that matter, but that's not really interesting for the question) of the velocity could be negative (being downward motion on the Y axis), and adding a negative value to the position will make it move downward. This doesn't feel obvious from the way you put it. +1

The Y-component in Super Mario 1 also depended on how long you held down the jump button; releasing the button would immediately set y velocity to 0 even if Mario had some previous upward momentum. Also, falling tends to have a max negative-Y velocity (you can think of this as "terminal velocity") for gameplay reasons. Lastly, there are a LOT of ways to handle the X-component -- Mega Man sets X as constant -1, 0 or +1 based on joystick position, Mario modifies progressively like gravity, Castlevania doesn't allow direction changes in mid-air at all.

ExciteMike has some great examinations of the Super Meat Boy and Super Mario 3 jump physics on his blog.


text:
Deterministic random number sequence
I have an array of lights that I need to sample from randomly, but deterministically so that all the lights are sampled. Currently I use random numbers to pick a light, and then put processed lights into another list, but I'm wondering if there is a way to use something like a hammersly or halton sequence to do this instead. A biased solution would be ok.

If I understand this, the sequence:
1,2,3,4
could end up as:
3,2,4,1 or 1,3,2,4 or whatever?
Fisher-Yates Shuffle, or the Knuth Shuffle came up on wikipedia. It says linear time, which is good.
import random

def shuffle(x):
    for i in reversed(range(1, len(x))):
        # pick an element in x[:i+1] with which to exchange x[i]
        j = random.randrange(i+1)
        x[i], x[j] = x[j], x[i]

+1 for a simple in-place shuffle.  This is the technique I have used when I needed to access all of the elements in a sequence exactly once, but in a randomized order.


text:
What pattern is this, and should I do it?
I'm making a game in as3 using flash develop and flash cs5. Everything is object oriented. I was wondering, should I have one "gateway" class that has a property-reference to all instantiations of other classes, and I just pass this gateway class to new objects, so they have access to every class. Like so:
 var block:Block = new Block(gateway);

 //In the block class:
 this.gateway.player.setHealth(100);
 //Or:
 this.gateway.input.lock();

Is this like a singleton pattern or something? Should I do this?

This is called the context object design pattern, and it is better than the singleton pattern.

Context objects aid testing, because you can pass mock contexts to functions you want to test. Singletons hinder it, because to mock singletons you need to make them not singletons.
Context objects makes your "global state" explicit, and therefore easier to reason about. If a function doesn't take a context object, you know it doesn't use any global context state. You have no such guarantee with singletons or global variables.
Context objects are very slightly slower if you don't use them, because you add another parameter to all your function calls. They can be faster than globals if you do use them, and are nearly always faster than singletons.
Context objects are easier to implement; usually they live on the heap or stack in a normal way. Singletons have tricky issues involving threading in many languages.

So no, this is not a singleton, it's way better than a singleton.
However, you're still passing around a crapload of state - the fact you're keeping it all in a single local variable makes it more explicit, but still creates major conflation of concerns. Keep in mind the one responsibility rule. It makes some sense for there to be a context that owns the player and the current level - they're related - but why does the same context own your keyboard input?
Consider different levels of contexts, for example:

GameplayContext - owns the player, enemies, the level geometry, etc.
InputContext - owns keyboard and mouse handles, input events, etc.
GraphicsContext - owns textures, the window handle, etc.
GlobalContext - owns a GameplayContext, a GraphicsContext, and an InputContext. This is where you want to apply the service locator pattern, to be able to swap out some contexts for others as needed. And maybe, for quick iteration and testing, this should be in a real global variable - just realize that whenever you use it, you're building up tech debt.

These contexts still conflate concerns somewhat - maybe some event handler takes a GameplayContext and really only needs the player - but the responsibilities are clearly laid out. You know that something that takes a GameplayContext won't load a texture; something taking an InputContext can't kill a player.

+1 Good answer. Some of the speed or threading concerns don't really apply in this context though (ActionScript3 doesn't support threading and a lot of speed improving mechanisms that work in C++ don't apply when using AS3).

I don't know much about the AS3VM, but in most dynamic languages, the cost of passing/receiving/using a local is still faster (array lookup) than the cost of looking up a global (hash lookup), and much faster than calling a function (craploads of stuff) to get at it. So I think that advice still applies.

This doesn't look like the Singleton pattern. The way I understand it, you're passing an object with references to important game-objects to all of your instances.
If this would be the Singleton pattern, you would have:
AudioManager.getInstance().playSound(XY);

Whereas in your case you might have:
this.gateway.getAudioManager().playSound(XY);

It looks basically the same, but it really isn't. If you would want to replace AudioManager with a new (extended class) like ExtendedAudioManager, you would hit a wall using the Singleton pattern. Your gateway approach will handle that just fine though.
The drawback of your approach is that you'll have to pass around the gateway everywhere.
The service locator pattern (proposed by Joe Wreschnig in this thread), looks like a good replacement for your "gateway pattern".
Sometimes it's better to just run with the simple and straightforward method instead of over-designing things though. Especially when it's a small project or a prototype.
Maybe you could make that gateway some sort of a global variable.. eg. Game.gateway and run with it.

Most solutions to this problem, including the Singleton pattern, involve the use of static variables.  If you'll only ever have one player, you can just have Player be a singleton class, which means you could access the Player instance through something like Player.currentPlayer.  Many people rage against Singletons, however.  You could also have a ResourceManager or similar class that contains static references to various useful global or pretty-darn-global variables.  In your code, you might as well make "Gateway's" variables statically accessible instead of inflating your code by passing it around everywhere.

The question has changed substantially since I made this answer, enough that it doesn't seem worth it to edit it.

Apart from the title, nothing changed in the question.

What? Nothing has changed other than the title. -1

I think I was thinking of the title here;  I remember the original title being something like "How should I do this?"  It's totally possible that I misread the initial title/question when I made the answer.


text:
How does a game like Doodlejump generate its "level"?
How does the game Doodlejump for iphone generate its stage? Are the platforms randomized in some way? If so, how do they make sure it doesn't generate impossible combinations?
If it's not randomized, how do they make sure it's different (or varied enough) every time?

Please notice that randomized levels are in most occasions clearly inferior to well-designed levels. Just compare Abduction to Abduction 2 and you'll notice the HUGE gap.

Well, its generated on the fly, and definitely random.
To make sure there is imposible jumps you need to tune your game to generate only possible yet interesting situations. It a really hard topic because it is totally different for each game. Luckily you can learn about some games by looking at it and analyzing how you would generate interesting levels.
One very very very good resource here is an article about Tuning Canabalt on how the developer decided to make it not only possible but also hard, and interesting.

I guess Doodlejump has it easier than Canabalt as the maximum jump height never changes, it only needs to give the player some platform within that jump range and it's fine. Thanks for the link, interesting stuff.


text:
Calculating Experience Points earned after a battle
I'm developing a simple text battle game and having some issues calculating how much XP should be earned after a battle, theres a few factors that i want to consider:
1) Players should of course earn good XP if they beat someone of the same level
2) Players should earn great XP if they beat someone of a higher level
3) Players should earn poor XP if they defeat someone of a lower level
4) The above should scale nicely, i.e. if player A is level 10 and battles Player B who's level 9 or 11 the difference shouldn't be huge (they would of course gain more XP for defeating the level 11 character but we wouldn't expect this to be huge), but if he was to battle a level 5 or 15 this difference should be huge.
Just having trouble calculating something that works well in all scenarios, currently my XP table looks like the below:
Current Level   XP Needed   Increase from Last Level
1   30  0
2   65  35
3   106 41
4   154 48
5   210 56
...
10  672 123

In PHP my code looks like the below to calculate the XP Needed:
$offset = 30;
$multiplier = 1.17;
$base = $prevXp * $multiplier;

$xp = $base + $offset;

I've tried a few different things but i haven't been impressed with any of them, I'd like to work with calculating the difference in XP and then using some kind of multiplier but i haven't been impressed with the results.
Any help / input would be appreciated.

I'm not even reading, just go there --> http://gamebalanceconcepts.wordpress.com/2010/07/07/level-1-intro-to-game-balance/ <--

first thought is you should find yourself a copy of a D&D dungeon masters guide from either second or third edition. Good resources for already play tested / balanced XP awarding systems.

Two suggestions:
Exponents! Calculate some "base xp reward" for each level. Then the formula for a kill is base_xp_reward * pow(1.1, target_level - player_level). You might want to clamp the gain to a maximum, to somewhat nullify exploits, and you might want to give zero XP below a certain difference, to prevent farming of lowbies.
(Base XP reward can be a simple exponential progression also, if you like - constant_factor * pow(1.25, level), perhaps. Then you can define the "exp to level" in terms of a multiple of the base XP reward. Might be easier to balance this way.)
Alternatively, let's make this really simple. Do the same base-XP-reward thing. Then figure out a table by hand for the bonuses you want from various level differentials. Make it ratio-based, so that killing someone one level above you always gives, say, 10% bonus XP over the base reward. And now you don't need to worry about a formula at all - you can just make the numbers do what you want.
Formulas are overrated, sometimes you just need to jam some numbers in and play it by ear.

+1 for Formulas are overrated, sometimes you just need to jam some numbers in and play it by ear.

I'd say something like "gain xp by the damage delt/recieved".  So if a level 10 with 100hp fights a level 15 with 200 hp.  It seems unfair but if the level 10 would be able to kill the level 15 he would get twice the xp of what he would get if fighting a level 10 with only 100hp.
Also this way you don't have to worry about stuff like if two people would fight the same enemy with different equipment.  For example, if a level 8 and a level 10 fight a level 13.  If the level 8 has better equipment/armor then he would get more xp then the level 10 simply becasue he delt more damage to the level 13.
But the most important thing: Set rules, playtest, set rules, playtest, set rules, plasytest, etc, etc...
Even the best MMOs from the best developers adjust their xp distribution system as long as the game lives.

Just IMHO, the most important thing to get right is the scaling amount of XP required to level up. A friend of mine used a fibonacci variation for his browser Rogue-like, for instance 100XP,100XP,200XP,300XP,500XP,800XP etc etc.
I have also heard of a mechanic in some games where the level is subtracted from the XP earned by each battle. For instance, if a particular battle earns 50XP, and they are at level 20, then they only receive 30XP. If they were at level 50 or above, they would earn nothing.


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

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

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

Either MS or CBS are running an XLSP farm and proxying all the traffic to the Last API.

Which would explain why we are being charged a premium for this content now.

Ditto on Netflix, I shudder to think of how complex that system must be on the server end.

Where do I find my information on XLSP ... APIs, architecture, etc.?  Is it necessary to join a developer program to get full documenation?  Thanks.

You need to have an Xbox contract to get any of the XDK docs, but you can sign up for the XNA CC which uses the same underlying system (does cost $99/year if you want to deploy to an Xbox though).

Sorry, I'm still a little unclear as to what's required. If I sign up for the XNA CC, would I be able to build a prototype Xbox app which could communicate with my own server code running on XLSP?  Thanks.

No, you need to be a Real Developer, the kind that pays MS thousands of dollars. XNA is only allowed to talk (over Live) to other Xboxes.

To clarify, you need to be Real Developer to use the XLSP servers. But via XNA you can develop an Xbox game that uses Live to talk to other Xboxes.

My employer is asking me to prototype an Xbox app which exchanges information with our own servers.  My understanding (from this thread) is that I would need to write XLSP code which would act as a proxy between Xboxes and our own servers.  This requires being a "Real Developer"?  How does this process get started?  Thanks again.

I'm not really sure, the higherups negotiate those contracts. If you have a relationship with a large publisher (EA, Activision, Ubisoft, etc) that would probably be a place to start. My email is in my profile if you have more detailed questions but this is starting to stray into NDA territory.

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

This is actually incorrect. A production Xbox can only connect through XLSP gateway servers. A devkit can open arbitrary sockets, not sure if that is what you were getting at.

The system is technically capable of connecting to any remote location (think of homebrew applications), but official licensed titles are likely required to use secure connections to Microsoft servers.

They don't need to be MS servers, anyone (well, any licensed Xbox developer) can run their own XLSP gateway. It is exceedingly painful though, so fewer and fewer people are going that route.

Does MS have any requirements regarding the networking protocol or security between the XLSP server and the developer's own content server?

Also (somewhat unrelated), is it possible to prototype an Xbox app on Windows, communicating with an XLSP server?

I don't remember anything in particular about protocols beyond the gateway, most of their limitations are content-related, not about security. Not sure on the second question, pretty sure we didn't but that doesn't mean you can't. Not sure why you would ever need to :-)


text:
Is there any performance benefit to sharing shaders between programs?
OpenGL allows you to share the same shader between multiple programs. Aside from saving small amounts of memory and a shader handle, are there any GPU-side performance benefits to doing this?

I doubt there is a GPU-side performance benefit.
When you bind a generic shader to a program for example, an efficient implementation should be able to remove unused attributes between that shader and the other shaders in that program and possibly even simplify the shader logic as a result.  Of course, this is no real benefit over a hand-tuned shader combination, but it does help manage the complexity/combinatorics, and possibly reduce the number of compiles the driver has to do.
However, there may be drawbacks to doing this in terms of hitting inefficient driver-compiler implementations. And there are some out there, check: http://aras-p.info/blog/2010/09/29/glsl-optimizer/ for just some simple things that some implementations can get wrong.


text:
Where to find designers for independent projects?
Let's say I'm a programmer, I know some artists, we've got a game engine and fun prototype done, and we're ready to enter the indie equivalent of "production".
But the game is full of "programmer design" (and/or "artist design"). We've got a core design concept, but average level design, average AI patterns, average writing, poor balance here and there.
Other questions have covered how to help independent developers find programmers and artists. Where can independent artists and programmers find designers? People who can refine and extend the design elements of the game until they really stand out.

http://forums.indiegamer.com is a great forum for finding help. There's a "Help Wanted" section but they allow only paid offers.

+1 because it looks like a high S:N ratio, but it looks like the standard "I'm an artist, I need a programmer" / "I'm a programmer, I need an artist" requests.

It's kinda ironic "indiependant" but paid. Most of the Indie Dev Teams I know were founded on non-paid base, but anyways... :)

It depends on your definition of Indie. Independent means not being funded by publisher, thus independent to do anything it wants (instead of what the publisher wants). Technically even Valve is independent.

The ModDB & IndieDB forums have a Recruiting & Resumes section where you can look for designers, artists, and programmers alike. ModDB and IndieDB have the added benefit of allowing you to create a showcase page for your project, where you can attract fans and potential team members.

ModDB and IndieDB also have an official jobs board which is free to post on.


text:
New games ideas produce methods

Possible Duplicate:
How do you come up with ideas for new games?

Hello!
I want to ask you about ideas for games, what methods do you know and which you are useing ?
I know for example method, to write a lot of smaller ideas on pieces of paper, and when I have 20-30 then, I try to connect one of them with another, to genereate new idea. For my the most difficult is to extend some idea, do you know some advice for me ?


text:
How do you design a replay system for a frequently patched game

Possible Duplicate:
How do you design a record/replay system for a frequently changing game?

I understand that in order for a game to have a replay system it must:

Have a deterministic engine
Record initial state
Record player inputs

The problem is, what if the game is being patched every few weeks, and these patches change significant parts of the game that can not really be abstracted into an attribute/state? Like, what if something (minor) is completely redesigned? Then you can no longer just play back older player inputs which took place when there were different mechanics on the current engine because it will lead to entirely different results.
Example: Let's say there is a bug in StarCraft that makes marines not take any damage if the damage they receive is greater than their maximum health. Later this is patched, but any replay from the time of the bug would be junk on the patched system. People would be trying to move marines that are dead in the eyes of the game, etc.
Is this reasonably solvable, given there will always be frequency patches that will make structural gameplay changes/fixes?


text:
WPF & C# - Game Overlay + Streaming
Greetings
I'm in the process of making a Scoreboard for a game (Starcraft II). This scoreboard is being made as a WPF Application with a C# code-behind. I already have a version which works for 90% in WinForms but I lacked the support to easily make it look a lot nicer which are available in WPF.
The point of this application will be to form a kind of overlay on top of a running game.
In this overlay people can see the Score, Map, Players, Colors, etc. Basically all the info they need.
Since the main look of the app in WPF is based on an image with a transparent background I have set most Background values to Transparent. However when I do this the entire application does not get registered by streaming software. For example it just shows my Desktop or the game I'm playing but not my application even though it IS there. I can see it with my own eyes but the audience on the stream cannot.
Does anyone have any experience with this matter because it's really doing my head in. My entire application will be useless if it is not visible on streams. If I have to put the background on a color rather than transparent the UI will be completely demolished as well in terms of looks.
I'm basically trying to make a game-overlay in C# & WPF which is able to update with little hassle for the viewer. I have little to no knowledge regarding C++ and DirectX so I would not know where to start in that regard. This project currently holds 1 Developer and 1 Graphic Designer so it isn't a big scaled project, it will also be distributed for free once/if it gets finished. Any tips are welcome!
Thank you for your time reading and your possible insights.

What type of "streams" are you talking about?

Basically streams such livestream.com, ustream.tv, own3d.tv . Generally websites used by gamers to stream their games. The game in specific that I'm talking about is Starcraft II

Your window gets rendered using the HW acceleration of the video card to get transparency effects, and bypasses standard Windows GDI stack, which is captured by most streaming utilities.
Basically, you can
a) hook DirectX's drawing functions and draw your overlay on top of the game (like Fraps does, for displaying FPS counter. AFAIK Steam overlay works the same way), though it can cause problems with anti-cheating tools
or b) advice your users to use streaming apps that CAN capture layered windows (as there are a number of screenshot tools that can, I assume there are streaming apps, too, though i havent used them personally)
or c) make important parts of your application square and not transparent.
or d) contact Blizzard to see if they have SDK for interacting with the game (Little chance, but you could probably at least get some advices)


text:
Bitmap to Texture2D problem with colors
I have a small problem with converting a bitmap to a Texture2D. The resulted image of the conversion has the red channel switched with the blue channel :/ I don't know why, because the pixel formats are the same. If someone can help me I will be very happy :)
      System.Drawing.Image image =
            System.Drawing.Bitmap.FromFile(ImageFileLoader.filename);
        System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(image);
        Texture2D mapTexture = new Texture2D(Screen.Game.GraphicsDevice, bitmap.Width, bitmap.Height,false,SurfaceFormat.Color);

        System.Drawing.Imaging.BitmapData data =
            bitmap.LockBits(new System.Drawing.Rectangle(
            0, 0, bitmap.Width, bitmap.Height),
            System.Drawing.Imaging.ImageLockMode.ReadOnly,System.Drawing.Imaging.PixelFormat.Format32bppArgb);

        byte[] bytes = new byte[data.Height * data.Width*4];

        System.Runtime.InteropServices.Marshal.Copy(data.Scan0, bytes, 0, bytes.Length);

        mapTexture.SetData<byte>(bytes, 0, data.Height * data.Width * 4);

        bitmap.UnlockBits(data);
        bitmap.Dispose();
        image.Dispose();

What you are seeing is not unusual. Image data is often stored as either BGR or RGB. (Plus there's ARGB vs RGBA and also premultiplication to take into consideration.)
XNA's SurfaceFormat.Color is ARGB.
For XNA 4 you generally want premultiplied alpha (this has more to do with what blend settings you use or need to use). If your image is entirely opaque it won't matter.
I'm pretty sure that the problem in your code arises from your use of LockBits. While LockBits gives you an opportunity to select a pixel format, it doesn't actually perform any conversion. So you've basically told it that a ABGR image is ARGB - you've lied to it! (I believe ABGR is a common format for Windows bitmaps.)
The solution is, of course, to swap the Red and Blue bytes in your temporary buffer before you set them on the XNA texture.

Here's a method i figured out, that is fast and swaps the red and blue fast also:
    private Texture2D GetTexture(GraphicsDevice dev, System.Drawing.Bitmap bmp)
    {
        int[] imgData = new int[bmp.Width * bmp.Height];
        Texture2D texture = new Texture2D(dev, bmp.Width, bmp.Height);

        unsafe
        {
            // lock bitmap
            System.Drawing.Imaging.BitmapData origdata =
                bmp.LockBits(new System.Drawing.Rectangle(0, 0, bmp.Width, bmp.Height), System.Drawing.Imaging.ImageLockMode.ReadOnly, bmp.PixelFormat);

            uint* byteData = (uint*)origdata.Scan0;

            // Switch bgra -> rgba
            for (int i = 0; i < imgData.Length; i++)
            {
                byteData[i] = (byteData[i] & 0x000000ff) << 16 | (byteData[i] & 0x0000FF00) | (byteData[i] & 0x00FF0000) >> 16 | (byteData[i] & 0xFF000000);
            }

            // copy data
            System.Runtime.InteropServices.Marshal.Copy(origdata.Scan0, imgData, 0, bmp.Width * bmp.Height);

            byteData = null;

            // unlock bitmap
            bmp.UnlockBits(origdata);
        }

        texture.SetData(imgData);

        return texture;
    }

This code is wrong. First you are modifying the original bitmap itself, and copying with Marshal.Copy is useless since you are already going through all pixels manually. See my correction.

    public static Texture2D ConvertToTexture(System.Drawing.Bitmap b, GraphicsDevice graphicsDevice)
    {
        Texture2D tx = null;
        using (MemoryStream s = new MemoryStream())
        {
            b.Save(s, System.Drawing.Imaging.ImageFormat.Png);
            s.Seek(0, SeekOrigin.Begin);
            tx = Texture2D.FromStream(graphicsDevice, s);
        }
        return tx;
    }

This works:
// Assuming:
uint[] m_PixelsBuffer;
System.Drawing.Bitmap m_Bitmap;

unsafe {
    System.Drawing.Imaging.BitmapData origdata =
        m_Bitmap.LockBits(new System.Drawing.Rectangle(0, 0, m_Bitmap.Width, m_Bitmap.Height), System.Drawing.Imaging.ImageLockMode.ReadOnly, m_Bitmap.PixelFormat);
    uint* byteData = (uint*)origdata.Scan0;
    for (int i = 0; i < m_PixelsBuffer.Length; i++) {
        m_PixelsBuffer[i] = (byteData[i] & 0x000000ff) << 16 | (byteData[i] & 0x0000FF00) | (byteData[i] & 0x00FF0000) >> 16 | (byteData[i] & 0xFF000000);
    }
    m_Bitmap.UnlockBits(origdata);
}
texture.SetData(m_PixelsBuffer);


text:
Resources to learn programming rigid body simulation
Where I can start learning about simulating rigid bodys 2d and 3d ?

Erin Catto's (of box2d fame) GDC slides may be relevant: code.google.com/p/box2d/downloads/list

This seems like a logical answer :)
1) Read theory on the subject. Understand the higher level concepts first. Check the www.gamedev.net article sections they have plenty, as well as google books. Also, this link has some nice references : http://chrishecker.com/Physics_References
2) Read existing libraries.
2D - Box2D for 2D physics is a really good reference of rigid body simulation in 2d. http://box2d.org/
2D/3D - http://bulletphysics.org/wordpress/
3) Implement. This taught me so much about understanding other engines. Start with the simplest of maths, implement it. Even the simplest implementation will boost your understanding of the systems involved.

Another great resource on the topic are David Baraff's papers. Here is one of them including source code:
"An Introduction to Physically Based Modeling"
http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf

A source that really helped me was using managed language code libraries. You then have the ability, through reflector, to see the code behind the methods that an engine uses. Much of this 'code behind' isn't available for view online.
The book that had the best influence on my understanding of the subject was this one:
http://www.amazon.com/Game-Physics-Interactive-3d-Technology/dp/1558607404/ref=sr_1_5?s=books&ie=UTF8&qid=1291983195&sr=1-5
If you are going to buy books, consider this well respected one too(it's related to physics):
http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323/ref=pd_sim_b_1

I second Christer Ericson's 'Real Time Collision Detection', the book is great. You might want to mention the related blog as well. +1

Imho, "Real Time Collision Detection" is not the best book for learning, but still the best to use as reference.


text:
How to give delay in java
I wan tto give delay in java without using thread. I need to load images one by one with approx half second delay. Is there any way to do this other than thread because if I am using thread my whole game is going into the sleep mode.

https://stackoverflow.com/questions/24104313/how-do-i-make-a-delay-in-java has already answers

Correct solution should be to use another thread for loading images. And the waiting aprox half second is not good. Your image loading function should have some callback to tell the  loading thread that the image is loaded.

you said that you don't want to use "thread" because your whole game sleeps. I think you are referring to Thread.sleep(). This is just one static method in the Thread class. The main purpose of the Thread class is to allow parallel execution. So the idea is to execute the image loading code in parallel to your normal processing.
Thread imageLoadingThread = new Thread(new Runnable() {
    public void run() {
        // loop to load image
            // load image
            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        // end loop
    }
});
imageLoadingThread.start();

The Thread.sleep(500) call will now only put the new image loading thead to sleep while the rest of the game continues to be executed.
Note: I assumed that you need the delay in order to keep load on the server low. If the delay is needed in order to wait until the image is loaded completely on the client side, a different approach would be better.

What are you trying to achieve? Can you only load the next image if the previous one has finished loading?
You can track the time when the last image was loaded and then check in your game update function if enough time since the last loaded image has passed.
Your game stalls when using sleep because you pause your main thread. As nhnb said you need to write seperate image loader thread class.


text:
Can't figure get the conversion from cartesian to spherical("polar") correctly for my orbiting camera
The two angles from the polar coordinate system are defined as hRotation and vRotation
This is how they are converted from polar to cartesian:
    // Get the distance between the object and the camera
    float distance = cam.getLocation().distance(RotationTarget);

    Vector3f pos = new Vector3f(distance * FastMath.sin(vRotation) * FastMath.cos(hRotation),
                                distance * FastMath.cos(vRotation),
                                distance * FastMath.sin(vRotation) * FastMath.sin(hRotation));

    // Add in the objects position to make the new relative position of the camera
    pos = pos.add(RotationTarget);
    cam.setLocation(pos);

Now the problem is when I try to get hRotation and vRotation from cartesian coordinates for the to initialize hRotation and vRotation, rather than setting them to an arbitrary value and having the camera jump each time. The camera is generally free roaming "a fly cam" but when an object is selected, the user can hold shift to rotate the camera around the object. So I need to base hRotation and vRotation off of the coordinates of camera and object, here is my code so far, but the issue is that the Camera will mirror its rotation rather than allowing me to fully rotate. For instance I can rotate to the left but it snaps to opposite angle from the right. I know I probably need to invert the angle when something is less than something, but I can't figure out what it is...
    float distance = cam.getLocation().distance(RotationTarget);

    Vector3f diff = cam.getLocation().subtract(RotationTarget);

    vRotation = FastMath.acos(diff.y / distance);
    hRotation = FastMath.asin(diff.z / FastMath.sqrt((diff.x * diff.x) + (diff.z * diff.z)));

Thanks,
-Tim

By using acos you are limiting vRotation to the range [0,pi], and by using asin you are limiting hRotation to the range [-pi/2, pi/2]. In other words, you are only able to get half the period of the trig functions in each case. To fix this you need to check some cases (CAST rule).

Thanks for the help! I finally got it to work the way I wanted. Here is the code:
    float distance = cam.getLocation().distance(RotationTarget);
    Vector3f diff = cam.getLocation().subtract(RotationTarget);

    vRotation = FastMath.acos(diff.y / distance);
    hRotation = FastMath.acos(diff.x / FastMath.sqrt((diff.x * diff.x) + (diff.z * diff.z)));
    if (diff.z < 0)
        hRotation = -hRotation;


text:
How can I distribute a native executable for a Python program?
Lately all of my work has been in Python (and Ruby), and I'm in love with those two languages. There are many libraries for game development on Python but the problem I see is that many of those frameworks don't cover the "distribution" aspect of game creation. I'd like to code my game on Python (and any other pure Python extra libraries I need) and be able to distribute an executable for the main PC platforms (Windows, Mac and Linux).
Any options out there or what are the best combinations for this? (maybe pyglet + cx_freeze)

Some Options for Python:

Multiplatform (Win/Linux/Mac): PyInstaller
Multiplatform (Win/Linux/Max): cx-freeze
Windows: py2exe
Mac: py2app
The bad news is that, as far as I can tell, you can't create binaries for a platform from another platform.  The reason seems to be dependencies on platform-specific libraries.
Edit: By the way, you might be interested in looking at this comparison table.  The guy was using pyglet too.

py2exe + NSIS works well enough, though it can take some voodoo to figure out the right py2exe config usually (but you only have to do that once). You can also look at setuptools' entry-point-based script generation and the pkg_resources API for working with data files.

I use this system and found it to be quite useful, if a bit steep on the learning curve.


text:
Best strategy (tried and tested) for using Box2D in a real-time multiplayer game?
I am currently tackling real-time multiplayer physics updates for a game engine I am writing. My question is how best to use Box2D for networked physics. If I run the simulation on the server, should I send position, velocity etc to every client on every tick? Should I send it every few ticks? Maybe there is another way that I am missing?
How has this problem been solved using Box2D before? Anyone with some ideas would be greatly appreciated!

You might see this question which deals with the same challenge...
Lag compensation with networked 2D games
Though not specifically about 2D physics, the same issues apply.

Something else to think about, is a clear separation of 'gameplay physics' which needs careful synchronization, and 'special effects physics' which doesn't.
Physics used for effects only, such as explosion debris, does not usually need keeping in sync, and can run independently on each client. It doesn't matter if it looks a bit different on each.

One of the most important things in game networking is to only send information when it's needed.
So the answer is neither of your suggestions. You run the simulation on both client and server (or just clients if peer2peer). If you press the up arrow, you send a packet that you now have initiated an upward motion, and until you stop moving in that direction there is no need to send any more packets, as both the clients and servers can run their physical simulation based on the information in that packet.
It's called Client-side prediction.

What kind of game is it?
Is it possible to keep the 2 simulations entirely in sync?
If you start the 2 instances of the simulation in exactly the same state, and update with a fixed timestep, then they should remain synchronized.
But when you do anything to a physics object, you send a message to all clients telling them what to do and on which frame.
So if you were making something like 'Worms' or 'Angry Birds', and the player launched a projectile on frame 1000, you'd send a message saying 'on frame 1000+N' we're going to spawn a physics object with these parameters.
Of course, this will add input lag. And you need some way to ensure that no player will get too far ahead to respond to messages on the correct frame.  Maybe a 5-10Hz 'clock' message, telling all clients 'you may advance your simulation to frame N, but no further'.
(I believe that this is how online RTS games work, where it would not be practical to send the positions and states of several hundred units every update, and where a fraction of a second's lag between giving an order and the unit executing it is acceptable)


text:
How can I find out what URL my game is executing from in Flash?
I want to upload my game to Kongregate and other sites, but on Kongregate I want to invoke one function and other sites I want run another function. How to check in AS3 where (I want to get host like: www.kongregate.com or www.games.com etc) my game is? Or maybe you know other, better way to make this?

I found a post on how to site-lock flash movies/games here. It is the fourth post down. You can modify it slightly to make it do something or set any variables you need changed.
Here is the code from the post.
//Assuming you have a movieclip or sprite named myMovieClip (you can use any movieclip or sprite)
var URLofSWF:String = myMovieClip.loaderInfo.loaderURL;

//You will do some string methods to get domain name etc etc, it's up to you
var domain_parts:Array = _url.split("://");
var domain_parts_2:Array = domain_parts[1].split("/");
var domainOfURL:String = real_domain[0];

 //Then you compare the URL to any URL you wish to allow or disallow
if(URLofSWF == "http://www.google.com/mySwf.swf"){ // strict swf url checking
proceed();
}else{
stopEverything(); // Or inject some funny code to the stealer :P
}
// or
if(domainOfURL == "www.mysite.com"){ // domain checking only
    proceed();
}else{
    stopEverything(); // Or inject some funny code to the stealer :P
}


text:
RPG Item processing
I started working on an item system for my (first) game, and I'm having a problem conceptualizing how it should work. Since Items can produce a bunch of potentially non-standard actions (revive a character vs increasing some stat) or have use restrictions (can only revive if a character is dead). For obvious reasons, I don't want to create a new Item class for every item type. What is the best way to handle this?
Should I make a handful of item types (field modifiers, status modifiers, )?
Is it normal to script item usage? Could (should?) this be combined with the above mentioned solution (have a couple of different sub item types, make special case items usage scripted)?

Wait... What are you using (language) and what is your current strategy?

possible duplicate of What are different ways to define items in an RPG like game?

I'd store everything about items as pure data, and then traverse the data to determine how the item behaves.
For example, suppose item properties vary per item type (instead of per item instance), and there can be multiple properties per item type.  This could be set up as a set of lookup tables on the item type. Example in JSON format:
restrictions = {
  'ghost_amulet': ['must_be_dead'],
  'magic_sword': ['in_combat'],
  …
};

actions = {
  'ghost_amulet': [('revive', 0)],  # note: int parameter not used for revive
  'magic_sword': [('fire_damage', +3), ('ice_damage', -1)],
  'wooden_shield': [('armor_modifier', +5), ('block_modifier', +3)],
  …
}

Each action and restriction would map to a piece of code that implements it. Note that instead of restricting items to have only one type of modifier, I'd start out with having any item have any action or restriction. It's simpler and more flexible to put all of this into a data file than to use a class hierarchy that has to be recompiled when you change something. If there are space/speed issues you can add restrictions to streamline the data format.
There are lots of variants of this. There might be properties that vary per item instance. There might be more parameters for some actions.  The action names might correspond to method names in the code instead of fields to modify.  Actions and restrictions might be ints instead of strings.  If only one restriction/action is needed you wouldn't need a list.  Modifiers might be put into their own lookup table (for example you could make a fire_damage lookup table that maps to numbers). All of these details will vary by game.

You can use a very similar strategy as described here: How to design the attack class in an RPG game?
Just imagine that you're dealing with Items instead of Attacks.


text:
Easing Functions
I started to involve myself with easing functions (Flash AS3), came about in trying to understand TweenLite and Robert Penner's website: http://www.robertpenner.com/easing/
The question I have is what is the math basis for these functions.  I've seen other sites modify the functions to create custom easing function.

I think it's rather well and extensively explained in the pdf linked on Robert Penners site: http://www.robertpenner.com/easing/penner_chapter7_tweening.pdf

Well tweening in the general case is just parametric movement (specifically, defining a function f(x) where x can be 0..1 for position/rotation/scale/whatever) with a modifier on the parametric value you pass in.  The modifier also has the range 0..1.
If you plot the algorithm on a graph you'll get something that starts at 0, ends at 1, and the slope of the curve defines the velocity at that point in time.
If you want the math for the easing functions themselves, check this out: http://iphonedevelopment.blogspot.com/2010/12/more-animation-curves-than-you-can.html

I've written a primer on interpolation, which may be of some use - http://iki.fi/sol/interpolation/
Another great resource is this interactive tool: http://www.gizma.com/easing/

That first link is very informative. Good article.

@JariKomppa I have to ask, where does the (3-2(x)) come from? And why does x have parentheses? Doesn't it always result in 3-(2*x)?

@Sidar Can't remember offhand where the formula comes from, but basically it's a special case spline (which leads to a simple formula). The (x) is due to the macro form - 'x' may be anything, for example '3+7', which would lead to (3-2*(3+7)) and not (3-2*3+7).


text:
What causes player box/world geometry glitches in old games?
I'm looking to understand and find the terminology for what causes - or allows - players to interfere with geometry in old games.  Famously, ID's Quake3 gave birth to a whole community of people breaking the physics by jumping, sliding, getting stuck and launching themselves off points in geometry.
Some months ago (though I'd be darned if I can find it again!) I saw a conference held by Bungie's Vic DeLeon and a colleague in which Vic briefly discussed the issues he ran into while attempting to wrap 'collision' objects (please correct my terminology) around environment objects so that players could appear as though they were walking on organic surfaces, while not clipping through them or appear to be walking on air at certain points, due to complexities in the modeling.
My aim is to compose a case study essay for University in which I can tackle this issue in games, drawing on early exploits and how techniques have changed to address such exploits and to aid in the gameplay itself.  I have 3 current day example of where exploits still exist, however specifically targeting ID Software clearly shows they've massively improved their techniques between Q3 and Q4.
So in summary, with your help please, I'd like to gain a slightly better understanding of this issue as a whole (its terminology mainly) so I can use terms and ask the right questions within the right contexts.  In practical application, I know what it is, I know how to do it, but I don't have the benefit of level design knowledge yet and its technical widgety knick-knack terms =)

Prevention is the cure?: http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php

If I understand correctly what you are talking about, then its dealing with framerates and the short cuts taken to get physics, and collision in general, to run in a reasonable manner in video games.
Basically you would do the movement, collision and reaction calculations over the time step of each frame. What if the time step of the frame with the current forces were enough to push you Into an object.. A wall or narrow passage say, that you normally would not be able to enter? Well the system has to 'eject' you from the object.. Depending on how this ejection was done it could result in a very large force applied over a very small time that may Not get you all the way out of the object.. The force could build up over 2-3 frames and pretty much just send you flying.
I am not 100% sure this is the actual case as mentioned in Quake 3, but I know in learning to develop games this is the type of example they would use to explain why the strangest things happen some times when you do not take into consideration all the time within a time step.. most physics engines I have worked with will use some sort of a set time step to do its calculations (This includes the people that nVidia bought :)). If a frame rendered to fast, the physics do not get calculated that frame, if the next time step is over that set value then enough to make a complete step is taken, physics is calculated, and that bit of time is used as the new point to add each next frame's time to before the next step.
Hope this helps give you some ideas of what to look for.

Regarding Quake 3: I remember websites with quite in-depth analysis of strafe-jumping and their relation to current framerate, including some mathematical formulas behind it. Quick google search turned out this site: http://www.funender.com/quake/articles/strafing_theory.html looks preaty good, but I'm almost sure it's not the one I saw before.

I can think of a couple of potential reasons.
First is that the geometry in these games is rarely "airtight". While working on a 3d game project we talked with a PVS technology provider, who processed some of our levels through their system and showed that perfect PVS data is impossible due to the holes in the geometry. These holes are not visible; I'm talking about t-intersections and floating pointy inaccuracies etc.
Sometimes physics just manages to blow up because the players hit the geometry "just right"; geometry that, while visually perfect, isn't mathematically so.
The second reason that I can think of, to quote Tim Sweeney - making realistic game physics is difficult. Floating point calculations are surprisingly inaccurate. There's plenty of articles about this on the net (for instance, http://docs.sun.com/source/806-3568/ncg_goldberg.html is a pretty good one). Add to that the fact that we're talking about online games with all their interpolations, predictions and such, and you get a rather unstable system, which still somehow manages to work.


text:
Algorithm to make groups of units
In Age of Mythology and some other strategy games, when you select multiple units and order them to move to some place, they make a "group" when they reach the desired location:

I have a Vector with several sprites, which are the selected units, the variables tarX and tarY are the target x and y. I just want an example, so you can just set the x and y position and I can adapt it to my code. Also, I would like to ask that the algorithm calls "isWalkable" for the x and y position, to determine if it's a valid position for each unit.

What you're looking for is basically coordinated movement. The units pathfind to their destination and when they reach it, they form a "formation".
This is a topic decently covered in the AI Game Programming Wisdom (Book 1, Book 2, Book 3 and Book 4) books. But, I'll refer you to the following articles:
Coordinated Movement - A link explaining the fundamental principles of coordinated unit movement in RTS games
and
Implementing Coordinated Movement - An article continuing from the first, that talks about how to implement this type of movement in a game.
It's written in C++ but it shouldn't be too difficult to port to any other language, as the underlying principles remain the same.
Hope that helps.
Ray

Okay, I'm gonna read it. I am using A* path finding.


text:
Soft body, where to start learning?
I want to ask you about some resources to learn simulating soft bodies, do you know some good knowledge sources?
I asking because I want to make car crash simulator, I've made something but it didn't work well. :/

Are you planning on using a Physics engine or just make all of the physics yourself?

I need to make this physics simulation engine myself ( only to 1 project, so it will support only what I need to car crash simulation ), I can't use physics engines like Bullet, ODE etc..

I don't want to sound rude and don't mean any offence, but do you have any experience with coding normal physics (i.e. Rigid body physics)?

Yes :) I make some basics physics simulations, but I don't making any soft body simulations yet

These might help:
http://cg.skeelogy.com/?download=SoftBodyPhysicsTutorial
http://en.wikipedia.org/wiki/Soft_body_dynamics
I also used some verlet integration once to do some pretty simple soft body physics. I know verlet I used more for rigid body physics, but by making the constraints a little more slack, It seems It can be used for some soft body stuff.
http://www.google.com/#hl=en&q=soft+body+verlet&fp=9bef8cda26d1a6ec
Hope it helps.

+1 although you'd really have to apply the stuff in the skeelogy tutorial. Start off small and then work your way up to a car.

Thx :) I found these sites too, but I'm looking for some more information

I got through the skeelogy.com tutorial last week. Very, very nice tutorial.