# Question
Title: Tweaking and Settings - Runtime variable modification and persistence
Most companies have an editor, or a variable control system for tweaking stuff in games, but are there any middleware solutions to this problem? I've written two such systems in the past myself, and worked with five, maybe six different ones, but none of them were off the shelf.

Each of these home grown solutions had problems, ranging from having to keep looking up values, to not being able to save the current state of the variables.

Are there any mature Config/Runtime-variable control libraries/apps?

I generally code in C++, but I would think that a mature settings/variables editor would probably be socket based (and therefore language agnostic to some extent) as all current development hardware apart from Nintendo stuff provides a mechanism to talk to servers. The code implementation would also need to be quite simple (I do like the hot\_var/TweakableConstants article shared by Oskar, but it's not a package)

# Answer
I like what Noel proposed on his blog. A telnet based variable tweaker. By using telnet he was able to use any telnet client to edit the variables. Later they built a gui around the protocol. It seems sufficiently simple, that it probably isn't worth a middleware library but looking at his code might be useful.

I disagree with his anti-Lua sentiment however. A remote Lua console just seems awesome.
> 8 votes

# Answer
Maybe the idea of Tweakable Constants fit your needs. It is so usable in fact that you'd *think* you would need a complex solution to have an effective run-time variables control, but in reality the implementation is almost too simple. The original discussion of this technique is also an interesting read.

Example:

```
glClearColor( H(1.0f), H(1.0f), H(1.0f), H(1.0f) );

```

The `H` macro expands to something like `HotValue(x, __FILE__, __LINE__, __COUNTER__)`. This registers the value to some global registry. Then have a function like `RefreshHotValues()` that you call at regular intervals. The function looks up each entry in the registry, parses the specific source file and reloads the hot value.

As you modify the actual source code, you have persistence right there.

Obviously this will not work where `H()` is not evaluated every frame, but there are ways to solve this as discussed here.

You could expand on this idea to a socket-based solution, perhaps. There could be a significant performance overhead to call `HotValue()` every frame, but as you very easily can compile out the macro completely replacing it with the constant this is not an issue.
> 5 votes

# Answer
AntTweakBar is really useful for what you want to do, however, most of the time, you'd want to have methods that 'compile away' in release with some macros or similar.
> 1 votes

# Answer
From a question about real-time debugging, comes David McGraw's answer about AsyncSocket for iOS developers. See his answer for more information.
> 0 votes

# Answer
Settings management seems to be one of those things that's redone from scratch for every game, probably due to how relatively simple it is and the high variability in the types of settings needed. Assuming you have a decent storage backend setup (SQL/whatever) you can code up a robust solution to settings management in a day or 2 so there doesn't seem to be much real business need for a middleware solution. Tacking it on top of whatever you use for player information storage is I think the best way to go in most cases.
> 0 votes

# Answer
I've actually been thinking about such a thing lately, and I think it would be a great candidate for an **Android app paired with a small library in whatever language you want**. The app would be a customizable set of buttons, toggles, dropdowns, etc. (any widget you want), and it would send the actions via WLAN (or USB if you wanted to complicate things) to the library. The library would have spawned a separate thread from the gameplay and would know which controls on the Android phone correspond to which variables in the game (you'd set them in your startup code) and would have a connection to the Android app.

Then, messing with your game is as easy as touching things on your phone. You could even have some textboxes on the phone which show realtime variable values from the game, or you could have the library forward `stdin` or `stderr` to a scrolling textarea on the phone. The options are limitless!

The only real concern is with speed. If speed and reaction time are crucial then you'd just hook the phone via USB and adb (android debugger) supports forwarding ports over USB to the phone. But otherwise, WLAN would only have a very tiny delay which I think would be plenty acceptable for this purpose.

**I don't think such a thing as the above has been written, but I've been strongly considering writing it.** (I just haven't gotten far enough into development of my own games to need it yet)

Of course, those of you that are Apple users can probably do the same with your iDevices. I personally find iOS development to be orders of magnitude more difficult than Android development, and of course the above app could easily be published to the Android market for easy distribution whereas Apple probably wouldn't allow a developer tool into the app store, so I feel the Android platform better suits this tool.
> -1 votes

---
Tags: tools, assets, databases, editors
---


# Question
Title: What's the easiest way to fill my 3d enviornment with temporary graphics?
Currently I am starting a 3D game with C# but I don't have a designer yet nor any images or anything or any money to invest on it.

I would like to develop it using some sort of placeholder or whatever to fill the graphics so I can make at least the basics of it and later simply switch for the real thing.

Should the place holders be actual sample images or can I use for example a ball to represent a body (what will be the impact of it later when I switch to the actual body it self)?

# Answer
> 6 votes
The easiest placeholder graphics are those that you just whip up in code. For a 3D game, write something code to generate a plane, a box, a sphere, a cylinder. Bam, now you have enough stuff to make a game!

---
Tags: 3d
---


# Question
Title: What are good, simple action games/action RPGs to emulate?
There is standard advice for game development to start off emulating simple games you know and build up from there. Which makes me wonder. What are good examples of action games or action RPGs that are very simple to begin with to try and emulate? What is necessary and what is superfluous?

Please link to the game's site (or Wikipedia page if it's defunct) if you can, and only one game per answer please.

# Answer
If your heart is absolutely set on making an action-RPG, the simplest one I can think of is the original arcade version of Gauntlet. Overhead 2d view, simple mazes, a limited selection of stat-boost and single-use items, and less than ten enemy types. It's also fairly modular, so you can at least start with a single level and movement, then add walls, then add a monster type, and so on, adding one new feature at a time.

http://en.wikipedia.org/wiki/Gauntlet\_%28arcade\_game%29

But as others have said, the point of "emulate something you know" is to build your programming skills, which means you want to keep it to very simple projects and not necessarily games that you like, so much as games that will teach you how to program.
> 5 votes

# Answer
Things that I consider important when choosing a game to remake:

1. Make a game that you have enjoyed playing in the past and are intimately familiar with. You want to know the design like the back of your hand so that you can focus on implimentation.
2. Make something with a menu, high-scores, levels, and other things 'beyond the gameplay'.
3. Make something with a distinct hero-character that the player controls (i.e. not cursor based), as this tends to avoid many GUI-related side tracks.
4. Pick a game for which you've previously imagined 'more modes' or other additional features, so that when you finish it you can immediately build upon it (if you choose).

The first point is really the thing. Asking for specific games is a bit over the top, anything here will get the job done really.

*Edit: I had a list of games, focusing on advice instead....*
> 2 votes

# Answer
I recommend Pac-Man:

* Pac-Man has aged well. It's still a lot of fun to play, even in its basest form.
* Everyone knows the game, and its core is simple and content-light.
* It's renderable with whatever graphics you have or know, from full-blown 3D with shaders on the ghosts, down to a turn-based text mode game akin to robots.
* It has AI, but you can make the AI as simple or complicated as you want.
* It has multiple levels, which lets you play with data serialization and a level editor if you want.
* It has a lot of scriptable elements, if you want to learn how to embed a scripting language.
* The design permits a lot of piecemeal extensions (new powerups, random levels, moving walls, ...).

I do *not* recommend an action RPG. Good action RPGs are probably some of the hardest games to make; they need quick control response, good AI and animation, and tons of content.
> 2 votes

# Answer
I wouldn't call it an action or rpg game, but making a Tetris clone seems to be a common recommendation. Here is a good article on beginning game programming (I've linked to the section that recommends Tetris and why).
> -1 votes

---
Tags: game-design
---


# Question
Title: What is a good book to start programming a 2D C++ game?
I have a degree in Computer Science and while I was in college, I created a simple 2D game in Game Maker. I would like to recreate this game in C++ as a start to learning how to create games in C++. What would be a good book to start out on programming games in C++ for someone who has a bit of C++ experience (My CS Major classes were taught using Java and I had a class in C++ to learn syntax) and knowing the concepts behind objects, methods, inheritance, etc?

This would be a hobby of mine while I build up experience until I one day could work in the Vide Game Industry.

# Answer
> 10 votes
Seeing as you were using Game maker, I'm assuming you're on Windows, so jump in at the deep end with the direct-x SDK. The samples provide source code, and also give you a taste of the power available to you. Just because you want to do a 2D game doesn't mean you should stick with a 2D library, at some point you'll probably want to do something the library doesn't implement in itself (shaders or rotations or something random that you just NEED for your project).

SDL -and probably SFML and Cinder- provides a high level *"got the basics out of the way"* approach to being an engine, so you would have all the power of doing it from scratch (so you could have pixel shaders in SDL), but you'd not learn how things got done. You'd then be doing real C++ inside a helper framework, which will help get stuff done, but won't be a great help in teaching you how to develop games if you're ever going to be working at a game dev company.

SDL, SFML, and even Cinder are all clever ways of avoiding learning about the difficult stuff in C++. They normally wrap OpenGL, which is useful to learn if you want to code graphics for non-windows machines, but there's tonnes of resources for getting work done in Direct-X too (probably more as the Windows virus has spread to every corner of the world).

If you don't want to learn the gritty stuff, then fine, but otherwise, don't be afraid to start from a raw Win32 app.

I'd suggest, for comfort, you start out with all the different helper packages you can find, but head towards writing your own rendering engine. Writing an engine is good fun and can provide you with a resource to look back on in your future projects. Nothing creates good code like the wisdom from doing it wrong in the past.

