title: Recorded Voice or Synthesized Speech?

text:
# Question
Title: Recorded Voice or Synthesized Speech?
I'm interested in adding to my game either recorded human or synthesized speech. I'm interested in what game devs have to say regarding the value of recorded human voice over voice synthesis. Thanks in advance!

---

Points to consider:

1. **EDIT:** First and foremost, the game is meant for kids (i.e. when you see an image of an apple, a voice says "a is for apple") - here it is on Appbrain (currently sans audio...)
2. I searched the responses for Is it worthwhile recording your own or buying stock sound effects? \- I'm basically wondering the same thing but for voice-specific audio.
3. Do you find value or any benefit in opting for recorded human voice?
4. What are some good voice synthesis or text-to-speech tools (preferably free)? I'm currently trying out Fruity Loops, which seems to get the job done (I input a phrase and it generates synthesized speech) however some words do not sound as realistic/convincing as others.
5. The platform is Android (i.e. memory constraints).

# Answer
> 7 votes
If you're aiming at kids, then I would say human voices are probably the best way to do it.

First off, there's the pronounciation issues. When I was a lot younger (age 8 or so), I had a lot of fun with some free 'Kids Encyclopedia' disk which had synthesized voice that spoke your name. It wasn't great, and I remember spending a while messing with how badly it pronounced stuff.

Second off, there is often a great difference between synthesized and human sounding. If it's for kids as young as 'a is for apple' level, then they might either a) be scared or b)not recognize something sounding so different from what they're used to; i.e. parents/guardians.

Lastly, the price of developing or buying a license for that kind of software is probably much higher than getting a voice actor to do it. Or getting yourself to do it. :)

# Answer
> 6 votes
For the type of game you are creating, I would say that some form of audio is a must! From a development perspective, I would go with synthetic speech, as the words and sentences are fairly simple, reducing the chances of your audio sounding "robotic". One thing you'll have to pay very close attention to is how the speech system pronounces each word. If it pronounces any word in a sentence incorrectly, you'll have to either "con" the system into pronouncing words the right way, or pick new words. With your target demographic being toddlers, you **cannot** afford to have mispronounced words in your game.

# Answer
> 5 votes
**I would rather read than have to listen to a synthesized voice.**

Android where space is at a premium, I don't think any speech would worth the size penalty, but if you had to have speech, use a real human's voice.

The only reason to have synthesized voices is generating them live to save space, but on android were you are also limited on processing power, you will not want to generate speech live.

*Edit*:

*For your game you might want to look into the build in voice support, or use one of those libraries, as it seems that your game will not require extreme performance, so using a bit of CPU for voice generation should be fine.*

# Answer
> 2 votes
Also consider if you want to port it to other languages. Though that will take so much more if you don't speak that language yourself.

Speech synthesizing for non-english are limited as I understand it. And if you don't speak that language yourself you need to hire someone to either validate the synthesized speach or record their speach.

However, if the synthesize engine is just as good in spanish as it is for english, then porting for that language will be very cheap.

# Answer
> 0 votes
As long as it is possible to use human voice, use it. Synthetized speech is only good in a few languages, probably only in japanese. If you do not want to port your program to other languages, then you can test the synthetized speech system and probably reduce the effort of developing the program.

The best choice might be to design it retargettable, so that you can switch between both systems dynamically.

---
Tags: android, audio, voice
---


# Question
Title: Game-oriented programming language features/objectives/paradigm?
What are the features and language objectives (general problems to solves) or paradigms that a fictive programming language targetted at games (any kind of game) would require?

For example, obviously we would have at least Performance (in speed and memory) (because a lot of games simply require that), but it have a price in the languages we currently use. Expressivity might be a common feature that is required for all languages.

I guess some concepts from not-usually-used-for-games paradigms, like actor-based languages, or language-based message passing, might be useful too. So I ask you what would be ideal for games.

(maybe one day someone will take those answers and build a language over it? :D )

Please set 1 feature/objective/paradigm per answer.

Note: maybe that question don't make sense to you. In this case please explain why in an answer. It's a good thing to have answers to this question that might pop in your head sometimes.

# Answer
> 7 votes
The language usually isn't the most critical aspect of game development. However, certain aspects of a language could make it more or less suitable for game development.

* **Data Management** \- Games are ultimately about data. Probably the most critical decision you make when you build a game is how the data will be managed. Pick a language that has good data management features. If all you've got is arrays, that's fine, but Objects, Structures, and advanced data types like linked lists and trees are often extremely helpful. Sure, you can build these things yourself, but it's great if they're already a part of the language.
* **Object-oriented** \- Games are one area (GUIs are another) where the object-oriented paradigm really shines. It really makes sense to think of the map as an object, each player as an object, items and inventory as objects, and so on.
* **Event-driven** \- This really goes hand-in-hand with OOP. Games are about events: the passage of time, user input, objects bonking into each other, robot zombie oppossums falling out of the sky, whatever. It's best if the language already has robust support for event-handling. Most OOP languages already have this.
* **Access to libraries** \- Typically you'll rely on some sort of rendering library to do the graphics work. You'll want a language to have a binding to at least the most basic libraries (DirectX / Direct3D for Windows, SDL / OpenGL for everything else) It's even better if you have access to some higher-level libraries that simplify the process.
* **Ease of use** \- Writing a game is hard. It's even harder if you're wrestling with your programming language. Often this is subjective, because a language is easy if you already know it. However, some languages (like Python) have a clean syntax and seem to stay out of the way. Java and C++ are great languages, but if you're not completely comfortable with their way of thinking, you'll fight the language more than write code.
* **Performance** \- You may be surprised that this factor is so low on the list, but I think that's appropriate. Certainly you don't want a language that prevents your game from playing at an adequate speed, but usually the language is not the problem with slow games, algorithms and data structures are the real logjams. Some quite impressive games have been built with Flash, which is about as slow as a modern game development platform can be. Optimize when necessary, but not before.

All in all, the programmer is a lot more important than the language. There is no perfect game programming language, but there are several that are good. I've taught and written about game programming in several languages: C++, Java, Python, and Flash. My current favorite gaming language is Python. It meets most of the criteria above. While Python is sometimes criticized for being slow, it usually relies on graphics engines written in C/C++ for the heavy lifting. Also, it's quite easy to write a critical section in C++ and run it from Python as an external module.

Hope this helps...

# Answer
> 0 votes
The entire concept of programming language fits right in with modeling games.

```
class D20PC
{
   int level
   string charname
   string playername
   EnumClassName mainclass
   EnumClassName multiclass
   CBackpack *inventory
   Array *feats
   CSkillList *skills
   Image *charPortrait
   int Strength
   int Dexterity
   etc...
}

```

It all just flows naturally. I mean if you wanted to build a library where you import game rules and the language builds class templates for you... but other than that I don't think there's anything specific about one language feature or another that's more important than the rest.

Obviously, being Object-Oriented is good. Having access to Databases is good too, but outside of that, any OO language would work. I've done games in C#, C++, Objective-C, and Java, and I don't find that they really lack anything.

---

\[EDIT\]

And IMO, LISP would be a horrible choice for programming an RPG game engine. I just have no idea how it would be done.

---
Tags: software-engineering
---


# Question
Title: What's the best phone for game development?
Yeah yeah I know, best is probably a bad way to phrase this. But I need some pros and cons. I need a new phone and if I'm going to get a smartphone and pay all that money, I better get one that I can develop for, and games are what I want to make (not apps).

So the way I see it is the iPhone would be a bit too expensive to get into. I currently do not own a Mac and do not know Objective-C, so both of those things would be major road blocks to getting an iPhone for game dev purposes. Are there any really good or bad things to know about iPhone game development?

Windows Phone 7 is pretty attractive to me, since I already have a basis in XNA and it would be pretty easy and cheap to pick up. For game development it looks pretty attractive.

After that, my research kind of dies. I have no idea what the deal is on Android, RIM's OS or any other mobile OSes. Does anyone have any experience on these?

# Answer
> 6 votes
Your two options for low-cost hobby development are the android and WP7 platforms. The WP7 platform has a $99 yearly fee (same as the iPhone developer agreement, for reference). With that you get XNA which is going to get you up and running without additional middleware pretty quickly, plus you said you have experience in that platform so you'll spend less time trying to learn the tech and more time making games.

However your best bet from a purely dollar-cost perspective is probably the android platform. It's an open platform (read: free). With the native development kit you can write your apps in C++. The graphics API is OpenGL ES (same as the iPhone, more or less). It's a lot more barebones in the sense that there isn't nearly as much of game-related things in the SDK like XNA has. However, given that it's a fairly standard/open interface, there's a lot of existing middleware (like this) that can help you get up and running on that platform quickly.

# Answer
> 7 votes
This is very opinion based. But if you already have XNA experience, and you don't want to learn a new language, seems reasonable to stick with that. (it also has a great IDE..Visual Studios!, imo)

---
Tags: software-engineering, mobile
---


# Question
Title: 3D game special effects, fire, lightning, water, and ice
I'm working on a 3d game using OpenGL and would like to take it in a fantasy direction. Specifically I'm thinking of having magic with effects for fire, water, ice, and lightning. My problem is I have no idea how to create these effects. Are there any resources for me on how to learn something like this?

# Answer
Look in to Particle Systems or particle effects.

Here are some links to tutorials:

http://gpwiki.org/index.php/OpenGL:Tutorials:Tutorial\_Framework:Particles

http://www.swiftless.com/tutorials/opengl/particles.html

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=19
> 2 votes

# Answer
First of all try to play with such effects in UDK Taste there realization in Unreal Engine 3. Then you can read something from Nvidia SDK and read math of cook from there book
> 1 votes

---
Tags: xna, graphics, 3d, opengl, directx
---


# Question
Title: What is the best way to debug and profile a web application on an iPod in Mobile Safari?
I've built a web app that makes heavy use of JavaScript and HTML5 canvas. It's easy to debug in Chrome, but on a mobile device the developer tools are much less robust. Is there a tool or technique that will enable me to easily debug and profile my application on an iPod in Mobile Safari?

# Answer
By using the iOS simulator that comes with the (free) iOS development kit you can achieve a lot; but profiling is generally tricky. Run it with the debug console; but do the major testing in Safari. (Not Mobile Safari, but the desktop version.) This should help you root out most actual errors.

As for performance, there's not a lot more you can do than to simply test it on a number of representative devices and see if it's fast enough. (2nd gen. iPod Touch, iPhone 3G, iPhone 3GS etc, with both iOS 3 and iOS 4 (latest versions) should be a good starting point.)
> 3 votes

---
Tags: javascript, html5, mobile, debugging
---


# Question
Title: Java code to get android phone hardware specs
Is there code available to view the specs of a phone that is running your application?

# Answer
> 2 votes
Yes, there is a built in class you can use.

http://developer.android.com/reference/android/os/Build.html

Also you might like to checkout PhoneGap.java for some other useful tidbits.

http://code.google.com/p/phonegap/source/browse/trunk/android/src/com/nitobi/phonegap/PhoneGap.java

---
Tags: android
---


title: How to use XNA in WPF?

text:
# Question
Title: How to use XNA in WPF?
How can I render some graphics using XNA to a widget/control in a WPF app? Specifically, I don't need any WPF controls inside the XNA graphics window, I just want to put some controls around it for a level editor.

# Answer
> 4 votes
Nick Gravelyn explains how to do it on his blog.

Although, if it's just for an editor, you may find using WinForms is easier and better supported.

# Answer
> 1 votes
You can use reflection to snag the Direct3D render target handle and hook it up with D3DImage. I've done this successfully with WPF and XNA 3.1, but I had some issues with XNA 4.0 because they changed the surface format mappings. But supposedly other people have gotten it working with XNA 4.0.

---
Tags: xna, c#, wpf
---


# Question
Title: Server-client communication: Quick and verbose or involved and compact?
**TL;DR:** Does the short development time required for HTTP/XML offset its size issues compared to developing a custom protocol?

As some of you might have divined; I'm currently working on a turn-based strategy game of the massively multiplayeriffic variety. The target turn-length is anywhere from 6 hours and up, so synchronization will be, on the whole, a bit easier than, say, an FPS or an MMORPG.

The issue then, is how the clients connect to the server. As I see it, I have basically two options: HTTP using some manner of XML exchange, or direct socket communication using some arcane protocol.

Because casual gaming is the "big thing" nowadays; the idea is that the game will be the sort of game where you can pick it up, play for 5 or 10 minutes, and then put it down and come back the day after; an approach that would greatly benefit from having the communication be stateless (as in HTTP).

On the other hand, target devices include the iPad and (perhaps) other mobile devices down the road; any protocol used would probably benefit greatly from being compact, if not so much for the speed (see above), but more in order to not cost the user everything he has if he plays on the road using cellular data networks.

On the gripping hand; using HTTP as the basic communication protocol greatly facilitates the creation of a web-based client.

All of this leaves me, as far as I can see, anyway, with 3 options:

1. XML over HTTP: A bit of bloat, but easy to implement in all cases.
2. Custom protocol: Allows for a very streamlined protocol, but trickier to implement.
3. All of the above: Small protocol for application clients; big protocol for web clients, increases implementation complexity and maintenance time required geometrically.

Does the short development time required for HTTP/XML offset its size issues compared to developing a custom protocol?

# Answer
> 3 votes
Do some back-of-the-envelope estimates: how often does the game state change? How often is this change communicated to the clients? How much data is communicated each time? For a turn-based strategy, I guess, you'll have only a handful of updates, but each relatively big in terms of data.

If I'm right, then you're not going to save much traffic with a custom binary protocol: you'll shave off a little from each packet, but since there's not many of them, savings won't add up.

In any case, you should try to completely separate your game logic and communication layers. That way, you'll be able to swap custom binary protocol with HTTP and vice-versa without much trouble.

# Answer
> 0 votes
If you use a modern database such as couchdb you will get a way to store your game state and get the syncronization basically for free.

It also works using a javascript interface, so it should blend well with your HTML5 app.

EDIT: I forgot to mention- the client-server communication happens in JSON, which is less verbose than XML but equally expressive.

---
Tags: game-design, architecture, networking
---


# Question
Title: Representing 3D World Space with 2D Tiles
How can I represent 3D world space with 2D tiles? **I do not mean isometric**, which is *visually* represent 3D objects in 2D space.

Let's say there's some height map, and each 2D tile (X, Y) represents a coordinate on **the top of the map** \- so the Y is generated automatically, X stays the same and the tile's Y is the 3D Z component. Is it the right way to transform 2D coordinate to a 3D coordinate (again, on top of the terrain)?

Also - is it possible to implement water effect this way?

I'd like to read any articles/tutorials/opinions on this subject and how to implement it.

Thanks!

# Answer
In order to represent 3d data, you need 3 coordinates (x,y,z). There's no way around that.

If you are using a heightmap, let's say, like this one:

```
11111111111111
11122222222111
11222333322211
11222300322211
11222333322211
11122222222111
11111111111111

```

Then you are *already* using 3 coordinates. x and y are the coordinates of each tile, and z is the number inside the tile.
> 8 votes

# Answer
I think the best solution for you would to be to make a 3D evironment and have a fixed camera, somewhat similar to Starcraft 2. Where they have actual 3D models and terrain, water, etc. Just that you use a fixed camera angle. There are many pre made 3D engines available to buy, and you can customise the camera to stay fixed.

Trying to implement 3D visuals into a 2D game will probably just be far too much work when there's a simple solution already available :)
> 1 votes

---
Tags: 2d, graphics, 3d, tiles
---


title: Drawing to create game drafts

text:
# Question
Title: Drawing to create game drafts
Man, I'm really bad at drawing... I feel myself really ashamed because I cannot draw even a little nice sword... :(

The problem is, on game development (I will be on the programming part, relax!) I will need to explain some game ideas to game artists, like "I need that city like this" or "that character needs to have that look and feel".

My idea is, I really need some BASIC skills on drawing some draft of what I'm thinking...

I'm bad in pen/paper drawing and photoshop/corel drawing, but I'm convicted to learn photoshop or corel to draft something...

Someone has passed that problem? What you recommend?

# Answer
> 2 votes
As a programmer/designer there are three types of imagery you will likely be producing.

**Technical Specification Images**

These are simple crude drawings showing artists/LDs how to place information nodes in the world, how sections of geometry need to be cut up for streaming, how models need to be split for customization and so on.

Pen and Paper are fine for low tech, Photoshop + Wacom is the nicer but expensive solution. You just need to communicate enough information that the artist knows what they are supposed to do. If this is some requirement multiple artists need to deal with, have one of them redraw the image after you explain it to them. Helps them commit the concept to memory and you end up with a nice drawing.

**System Visualization/Flowcharts**

This is less for artists and more to visually look at gameflow, state machines, or a UI design and make sure you aren't missing anything. Visio is a good tool here which you may already have depending on your version of Office, although GraphViz & Dia are freeware alternatives.

**Reference Art**

For designers providing reference art if you can't draw well then don't waste the time. Google Image Search is your friend. Just grab images that match the components of what you need. It's helpful to draw over these images with any painting program to make sure it's clear what part of the image is important. If you just like the fabric of a couch and not the shape write that on the image so that three weeks later when the artist is looking at it for reference there isn't any confusion.

Photoshop obviously works here, but Paint.Net is a nice freeware alternative.

# Answer
> 1 votes
I'm pretty terrible at any sort of drawing too, but I bought a **Wacom tablet** anyway. I find that it's much easier for me to draw something with pen and tablet, than to try and draw it with a mouse, or (even worse) to draw it, scan it in, and then try and clean it up to where it is usable as an asset.

Another option is to get really good at Google image search, and then make a collage of downloaded images. This can be used to give artists a sense of the overall art style of a game, or to choose a color palette, or anything else you want to do. And the best part is it's as easy as downloading images and copy and pasting them together. For example, if you want to convey that a character should have a certain look and feel, search for an image of the body type, and then images of clothes, and images of other accessories (weapons, etc.). The artists should get a great sense of what you want, and they can use their artistic ability to fill in the blanks!

# Answer
> 1 votes
If you get the real artist for the job, all you need to be able to draw is actual simple crosses, boxes, circles etc.

But use a "grid" and perhaps some colors (kids pens are enough for a start) and then remember to write down what each color really means.

Dont use paint as you will have to draw with a mouse.

Rather use "Squares" and "circles" and "lines" for a start.

I always try to make some sort of "grid/layout" of the actual gameuniverse + I use a lot of papers trying to divide my idea into objects I can explain and put into systems later. Might not always give me the best result first time, but the more you do it, the better you will get.

Instead of a Wacom tablet you could just buy a Flatbed Scanner. (I have a Canon Lide 90) secondly, use Google Images for prototype.

# Answer
> 1 votes
Just get yourself a copy of dia http://projects.gnome.org/dia/ It's an open-source vector drawing program. If all you're drawing is circles, squares, lines, and text, it's all you really need.

Here's a game outline I did in DIA: (converted to png format) http://www.aharrisbooks.net/pythonGame/ch07/mailPilot.png

...and here's a state diagram for an adventure game http://www.aharrisbooks.net/pythonGame/ch10/adventure.png

That's enough to get the basic ideas.

I also spent the time to learn some basic 3D modeling in Blender http://www.blender.org. I haven't any particular artistic skills, but I can usually knock together a cartoony model pretty quickly and use a snapshot of it for 2D game sprites.