# Answer
> 7 votes
I would recommend staying away from that Cinder library. Browsing through the tutorials is about as demotivational as it can get. Pick something that's easy, fun and fast to code with, like SFML. Think of it as a modern object-oriented replacement for SDL. If the features satisfy your needs, install it, go through the tutorials and just start playing with it. You can find source codes for existing SFML projects from the forums to look at how they implement things, such as the game loop, how they organize the code and the objects and make them communicate with one another and the Wiki has a number of tutorials and source codes you can use in your projects. And the forums are active so you can ask for help there anytime.

# Answer
> 5 votes
I don't know any book specitic to 2D games, but you should look at the answers here. After all, 2D and 3D games have a lot in common. There are many 3D games that have 2D gameplay.

Maybe you could check the tutorials by Lazy Foo, they cover many important subjects in a step by step basis. They use SDL and OpenGL.

# Answer
> 3 votes
Might be a little dated but Advanced 2D Game Development was a pretty good book. Check it out.

# Answer
> 2 votes
Why not try starting out with something like http://libcinder.org/ \- it's all free and has all the tutorials you need to get started.

# Answer
> 0 votes
Beyond a book, it's important to decide what sort of game you want to make. That will help inform your path in general. I would suggest picking something simple, Minesweeper or Tetris or maybe Lightcycles of Tron, where the game logic is fairly straight forward and the graphics requirements are minimal just to get something basic playing.

# Answer
> 0 votes
While there are plenty of books out there, I've not found one that I'm happy with. Most seem to stick to "games" that aren't particularly interesting from a play perspective, and don't really get into the implementation details of graphics, game loops, and so on.

My recommendation would be, rather than looking for a book, teach yourself through Google searching. There are tons of online tutorials for making simple games, just pick a game like Tetris (or whatever), make yourself a list of programming tasks, and then when you get stuck on something (maybe you're not sure how to accept realtime input, or how to draw graphics to the screen) search for the answer to that one specific question. Repeat every time you get stuck, and by the time you're done you'll have a pretty good idea of how a game is put together.

---
Tags: 2d, c++, books
---


# Question
Title: What is the purpose of the stencil buffer ? More precisely, what is a stencil in computer graphics?
I read the stencil word a lot, and I don't have a clue what is its real purpose in computer graphics.

Seeing the picture in black and white on wikipedia, I'm still having problem with it.

Why do we use a stencil or a stencil buffer, and what is the difference with a Z-buffer ? Why using this word which seems to have some meaning in graphic design ?

# Answer
In its original incarnation, a stencil buffer was a one-bit-per-pixel (i.e. black or white, but no grays) framebuffer. You could render to it whatever you wanted like any other framebuffer. Then, later, you could use the contents of that buffer to "stencil" or mask out when drawing to your regular buffer.

An example: Let's say you're making a driving game. You want to have a little rear-view mirror onscreen that shows you what's behind the car. You'll need to render a view pointing behind the car, but you only want to render that within the little rounded rectangle of the rear-view mirror. The typical solution is:

1. Render the rounded rectangle shape to the stencil buffer.
2. Enable stencilling.
3. Render the backwards pointing view onto the regular buffer.

The stencil will then mask it out so that you only draw into the shape of the mirror.

Now that render pipelines are much more flexible and programmable, stencil buffers are used as just a generic 1-bit framebuffer that you can do whatever you want with. Shadows are a common use case.
> 41 votes

# Answer
In addition to the functional usage of stencil buffers that people have already discussed, stencil buffers can also be used for optimization.

Due to the position of the stencil test in the graphics pipeline (which is *before* pixel shading), stencil testing can be used to kill pixels that do heavy shading work when they're not needed. Often this can be done at a coarser granularity than just a single pixel eg. a tile of pixels, so work can often be culled during the coarse rasterization stages too.
> 9 votes

# Answer
It's just a buffer that controls which pixels can be modified when polygons are rendered. For each pixel, there's a corresponding stencil value, and pixels can be conditionally modified/ignored depending on these values

At it's simplest, it can be used like a physical stencil - a mask that allows some pixels through, and stops other pixels being modified.

It is very similar in behaviour to a z-buffer - like depth testing, stencil testing is a true/false test, and there are similar settings to control the stencil test (pass if greater/less/equal). But instead of writing a depth to it, it will usually have pre-defined values written to it, or be incremented/decremented when pixels are drawn, as used in stencil shadow algorithms.
> 4 votes

---
Tags: graphics, hardware, graphic-effects, hardware-acceleration
---


title: Level Implementation

text:
# Question
Title: Level Implementation
I recently started to create a sidescroller game, for learning purposes. While creating several levels for it, i stumbled upon the question, how to implement these levels into my game. I made (and i think this is the common way, correct me if i am wrong, i appreciate it) a state-based game, with a menu-state, a game-state and so on. So whats the common way to implement various levels in the game-state? Should i create a new state for each level? or should the game-state be the only "playable" state, and "know" (however realized) the current level it is in? How would you realize point-counting or something like that (like a live system, or a simple beat-the-highscore point system)

# Answer
> 4 votes
The implementation of the concept of level varies quite a lot, but two common techniques come to mind.

Most open games, ones where levels/progress are merely an internal state of the player, the normal implementation is to have the game assets catch up with the player state (so if your level starts out "in the docks", your game starts up by putting you there, and begins loading.) The game waits until all assets have finished loading, then switches to the "loaded" state.

The other common technique is to have the level be more explicit. The level to be loaded still comes from player session information, but you load the level into the game and then place entities on their starting points. This is the norm for games that have literal levels that are arenas for play. Save games for these style games tend to only save the difference from the starting conditions of the level.

As you can see, neither of these imply that you have a gamestate per level, only that the level is either playing catchup to player session information, or the assets are explicitly loaded for the level and the player is placed inside it.

In your sidescroller, this could be taken as your session information containing the level index/ID, and then loading that level on game starr. When your level index changes, you store all info that needs to travel with you from one level to the next, then free the current level and load the new one, finally drop in your saved state.

Points or game progress are normally managed through session info, which usually includes your current lives, score, time playing, but not the intra level information (such as health level, speed, number of bullets on screen). This separation is important in games where the level is not always mapped to the location (games where you revisit locations for example), but can help simplify your thinking even in linear games.

# Answer
> 2 votes
Simply, the game state can carry with it an index for the current level. You'll want a trigger (a function at the very least) for when the level ends, so that you can unload the current level, update the current level index, then load the (new) current level and start playing.

You could create another state for each level, but typically it's unnecessary. The data differences between "front end" and "in game" are not the same as the differences between the levels. If you wanted state-per-level, you could have another state machine in the game state, the most rudimentary form of that is an index representing the current level. :)

---
Tags: game-design, software-engineering, levels, game-mechanics
---


# Question
Title: How to Further My Game Dev Studies Away from Technology?
I'm a college student, and I have a really boring class every Tuesday that's 2 hours and 45 minutes long. It's an interesting situation... attendance is required and checked, and electronic devices aren't allowed, but discussion isn't required and the lectures don't really matter to the exams. So I sit there in the back of the room either dozing off, doing Sudoku, doodling on my paper, pen-spinning, or trying to secretly use my phone without getting caught. I find myself wishing I could use the time productively.

Just like when one sits down with paper and crayons and can't think of anything to draw, I find myself wanting to do something to further my game development skills (e.g. work on the design of a game) but as I sit there with a pen and paper and the professor droning on, nothing comes to mind.

**Help me get through this tedious class! What are some things I could think through or work on, or how can I figure out things to think/work on?** Or even things I could print out in advance and read or solve during class. Remember the constraint is that I have no access to technology...

And I'm not sure a book would be appropriate. Though now that I think of it, I should probably just read game dev books from the library. Why didn't I think of that before? Anyway I still want to hear suggestions! What would you do with this time, if you were in this situation?

# Answer
> 2 votes
Here is what I'm doing when a lecture is making me fall asleep

* Think of a game design problem and try to solve it, going through some of the games you've played seeing what developers did wrong, what you can improve, what decision you would have took if you were in the position to do so, etc.
* Make up a short story, it doesn't have to be complicated, just some characters and how do you think they should interact with each other. (e.g: i often think of a story of a midget elf who is trying to make something out of himself even though all the bigger elves laugh at him and call him name).
* Write down whatever quirky thoughts you have, be it programming or design, having it lay down on paper with pros and cons, this can give you a better idea of how to balance elements in a game, in my honest opinion when you think about a design you have to nibble on it for a long time to see if it's good.
* This may sound "Inception" like but draw labyrinths, level flow is extremely important in any game, you don't want just a corridor with some rooms now do you?

From student to student: don't upset the teacher, being discrete in these kind of situation, where you have no interest in the course, is the best way to go about it. All I've written above can be seen as paying attention or taking lecture notes, so no danger there :)

# Answer
> 15 votes
Pay attention in class and bring something unique from the lecture into the next game you work on.

# Answer
> 0 votes
Possible things I did in class before

1. I would draw on paper it help you get ideas
2. Think of a game design and play it on paper or in my head.
3. Questioning the lecture is always helpful to warrant discussion to make things interesting it also builds communication skills.

---
Tags: education
---