I have some videos about blender as part of one of my classes: http://synapse.cs.iupui.edu/Mediasite/Catalog/Front.aspx?cid=5d511316-3092-446e-9a69-79d35c41b62d Blender stuff starts at video 13.

Hope this helps

# Answer
> 1 votes
Though I am an artist myself I don't believe you need great art skills to get your point across. I suggest you focus on what you are great at. The book Level Up!: The Guide to Great Video Game Design (not an affiliate link) has some examples of simple drawings to get ideas across. The author is a game designer and learned you can get a lot more information across quickly using simple drawings.

My suggestion is to not focus on detailed drawings but focus on how to portray action, movement and basic shape.

# Answer
> 1 votes
A lot of times you can just give decent text instructions, and trust your artist to do their job. I think I drew at most one or two stick men to get a Best Visual Arts award (thanks of course to my artists!).

You can compile reference material by scanning or copying stuff for your artist -- if you want a particular architecture style, chances are at least parts of it exist already.

---
Tags: game-design, art
---


# Question
Title: What term is used to refer to iPhone and Android games?
What do you call games developed for Android or iPhone to differentiate them from games developed for other platforms?

# Answer
They are typically called **mobile games**, which covers a game that runs on a mobile device. This is distinct from console games (Xbox, Wii,...) and PC games.

In addition, most mobile games (but not all of them!) are **casual games**.
> 10 votes

# Answer
Mobile, but if you don’t like that, perhaps “handheld” (since mobile implies telephony, and things like a DS are also handheld).
> 2 votes

---
Tags: iphone, android, mobile, terminology
---


title: CATiledLayer drawing delay

text:
# Question
Title: CATiledLayer drawing delay
I am developing an iphone app. It has following page structure, 1.List of game levels in a UITableView 2.Game page

I use "UIViewAnimationTransitionFlipFromRight" between pages

Game page has 3 views, One is a scrollView in that my game grid is drawn. Game grid is a sub class of UIView ,that added to Scrollview. To support zooming i use CATiledLayer to draw the grid(20\*20).

MY problem is GameGrid shows white or last played puzzles grid contents for a few seconds and then refresh(flashing) to the new content.

My GameGrid class as follows

\`

```
 @implementation GameGrid

+(Class)layerClass
{
 return [CATiledLayer class];
}

 - (id)initWithFrame:(CGRect)frame {
        if ((self = [super initWithFrame:frame])) {
           CATiledLayer *tempTiledLayer = (CATiledLayer*)self.layer;
           tempTiledLayer.levelsOfDetail = 5;
           tempTiledLayer.levelsOfDetailBias = 2;
              self.opaque=YES;
           }
             return self;
}

-(void)drawRect:(CGRect)r
{
 //empty
}

-(void)drawLayer:(CALayer*)layer inContext:(CGContextRef)context
{
 // here i am drawing grid
// filling rect
 // lines
// string etc..
}

```

# Answer
That's pretty much supposed to happen, it's doing (some of) the drawing in a thread.

It's been a while since I worked on this, but I used

```
@interface FastCATiledLayer : CATiledLayer
@end

@implementation FastCATiledLayer

+(CFTimeInterval)fadeDuration
{
    return 0.0;     // Normally it’s 0.25
}

@end

```

because I didn't like the forced initial delay. That may help.
> 1 votes

---
Tags: iphone
---


# Question
Title: What is a good linear algebra book for game programmers?
I was told that I should start learning Linear Algebra in order to create good games with good physics.

I'm reading Linear Algebra book and it's completely foreign to me. The author starts out with solving linear equations (two equations, two variables) and I remember learning about that in school, but almost immediately he jumps into other things that seem to be taken directly from the Necronomicon.

What book can I read to learn some good math, but starting from the fundamentals?

Thanks a lot for the help.

# Answer
> 11 votes
Sergio you might want to aim more toward a Game Development math book like

**Essential Mathematics for Games and Interactive Applications, Second Edition: A Programmer's Guide**

Instead of the classical Linear Algebra you would learn in college. Also like Ron Warholic said, stating what your math comfort level is would better help us taylor a specific book.

# Answer
> 16 votes
Not a book, but you should check out the math curriculum over at the Khan Academy. I'm in the process of using these videos to brush up on my own math skills. They cover an extremely broad range of material, and the author has been praised for his teaching style.

IMO, truly an amazing resource.

http://www.khanacademy.org/#Linear Algebra

# Answer
> 2 votes
What level of math are you at? Do you understand things like vectors and matrices? What about geometry and trigonometry?

I have Mathematics for 3D Game Programming and Computer Graphics 2nd edition by Eric Lengyel and it's a great refresher on math related to games. It starts with a very basic introduction to linear algebra with vectors and matrices and works through more advanced things like illumination, visibility determination, computational geometry, and game physics systems.

The only downside from a programmers point of view is that it is very equation heavy. If you are the type that gets scared or frustrated by equations I would look elsewhere for reference.

The one thing you need to make sure to do regardless of the book you choose is to do the exercises! You can't learn unless you actually do them. For fun you could even implement them to allow you to see how the math maps to code.

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

# Answer
> 1 votes
The Best world class course in linear algebra is MIT's one with the great Gilbert Strang

It is about 34 lectures

You may face few calculus examples which you can ignore them

check the syllabus for his text

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

---
Tags: mathematics, books, linear-algebra
---


# Question
Title: Networking and movement in MMORPG's UNITY
I'm programming a dedicated server in C# using BeamServer2 DLL's. At first I wanted to be able to see other players move on our already made Omuni map. This I did by just sending your position to the server each frame. This worked out and I was able to play with a few friends but the movement wasn't laggfree. So I started trying to add movement smoothing and also some security so they can't just send a false position to the server without the server stopping it from reaching the other clients.

What I than did, I made a masterClient that has a movementController on the remotePlayer. When a client wants to move he moves localy and sends a message to the server with hes direction to move. The server than takes hes speed and sends it to the masterClient. The masterClient than moves the remotePlayer just like the remotePlayer moves himself. When he stopes moving he sends a message with hes position in it. The masterclient than checkes if the position that he has come to is as close as the position he has from the client, if it is realistic according to the ping of the client the server puts him on the client's position.

This works, but I still have a lagg problem and I'm not sure how to fix this. I must make movement smoothing on the client but I found out myself that I can just lerp (x/2,y/2,z/2) to the position and put him on the real position next frame, I failed at that and I will try again soon. Even if that is added I'm not sure if the lagg is fixed.

Any other techniques, suggestions, questions, ... ? Thanks, Diede.

# Answer
> 8 votes
There a many problems/tasks involved when programming "no lagging" realtime network games.

* hardware speed (CPU power needed pr. player both client and server)
* network distance and equipment (connection LAN or WAN?)
* server bandwidth (how many players)

Secondly you have the "bad guys" who always tries to cheat in games. If your game is going public, then consider what would happend if I sat down and injected "false" network packages. Consider if someone posted "unreachable positions" or "full health/ammo".

**My suggestion for your architecture for a start, would be something like this:**

* Server, controls all vital data, calculates AND validates movement.
* Client, receives data on what to show on the screen + some "think ahead" data on moving objects.

Most realtime FPS's as I know, does some sort of "we know you are moving this direction at this speed, so we just simulate that until we get other details from the server"

So your client should post "what it requests" and might even start to move itself that direction, but it might get "forced back" by the server if the server rejects the movement. Here you have to think, what if the client posts "false coords" outside the map, or suddently "jumps". The server needs to track if the new position is possible from its previous point OR the server just receives the message that says: "CLIENT MOVE FORWARD 200" and then the server process what this will do according to map and game data.

This will give some lag, but again, if you let the client receive these data and does some math itself, it does not need an update every ms/frame, it can lag a little without noticeable lag on the screen.

Perhaps you can even divide the map into "virtual tiles" (if its a vector game) so that you have a fast way to calculate where the objects should be next.

**World of Warcraft/Battlefield/Counterstrike**

I believe WOW is doing it this way too. You press a key, the server receives your movement "wish" and reply with "you are moving now" and then the client shows this + the server simulates the new position on the server in some sort of "session pr. client". This is were the "maximum amount of players pr. game" is getting nasty, because your server has to keep track of everyone and basically do this as "turnbased" - but so fast that it looks realtime.

So...

```
Foreach (Client in GameSessionList)
{
   ParseInput();
   ParseMovement(); // including collission test
   ResponseSend(); // new positions+movement data for client and objects/other players
}