# Question
Title: Pretty open source game/rendering engine?
It might be outside the domain of open source (as there isn't much in the way of open source games that would want/need to implement all these) but is there an existing open source game or rendering engine capable of things such as :

* day/night cycles
* dynamic weather wind/rain/clouds/etc
* wet surfaces (surfaces look wet during rain)
* realistic water
* large terrains with the ability to define "roads"
* seamless exterior and interior
* forests (lots of trees, clutter, etc)
* realistic lighting (ie. light from a fire/candle flickers)

if game engine :

* integrated physics
* support for vehicles
* ai
* multiplayer/network capable.. maybe mmo
* voice recognition
* etc

# Answer
If you're looking for a rendering engine that does all of that first list right out of the box, I don't think you'll find a whole lot. Stuff like fancy lighting shaders and day/night stuff are very game/simulation specific, and most rendering engines either won't have that sort of thing built in, or the built in implementation won't meet your specific needs.

I use Ogre3D, which I wholeheartedly recommend:

> open source

Ogre is open source, under the MIT license.

> day/night cycles

Nothing built in, though there are a few extensions that do this sort of thing (Caelum comes to mind).

> dynamic weather wind/rain/clouds/etc

Again, nothing out of the box, but there are a number of extensions that do something like this (again, Caelum, and also SkyX).

> wet surfaces (surfaces look wet during rain)

You'll have to write a shader for it, but it is possible (I have achieved such an effect in the past with Ogre).

> realistic water

There is a plugin or two for this (Hydrax is rather pretty), and the 'Fresnel' SDK sample shows off a simple refraction/reflection water shader (and there's another sample or two devoted to water effects).

> large terrains with the ability to define "roads"

No roads, but Ogre recently got a new terrain system that is very nice.

> seamless exterior and interior

Ogre has a few different plugins for portal connected zones, BSP's etc, so it should support whatever you need.

> forests (lots of trees, clutter, etc)\**

Ogre has some batching capabilities built in, and the Paged Geometry addon is supposedly quite nice.

> realistic lighting (ie. light from a fire/candle flickers)\**

Aside from some example shaders included with the samples there aren't any built-in lighting shaders, but the material/shader system makes it very easy to get a lighting shader up and running.

Overall, Ogre is capable of all of that, and has a very robust material/shader system, but you will have to write the shaders for a lot of the effects yourself (and this is true of most other rendering engines, you can't really make one-size-fits-all solutions for a lot of these effects).
> 17 votes

# Answer
DevMaster maintains a comprehensive list of engines and features:

http://www.devmaster.net/engines/

Most engines will not offer day/night cycles as there is always a time in the cycle where the map is poorly lit and looks bad (just like real life) - usually an unnecessary feature for games.
> 2 votes

# Answer
This may be slightly off topic, but I'd suggest thinking very carefully about whether you *really* need day/night cycles for your project.

By supporting that feature, you're essentially saying 'no baked-in lighting/shadows allowed', which will make it *much* more challenging to get pretty results, whichever engine you choose.

A lot of people were recently wowed by the Epic Citadel iPhone/iPad demo. Technically, it's not doing anything incredible - it's a combination of good art and nicely baked-in lighting.
> 0 votes

---
Tags: physics, ai, terrain-rendering, open-source
---


# Question
Title: Simplest most effective way to rank and measure player skill in a multi-player environment?
I know of the Truskill algorithm, it's quite complex but effective.

My question is there other algorithms/methods to determine a players skill for accurate measuring for multi-player competitive play?

# Answer
> 12 votes
I think asking for "simplest most effective" is an unrealistic requirement, but there are certainly a few good approaches. Rather than go into detail, I'll link to an article:

http://www.lifewithalacrity.com/2006/01/ranking\_systems.html

This covers:

* ELO
* an ELO variant by Days of Wonder
* TrueSkill (and glicko, which it appears to be based on or at least similar to)
* eGenesis Ranking (for Tales in the Desert)

On the whole you'll see that they're all pretty much variations on the same theme - you pick a starting or average value for a player, and then the values are used to predict the game outcome. The difference between the actual outcome and the predicted outcome is used to modify the scores for each player, and the process repeats with the adjusted scores. Since each modification to the scores makes the predicted result more accurate, the scores converge on their 'true' values. (This actually assumes that it's a game of skill rather than chance, that the skill in question is capable of being linearly ranked, etc.)

# Answer
> 8 votes
Depends on the game. There are a few problems you can get into:

* For games that have a luck component and a skill component (Bridge, Poker, Magic:the Gathering, etc.), most algorithms don't account for the fact that a weaker player can sometimes get lucky. If your game falls into this category, you'll need to do some work. Generally this means figuring out what percent is luck and what percent is skill (a difficult trick, but if you've been using a skill-based algorithm like Elo already, you could run some metrics on the results to figure out how often the algorithm predicts an upset versus how often it actually happens). Then you have to change the algorithm, and exactly what to change it to is probably beyond the scope of this question.
* For games where matches can be manipulated (I can choose to play a ranked game against my friend), you have to put extra safeguards in place to prevent players from purposefully throwing matches.
* For games where a player can get "out of practice" if they don't play regularly, the system could involve some sort of time-based degradation. The Glicko system is a mod of Elo that adds an "uncertainty" variable to each player's ranking, based on how many games they've played and how recently they played them; the more certain a player's ranking is, the less it changes from game to game.
* Multiplayer games (whether free-for-all, team-based, or some other player structure) need special care, of course. Some team-based games make it easier to figure out each individual's contribution, compared to others.
* Also ask what the purpose of your rating/ranking system is. In professional games and sports, the purpose is statistical: rating is used as a predictor of the outcome of any given match. The primary goal here is accuracy. However, this is rarely what players want; instead they want progression, a feeling they are getting better and climbing through the ranks (whether they are actually getting better or not). In short, there is a tradeoff between accuracy and fun that you need to consider.

# Answer
> 3 votes
What did you find complicated about TrueSkill? I thought it was a straightforward algorithm with just the right amount of knobs to tweak for different game modes, and it reduces to Elo when the game is head-to-head with high certainty.

If you're looking for the simplest way to to effectively rank and measure a player in a multiplayer environment - my recommendation is TrueSkill.

# Answer
> 2 votes
What about a pairwise system like elo? It has been used for ages in "normal" sports with excellent results.

For free-for-all-matches you could interpret them as a bunch of pairwise matches and assign points based on the relative standings.

---
Tags: game-design, multiplayer, methodology, ranking
---


# Question
Title: Collaborations with colleges? How do you make them work?
I am a graphic artist and not a modeler or a programmer. For the last few months I have been developing the concept for a game, but could not find a proper team of collaborators to make a demo. Then, as luck would have it, I met a group of people from a local Design College that has a new degree in Game Design. After a brief chat with the program’s Director, he seems really interested in coming to an agreement. Most of his students need an actual project to work on for their final year, and I need a team to make a demo…

So it works out great for both of us. I am trying to make a formal meet with the school’s administration to reach a formal agreement. Just one thing I am not sure of.

Who owns the project?

After everything is said and done, the end result is a demo and a Game Design Doc what will be presented to a publisher, but who owns the rights to the game?

I know the answer technically is “who ever is agreed upon in the collaboration contract” but how does these collabs usually work?

# Answer
In my opinion, since your only job is art and design and you are by yourself, you have a very weak stance getting to become the owner of the project since you have the least contribution of work out of the whole team. You are highly dependant on them to make your project work, whereas they do not need you to get their passing mark on the finals.

If you want full ownership, either work alone on your project, pay people to put it together, or somehow manage to convince the people you are working with to assign full ownership to you despite working for you for free.
> 3 votes

# Answer
Does your studio not have access to legal advice? Ask an attorney specializing in contract law to draft a contract that clearly spells out everyone's rights, responsibilities, and ownership. As for "who owns what" -- it can be whatever all parties agree to!

If this is unpaid work, you'll probably want to contact someone about this anyway to make sure the agreement is legal; I hear that in some states, "unpaid internships" are not allowed, for example.

While you didn't ask, I'll give you two caveats with this kind of "industry asks a student team to make a demo" project: 1) Student projects don't always work. Sometimes the students don't have the skills to pull it off, or they don't get it done in time, or they turn in something that's only partly done. 2) Expect zero support after the academic term is over. Students will TELL you they want to keep working on it, but in practice they almost never do.

Choose a project accordingly :)
> 3 votes

# Answer
You're right, that whoever is contractually established as the owner, is the owner. I get the feeling that you want the rights to the project. If that's the case, then be aggressive! In the end you need to come to an agreement with them, but if your hope is to keep the rights to the game and you feel it is a fair stance (or even if you don't), then state it from the beginning so that you can start negotiations to come to an agreement. Maybe they're okay with that; after all, if they are in desperate need of a project and yours is perfect for the situation, they may be willing to forgo the rights to sell the product in exchange for exclusive rights to develop it, for example.

Most likely you'll need to meet them in the middle, though. I'd say just set up your formal meet, and meet with them. Discuss it, and come to an agreement that you're happy with. And then get it all in writing.

As usual... IANAL (I Am Not A Lawyer)...
> 2 votes

---
Tags: game-design, legal, design-document
---


# Question
Title: What are some common ways to generate revenue from a free game?
When creating a free game what revenue options are there and how successful are they? What are the pros and cons of different revenue models such as ad-supported, freemium, partnerships, merchandising, virtual goods, etc.?

If possible, give specific examples of games using different revenue models and provide data as evidence (otherwise it could get quite subjective).

# Answer
> 12 votes
Monetization heavily depends on the platform, but for the iPhone specifically, freemium (specifically, buying into something that lets you play more effectively) has proven itself to be probably the most viable strategy for games in which it fits.

A few sample points:

* http://gamesfromwithin.com/the-power-of-free \- a blog post talking about revenue in a freemium app, with increased sales even after making the game non-free
* ng:moco has switched all their future games to be freemium, and their shooter Eliminate showed up in the top 100 revenue generating apps despite being free.

Of course, in the iPhone marketplace, monetization of microtransactions is fairly easy since it's all handled through iTunes and most users already have a credit card tied to their iTunes account. I'm sure you'll see similar stories coming from Facebook once there's a unified way of purchasing things on there instead of a bunch of different mechanisms.

As far as ad-supported, there are conflicting reports on that matter.

Here's one that says ads are good: http://www.macrumors.com/2009/05/06/adwhirl-free-ad-supported-iphone-apps-can-very-lucrative/

And here's one that says ads aren't worth it: http://www.macrumors.com/2009/02/20/appstore-secrets-price-drops-usage-and-ad-supported-models/

Of course both of those are before iAd came out.

# Answer
> 6 votes
Don't forget about alternate revenue streams! More often than not, your game's source code is worth quite a bit to fellow developers. The more so the more popular your game is and the harder it is for the average developer to replicate your gameplay or parts of it.

You should license only the source code, and not the assets, to avoid spawning a myriad of look-alike copycats. You may still be afraid of copycats even using their own assets, in that case specify a "non-compete" in your license. But honestly, those who buy the source code either know better than to make a clone or are not experienced enough to keep up with you. It's also a great source of motivation to always stay ahead of the curve (others may see this as stressful though).

Selling one's source code can be quite attractive. I summarized the sales of my Line-Drawing Game Starterkit (not a complete game, but close enough) here: http://www.learn-cocos2d.com/2010/08/starterkit-price-drop-sales-numbers/

Quite easily I made more from selling the source code than I had if I had invested the additional 2-3 months to make it into a complete game that would actually stand a chance of making decent sales on the App Store. Other developers are more likely to value what you do than gamers. And they're definetely more willing to pay. And it changes your relationship with the customers from many angry nerds to few, grateful, like-minded individuals (few exceptions notwithstanding but the trend is obvious).

One notion to get away from: your source code is not a trade secret that makes or breaks your business. It's not something to protect at all costs. For the most part you sell a lot of effort, lots of insights and expertise to developers who like to get a headstart and/or learn from you. There's probably nothing they couldn't do, it would just slow them down / take them a bit longer to get to what you have already achieved. They trade money for convenience. It's a good deal for both sides.

# Answer
> 5 votes
I won't go as far as calling it an emerging revenue model, but recent 'pay what you want' campaigns have been big successes.

A great example is the 'Humble Indie Bundle', hosted by team Wolfire in collaboration with a handful of other indie developers. This model clearly works best if you have a big community following, preferably with many committed fans.

# Answer
> 2 votes
It's worth noting that Flash already has a community that supports games targeted at generating advertising revenue for portals. The idea is to submit your game to http://www.flashgamelicense.com/ for bidding by sponsors.

The developer of Steambirds had some success with that model, as outlined here: http://www.gamasutra.com/view/news/27924/InDepth\_Behind\_Flash\_Game\_SteamBirds\_Revenue\_Deals.php

---
Tags: revenue, monetization
---


# Question
Title: What will AMD Fusion or likewise hybrid CPU/GPU will change for the 3D programmer ? Are they potentially faster?
Since the early days of accelerated graphics, programmers were obligated to use hardware-supported libraries like directX or OpenGL.

If we wanted to explain someone what happened by introducing a graphic chip, the simple thing to say is "we just copy the 3D data into a new memory, where another processor will take care of it, because this one processor is just faster at it".

During this period, the processors have never ceased to evolve in term of speed and power. Today with the upcoming of multiple core processors, x86 is still there, graphic card get more power, and are now taking the role of a CPU with tools like OpenCL and CUDA.

Back in the year, the AGP port speed was quite important, and PCI-express gave another big boost.

I didn't heard a lot about AMD Fusion, but the idea might have come into the mind of any computer engineer: Since the heavy calculations made in a computer are either graphical or not, we separate them into 2 dedicated chips.

But nowadays, any computer power is needed for both, especially in 3D games: to put it simply, at the beginning computer were just dealing with text, but today they all deal with at least 2d graphics, so why not design one chip that would take the role of both a CPU and a GPU ? Instead of having two memory block and having to copy all the textures and models into the graphic memory when a game loads, the "CGPU" would have some GDDR3, instead of having two separate memories, again cutting costs.

I still wonder how this AMD fusion will have to be used from a programmer viewpoint, but I wonder that the graphic library would be somewhat easier to deal with that directX or OpenGL, since we would program just one processor.

Is it right to think that this kind of dedicated hardware would also potentially just be faster for 3D games ?

Pro: Single memory, no more AGP transfers, simple for the 3D programmer, cheaper to build. Cons: Complicated to come with such hardware, long and expensive research because of both new hardware AND software standards.

What are you thinking ? Is it a new incoming step for computers, or just scifi ?

EDIT: Since I got an appropriate answerm I leave the question as I wrote it, I just add something to it:

Since all computers, and especially consoles, require graphics acceleration, and since it requires a lot of transistor, and with the upcoming of tools like CUDA and OpenCL, why no industrial has yet come with a "gaming chip", some sort of processor with an integrated graphic card, but nothing like a low-end chip; something more like an all-in-one processor unit, with the GPU and the CPU on the same die, but still clearly separated ?

Since the playstation 3 has dedicated chips and since games requires that extra power desktops or servers don't, can it reduce costs and give a little boost ?

# Answer
> 7 votes
> Since the heavy calculations made in a computer are either graphical or not, we separate them into 2 dedicated chips.

It's not really because they're graphical or not, it's that there are 2 distinct types of computation, which I shall term 'branching', being heavy on choices, loops, and conditionals, and 'linear' which has few or no conditionals and is a long line of predictable instructions.

Typical computer operation is 'branching', and consists of algorithms require lots of "if this, do that, otherwise do something else". This means a lot of jumping around in different parts of the code based on what data you have. This makes it hard to optimise the hardware since you have to wait until one instruction has finished to know which instruction to handle next.

By contrast, computer graphics are one example of 'linear' code. You have a long block of data and you do exactly the same thing to each piece. Transform each vertex into the new coordinate system, iterate between the vertices for each pixel, perform a predictable number of lighting steps to render each pixel. This procedure is so straightforward by comparison that you know exactly which operations you'll need and in which order, so you can hard-wire that into your hardware. Each piece of data can be processed by one instruction and automatically shunted to the next instruction, while the next piece of data is being shunted in. This means you can have massive amounts of data being processed in parallel, one piece per instruction, whereas a traditional algorithm is performing just 1 instruction at any one time.

Before anybody jumps on me, this is of course a simplification - these days the two types of processing have converged significantly. But, the fundamental fact remains that hardware that supports complex branching code is necessarily slower than hardware that primarily or exclusively supports linear code.

> so why not design one chip that would take the role of both a CPU and a GPU ?

Hopefully the above has explained why a dual-purpose processor is not the optimal route, in terms of performance.

> Instead of having two memory block and having to copy all the textures and models into the graphic memory when a game loads

You are assuming this separate memory is a performance hit. In fact, it's a performance gain. The memory on your video card is essentially a very large high speed cache which allows the GPU to get very quick access to it. Not only that, but it doesn't have to compete with the CPU over that access. If it had to use main memory all the time, you'd not have that initial cost of uploading but every access would be slower, and it would have to be carefully coordinated with the rest of the system to ensure it isn't reading memory that another process is trying to write.

> What are you thinking ? Is it a new incoming step for computers, or just scifi ?

In future, when computers are so fast that top graphics are not a significant performance problem, it may well be better to have it all on one chip, for ease of development. Until then, I think we're going to be sticking with the different approaches, except for low end systems.

# Answer
> 7 votes
AMD Fusion is the next logical step in onboard graphics; the first step was of course "why don't we take the video card, and stamp it onto the motherboard instead!" - of course, greatly reducing the power in the process. Now they're thinking "why don't we take that onboard graphics chip, and built it into the processor". It will be low-powered, just like onboard graphics. But at the same time, integrated graphics chips have come a long way; today's integrated graphics chips can play World of Warcraft smoothly at a decent resolution, for example. I get the feeling that discrete (video card) graphics chips will remain faster than these integrated solutions (whether motherboard integrated or CPU integrated), mainly since they can be separately cooled so there isn't as strict of a constraint on the power.

**From a programming standpoint, the libraries and methods will not change. DirectX and OpenGL will still be the two standard low-level libraries.**

Regardless of how the architecture is, you still need to take some 3D data and draw it to the screen. OpenGL doesn't have a "copy some data into graphics memory" operation, it has "draw this buffer" or "draw this array". The copying is all implied and handled by the library. So in your case, if the whole system memory is GDDR and no copying is necessary, then the OpenGL driver for the chip will not copy and just draw the buffer; that's perfectly fine, and it doesn't change our programming methods at all.

For a long time now there has been an abstraction layer between CPU and graphics. Long gone are the days when we, as programmers, literally copied memory from one area to another in order to see it on the screen. So now as GPU and CPU merge, we won't have to change a thing. The hardware guys can worry about the merge, and we programmers can keep on moving forward with development.

---
Tags: graphics, 3d, software-engineering, graphics-programming, gpu
---


title: 2D AABB collision response

text:
# Question
Title: 2D AABB collision response
I'm making a simple platformer, and I wanted simple collision handling. So I gave all my objects an AABB hitbox and tried to resolve collisions. However, I can't get it to work.

My main character has a 32x32 hitbox and my walls have a 16x16 hitbox. I've used the separating axes solution to resolve the collision, like so (unoptimized):

```
Vec2 Box::Collides(Box* a_Other)
{
    Vec2 sum_extents;
    sum_extents.x = (m_Max.x - m_Min.x) + (a_Other->GetMax().x - a_Other->GetMin().x);
    sum_extents.y = (m_Max.y - m_Min.y) + (a_Other->GetMax().y - a_Other->GetMin().y);

    Vec2 double_center_to_center;
    double_center_to_center.x = (a_Other->GetMin().x + a_Other->GetMax().x) - (m_Min.x + m_Max.x);
    double_center_to_center.y = (a_Other->GetMin().y + a_Other->GetMax().y) - (m_Min.y + m_Max.y);

    bool result = (fabsf(double_center_to_center.x) < sum_extents.x) && (fabsf(double_center_to_center.y) < sum_extents.y);

    if (result)
    {
        return (
            Vec2(
                ((sum_extents).x - (double_center_to_center).x) / 2.f,
                ((sum_extents).y - (double_center_to_center).y) / 2.f
            )
        );
    }

    return (Vec2(0.f, 0.f));
}

```

My character just falls down onto the floor. I check the object I want to check against every other object and just see which one has the smallest intersection area.

```
Object* Scene::Collides(Object* a_Test, Vec2& a_Difference)
{
    float smallest_area = 10000.f;
    Object* closest = NULL;
    Vec2 final;

    std::vector<Vec2> check;

    for (uint32 i = 0; i < s_ObjectTotal; i++)
    {
        if (a_Test == s_Objects[i]) { continue; }

        Vec2 test = a_Test->GetCollision()->Collides(s_Objects[i]->GetCollision());
        float area = test.x * test.y;
        if (area > 0.f)
        {
            check.push_back(test);

            if (area < smallest_area)
            {
                smallest_area = area;
                final = test;
                closest = s_Objects[i];
            }
        }
    }

    if (closest)
    {
        a_Difference = final;
    }

    return closest;
}

```

The hitbox for the player is `(32, 229.999995)(64, 261.999994)` and the hitbox for the floor is `(48, 256)(64, 272)`. So, the resulting movement (to resolve the collision) is `(16, 5.9999930)`. The y is correct, the x is not. As a result, the player character hits the floor, stays above it and slides to the right very fast.

How do I resolve this collision?

# Answer
> 5 votes
This is how I solved it.

I already knew *when* it collides. There is lots of stuff on the interwebz about the separating axis theorem. Google that and you're halfway there.

Now the hard part: resolving the collision. After a good hard discussion with a teacher, we came up with the following. A collision can be resolved in four ways:

* Box A moves left to resolve collision with Box B
* Box A moves right to resolve collision with Box B
* Box A moves up to resolve collision with Box B
* Box A moves down to resolve collision with Box B

And if you take the diagonals of Box B and determine on which side of the line the other box's center is... tadaa! It still has a tiny problem though: even though logic says it should resolve a collision from the bottom, it wants to resolve it to the right. I don't know what's up with that.

```
uint8 Box::Resolve(Box* a_Other)
{
    Vec2 diff, perp;

    diff = m_Pivot - a_Other->m_Pivot;

    perp.x = -a_Other->m_Min.y + a_Other->m_Pivot.y;
    perp.y = a_Other->m_Min.x - a_Other->m_Pivot.x;
    float d1 = perp.GetDotProduct(diff);

    perp.x = -a_Other->m_Min.y + a_Other->m_Pivot.y;
    perp.y = a_Other->m_Max.x - a_Other->m_Pivot.x;
    float d2 = perp.GetDotProduct(diff);

    // left
    if (d1 < 0 && d2 < 0)
    {
        m_Pos.x = a_Other->m_Min.x - (m_HalfHeight * 2);
        Compute();

        return BOX_LEFT;
    }
    // right
    if (d1 > 0 && d2 > 0)
    {
        m_Pos.x = a_Other->m_Max.x;
        Compute();

        return BOX_RIGHT;
    }
    // down (and right?!)
    if (d1 < 0 && d2 > 0)
    {
        m_Pos.x = a_Other->m_Max.x;
        Compute();

        return BOX_RIGHT;
    }
    // up
    if (d1 > 0 && d2 < 0)
    {
        m_Pos.y = a_Other->m_Min.y - (m_HalfHeight * 2);
        Compute();

        return BOX_UP;
    }

    return BOX_NONE;
}

```

# Answer
> 1 votes
I'm not sure about your Scene collision. But it looks to me like your box collision has a problem. I've seen this mistake before; it looks to me like you're finding the centers of the boxes, and calculating distance between the centers. That's not box collision; that's sphere collision. Think about it for a moment.

Honestly your algorithm is entirely unclear to me, when AABB collision is pretty simple (especially in 2 dimensions, which is essentially AAS (Axis-Aligned Square) collision).

You can use the process of elimination:

* Let's say box A is to the left of box B. Then if the right side of A is left of the left side of box B, there can be no collision.
* Now suppose box A is to the right of box B. If the right side of B is left of the left side of A, there can be no collision.
* If neither of the above two cases were true, then the boxes are overlapping in some way **in this dimension**.
* Now do the same in the Y dimension (the two steps, but with above/below). If neither of the Y dimension cases were true, the boxes overlap in some way in the Y dimension.
* So if the boxes overlap in the X dimension **and** and in the Y dimension, then they overlap. Otherwise, if they overlap in only one dimension, then they are just above/below each other, or left/right of each other, but not touching.

---

So your algorithm should look something like this:

```
Vec2 Box::Collides(Box* a_Other)
{
    final Vec2 nullResult(0.0f, 0.0f);

    float xOverlap = 0.0f, yOverlap = 0.0f;

    /* test the X direction */
    if(m_Max.x < a_Other->GetMin().x || a_Other->GetMax().x < m_Min.x) {
        return nullResult;
    } else {
        // get center X's of this and other box
        float thisCenterX = (m_Min.x + m_Max.x) / 2.0f;
        float otherCenterX = (a_Other->GetMin().x + a_Other->GetMax().x) / 2.0f;

        if(thisCenterX < otherCenterX) {
            xOverlap = m_Max.x - a_Other->GetMin().x;
        } else {
            xOverlap = a_Other->GetMax().x - m_Min.x;
        }
    }

    /* test the Y direction */
    // (repeat the above but with Y instead of X)

    // if necessary, do the same in the Z direction

    return Vec2(xOverlap, yOverlap);
}

```

# Answer
> 0 votes
In my opinion, you should move your player only by smaller part of the result movement. In this case (5.9..)

# Answer
> 0 votes
The problem with your solution (I think) is that you're resolving the axes independently in the case of a collision; even though the boxes are only touching in the Y, they are overlapping in the X so this algorithm is going to try to push them apart in that axis as well. I'm not sure if there's an "easy" solution to this problem and suspect that the most straight forward way to deal with it would be to split your collision detection into four "modes," which is bottom, left, right, and top collision with the player. Actually, Kaemon's answer would do this, sort of, since it'll only move along the axis that is least-penetrating.

The problem with general collision resolution is that it requires a lot more state than you're passing in. What direction are the bodies moving relative to one another? If you know that, then you can figure out what direction to push them away from one another when a collision is triggered. You could also resolve the corners against the other box's faces, which would allow you to spin the box if you wanted to (e.g. one corner is overlapping so it stops while the other corner keeps moving) (although if you want to keep things simple this would be undesirable).

The easiest way to *detect* collision in AA bodies is something like this:

```
for axis in [x, y, etc...]:
   if (body1.axis.min > body2.axis.max) or (body1.axis.max < body2.axis.min):
      # can't possibly be colliding
      return false

   # must be colliding if we got here
   return true

```

However, this only tells you *that* the bodies are colliding, not what to do. Again, the decision about what to do requires more information.

---
Tags: 2d, c++, physics, bounding-boxes
---


# Question
Title: When learning, nothing is better than practice
A little introduction:

I'm 25, and going to this private french school, CreaJeux, which begins in october. I will be learning mostly game programming, something I wanted to do a long time ago, since the day I wondered how were 3d graphics working on my playstation, when I was 14 or so.

I'm very eager and impatient to begin, and I can't think on anything else (I'm bored), I feel like I'm wasting my time doing nothing, and I wanted to just practice on something during my spare-time, whatever it is.

I'm not a beginner in C/C++, I know how to program, but I didn't make a lot of stuff excepy a little tetris-like with pygame: I just want to make something in 3D, even if it awful and plain ugly, non-accelerated or whatever.

Isn't there anything else than open source 3D engines like irrlicht, panda3d or ogre3d to start something ? Isn't there some game dedicated to modding or dedicated to educate begginners ? Or some projects or practices for begginners like me ? Even simple and ugly 3D seems hard to come by...

# Answer
I guess it really depends on what exactly your goal is. Are you trying to do a quick little game before you get to school? or are you interested in really learning how to make games and become a "game programmer"? If it's the former, then definitely check out some of the popular free/open source engines, but remember that some of them (like Ogre3d) are actually just rendering engines, and will help you get things on the screen, but won't help you do a whole lot else. These rendering engines provide a whole bunch of more advanced rendering features that a small "learning project" doesn't really need, but they add substantial complexity because of it.

As an example, if you're just trying to learn the basics of 3d game programming you're probably going to be less interested in a having a robust material/shader system than you are having basic collision detection and response.

If you are more interested in becoming a game programmer and becoming good at it, I would recommend not using any of the popular engines and instead start writing your own. It's going to be slow, ugly, and probably just plain bad (mine was), but you'll learn an immense amount. Go download some samples for your graphics API of choice, read some tutorials, and start with the basics. Get one object on screen, then multiple objects, then try and get them to collide with each other. Add layers of abstraction, add features, rinse and repeat. You'll learn something with every iteration and you'll accumulate far more knowledge than if you let someone else do the hard bits for you. You'll also get a ton of great code samples and demo pieces to show potential employers (if you choose to go that route).

As the title of your question says, "nothing is better than practice".
> 2 votes

# Answer
I recommend you grab Blender and the free version of Unity. Blender will let you make 3D models (ugly or pretty) and Unity is a great development environment for simple 3D. It isn't entirely beginner-friendly, but there are a bunch of great tutorials out there, and with some initiative you should be able to get started building stuff.

Alternately, you could try making levels for a game like Half-Life 2, which has a well-developed modding community. If that seems too intimidating, you could start playing with a game like Minecraft, which is partly designed around building simple 3D environments.
> 2 votes

# Answer
For modding: look up an editor and try out a few and see what they can do. Here is a good site to get you started, it has tutorials, editors list, a good community that would give you feedback on your work: http://www.moddb.com/

For 3D programming: start with a graphics API (OpenGL or DirectX) whatever you fancy. Personally i recommend OpenGL along with this book that will take you through the basics to advance graphics.

If you want to become a game programmer then you should reconsider your position on Ogre3D/Irrlicht or any other engines alike. Sure making a game is easier with some tools, however making good, original games comes from hard-work, strong organization skills and discipline. I'm not trying to pull you down or insinuate that game programming is a monstrous horrendous task that you can't master, just want to underline that it isn't the sum of a few clicks.
> 0 votes

# Answer
I'm not quite sure what you're looking for. If you want to master the 3d aspect but are comfortable with C++ you could take any DirectX SDK sample and start modifying it until it becomes something game-like. Set targets and set out to implement them. Take a sample that loads and shows a model, take a sample that reads the joypad and combine them so you can move the model around. Add in animation, sound, see if you can come up with some challenge and you have a first game.
If you want to delve more in the game-dev aspect and don't want to be bothered with 3D coding you could consider looking into Source engine mods.
If you want to look into more isolated aspects of game dev, hmmm, then I guess you'd have to research subtopics and use an existing environment. Unity might work, it's not C++, but the concept translate well.
> 0 votes

---
Tags: c++, 3d, python, ogre
---


# Question
Title: importing 3ds max ( .max) file into blender
I got couple of 2 .max files that were created on 2008 version of 3ds Max. The files are really very simple 3d models of room and furniture item.

I am using blender 2.53 beta.

I have 3ds Max 2011 version. Using this version I exported the model to Autodesk Collada (.dae file) and also to .OBJ files but neither work with blender 2.53. In blender I can import the files but most details are gone and wall edges look like annoying zig zag pattern and look worse than a silly cartoon.

Even tried exporting to old .3ds format but that gives more problems.

I looked at 3ds max collada plugin : http://update.multiverse.net/wiki/in...COLLADA\_Plugin but it is not compatible with 3ds Max 2011 version.

So I am confused what to do as I am new to blender and 3d. What is the best way to export from 3ds max when opening exisitng 3ds max 2008 version models and importing to blender 2.53?

The models have simple lights and no animation is involved.

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

---
Tags: collada, blender
---


# Question
Title: Why do we use physics engines for collision testing or raycasting?
There is a thing I don't understand about game engines: why it is so common to use physics engines to do raycasting or collision testing?

Say that you have a 3D scene loaded in your scene manager (Ogre or whatever) and you have to do some raycasting. Is it really efficient to load all your objects in the physical or collision world just to test them for intersection? Why do game engines don't implement the same structures so you don't need to load a physics engine? This sounds like a waste of resources, especially if you don't need physics.

# Answer
> Is it really efficient to load all your objects in the physical or collision world just to test them for intersection?

Yes it is efficient... **for the programmer**. There are lots of physics engines around and it's far easier to just use one - than to strip one down, or implement raycasting yourself.

Talking about code (in fairly rough terms):

You've got the code to create physics objects (you're not going to coldet/raycast against fully triangulated models, are you?) in a data structure that is efficient for doing coldet/raycast (you're not going to bruteforce it, are you?). And then some wasted code for various physical properties (and depending on the physics engine you can probably avoid much of this). Plus the CPU and memory requirements for the same (relatively small).

Then you've got the raycasting code. You need that in any case.

And finally the rest of the physics simulation code - which just sits in its binaries, never executed, never loaded to cache. Code doesn't take up much space anyway.

So **the "wastage" here is utterly minuscule**. Especially compared to the massive effort involved in replacing or stripping down half a physics engine.
> 7 votes

# Answer
(Rigid-body) Physics is collision testing, raycasting, and response. There's no magic pixie dust that changes that combination into "physics engine" - if you need collision testing and raycasting, you need some kind of physics engine, whether you use an existing one or roll your own.
> 6 votes

# Answer
Raycasting and collision detection is a smaller subset of a physics engine. Therefore most people use physics engines for this task and they generally have a good implementation of these functions.

You can use the the collisions detection and raycasting features of a physics engine without using the Rigid Body dynamics part. For example Bullet has a btCollisionWorld class that just does the basic collision and raycasting. btDynamicsWorld is built on top of that.

ODE (another popular but older physics engine) uses OPCODE (downloadable as a separate library) for its collision and raycasting.
> 1 votes

---
Tags: collision-detection, performance, raycasting, physics-engine, efficiency
---


# Question
Title: What technical questions do you need to be prepared to answer before presenting an idea to venture capitalists?
A friend and I are planning on pitching an idea to venture capitalists in a few weeks at SIEGE 2010. He is handling the business plan side of things and all those related questions so I only need technical questions here. What types of things should I be prepared to answer about our project?

For reference its an economic game for mobile platforms(targeting android to start with).

EDIT-CLARIFICATION: I am aware that they may be more interested in non-technical questions, but my friend is handling that end. I am mainly concerned with technical questions as he should be able to field most of the rest.

# Answer
> 5 votes
If you are going to be implementing the idea then they will have the most questions about staying on schedule; involving things like **estimates of development time** and of **milestones** or **prototypes**, **test plans** and the equipment (**test devices**) you'll need to develop the app, and other technical resources you might need (if you need to **purchase any development software or libraries**). Also you might be fielding some questions regarding staff members; for example, do you think you can develop the app yourself or will you need to **hire some team members** for graphics, programming, testing, etc.

If they are smart they will also be looking to the **future**; how will you ensure the app can run on future Android devices or even take advantage of new **features that are yet to come**? And how much **maintenance** will the app require? How often will it **update**? (updates are a great thing, they help remind users that the app is installed and I think they might bump your app to the top of the new list in the Market, though I'm not sure).

# Answer
> 8 votes
VC's are rarely technical. The want to know you have the people in place to get the job done, but outside of that their concerns are more financial. They want to know:

**People**

* Who is involved in this venture?
* What's their track record of success?
* Have these people shipped products before? Shipped them together?
* Do you need to hire more staff?
* How do you plan on attracting qualified additional staff?
* Are you depending on anyone else (Outsourcing/Middleware) to finish the job?

**Market**

* How competitive is the market?
* Is the market growing/shrinking?
* What makes you stand out in this market?
* How can you leverage your work into other markets?
* What's the average sales for titles in your market?
* What are typical dev costs in your market?

**Return**

* How long till the company starts to see revenue?
* What's your exit strategy? (a.k.a.) How do they make a 10x profit on money invested?

# Answer
> 3 votes
My first question as a VC would be, why are you targeting Android when it seems pretty clear that the ROI is much better at the present time on iOS? Once you make your money back on iOS you can port to Android, but it seems like a weak platform to lead on.

note: I own an Android device and detest the iOS devices. This is not meant to endorse one or the other but rather to ask a question that the OP will likely encounter.

# Answer
> 3 votes
My questions as a VC to a technical person would be:

* Who are you? What are your credentials?
* What is your educational background, how many years of experience do you have as a programmer?
* Show me two successful games/apps you have published or have participated in on the Android Market. What was your role in them?
* What other major projects have you participated in or have accomplished in the past?
* Do you develop for other platforms other than Android?
* We receive alot of demos from all the other presenters who come to us, now show me yours.

# Answer
> 3 votes
In addition to the factors above I can think of 2 questions I would expect to be able to answer. Remember, VCs care most about the possible financial windfall on large-scale success so expect to be able to answer:

* How would your game/technology work if scaled to hundreds of thousands of players? For instance if your game has some sort of multiplayer component they would be concerned that your design may not scale above 10000 customers, which would not make it worth it to most VCs, who are looking for potentially big wins.
* Can your technology become a "platform" for other types of experiences? VCs like platforms that can be the basis of a variety of experiences as opposed to just a single implemented game with no room for branching out.

---
Tags: fund-raising, venture-capitalist
---


# Question
Title: A good place to learn about Game Programming with Mathematical Vectors?
I am looking for a place in the web where I can turn my current game development process into a vector based approach. I am sorry If this question has been asked once.

According to my google search analysis, few places I've found pretty interesting are Tony Pa's tutorials and Metanet. But, due to limited explanations, I found it little bit tough to implement. I could try out the same examples as provided there, but when I have to use it in my games, I am STUCK. I want to know about the dot products and cross product stuff, Its uses and detecting collisions and predicting collisions with these mathematical techniques.

Please, write down some links and a brief description of the link. Thank you

# Answer
Here you go: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/

This is the first entry in a series of (4) blog posts about linear algebra pertaining to game development. It'll explain about dot products, cross products and transformations using matrices.
> 8 votes

# Answer
This is not a pure web site, but you can view some of the contents of Mathematics for 3D Game Programming & Computer Graphics at Google Books here: Mathematics for 3D Game Programming & Computer Graphics.

This is a very good book and well worth purchasing if you don't find a website to suit your needs.
> 1 votes

---
Tags: physics, mathematics, game-mechanics
---


# Question
Title: What are the technologies that makes physics engines so good for raycasting?
again. This question is strictly related to this one so, what is the technology that makes physics engines suitable for raycasting? It is a particular data structure? Has it to do with the engine's internal representation of the objects? If so, how do they represent objects so to be able to make polygon-precise raycasting? Do they hold the whole information about a mesh?

# Answer
> 8 votes
Good physics engines:

* Use algorithms and data structures with good theoretical ("big-O") properties.
* Use specific memory allocators and data layouts for improved cache efficiency.
* Use microoptimized code, that not just has good big-O runtime but is also known to generate efficient code on real compilers / machines (e.g. SIMD and specialized instructions like fsel).
* Use a variety of good spatial subdivision techniques (octrees, BSP trees, spatial hashes).
* Use different levels of checks of various costs (e.g. first AABB, then tri-tri).

# Answer
> 2 votes
I don't think there are specific technologies that are *exlusive* to physics engines which makes them so good for Ray Casting. It's more the fact that in general they have very good ray casting capabilities because that's what they use to determine collisions between objects in the simulation. These have generally been optimised and tested pretty well as they're a fundamental component to a physics simulation.

Why re-invent the wheel if you can leverage existing, fast and well tested libraries?

---
Tags: collision-detection, performance, physics-engine, raycasting, data-structure
---


# Question
Title: iPhone app activated before associated in-app-purchase activated?
I recently submitted my iPhone game for review. I also approved the in-app-purchase for my game (and provided the in-app-purchase screenshot). It's a few days later and the app status has been updated from "waiting for review" to "in review"... while the in-app-purchase status is still "waiting for review". **Could the app go live in the store before the in-app-purchase?** If so what happens when the user tries to make the in-app-purchase? Anything the developer can do to remedy this?

# Answer
Yes, the app can go live without the in-app purchase being activated. To prevent this, you need to delay your app's release by setting the release date to some future date. Most iPhone devs will delay the release anyway so they can time press coverage, etc better. One bonus: you can give out promo codes to review sites between app approval and the release date.
> 3 votes

# Answer
You can set a specific release date later to ensure that it is not released without the in-app-purchase content.
> 3 votes

# Answer
You have probably noticed by now, but I thought I would add that you can now choose when you submit your app to:

* Release app into the app store as soon as it is approved.
* Ask from developer approval for release once it has been approved by Apple.

This means you don't have to play guessing games about when your app is going to be approved. Just set the flag and release when you are ready.
> 1 votes

---
Tags: iphone
---


# Question
Title: Is it worthwhile recording your own or buying stock sound effects?
A unique graphical aesthetic is obviously important when developing a game. I wonder if the same is true for audio? Is it worth investing my time in recording, producing my own sounds or should I just buy stock effects?

# Answer
> 22 votes
I like to follow this rule of thumb:

1. **Use off-the shelf components wherever possible.**
2. **Replace them with unique elements as necessary!**

We've recently used a lot of stock music from IB Audio, and stock effects from Sound Ideas and Sound Dogs.

* **Music:** Places like IB Audio are nice, because they provide solid music at prices far below what we'd pay to have pieces created for us.
* **SFX Collections:** CD/DVD effects collections such as Sound Ideas' are great, because we have access to the same, quality, royalty-free libraries that the big Hollywood studios use.
* **Individual Effects:** We use Sound Dogs because they provide a la carte effects, which means that when we've needed a single sample of cheering spectators, we had it.

This gives us the ability to focus on dev elements such as gameplay and concept testing. And, when we want to create something unique, such as a theme song or a sound effect of a space toilet being flushed into another space toilet, we can do that too.

# Answer
> 9 votes
If you have any kind of budget to spend on your game, you can probably just buy them in. A sound effect from a website like http://www.soundrangers.com costs about $5 to license. You'll need maybe 50 in your game? That's $250. 50 sounds would probably take at least 2 days to record, and you might not end up with the best quality if you're new to it. If 2 days of your time is worth more than $250, buy them in.

# Answer
> 3 votes
I think you really need both.

For example, it's quite easy to generate a ship engine's rumble using a white-noise generator and applying a low-pass filter to this. However, you may find it difficult to get out and record the sound of trains going over tracks, so a stock sample my be more useful in that instance.

Of course, learning how to post-process sounds is very important so you can tweak stock sounds for your own use. As another example, I created the sound effect for one of the bad guys (the Feedback Monster) in Jeff Minter's Space Giraffe. This effect ended up being a combination of a stock recording of some thunder, but then it was processed and I added several samples of guitar feedback that I recorded with my collection of guitars and amps. Along with various EQs, delays and reverbs, etc.

# Answer
> 2 votes
When it comes to music I'd also recommend Jamendo: They have their artist sign that they're not part of a collection society, so there's no second party you have to pay.

Of course a lot depends on the game you're making. For And Yet It Moves, all sounds were created by hand. I'd also recommend SoundSnap for good quality sounds.

Maybe the most important step is to learn what it is that you need for your game and develop an ear for game audio.

# Answer
> 1 votes
I have a MIDI keyboard with hundreds of sounds effects that I can use as I wish - or at least that is way I understand the terms of usage for it - so if you already have a source for effects and know how to make your sound files, save the money. However, if you aren't setup for that (my keyboard was about $200) then buying sound effects packs is a quick and easy way to go. I use the Torque game engine and there is some very cool sound packs available for Torque, buy YMMV depending on development tools.

---
Tags: sound
---


# Question
Title: Import from mesh vs hardcoded vertices performance
Which brings better performance at run-time: a cube imported from a mesh, or a cube made from hardcoded vertices?

Are there limitations to a certain method? Is one of them better architectural-wise?

# Answer
> 18 votes
Once it's in memory, verts are verts.

# Answer
> 4 votes
If by hardcoded vertices, you mean glBegin ... glEnd (OpenGL), or Draw(Indexed)PrimitiveUP (Direct3D), these methods are inferior because they result in the vertices being transferred from system memory to the graphics card every time they're called.

If, however, you're putting your vertices into a vertex buffer like you should be, it really doesn't matter. If your cube is logically an art asset, like the Horadric Cube, or the Weighted Companion Cube, it should probably be stored as a model on disk. If your cube is, on the other hand, intended to be used for skybox rendering, and therefore immutable, hard-coding it is probably fine.

# Answer
> 1 votes
When it comes down to raw speed, a hard-coded set of vertices (and indices) embedded in the application's data region will be faster; this is because you avoid the cost of loading the mesh from disk. For simple applications, such as rendering a triangle or a cube on the screen, this approach is fine. In practice however, geometry and other resources such as textures are typically loaded from some resource file on disk into memory. This approach is beneficial for many reasons, but two major reasons are: loading and unloading resources at will and decoupling the application from its resources.

# Answer
> 1 votes
Depends. If we're talking something as simple as a cube, you're going to want to hardcode it. The loading time for all 8 vertices is not worth it. Same can be said for any simple geometric shape; just make a CreateSphereMesh, CreateCubeMesh, etc. set of functions.

However, have fun making an OVER 9000 vertex model by specifying the individual vertices. And tweaking. Oh, and animating. That's when it's much better to have it as a model format.

---
Tags: 3d, performance, 3d-meshes
---


# Question
Title: Can someone provide a simple algorithm for calculating an outcome based on User characteristics?
In these online games, say you are a person who has characteristics like:

1. level
2. strength
3. experience
4. defense ...

And now you walk into a room of 'others' that you want to e.g. recruit, how would you go about calculating this users ability to recruit?

Or any other common action in a online web game like a battle, or looking for items in the grass, or looking for food etc.

i.e. the ability or chances for success depend on the user's characteristics, **and they get progressively harder as the user level ups etc.**

# Answer
> 2 votes
This is a confusing, vague question but I'll give it a shot

First thing to consider is whether you want success chance to vary with or inversely too your factor for consideration(level, experience, defense, whatever)

your fomula can be a fraction with things that you want to improve your chances in the numerator and things you want to decrease your chances in the denomenator(this can just be 1 if nothing decreases your chances)

Suppose we wnat your chance to recruit someone to go down with your level(so it gets more difficult) but to go up with your strength. Our basic formula so far might look something like chance = strength/level

This would be a linear function. Depending on how you want things to scale you may want a different type of function. If you have a theoretical maximum you could for instance use a logarithmic function to taper off towards some value

chance = ln(strength/level)

With this you get diminishing returns.

You also may not want throw in multiplicative factors or additive constants to tweak the data if it doesn't feel right with how you want to progress.

chance = m * ln(strength/level) + k

Finally since this is a percent chance you may want to try and normalize it and convert into a percent. For this we divide by your best possible values for chance and multiply by 100

chance = 100 * (m * ln(strength/level) + k)/(m * ln(MAX\_STRENGTH/MIN\_LEVEL) + k)

I hope this helps.

---
Tags: game-design, mathematics, simulations
---


# Question
Title: Your recommendation for path construction from a single background image?
So I currently have my background as a single PNG and some obstacles (like blocks as part of that PNG). In order to create a path, I currently store pixels above a unique green color (my hill) and use this to move the character. My question is, is it better to create something like a collision layer mask or somehow convert my PNG to a bunch of tiles? Is this possible?

# Answer
> 5 votes
Two programs you should at least take a look at are **Mappy** and **Tiled**. A library for XNA integration with Tiled called **TiledLib** has been developed and could be of some use, if only to take a look at for ideas.

# Answer
> 6 votes
Yes, it is strongly suggested that you move to a data driven map, with layers and tiles. It will make your life easier, your maps will be editable in other tools(like map editors). You could even think of randomly generating maps and much much more!

Happy coding!

# Answer
> 2 votes
In Stendhal we use several layers of a map: ground, floor, objects, roof, roof\_2. This way it is easy to create new maps based on images already created. We use two additional layers that only contain a green or red square called collision and protections.

You may get some ideas from our map tutorial. The map editor "Tiled" is from http://www.mapeditor.org/

---
Tags: 2d, collision-detection
---


# Question
Title: How difficult is it to implement 3D models in a 2D game?
Creating a full blown 3D game requires a lot more math for physics, but what if I just want to mix 3D models in a 2D game, such as in the New Super Mario Brothers? Would I be able to get the looks of 3D models with the ease of making a 2D game?

# Answer
> 6 votes
Given that most "2D" games are still in 3D engines, just using camera-aligned quads and an orthographic camera, not hard at all.

Simply replace your standard quad with animated materials with an actual model that animates and keep your logic the same.

# Answer
> 2 votes
Here's a tool that does just that - takes 3d models and turns them into sprite sheets, including rendering all the sprites for the animations:

http://www.envygames.com/content/?page\_id=65

reasonably priced too!

(caveat: I haven't personally used this tool, just read the review at: http://www.torquepowered.com/community/blog/view/16207/2 )

# Answer
> 0 votes
It's not uncommon to have tools that will take your 3D models and render them out for your game. Many studios and indie devs write up their own tools to do it and makes generating the graphics super easy. It's also nice to be able to go in make a change to your model and then just hit a button in your tool to quickly re-render all the raster graphics.

---
Tags: 2d, 3d
---


# Question
Title: How to think about 2D scaling/rotation transformations
This is a kind of embarassing question to me since I'm getting more in-depth with XNA but some times my way of thinking about things in my head contradicts an example and I need to re-think it to make it work.

So let's say I am just working with a sprite that is 10 wide and 10 high.

Scaling:

When I apply a scaling matrix, am I just shifting the points back or scaling the X-axis and Y-axis in the LOCAL coordinate space of that sprite? I ask because on this page:

http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2D/Coll\_Detection\_Matrices.php

and

http://www.riemers.net/eng/ExtraReading/matrices\_geometrical.php

It shows the X and Y of the local axis the sprite is in being scaled down. So in my head, I think that a scaling means that you scale down the local axis space where the sprite is located which makes it smaller.

Rotation:

When I do a rotation matrix, am I rotating the local x and y axis of the sprite around the world origin or rather do I think about it as rotating the local coordinate space entirely around the world origin?

Translation:

This to me is just moving that scaled image with those smaller x and y axis to some other point in the world.

# Answer
For me, the easiest way to think about this is to remember that each coordinate space can be expressed in world coordinates by a vector from the world origin to the local origin which I just call the position vector and two (in 2D or three in 3D) basis vectors. Any translation moves only the head of the position vector (the tail is always anchored at the world origin). Rotation and scaling can affect all three (or four) vectors depending on the specific rotation or scale as well as the order you have applied transformations already.

This, along with my knowledge that these transforms don't change the object in local space (a point at (1,0,0) is always at (1,0,0) in local space, no matter what the basis vectors are in world space), only its appearance in world space, allow me to visualize these transforms with relative ease.

In essence you are thinking the right thing, but you must be aware that these transforms don't actually affect the local coordinate space of an object, only its mapping into world space.

For example:

I have a an object defined by {(0,0), (1,0), (1,1), (0,1)} in local space. The Position vector is (0,0), and the basis vectors are (1,0) and (0,1). In other words, my transform matrix is just an identity matrix and the object looks like a square with bottom left corner at the origin both in the world view and in a local view.

If I were to apply a translation, say by the vector (2,3), only the position vector changes. My object is still defined as {(0,0), (1,0), (1,1), (0,1)} in local space, but the object in world space has been moved up and over. The object still looks like a square in both views however.

If I were to then apply a scale, say by (1/2, 1/3), the position vector would be changed to (1,1) and the basis vectors would be changed to (1/2, 0) and (0,1/3). Note that my object is STILL defined as {(0,0), (1,0), (1,1), (0,1)} in local space, but if I view it in world space it is a rectangle that has been shifted up and to the right, not a square with bottom left corner at the origin as it is defined in local space.

Rotations are very similar, but the changes in the basis vectors are not as easy to calculate in my head so I shall do a very simple example with a 45 degree rotation counter clockwise around the origin. The position vector would be changed to (0,sqrt(2)), while the basis vectors would be changed to ~(-0.35, 0.35) and ~(0.24,0.24). The object would now be a slanted diamond moved up in world space.
> 6 votes

# Answer
Think of it as rotating an entire coordinate system from one basis to another. That matrix can take any tuple in (R,R) and it would have a point in the new coordinate system.

If I have a rotation matrix like this:

```

   0 -1
   1  0

```

I pass vectors from my starting space, and they get turned into vectors in the finishing space. this include the axes \[1,0\] and \[0,1\] which get turned into \[0,1\], and \[-1,0\] (i.e. it gets rotated counter-clockwise 90 degrees.

You may have noticed that the rotated axes are the columns of the matrix. In fact, the columns of a matrix represent the axes of whatever coordinate system you're transforming your numbers into *by definition*. That's because a coordinate system is just a way of representing a point in space in terms of its projection onto a bunch of independent vectors (blah blah).

Hope this helps.
> 2 votes

---
Tags: 2d, mathematics
---


# Question
Title: Make CharacterControllers in Unity not collide with each other
I'm trying to spawn a number of CharacterControllers and have them move around an area, but they keep getting stuck on each other. Is there a way to make them pass through each other while still respecting the terrain's obstructions?

# Answer
> 2 votes
Your best bet is to probably use rigidbodys and capsule colliders (a script to get them to behave similar to a character controller can be found here) and then use `Physics.IgnoreCollision` to get them to pass through each other.

---
Tags: unity
---


# Question
Title: what should the size of a flash game in Facebook be
I'm developing a flash game and i want to put it in Facebook ,My question is the Proper maximum size for it. 500 KB 1 MB ??

# Answer
I'm taking you to mean .swf size, for loading vs presentation?

I found this link finding the average sizes for flash files. Most seem to be 1MB-5MB. As long as you have a decent loading screen that keeps people attracted, and it's not too much of a wait, then it'll be fine.

On Facebook, everyone's bored. :P
> 4 votes

---
Tags: game-design, flash, server, facebook
---


# Question
Title: Is frustum culling necessary in a Flash/AS3 game?
I'm making a 2D game where the map will be scrolled frequently, and only a small part of it will be visible at any time.

Which implementation would run faster?

* **The naive way:** Make the map a single huge MovieClip and move it around.
* **The elegant way:** Split the map into
multiple chunks and use a frustum
culling algorithm to render only the ones that are visible.

Now that I think of it, this question boils down to whether Flash does its own frustum culling on big MovieClips.

# Answer
> 6 votes
Flash is actually pretty good at handling "frustum culling". You should use the `scrollRect` property for this: http://help.adobe.com/en\_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayObject.html#scrollRect

If you plan to use a Image for your world map, you should be aware of the Bitmap-size limitations of the Flash player. If you target player 9, the limits are 2880x2880 pixels. Player 10 and up can handle images with a pixel sum of max. 4095^2 pixels (see: http://kb2.adobe.com/cps/496/cpsid\_49662.html).

If you think your map might exceed these limits, I think it would be a good idea to implement some tiling on your own.

**Update:** Here's an article that explains `scrollRect` a bit better: http://www.gskinner.com/blog/archives/2006/11/understanding\_d.html

# Answer
> 2 votes
Spend time implementing culling now. You'll be happy you did.

Should you choose not to, at least avoid making it a MovieClip as there's no technical reason it shouldn't be anything more than a Sprite instance.

---
Tags: flash, rendering, actionscript-3, maps, culling
---


title: Creating a 3D map for XNA?

text:
# Question
Title: Creating a 3D map for XNA?
Is anyone aware of a nice 3D map tutorial (how to import and use the map) using XNA without any engine but not limited to an external application (like Tiled for 2D maps) ?

I did a search arund here but have'nt found anything towards xna 3d maps only 2d.

PS: **I am looking for material that can be read online with no cost if possible.**

**I would be very interested in knowing any other contents related to this subject other then what Ricket contributed.**

Best regards.

# Answer
> 9 votes
You'll want to search for tutorials on "terrain", which is the technical term for a 3D map. Also "heightmap" might return results.

Here is one possibility (notice the "Contents" section on the right bottomish): http://www.riemers.net/eng/Tutorials/XNA/Csharp/series1.php

---

Due to the comment that you're looking for online content which can be read: This IS an online tutorial! It can indeed be read online! When you go to the above link, **look on the right side, the third section is "Contents"; in that box, look for the links under "3D Series 1: Terrain".**

For example, here is one very relevant section: "Terrain from file"

---
Tags: 3d, xna, c#, maps
---