```

# Answer
> 2 votes
The challenging part in lag compensation is that you will get updates from clients that are out of order. A laggy client's command sent at time T may very well arrive after a non-laggy client command sent at T+40ms. Applying the commands in the order you get them will lead to all sorts of nastiness. Doing it correctly on the other hand involves winding back time and replaying all commands that have been issued since.

There is no easy way around this, but there are multiple valid solutions. You can find a relatively easy one described here.

There's a lot of research in this field, have a look around!

# Answer
> 1 votes
I'd create the client like it's a non-network game. That is, anything you do you do it immideately on the client. Then add, parallel to that, your network code. This code will get the movement data. Simple as from coords, direction and speed. It just sends this to the server who validate. Server sends you an ok or a new position.

So you have all you client code running like it's alone in the world. Then it just recieve new correction data from the server or an ok. If you press forward and hold it for ten seconds, then the server will just recieve that one data. You might concider sending/recieving data every second even though you're just holding the forward button, or else, if you hit a lag spike you might run forever.

---
Tags: c#, networking, mmo, unity
---


title: Ogre For iPhone

text:
# Question
Title: Ogre For iPhone
Do we need MAC OS for Ogre Iphone SDK? and Is there any other way for developing iphone game on windows i mean free open source SDK?

# Answer
> 2 votes
Since iPhone code is C/C++/Objective-C you can write the code anywhere. To use the SDK, compiler and debugger, a computer running OSX is required. Per the license agreement this must be an Apple built piece of hardware, although I've heard that hackintosh machines work just fine.

---
Tags: iphone
---


title: How much is too much?

text:
# Question
Title: How much is too much?
From a game design perspective, I've got the following idea:

Traditional Tower Defense game. - an open, mazeable field as monsters approach the castle.

"Towers" consist of ground-pounding units like foot soldiers, moats, and other things. *yawn*

However, I'm adding the following features:

* "Town" - a separate screen for upgrading units and buying new abilities.
* "Tap Defense" - There are archers sitting on the wall with excellent range - tap monsters to shoot them. RoF, Damage upgradeable in town.
* "Tap Defense+" - for cash purchases, you can buy wizard spells that deal mega-damage (think Eagle in Angry Birds).
* "Underground" - the paid version will come with Dwarven Sappers, which give you an additional screen of "mazing" and towers "underneath" the current map, so you can build defenses in at least 2 levels.

Is mazing, tapping, and 2 z-levels too much?

What kinds of things should be considered? I already know that pausing while placing structures will probably be needed (or wanted). Anything else?

# Answer
It's hard to decide in advance, how much is too much. You have to play and see.

But a loose guideline, you can count possible interactions that a player is presented with - simultaneously. Simply put, how many different things can you do at any moment? You want to present just ONE thing to a complete newbie (e.g. when the game just started), 3-4 for casual play and if there's more than 7, the game is probably hard-core.
> 5 votes

# Answer
Start with a traditional tower game, and once that is complete add on to it.

Unless you are asking is it too much for the user, in that case, I don't believe that would be that much for the average user to handle (just make sure to explain everything in a help button)
> 8 votes

# Answer
Start with the most fun of the alternatives and make a game centered on that. Discard the rest. When you're done, come up with new features based on the one you implemented.

If you find that the basic tower defense is boring because it's been done hundreds of times (and I agree), just skip it.

Personally I like your description of "Tap Defense", but that is just a matter of personal taste. The idea would be to implement that directly, avoiding the "Tower" and "Town" mechanics. Later, you can add "Tap+" or other ideas.
> 5 votes

# Answer
Your first question should be, *who is my audience?*

If you know who's going to be playing this game, then you should be able to work out the appropriate level of complexity for that audience.
> 3 votes

# Answer
Provided that your interface is intuitive and you don't price yourself too high, I don't think its too much at all. On the contrary, I feel that the tower defense genre of games is mature enough even with casual gamers, that they will not be intimidated by these new features.
> 1 votes

---
Tags: game-design
---


title: How do I blend a bitmap with a color?

text:
# Question
Title: How do I blend a bitmap with a color?
I have a png which is mostly transparent, except for a shape I've drawn in white. I want to be able to blend this bitmap with a color when drawing it with Canvas. I'd like something like \[Sa, (Dc * (1 - Sa)) + (Sc * C * Sa)\], where C would be the color I want to blend with. I assumed I would just set the paint color to C, then call drawBitmap, but the default behavior doesn't seem to be blending.

Is this the right approach? Are there some Xfer codes I'm missing? Can I create a custom shader to do this? Is there an example in the android sdk api I missed that does this?

As an additional constraint, I should mention I want to avoid just creating a new bitmap with the blended color to use. The color C (above) could change every frame, and I don't want to have to generate 100's of these bitmaps for every color that I might need.

# Answer
> 11 votes
```
Paint p = new Paint();
ColorFilter filter = new LightingColorFilter(Color.RED, 0);
p.setColorFilter(filter);

```

Then draw with that `Paint` object.

Found at "How do you tint a bitmap in Android?"

---
Tags: android
---


title: How can I debug shader programs?

text:
# Question
Title: How can I debug shader programs?
I'm in the process of debugging GLSL vertex shaders and I can't shake the feeling that I'm doing it wrong.

In general I have two strategies to make up for the lack of tracing

* I stuff values into a debug color varying that I pass to the fragment shader and then try to interpret the colors.
* I change the vertex shader code and see what happens.

I'm thinking that ideally I could make up for the lack of tracing by writing values to a texture somehow, reading the texture from the GPU and printed the values stuffed in the texture.

My guess is that there might be way better ways. Any suggestions?

# Answer
A friend of mine has used glslDevil for this, and said it was okay.

If you're not tied to GLSL, Microsoft has an incredible tool for DirectX called PIX, but I don't think there's anything equivalent for OpenGL.
> 3 votes

# Answer
nVidia has an awesome shader debugger. You can find it, and its specs, HERE

Update 2016: There is also a Visual Studio plugin, which most probably is their newer effort in helping developers, here: https://developer.nvidia.com/nvidia-nsight-visual-studio-edition
> 2 votes

---
Tags: shaders, debugging
---


# Question
Title: Determining the probability of a successful attack based on the equipped weapon?
Take this example, a player has a sword composed of the handle and a blade. Together, they generate a strength of X and that combination adds qualitative attributes (induce more damage to fire creatures). If the player encounter 2 enemies, both at same defence level, but one is made of fire. Then, I need to calculate the probability of hitting the enemies, knowing that it may be higher for the fire creature.

Given the example, I need to calculate the:

* Weapon's strength, by combining different parts?
* Probability of the outcome of an encounter?
* Inclusion of qualitative attributes in the calculation?

So far, I though of the following and I am not sure if it is good enough.

* For the weapon, I would associate a value to each component. Then, I would determine that the handle represents 25% of the total strength; allowing me to calculate the total strength
* The enemy will get a defence value.
* For the encounter, I would generate a random number between 1 and the (player strength)+(enemy defence). If that number is higher than the enemy's defence, than it's a hit. This means that if they are equal, then it's 50% chance of success.
* For the physical attributes, if the enemies has a weakness towards an elements, then I would deduct a certain value of he's defence before calculating the probability.

Is this a viable approach? If not, what would be a suitable implementation? or where can I find more ressources on these kinds of problems.

# Answer
There is no "one-way-to-rule-them-all" to handle combat resolution and damage. The most important thing is that the resolution is understandable by the player.

In general you want to separate three elements.

* Chance to Hit
* Damage Applied
* Attack Rate

This gives you the ability to make a wide range of weapons.

*Chance to Hit* \- tends to be calculated from a combination of player skill (agility or similar), enemy skill (agility/dodge or similar), weapon quality and weapon type. Sometimes elemental matching or magic effects are a part of this calculation.

*Damage* \- tends to include a player skill, weapon type, enemy armor type/quality. Elemental matching or magic effects are often applied at the damage level. So a flaming sword may "hit" a flaming enemy and then do no damage or only do the base damage of the weapon but fail to apply the flaming damage effect.

*Attack Rate* \- tends to be derived primarily from weapon type and player skill

**Reference**

If you want some good references go grab a bunch of different D&D style rule books and look at all their combat systems.
> 9 votes

# Answer
I think you need to start with the questions, *who am I making this game for?* and *what kind of experience do I want my players to have?*

* Is this an online game or not?
* Are you trying to make a realistic simulation of mêlée combat or something that's unrealistic but fun?
* Are you making a game for a broad or "casual" market, or for hard-core gamers?
* Are you trying to create strategically interesting player-vs-player combat?
* Are you making something for people who like to study a system of rules in detail, or for people who are probably just going to run around and mash on the X button?
* Why do you need combat to be probabilistic? What would go wrong if it were deterministic?

Only once you know the answers to these questions, can you start to figure out what kinds of solutions will be appropriate.
> 3 votes

# Answer
As a reference, you may also interested in checking how the Fire Emblem games calculate their possibilities of hit, damage, speed,... You can find all the formulas, stats and explanations here:

http://serenesforest.net/fe10/calc.html
> 0 votes

---
Tags: mathematics, web, turn-based-strategy
---


# Question
Title: How can I implement rectangle collision response?
I am working on a game in JavaScript and my current implementation of collision uses the shortest distance to push the intersecting object away, which isn't always correct. I've made this diagram of the ideal collision. The red box represents the starting position, the green box represents the proper position and the black box represents the static object it is colliding against. The blue arrow is the velocity vector. With my current implementation, the object would be placed in its final position and pushed out (and in this case it would be pushed left)

How can I fix this?

# Answer
You can procedurally find out how to do a moving AABB/AABB trace with the formulas on this page.

http://www.realtimerendering.com/intersections.html

Basically those equations will tell you what percentage of your move you should do that frame, which will allow you to place your square at the correct location.
> 2 votes

# Answer
There are a few ways to do this, but one easy way is a binary search over the timeline between last frame and the current one. Say that last frame is at time t, and this frame is at t+1. If a collision happened, back up the objects to t+.5. If a collision is still happening, try t+.25, if not try t+.75. Keep going until the steps are sufficiently small. Then do your test for shortest distance push back. Then make sure to play forward the remaining amount of time (since you backed up to find the collision point.)

The key is to get as close to that point in time as you can, since that will definitively tell you which face collided with which other face.
> 0 votes

---
Tags: collision-detection, physics
---


title: MVC-like compartmentalization in games?

text:
# Question
Title: MVC-like compartmentalization in games?
I was contemplating the design of a game (translating a boardgame to the computer, specifically, which I suppose is relevant in this case) and it occurred to me that it might make sense to build the 'game' separate from the 'display.'

It would allow me to prototype something quickly with a simple text interface, and then go pretty it up later. It would also let me port the game to other media more easily.

Is this sort of compartmentalization common in games? Should I try to break things down further? Are there complications I might be missing?

# Answer
> 7 votes
A board game is a good example of a game that could be made using MVC, as the game logic (model) does exist quite independently of the visuals (view). However if you consider an action game like Gears of War, the geometry of the 3D models is intrinsic to the game logic, so separating out the view as if it were interchangable becomes pointless. Unity3D is a great example of a more game-specific way of organising code. You have a base entity class which you add functionality to with components, where one component might handle drawing the entity, one handle game logic etc. Check out these famous blog posts on the subject:

http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/

http://gameprogrammingpatterns.com/component.html

# Answer
> 5 votes
My take on it:

* The **model** is where most data lies and all logic takes place.
It reads a queue of input events, and modifies the game state accordingly.
It then processes stuff like physics and other core components that also update the game state.
Loop. That's all.
The goal is to make the model independant: it doesn't have any dependency on view or controller stuff: you should be able to make a program that only runs a model.
* The **view** simply reads the model's game state, updates its own components dedicated to the representation of the data, and display things on the screen.
It never writes anything on the model, it's a read-only process, except maybe the registration of some event handler (like "Hey Mister Model, when you detect a collision between those two objects, please call my event handler that plays a sound!").
* The **controller** catches input events and passes them to the model's input queue. It reads the view (did this button click happen on a UI button?).

That way you can plug a fake controller that reads a file that contains pre-recorded input events.
Also make a simple view that just logs things on a file.
Very usefull for testing and debugging.

Remember to make the model update at a constant rate (fixed time step), and the view and controller as fast as possible (but not too much variable).

# Answer
> 0 votes
That kind of compartmentalization is the split between an Engine and gamecode, and is quite common. There is plenty of room for abstraction along the way.

Your Engine and your games specific graphic data could be though of as the View, your gamecode the Model, and the controller would be whatever glue you use to tell your engine which texture to apply to which entity in your gamecode.

---
Tags: design-patterns
---


# Question
Title: Making (or emulating) a "D-Pad" on a touch-screen; virtual d-pad
With the proliferation of touch based devices, many lacking a true D-Pad, I'm wondering if anyone has any resources on how to emulate a D-Pad on a touch screen? I'm specifically interested in XNA and/or Android code examples.

# Answer
There is an XNA sample of touch thumbsticks here

I would reiterate that a dpad is unlikely to be the right interface for a touch screen like device.

Something like what epic has done with Infinity Blade for the iPhone may give you inspiration Movie Link
> 5 votes

# Answer
Can I discourage you from attempting to emulate a D-pad on a touchscreen device?

The problems with emulating a D-pad on a touch screen are:

* the D-pad takes up screen space that you could be using for the game;
* unlike a real D-pad, an emulated D-pad offers almost no feedback: as a player, you can't tell which direction you're pressing in, neither by feel nor by sight (since your finger is covering up the D-pad on the screen). So your finger all too easily slips off the D-pad, or onto the wrong part of it, leading to fumbles and frustration.

A touchscreen device is much more than a device "lacking a true D-pad", as you put it. A touchscreen device allows the player to touch *anywhere on the screen* and so *interact with any visible game element*. This gives a wide range of game design possibilities, and these designs are likely to be much more pleasant to use than an emulated D-pad.
> 16 votes

# Answer
I know this isn't the most useful answer, but unless you are porting a project over from another platform, I'd suggest reconsidering on the virtual D-Pad. Most implementations of virtual D-Pads have been poor at best, the lack of tactile feedback make them a poor choice for the platform.

You are far better off looking at building an interface to your game that highlights the platforms strengths instead of building to the platforms weakness.
> 9 votes

# Answer
Like the others have said, it's best to come up with a design that fits the environment, not force the environment to fit your design, but if you do stick with the D-Pad, here's how you might do it:

If you think of the "touch point" as a mouse cursor, you are basically create a "hot spot" that reacts to the cursor movement.

The best/simplest way to do it I think is to make a semi-transparent(remember, you are covering the game screen) box or circle in one of the bottom corners, where the player is most likely to have their finger already. Then you just track the position of the player's finger relative to the center of the hot spot, and that's your input delta value.
> 3 votes

# Answer
I see most people here thinks a D-Pad is a bad idea, and they are right - most of the time. Dungeon Hunter from Gameloft for Android is a great example of a great D-Pad for touch-screens. It is responsive, have a 360 degree direction, an is not "dumb". What I mean that it is not "dumb", is that when you press the D-Pad and slide you finger out from the D-Pad area, it doesn't interfare with what happens on the screen - it just extends. So if you accidentaly slip out of the D-Pad area you won't loose movement.

I think 360 degree direction and out-of-bounds responsivness is important and if you can do that you will have a chance in doing the D-Pad right.
> 2 votes

# Answer
If you want to implement a D-Pad, the easiest way that comes to my head is to create four rectangles (one for each direction of the D-Pad) and then check if the touch location is within the bounds of any of the rectangles.

As the other guys said; think twice before implementing a D-Pad on a touch screen. On the other hand I´ve seen people playing those GBA emulators all day on their iPhones.

It´s up to you ... can you tell us what are you planning to do that involves a simulated D-Pad?
> 1 votes

---
Tags: xna, android, input, touch, windows-phone-7
---


title: Is there an XNA-like library for Java?

text:
# Question
Title: Is there an XNA-like library for Java?
I'm curious to know if there is an XNA-like library for Java; that is, a library that

1. Handles the game loop - i.e. you just implement an existing method, and it will get called every frame.
2. Handles the rendering - i.e. you just tell it what to render, it will take care of displaying it to the monitor, hiding implementation details such as hardware acceleration.
3. Contains many useful methods for graphic, sound and user input options.

I'm interested in a library which supports both 2D and 3D options.

# Answer
> 15 votes
According to your first requirement, you are looking for a **framework** rather than a library.

jMonkeyEngine is a framework for 3D games (i.e. it provides the main loop as you ask for, similar to XNA) but it wouldn't be a good choice for 2D.

However, **a game loop isn't a hard thing to write**, and existing Java libraries handle your 2nd and 3rd requirements, so I highly suggest looking into a scene graph 3D library/engine or any 2D library, depending on if you're making a 2D or a 3D game.

Aviatrix3D, Ardor3D, Java3D and jMonkeyEngine are my recommendations for scene graph 3D engines.

For 2D libraries, you have JGame, or you can choose to use OpenGL for max speed and use LWJGL or JOGL. You could also just go with Java's built-in Graphics2D library, which would be an especially good option if you plan to deploy your game as an applet.

---

For going the built-in Graphics2D route, look at the source code to Metagun (click to play in applet form). It's a small but very well-written 2D Java game, and I think it's an excellent example of a small game; copy its structure and you have your optimal game loop/framework.

# Answer
> 6 votes
**Slick** is a nice 2D Java library based off of LWJGL. It handles the game loop, rendering, and contains useful functionality to implement sprites.

It comes bundled with many different demos and examples.

# Answer
> 2 votes
If you want a single framework to support both 2D and 3D the closest I have seen is jPct. It is 3D but inside their forums they have some tweaks to do 2D.

I recommend you go with Xith3D or Java Monkey Engine for 3D. And Slick or GTGE for 2D.

I'm writing a book about java game development, I already completed the chapters on the basics for 2D and 3D java game development, it can give you a starting point, look here:

http://code.google.com/p/lucu

Taksan

# Answer
> 0 votes
Although it doesnt support 3D, pulpcore is a good gaming framework. I havent personally used it, but i have browsed thru the code just to check it out, and it looks nice.

# Answer
> -1 votes
RedDwarf is a Java Game Engine. This is the old Project DarkStar that Sun use to fund.

---
Tags: java
---


# Question
Title: How to create the "drunk camera" effect in GTA 4?
If you have played GTA 4, then you have probably been drunk at some stage. This is one of the best intoxicated simulators I have ever seen. It is actually hard or sometimes almost impossible to drive a vehicle while drunk in this game.

I know that a lot of the things that make up this drunk experience are changes to the controls or having random changes in direction, but how would the camera be done?

The camera seems to wave in and out and side to side. It also has changing blur, and other effects going on. Would this be some kind of shader? What are the effects that are used on top of each other to create the experience?

# Answer
Some things you could do are sway the camera, delay the controls, make the controls unresponsive or unpredictable, as well as blend in previous frames.
> 2 votes

# Answer
Oh man this game should be used for drunk driving reeducation, because the one thing that I learned about drinking from this game is that the results suck.

I think they were doing a couple of things, although I haven't played it since it was new so my memory may be fuzzy. One big thing you can do is change the FOV. Then you can swirl the camera location around and maybe even the look-at position. Finally, to get truly vertigo inducing, you could skew the frustum.
> 1 votes

# Answer
Also, a general tip for making a distortion effect is that you can render the scene onto *another* plane overlaid on the scene, and then warp that plane. This is useful for other things too, because you can have the overlay partially transparent (flash bang effect maybe?).
> 1 votes

---
Tags: graphics, graphic-effects, special-effects
---


# Question
Title: How do we attract more developers and other Volunteers to our Open Source MMO Emulation Project?
I am on a small development team that is tasked with completing the server side programming for an Open Source MMO project that has been in progress for about 5 years now. Approximately a year ago we Open Sourced the project hoping to draw in new developers, this was without much success and in fact we haven't gained even one active developer in our project. The Project Star Wars Galaxies A New Hope, is something near and dear to myself and the other few people working on the project. It is a quest to bring back one of the golden eras in gaming, Patch 14.1 for Star Wars galaxies.

The progress as of this summer was extremely slow and it seemed as if we were taking two steps forward and one back every change we made. The codebase wasn't designed very well and we looked into completely rewriting it from scratch. After a couple of weeks we realized this couldn't be done in a timely manner and perhaps we should take another look at the old core to see if we couldn't revive it. We found it was worth just revamping the old core and continuing to push forward, we've made some really good changes that will help with the future of development. One reason we didn't really want to push heavy developer recruiting was the state of the existing codebase.

Now that it is somewhat cleaned up, how do we go about recruiting quality individuals that are interested in finishing up this Open Source MMO project and delivering what we promised to the community?

Github Project

# Answer
> 4 votes
Take a look at Finding other programmers to help on a project and see if my answer there resonates. You have already started with the code cleanup. Basically, you just need to find groups of like minded people in clumps and pitch your idea.

---
Tags: mmo, open-source
---


# Question
Title: What does a Game Designer do? what skills do they need?
I know someone who is thinking about getting into game design, and I wondered, what does the job *game designer* entail? what tools do you have to learn how to use? what unique skills do you need? what exactly is it you'd do from day to day. I may be wording this a bit wrong because I'm not sure if the college program is *become a game designer* or learn *game design*. but I think the same questions apply either way.

# Answer
**What does the job game designer entail?**

I always explain design to people like this:

> What's the difference between Black Jack and Poker?

They both involved players and the same deck of cards, but are entirely different games because the rules that define how the games are played are different. In essence that is what a designer does, writes a series of rules as to how a game plays.

These days as games get more complicated, the job often includes narrative elements in the areas of story/setting/characters. Although many parts of that are given to people dedicated to writing and not design.

Design is a pretty broad term in the industry and it covers everything from high level system design (rules) to narrative design (story/character) to level design (the placing of assets and scripting)

**What tools do you have to learn how to use?**

Getting a job directly as a designer is hard. Many of us came from either Programming or Art backgrounds or in my case both. On smaller teams, it'll be expected that you can do something other than design full time as well. The tools change depending on the type of design you are doing.

*System designer/Creative Director* \- Most time spent in Excel, Word, and Powerpoint.

*Narrative designer* \- Word, maybe Final Draft. These guys are mostly writers.

*Level Designers* \- Excel, custom level design software or common 3rd party tools (UnrealEd, and so on) Typically should be comfortable navigating the popular 3D-art packages (Max/Maya)

**What unique skills do you need?**

Communication, both writing and verbal is probably your most often used skill once you get to the higher levels of design. Coming up with a design is a pretty small part of the job. You spend most of the time communicating how to build that design to the rest of the team.

Critical thinking, ability to break down a problem into a series of small discrete steps. It's not enough to play a bunch of games. You need to be able to clearly understand how the parts of those games work together. When/why they combine and work, and why they can fail when combined.

Level designers benefit from an art background. An understanding of composition and architecture both help.

A basic psychology understanding is also helpful for designers. The more you understand about how and why people respond to stimulus the better your can predict their response to future designs.
> 19 votes

# Answer
~~Hardly anyone~~ A select few (see comments) do *game design* full time: but more typically game design is only part of a job. Some designers are also *producers*: they manage the personnel, schedules, budgets, and contracts of the games they design. Others combine game design with *development* (programming, art, audio, etc).

So if you want to do game design as a career, you should become expert at a related skill and find some way to move into design. There are different career paths: for example, you might join a big company, demonstrate your design talents, and move up into design. Or you might join a small company (or start your own) where everyone has to do a bit of everything by necessity.

The key skills, in my opinion, of being a game designer, are:

* A wide knowledge of games of a lot of different types, so that you have a lot of background to draw on for solutions to problems ("Our game has become unbalanced because it's too easy to accumulate health, but I remember how they solved that problem in *Foobar RPG VII*, they gave you the option to exchange health for experience, which created an interesting trade-off...")
* The analytical skills to be able to determine *why* games have particular qualities. ("Even though they have very similar gameplay, *Ico* creates a much more effective sense of peril than *Prince of Persia* because ..." \[Well, I won't spoil it for you: let's say it's an exercise for the reader!\])
* The communication skills to explain to artists, programmers, level designers and other developers how to achieve the effects you want. Big projects need big game design documents and you are going to want to write good ones. ("We need to give the player enough warning of the attack that they have a chance to establish their guard, so the boss attack sequence needs to have a distinctive motion at least 1 second before the damage is dealt. Also, we need to arrange the camera angle so that this signal is visible.")
* The discipline to realise that *you* are not the only person the game is aimed at (or even necessarily part of the target audience at all), and that your own intuitions about what is fun are not an infallible guide. You have to be able to look at data from real players in the market you are aiming to reach. ("In the office, we all loved the hyper-death-mode, but when we tried it out, we found that 72% of beginners turned off the game in disgust when they were killed after 30 seconds and all their equipment was stolen.")
* An awareness of your own limitations as a designer. Perhaps you know everything there is to know about balancing unit types for a turn-based strategy game, but you wouldn't know where to start when it comes to a racing game. Better to be humble than make a bad game!
> 9 votes

# Answer
There are indeed game designers out there, and it seems like a pretty interesting job. Usually folks are attracted to this job because they want the creative and leadership aspects of game development but aren't ready for the many years of hard work and preparation needed to do game programming or 3D art. There's some expectation that there are programmers and artists out there just waiting for somebody to give them a great idea and tell them what to do. That's not been my experience.

Unfortunately, a lot of college game design programs teach exactly this illusion. Students pay a lot of money for a program that teaches a skill that may not really be in demand.

Game programmers are usually game designers too. Programmers with the skills to work on games could often make quite a bit more with a lot less pain working in more traditional sectors. Game programming requires much more knowledge of math and physics than traditional business and database programming, for example.

Game programmers usually started out as designers who learned an important truth:

**You can become a game designer in two ways** \- write the code or write the check. If you can pay somebody to implement the game you design, you're a designer. If you can't pay, you probably need to learn some programming.

To be fair, 3D art (especially the more challenging aspects: rigging, texture-mapping, animation, and lighting) is another great way to work yourself towards design, but the competition is much more fierce than in the programming arena.

The surest path to working in the game industry is to get a solid degree in computer science. Take all the math and physics he can, as well as the theoretical classes like data structures and algorithms.

This hard-core CS background can provide a significant competitive edge. If the person decides that the gaming industry isn't such a perfect deal (my students sometimes meet a girl, and everything changes) then they have a 'backup' that starts at 60K a year, has six openings for every applicant (at least in my state) and they'll still have the skills to write the game they really want to write on their own terms.
> 4 votes

# Answer
One of the best things I've reading describing the evolution of the job title *video game designer* \- as distinct from programmer, artist, composer, etc., all of whom also *design games* \- and what they do is Jim Mummery's Tightening up the Graphics on Level Three (and part 2, not as good).
> 3 votes

# Answer
It's worth noting that designer is an overhead position. Meaning, it's not completely necessary to have a person dedicated to design when making a game.

People who make games, programmers and artist, they have some idea of the design of the game, the team designs the game that they want to make.

Only when the project is large enough that design becomes a burden is a designer really needed(usually).

That being said, the designer is the one who manages, not controls, the design of the game. What ideas work, how to implement certain features. They work with the programmers and artists to figure out what works, what can be done, what it feasible and then they put it all together so that everyone can get in on it and get it done.
> 0 votes

# Answer
Programmers and Artists are machines dedicated to their ability of creating what they get as input. The ultimate idea comes from the Designer. He has the vision. He his the mastermind, but no brain can function without body, so you need a team.

The job "Game Designer" has no real profile, each project / company defines what this person's tasks are. A game designer can be a writer up to a visionary like Will Wright or Steve Jobs.

The fine thing about the "Game Designer" is, that this job currently does not exist. Because even if you can tell me what a game designer has to have as skills, tell me how to teach a person to be creative.

I have read once a quote that said: "To become a (Game) Designer is impossible, either you are one or you are not."

This might sound very final, but the core part of this quote is in my very honest opinion right. There is a component, a combination of social and scientific that you must have to be a real "designer".

Let's say that a designer has to own the skills he needs to design what he wants to design. Because there is a huge difference between designing a small level, or game and designing a real game.
> 0 votes

---
Tags: game-design, jobs, job-hierarchy
---


title: Starting programming in 3D with C++

text:
# Question
Title: Starting programming in 3D with C++
EDIT: There aren't sufficient enough tutorials for what I'm trying to do in Python, so I'm going to take my time and slowly build up my skills in C++. It's hard to trip and not land in a book of C++ tutorials on game development and 3D programming.

Once I get passed the basic syntax for classes in multiple files with preprocessor declarations, what is the next step in 3D?

Do I use DirectX or OpenGL? If I use DirectX, are there sufficient enough books on the subject for a BEGINNER? Same question for OpenGL. I love programming books, I just feel that most of them are way below par - they either have good general explanations and terrible source code, or vice versa.

Thanks for your time. I'll do my best to turn this into an active discussion on the matter.

# Answer
I just started this path with the OpenGL SuperBible and I would say its a good(long, 700 hardcore pages) path to start if you are confident, focused and dedicated. It starts really good and then it build up to the complicated shaders in a very nice way.

Its a real challenge to do 3d programming at all and we (in gamedev) **not only want to do 3d programming**, we want 3d GAME programming, which makes things 10 times more complicated. Because everything is more complicated from modeling movement, to collision detection and all the way to assets and textures, everything is **exponentially more complicated.**

I would say that the road ahead(to do a cool, nice, 3d game) is looking something like this from where I am standing:

* Learn openGL(read a book or 2) (\< I am in the middle of this\>)
* Do stuff with openGL(do a toy project or 2)
* Learn about 3d engines(read a book or 2)
* Do a 3d engine(do a prototype)
* Make a simple game
* Learn more (think, read, see other engines)
* Do a better 3d engine/settle for a 3d engine made by someone else
* Feel confortable with 3d, do big projects.

So all and all, it seems like a path of over a year to get there, and I really hope is worth it!
> 8 votes

# Answer
Maybe before jumping in to OpenGL it would be helpful to start with something higher level like Panda3D. It provides a much simpler scene graph and animation interface, as well as numerous other supporting systems. It still isn't as simple as a 2D environment, but it should get you started a lot faster.
> 2 votes

# Answer
There are more tutorials online for OpenGL than Direct3D, last I check. Beginning OpenGL Games Programming has a second edition, so it may be more recent. If you are looking to do an engine, I have read C++ Games Programming from Start to Finish and found it helpful.
> 1 votes

# Answer
http://nehe.gamedev.net/default.asp is pretty good for learning opengl. I can't find anything for pyopengl though.
> 0 votes

---
Tags: c++, 3d, opengl, directx
---


# Question
Title: Use of Collections in Android Game Development is not encouraged?
While working on a game project for Android i was digging for some information on **performance optimization** for game code. And i came to know that use of Java **Collections** like List,Arraylist etc are not encouraged in game codes,though collection is an useful tool in Java programming.Why is it so? I would like to know technical details as how much impact can Collection framework have on Android systems and why? Any help in this regard will be great.

# Answer
> 8 votes
It's mostly about memory allocation and garbage collection. Memory allocations during runtime gives your garbage collector a chance to bring out the trash. Which hurts your performance. GC should happen as seldom as possible.

Most java collections:

**A)** Allocate more memory than they need.

**B)** Allocate memory when you don't want them to.

**C)** Allocate memory for each iterator when iterating through a collection.

To circumvent these things:

**A)** Allocate collections with fixed sizes. ie. create object pools.

**B)** Allocate these pools at program init.

**C)** Avoid the for( Object obj : collection ) for those collection types that has a size() and a .get(int index) method.

---
Tags: android
---


# Question
Title: What percentage of game content is normally free on a Free-to-Play game?
If I wanted to launch a free-to-play game with different characters, weapons, items and clothes that can be either unlocked through gameplay or bought with real money, what percentage of items should only be available for real money? This isn't "subjective" - I'm interested in examples of real games and estimates of what percentage of their content is free.

# Answer
The US Virtual Good market (freemium games qualify) is expected to hit 1.6 Billion dollars this year.

0.01% of that is still 100K.

You shouldn't concern yourself with percentage, per se, but with content. *Which* items are paid for may be more important than *how many.*

My general rule is this, if an Item can save someone 5-10 minutes during game play, or advance to the next "level" automatically (like a +1 item) charge a buck. Angry Birds uses this idea with the Mighty Eagle.

In all the zynga games I've played, it was either A) advertise for them by friending people, or B) pay money to advance past an hour of play. I don't necessarily like this style, because it frustrates me and forces me to stop playing if I don't have the friends.

In my game (Shining Force style game) I'm making 'promotion' cost money. You can still beat the game with a level 30 fighter, but a level 30 dragoon will be so much cooler.
> 7 votes

# Answer
## Analysis

The problem with asking for a hard figure here, is that this is an extremely variable number.

On the one hand, you have something like World of Warcraft, which, while not exactly Free-to-Play, still might serve as an illustrative example on the one end of the spectrum, with *approximately* 0% of content that is only available for cash. (The Celestial Steed)

On the other side of the spectrum you have producers like Zynga (of FarmVille fame) who maintain a catalog that is, at a wild guesstimate, about 50-60% cash-only items, and a fair chunk of these items are additionally time-limited (e.g. Halloween stuff, Christmas stuff, etc.) (**Note:** For various reasons, these numbers are difficult or impossible to pin down to an exact number; but when browsing the store in a game like FarmVille or FrontierVille, it seems as if basically every other item is bought with for-cash currency.)

On the gripping hand, it might be interesting to mention the spectacularly successful game by EA, The Sims 3. If you discount the initial cost of the game, which is relatively low and a one-time expenditure; their model works a lot like a Free-to-Play game.

Another wild guesstimate on my part puts their for-cash catalog at about 50%; unless you count content from the expansions. (A fairly rough breakdown puts cash-only content at about 30% of their catalog; free content at about 30%, and an additional 40% in expansion pack content.) (**Note:** Again, these numbers are hard to pin down, as they aren't exactly published anywhere; but these rough estimates are based on observation of the EA store for TS3 content.)

And here's the real clever bit what they do: With each expansion they bump the version number, giving players a host of new gameplay features; if you don't buy the expansion, but keep the "free-to-play" version; you only get the framework, and not the content required to make the feature interesting.

## Summary

How much pay-to-play content you can get away with is strongly related to how much the game costs to play. In a Free-to-play game, you can probably get away with as much as 60-70%; but a more optimal popularity/profit-scale is probably achieved from setting it at about 50%.

Additionally, as demonstrated by the WoW example above; the ratio is not as important as the price and relative coolness of the item. Even if you only have *one* cash-only item, if it's insanely awesome you can make an incredible amount of money from it, even if it's just cosmetic, so long as you have enough players. (Estimates put the Celestial Steed at about **$2.5 million** of income, at the very least.)

## Summary of the summary

1. Make items that confer stat bonuses, power and glory attainable to all players, or you'll lose them as they realize your free-to-play game is actually free-to-play-pay-to-win.
2. Package your ball-shatteringly awesome cosmetic items with ho-hum or sub-par stats up and sell them to your large player base for a stiff but reasonable price.
3. ????
4. Profit
> 1 votes

# Answer
I've recently locked most of my game; despite having really few users you might be interested.

There are 6 classes ("levels"), and non-paying users may only acquire class 0 or class 1 players and weapons. Also, they can't do direct trading with other users, but they are allowed to use the auction (still can buy only class 0 or class 1 stuff).

Moreover, I have set up an exclusive conference, that will be the "main" conference, only for paying users. Non-paying users can still play as much as they want in the "lesser" conference.
> 1 votes

# Answer
Well you'ed have to guess on it really since most of the games change there what the player can only buy with real money list, sorry best thing I could think of. Most of the games I've played with free-to-play usally keep around, and I'm guessing a bit, like 5-10 percent like Joe Wreschnig said, but it is really up to how big it is. If it is like a small game, like im guessing yours would be at the beggining, they make almost everything avaible in-game but really hard to get like a very rare drop and might have a few items that you can only buy, but it gives you a big advantage.

Check games like holy-war, Shogon Kingdom, and maybe game company's like perfect world if you want to reasearch your self.
> 0 votes

---
Tags: free-to-play
---


title: Using Flash in CS5 for iOS

text:
# Question
Title: Using Flash in CS5 for iOS
So now that the restrictions are lifted from the third party developer by Apple. And the new packager for iPhone for Flash in CS5 is available for download. How much efficient it can be to develop a game in Flash for iPhone. How much worth it can be to invest time in developing games on Flash? anybody started working on game development on Flash for iPhone can help a lot.

# Answer
I built a game using the Flash CS5 iPhone packager which is still available: http://itunes.apple.com/us/app/monster-ball/id356171232?mt=8

My experiences were that it was quite easy to get going, and obviously you bring all your existing Flash skills - the problem is that performance is very slow, to the point where you can only make very, very simple games.

Unless you're making a very simple "fart app" type game, my advice would be to avoid Flash and go with Unity3D or cocos2D etc It will mean learning a new dev environment and language, but you will be able to make much better games.
> 5 votes

# Answer
I tried out the iPhone packager for a bit, although I was using it from the command line (I work in FlashDevelop, not CS5). I had a great deal of difficulty getting existing game code to work; I ran into a number of issues that were near-impossible to track down, including an error that I couldn't get info on using fdb. I was able to get an early version working fine, but when I tried switching it to AIR in order to get hardware features, I had so much trouble that I couldn't even get a version working again.

Your mileage may vary, but for the moment I would consider Flash for the iPhone a very high-risk prospect. There's limited support and experience out there, and the process is a bit convoluted. I'd invest only a bit of time at first; if things go smoothly, then go for it. But don't bet much on the platform until you're comfortable that things are gonna work.
> 4 votes

# Answer
i had a simple quiz game which seemed to be animating at 10-15 fps running on my iphone 3g. So i made a test app and had only two bit maps alpha fade in and out with one background image. It still looked to be 10-15 fps. I have seen Demos of apps made from the iphone packager and it seemed smooth, but my simple app was not smooth at all. I think the flash packager still needs alot of work.
> 1 votes

---
Tags: iphone, flash
---


# Question
Title: Is there a free source for flat/32-bit character avatars to build off of?
I'd like to use some pixel characters as a base for tweaking into characters for my browser-based-game http://ninjawars.net . (In other words, I take a base template and I modify it with colors and pixels slightly to make character variations)

Now, my bbg is mostly ninja oriented, so a ninja avatar to work off of would be great, but more varied character types would be good as well. And I can probably fudge a "ninja" from some other template.

But, err, free-to-use-for-commercial-purposes (e.g. public domain) would be necessary. I'm already makin' a little money off the site from Ads, and would certainly like to make more, so I can't use stuff for "non-commercial use only", unfortunately.

So any source for free-for-commercial-use pixel-y 32-bit-y characters to use as a starting design base?

# Answer
There's a couple of nice resources.

Try Reiner's tilesets: http://www.reinerstilesets.de/

This is a terrific set of sprites. All were created originally with a 3D modeler, and then cut into 2D images. Many images have multiple animations from multiple viewpoints. Most of the images are in a traditional RPG theme, but there's a good chance you can find something you like. They are free to use in your own games with permission.

I also like Ari's spritelib: http://www.flyingyogi.com/fun/spritelib.html This guy wrote a book about creating 2D game graphics, and he's done graphics for several games. He released a terrific set of graphics under the GPL license. These graphics are a bit more dated, but they are also a super starting place.

There's another great set available here: http://www.lostgarden.com/2007/05/dancs-miraculously-flexible-game.html

I haven't used these tiles myself, but they look beautiful. They're a bit 'cuter' than you're probably looking for.

Yet another nice royalty-free set available here: http://www.spicypixel.net/2008/01/10/gfxlib-fuzed-a-free-developer-graphic-library/ This set looks ideal for platformers. I may use it in one of my upcoming books. (I've already used ari and reiner works)

Hope this helps...
> 3 votes

---
Tags: assets
---


# Question
Title: What's the state of the art in Space Partitioning for games?
I know about BSP trees, Octrees and Portal that where used for a long time. But modern games still use this systems or they are using new things?

If it's possible with pros and cons, considering rendering and collision detection.

# Answer
Yes, the Unreal engine 3 for instance still uses a BSP -- mainly because it's used during the CSG process. Doom3/id tech 4 uses portals, and I think I've read something that id Tech 5 is back to BSP trees. There are some games which use octrees, too. In game, my understanding is that UE3 moved to a more dynamic approach with occlusion queries, but I would be surprised if they don't use the BSP to at least determine which static meshes are in sight. Other games might just use view-frustum culling (Civilization for instance.) It really depends on what type of game you look.

The reason that BSPs and stuff is still around is because you can't do much better. If you have static geometry, a BSP is great if you construct it right. It requires you to write a BSP builder though, which is tricky (but it might happen for free if your CSG solution uses one!) Octrees and more dynamic solutions (like relying on occlusion queries for everything) are simpler to implement, have higher runtime cost but don't require (expensive) pre-processing of the levels. That's a trade-off that some games are willing to do (Crytek for instance wants everything to run in real-time, so they don't spend processing time to build a static acceleration structure.) Other runtime approaches are for instance software rasterization on the CPU and performing occlusion queries on the CPU (this is used by the Frostbite engine.)

For a really modern approach, look at Umbra, which is a middleware for visibility queries. If you search the web a bit, you should find some of the master thesis which describe the early beginnings of Umbra.

Bottom line: Whether you want to use a BSP/Octree/no AS will highly depend on the type of game you want to create. If your levels are mostly static, you should take advantage of that and build some static acceleration structure. If everything is dynamic, you need of course another approach.

For collision detection, I would take a look at Bullet and PhysX and their collision detection algorithms. But my feeling is that the physics solutions are less tied to the visibility than they used to be -- a physics solution might want to use a GPU based BVH, in that case, there's not much sense to try to use that for visibility queries.
> 19 votes

# Answer
I honestly don't know what next-gen engines are using these days, but I will tell you what I do know. It's easy to get confused between an optimization and the data structure used to assist in that optimization. All of the things mentioned below are for optimizations though, but I'll point out which ones are data structures specifically.

**BSP**: Data Structure - For detecting intersection between a dynamic moving objects and static world geometry. Used to be used for both collision detection and rendering of geometry correctly without a zbuffer, but it is no longer used for rendering anymore since we have enough memory for a z buffer now days. They're technically generated slightly differently though but still considered the same tree type. Requires preprocessing.

**Octree or Kd-Tree**: Data Structure - used for determining what objects are in the same "cell" or area to avoid doing an n^2 check on all dynamic objects.

These aren't the only ones, but are probably the most common. There are also a lot of optimizations that allow the engine to avoid rendering geometry in general. But the following just cull out the geometry, and that's usually all it's used for:

**Portals**: Not technically a data structure, but requires a special one to do culling. Used for visibility culling of world geometry and dynamic object geometry from view. Requires preprocessing to divide the world into areas I think. But I haven't actually implemented this, so I don't know.

**Occlusion culling**: Optimization - used for visibility culling for whatever you want, probably dynamic objects.

**Regular Viewport culling**: Optimization - culls objects that aren't in the camera's view.

**More viewport culling**: Optimization - Regular viewport culling can be optimized even further by using an octree. You can cull out entire cells of the octree that are behind the camera or not in its view. This includes patches of terrain (if you're outside). Whatever isn't culled by the octree you would perform "regular viewport culling". Then, whatever is left, you would render.

**Backface culling**: Optimization - culls geometry facing away from the camera to prevent rasterization. Usually done in hardware if the render state is set properly.

Special case data structures:

**AABB trees or Sphere trees**: These are kind of special case data structures. They turn a concave shape into a convex one. For example a character with bones is technically concave. It breaks it up into smaller convex pieces. Can be used as an optimization for collision detection, visibility culling of dynamic objects (usually), and makes it easier to do intersection tests against since it's convex. These would go inside of say, an octree since they're usually dynamic objects. These could also be used to assist with the occlusion culling optimization.

There is no reason why you have to use a single structure to represent everything (such as a scene graph). In my opinion, you would be better to use different data structures for different tasks instead of attempting to use one general purpose tree of some sort. For example, the engine I'm working on presently, I plan to implement a BSP/Octree/AABB Tree combination with the following optimizations: occlusion culling, viewport, &, of course, backface culling. This means I'll have one bsp tree, one octree, and probably multiple aabb trees within that octree.

The selection of the best data structures and algorithms/optimizations is probably the single largest and most beneficial thing you can do for your engine.
> 17 votes

---
Tags: octree, binary-space-partitioning
---


# Question
Title: Software Design or Advanced Computer Graphics for Game Dev Wannabe
So, I've been a programmer for 3 years and am finishing up my first graduate semester. I want to get into independent software( mostly mobile ) development with a interest in game development.

The university I go to does research in software development but not computer graphics, but they do offer courses in computer graphics and advanced computer graphics. I took the first computer graphics class this semester.

We used very little OpenGL. We have had 4 main projects where we have implemented the algorithms behind anti-aliasing, clipping, polygon filling, implementing our own transformations( replacing glRotate/Scale/Translate ), and phong lighting equation. From talking to a friend, he says it sounds like a good course.

I have a choice to make next semester, take software design or advanced computer graphics. I've talked to the professor teaching the advanced computer graphics class and he says we are going to be implementing the algorithms our selfs again, but it is focused on more ray-tracing type algorithms. I'm not sure how this class could help me in the realm of game development.

Now, the software design class I feel I could really use. I only took one class on software engineering in my undergrad and I have the possibility to do research in software engineering if choose to. I have found my self when working on my own iPhone apps in the past of hating some of the code I wrote. I did some design but just to get things going. I know that I need to do better at software design if I'm going to be a successful software developer.

So, I know I need both but I guess what would be more useful taking at a university? Which ever one I don't take I probably will try to teach myself in my own time. I'm kind of leaning towards Software Design just so I can see how it's really suppose to be done. Where as the advanced computer graphics algorithms aren't subjective in any way and just need to be implemented.

FYI: I won't be able to take the other class in the future as both of these classes are only offered once every 2-3 years.

Description on each class

Advanced Graphics: Realistic, three-dimensional image generation;modeling techniques for complex three-dimensional scences; advanced illumination techniques;fractual surface modeling; modeling and rendering of natural phenomena.

Software Design: Software design principles, attributes, models, and methodologies; object-oriented designs; real-time system design;user interface design;design verification; reusability issues;tools;current issues.

# Answer
Since you're most interested in the software design class, take it. Those tasks are universal, and the "advanced graphics" description seems a bit more targeted at pre-rendered rather than real-time (gaming) graphics. If you've got the cash, though, you might want to pick up the textbook for the advanced graphics course while it's in the bookstore; it could serve as a good reference and learning tool on its own.
> 4 votes

# Answer
## Definitely go with the Software Design course.

The Advanced Graphics course is a class on advanced ray traced graphics which are more suited to pre-rendered 3d graphics.

You also said you were not happy with your programming skill, and the Software Design course would help you increase your skills much more than the Graphics course.
> 4 votes

# Answer
Unless you're interested in designing *new* game graphics, a ton of work has already been done by the wonderful people at Unity and Cocos2d.

As I'm currently in a Software Engineering class, I can tell you it teaches you how to be a better designer and programmer, think "meta" about your program and design it better.

Graphics is just a tool library, and unless you're going into high-performance graphics rendering, you can just harness the hard work of others. I've self-taught both OpenGL and cocos2d over the past year, but I don't think I could have self-taught Design (or at least, been motivated enough to learn on my own).

HTH
> 1 votes

# Answer
pre rendered graphics have practically disappeared for the HD generation of consoles, expect the trend to continue in the future unless you wouldn't mind working on smaller, xbox arcade style games.
> 1 votes

---
Tags: education
---


title: Strangeness when simulating a chain

text:
# Question
Title: Strangeness when simulating a chain
I'm using box2d and I simply hook up 10 points each with a similar length constraint to the adjacent point.

When I move 1 point, the others follow just like a rope/chain. Just like one would expect.

What I would not expect however is that when I fix the leftmost point and then pull the right most, the points distribute themselves very odd. When I simulate it using ascii it is as following:

OO-O--O---O----O-----O------O-------O--------O

I would have prefered that one point would 'win' (given the order of point creation or something) and that the rest of the points would never reach the other point (due to their constraints). Or maybe even that the points would distribute themselves in a better fashion.

Does anyone have an explanation on why this is and how this might be solved?

# Answer
> 2 votes
(Just to be clear, when you say "length constraint", you mean b2DistanceJoint right?)

Is this along the ground? If so, pulling on the rightmost one is going to have to fight both the length constraint and the friction of all the others on the ground.

Are you sure your points are all equidistant from their neighbors when you first link them?

---
Tags: 2d, physics, box2d, rope-physics
---


# Question
Title: Line plane intersection: what is this variable?
I'm doing line plane intersection, and have come across an un-referenced variable or constant in the tutorial I'm following.

One of the formulae given is this:

t = N dot (p2 – p0)
N dot V

The variable I'm stuck with is `V`. Can someone tell me what `V` is and how I'd go about finding it?

For more info on that formula, please see the link given in the first para.

Thanks,

James

# Answer
> 5 votes
Looks like V = p1 - p0. Since then t = 0 when p2 = p0, and t = 1 when p2 = p1.

---
Tags: mathematics, linear-algebra
---