# Question
Title: Is story more important or the gameplay more important?
Read this Slate article. In particular, the following struck me:

> When he looks at video games from a critical distance, Bissell is concerned mainly with their lack of narrative meaning. Games ask us to save the princess, save the country, save the world, save ourselves—but no one plays games to achieve those ends. We play for the puzzle, for the physics, for the sense of being embedded in a fully realized world. Indeed, for me, the "story" usually seems like filler, even in games like Grand Theft Auto and RDR \[Red Dead Redemption\], whose stories are smarter than the rest of the video-game pack. RDR begins and ends every mission with cleverly scripted movielike "cut scenes" that provide some explanation for why your character is doing what he's doing—but the game also lets you skip the scenes, which I usually elect to do. Thus I can't really explain why my character is doing what he's doing. The real answer is he's doing it because I am making him do it, and I am making him do it only because I am having fun.
>
> "This is one of the most suspect things about the game form," Bissell writes. "A game with an involving story and poor gameplay cannot be considered a successful game, whereas a game with superb gameplay and a laughable story can see its spine bend from the weight of many accolades—and those who praise the latter game will not be wrong." What's the solution to this quandary? Should games invest more in story, in an attempt to bring us narratives that are on the level of those of the other popular arts? Or should games abandon story—is the video game, as a form, simply incompatible with traditional concepts of narrative, and must game designers instead find other ways to invest their creations with lasting meaning?

As if Bissell's uncertainty is echoing throughout the game industry, there has arisen a tendency to make many big-budget blockbuster games heavily story-driven. Even Starcraft II has a fairly story-driven campaign.

Is a game without a high-quality narrative bereft of true value and meaning? Must games have any meaning at all in the literary sense in order to be considered worthwhile forms of entertainment? What about emergent narratives, where the player has a decisive role in determining the plot (ideally much more decisive than we've seen in any games so far released)? If games do not need a higher literary meaning, do they at least need to have some lasting emotional significance for the player?

Those are just some thoughts that the article raised. The real question can be summed up like this: what is the true *value* of a video game? Is a game to be valued on its dynamic interaction with the player, on its ability to present a narrative in a way other mediums cannot, or on its ability to provide simple pleasure?

# Answer
> 6 votes
Without reading this in it's entirety my gut reaction is that people like this immediately sound as though they have no credentials:

> but no one plays games to achieve those ends

Unsubstantiated opinion, I would even go so far as to call this a lie.

> even in games like Grand Theft Auto and RDR \[Red Dead Redemption\], whose stories are smarter than the rest of the video-game pack

My opinion is that these games have some of the most cookie cutted stories of the industry - even Doom3 and HL2 have more original stories than these!

The reporter comes across like somebodies grand-dad. Bottom line - multi billion dollar industries, growing faster then most others, rooted in entertainment, cannot be described as a waste of time! IMHO :)

# Answer
> 6 votes
I think it's not very unlike movies. You have genres and traditions, and they value different things. Look for example at Fellini's 8 1/2. Undoubtedly a masterpiece, but very light on narrative. Contrast it with Citizen Kane, again one of the quintessential cinematographic masterpieces, with it's complex plot and reveal.

We do not try to judge all films by the same standard. We should certainly not attempt to do the same for a medium like video games, as it is even more diverse.

With regards to the titular question, I do not think games in general are more of a waste of time than other forms of entertainment. Of course, just like in the other media, there is tremendous variation of quality even within a single genre. There's Max Paine and Serious Sam, just as there's Great Expectations and the romance novels at the supermarket checkout.

# Answer
> 2 votes
The advantage of any game, video, computer, boardgame - is that it's interactive. The player is *doing something*, interacting with a changing medium, responding, thinking, planning, dreaming, exploring, etc. As opposed to passively sitting in front of a television four hours a night.

Isn't this question a bit *meta*, anyway?

# Answer
> 2 votes
Some games are pulp fiction. Others are more like their physical puzzle counterparts. There are games about human interaction, human nature, atmosphere, war, love, deep fantasy, shallow reality...

Are all of those things (and the many more I didn't mention) a waste of time?

# Answer
> 1 votes
I think the author is looking at it from the wrong perspective. It's a matter of target audience and player preference. He obviously strongly prefers gameplay over story and character considerations. Some people are just the opposite, and some games (RPGs) are targetted at them. RPGs are all about the story; the gameplay is just another narrative device. (The Metal Gear Solid series, for example, takes this to extremes.) In other genres, the story takes a back seat, but it's becoming more important as time goes by. For example, even with all the fun, innovative physics puzzles, can anyone really claim that *Portal* would have been even half as fun without GlaDOS and all her craziness?

We're seeing a lot of hybridization between the two extremes. Having story and character development introduced into non story-driven genres, what TVTropes calls RPG Elements, is an inevitability of Moore's Law in my opinion. Having a story that explains what's going on speaks to basic human desires. It used to be, back when system resources were sharply limited, that building a story-driven game didn't leave much space for anything else, which is how RPGs appeared as a distinct genre. But now that CPU and RAM power are much more plentiful, game developers have been putting "RPG Elements" in anywhere they can, because they improve the quality of the game.

Look at first-person shooters, the original "mindless cool graphics and gameplay mechanics" genre. Ask people what are the greatest FPSes of all time, and they won't say Quake or Unreal. You hear about the Half-Life series and Deus Ex, and sometimes even games like Halo or Gears of War which quite frankly had pretty mediocre gameplay, but *interesting stories.*

# Answer
> 1 votes
> what is the true value of a video game? Is a game to be valued on its dynamic interaction with the player, on its ability to present a narrative in a way other mediums cannot, or on its ability to provide simple pleasure?

Who says it has to be one or the other? These aren't mutually exclusive.

Some games have great linear stories. No reason why they can't, really. There can be value there.

Some games have non-linear stories that let the player create their own, to varying degrees of success. There can be value in the player-created stories, and also in the system that enables them (the same way that the printing press isn't "great fiction" in and of itself, but is still useful for creating such).

Some games have outstanding visual art. Even without anything else, if a painting can have meaning, certainly a painting inside a game could do the same.

Some games have meaning embedded purely within their mechanics. These games may not even have art or a story but they still contain meaning that can be learned through interaction on a purely mechanical level.

Then of course there's the social meaning of playing games with other people, which is enough of a topic that you could probably write several books on the subject (if they haven't already).

# Answer
> 1 votes
I think you've possibly mis-stated the premise of the original article (and I say possibly as I haven't read it). I don't think he has an opinion of the importance or otherwise of narrative in games, but I do think he's concerned that you can tack a bad story onto a game and it's still a great game. In that case, what value does the story have at all? Is the story just a charade to dress up the game - if so, for whose benefit?

It would be like having 'click to fast-forward' on the love scenes in action films. That would be akin to admitting that the scene is completely unnecessary. And indeed sometimes it is - but while film suffers from sometimes being a little incongruous, games seem to embrace it, flaunting the optional nature of certain aspects of the work.

So, in answer to his final question, *"must game designers instead find other ways to invest their creations with lasting meaning"*, I would say that they should certainly consider other ways (if indeed they care about meaning), but that if narrative forms a part or a whole of their game, it should be viewed as an integral design feature, not a bolt-on cosmetic aspect.

# Answer
> 0 votes
Like one of my previous speakers already said. Games are not a bigger waste of time than classic movies.

In fact they have quite some big advantages over movies. They include the spectator (player) as part of the story. Some games manage to do that better than others. For example some games change their story and/or ending based on the decisions are made and actions are done by the player. A good example for this is BioWare/LucasArts (developer/publisher) Knight of the old republic series. A player starts with his character in a lets call it neutral state. Based on his decisions and actions the state changes and so does the story (in this example not the ending).

Then there are others with other approaches like Infinity Ward and Treyarch/Activision which decided to create an interactive movie. You have a linear story and even a linear gameplay but that doesn't even bother anyone since it is like watching a movie in the cinema and even more interacting with it. Playing a role in it. It gives the players the impression they are important and have done something.

Then there are also different types of games. Every type of game fulfills its role and trains the players abilities sometimes its their soft skills sometimes its their hard skills (kind of).

For example role play games and multiplayer games actively train a players ability to interact with others and to communicate with others. This however depends on the specific type and layout of the game but generally this is true.

Multiplayer games can serve as a way for players to interact socially it even allows players to make friends online based on the same interest (the game) and based on their experiences and achievements.

Now first person shooter for example can train a players reaction and decision making speed (this is a true fact which even saved my life once).

Strategy games train your ability to plan for the future and foresee certain outcomes based on certain circumstances.

Logic games and games of skill well I guess you know what they are good for.

So what I've tried to say with all this is that every game serves a purpose and has its own way to interact and get to the player. It is impossible to answer your question as games can't be put in stereotypes.

# Answer
> 0 votes
I'd compare video games to board games, since the two share many traits that they don't with any non-interactive media.

Take Monopoly, for instance. The game's been around 50+ years (correct me if i'm wrong), and people still play it. Why? not for the story, but mainly for the gameplay. It's always fun to have a game of Monopoly and see who wins! Or Clue: people don't play that for the story either (there's almost no story: someone killed the whats-his-name of the mansion and it's your job to find out). The theme here is that board games bring people together to play games and have a good time interacting with each other.

Video games offer the ability to play a game much like a board game, but there are different (and fewer) restrictions on what can be modeled. Only more recently have developers been working on multiplayer games and games with story, and thus the focus has been on making gameplay the king. Games allow you to do this in many ways not previously possible; you can do highly detailed models of the world or implement complex systems for interaction, which would be an incredible pain or impossible to do in real life.

Games also pose a unique problem for telling stories in that it's difficult to both allow the player to play it as a game (not restrain him/her heavily) and move a story forward well. The industry has begun work on overcoming that, but it's a long road to do so.

In short, right now games are prized for their interactivity and not their story, but remember that video games are a new medium (being around for 20-30 years at most), and it hasn't had time to mature like film or literature. As time goes on, people will find ways to integrate story into their games quite well. However, the "games for the sake of playing" will stay around quite a long time i imagine, judging from the length of time humans have invented ways to entertain themselves through (traditional) games :)

# Answer
> 0 votes
This is a subjective question.

EDIT: I have a better example. Pokemon games actually have the most generic storylines ever. Imagine they are published as novels.

I had fun in OpenArena and Nexuiz and other storyless open-source shooting games. It's fun because how exciting it is to jump around and pick up frags.

I also played HeavyGunner, where there is a over 5-page description of the technology and history, and a one-page description of what happened after finished every bosses.

I also played Colony, the story is simple and brief, but it's fun to play online.

Last, the game of Life (literally), a typical life (including mine), doesn't have a stunning plot like a romance novel have, and a life doesn't even have a clear objective (the objective is subjective: varies from person to person). However, if that game is made, it will become the seller over its realism and complexity and even scientific value.

I also tried Grand Theft Auto on iPod Touch, I had hours of fun in the demo version, suicide bombing cops and blowing up cars, and I ignored all the missions except the first, mandatory one.

Pokemon games, it can get boring over full of battles, and the battle mechanic never improved, plus a high learning curve for competitive battling online. The story between generations also follow a fixed template (8 Gyms, a criminal organization, Pokemon League, that's it), it's the Pokedex and the fanbase made them enjoyable.

I think a good game should have a simple story that does not even require you to read it, and a good gameplay.

Here is a good test for your game: Reading skill test. Can someone who can't read English play your game? Can you play the game if it was translated to Japanese?

# Answer
> 0 votes
To me it's a rather simple thought experiment. If I take a game with story and gameplay and take out the story, is it still a game? I think so. Tetris is a good example of a game without story. Now if I have a game with story and gameplay and I take out the gameplay, is it still a game? Not so much. So, in order for something to be even classified as a game story seems less critical than gameplay.

---
Tags: game-design
---


# Question
Title: Good examples of 'transferable game logic' across genres?
Do any of you have any good examples from two or more games that share some of the same game logic, but are of entirely different genres? Could very well be one of your own games. Take Warcraft 3 and World of Warcraft for instance. Entirely different games, but they *could* have some game logic in common without us knowing.

# Answer
> 9 votes
**Game logic re-use can be a wonderful thing!** Here's where and how we've used much of ours from project to project. About 75% of our 2004 title exists throughout the games we've created in the subsequent six years, even though they are all quite different:

Here are a few places where we've re-used modules:

* **Tools:** The level editor for Inago Rage exists as part of Aaaaa! and Ooo!, but it also formed the basis for gameplay for Epidemic Groove (the player's interface for building defenses is an augmented version of the map editor from the previous game).
* **Libraries:** The audio wrapper for our sound library of choice is shared between all five titles. We've improved this with each iteration.
* **Game Logic:** Elements such as player movement logic were/are re-used where appropriate. No need to re-invent the wheel.
* **Utility:** Certain elements such as text display/HUD are re-used and (ideally) augmented each time.

**Pluses:** Over these titles, we've learned the following positive things:

* Re-use reduces the time required to prototype new ideas.
* It can also reduce time-to-market once we're past the prototype stage.
* Elements that seem outdated can serve as a basis for more polished future work. For example, if the UI that displays the score is ugly and aliased, no matter -- we can use it during development, and polish when we're ready.

**Minuses:** And the following negative things:

* Re-use can sometimes constrain what we do when we prototype. For example, we never considered an RTS-style game because it was too far from what we'd done before.
* Sometimes we neglect to refactor, so we end up with the code equivalent of junk DNA. There are routines that handle weapons upgrades from our 2004 FPS in our 2009 title whose gameplay does not involve combat.
* If the code sits atop one engine, porting it all to another engine can be difficult. (For example, we want to move to Unity for cross-platform compatibility, but that requires a certain time investment we didn't want to make just yet.)

Still, I think our inclination to re-use has kept us in business thus far, and would recommend the practice. Hope that helps!

# Answer
> 0 votes
The easiest examples of this are two games that use the same engine, or one game that is a "mod" of another game (which is just a special case of "same game engine" really).

And yes, of course you can do that. One of the Warcraft mods took away the concept of destroying the opponent and essentially created what is now known as the "Tower Defense" genre, which is a bit different from the Realtime Strategy genre. Portal and Half-Life 2 share their game engine in common; I'm not sure exactly what genre to call Portal, maybe a physics-based puzzle game, but I'd be hesitant to call it a pure first-person shooter.

If you want to get technical, all games using, say, Game Maker are built using the same tools, and therefore share some of the same objects and behaviors. Or even games using C++ that are all using if statements, for loops and pointers, whether they be RPGs or FPSs or retro-arcade games. So it all depends on how loosely you define things.

From the question title, I'm guessing that what you're REALLY looking for here is a general list of "game programming" tasks that are used in a variety of games, beyond just "normal" programming -- in other words, what functionality should be common to every "game engine"? And yes, there are a few things: random number generation; displaying sprites (for 2d games) or polygons (for 3d games) to the screen; ability to accept and respond to player input in real-time; collision detection; pathfinding; playing sound effects and background music.

# Answer
> 0 votes
I believe this deals with logic like "making the player jump". I've heard that question from inexperienced developers a couple times. What you're looking for is more algorithmic in nature. For example, the code to make an actor jump in a game could be uniformly used in any engine and any game that supports jumping characters.

It needs: \- a velocity vector for the actor \- a force modifying the velocity (jump) \- changing actor position based on velocity every frame \- reducing velocity every frame based on gravity \- certain minima and maxima, like min/max speed

This works in a 2D Jump 'n Run, a 3rd person action-adventure or a 1st person shooter in any engine. Only the parameters (force, gravity, coordinate system) change.

But sharing this kind of code across games of different genres is unlikely simply because developers:

1. change engines (sometimes depending on game genre)
2. stick to a certain genre anyway
3. simply re-write the code because it's so simple or requires significant architectural changes because of the game genre or game engine
4. love to reinvent the wheel (some do)

---
Tags: game-design, game-mechanics
---


title: Best 3rd Party DRM Solutions

text:
# Question
Title: Best 3rd Party DRM Solutions
What are the best 3rd party DRM solutions available from a user experience, development integration, and security perspective?

# Answer
There is no such thing as good DRM. Consider it from the computer owner's perspective: DRM is a program whose function is to override the owner's ultimate control of the system and allow some other programmer somewhere else to dictate what he can and cannot do with the computer, which is his personal property.

In any other context, this would be considered computer hacking, which is a serious crime. The only reason people can get away with using DRM today is because the DMCA explicitly turns the entire legal issue inside out. (It's now legal to hack anyone's computer pretty much however you want to as long as they have your copyrighted material on it, and the owner is the one guilty of a computer crime if they try to assert their natural right to control over their own property.)

When programmers say they want DRM, what they really mean is that they want to protect against lost sales. This is both futile and counterproductive. Futile because in the age of the Internet, all it takes is for one person, anywhere, to produce a working crack and upload it somewhere, and your DRM is broken everywhere. Counterproductive because DRM causes inconveniences for the user which lowers their perception of its quality and thus their incentive to buy it. Just look at Spore, which was a mediocre game, but nowhere near as horrible as its reputation would have you believe. It got crushed by backlash against its DRM, not by the game itself being bad. On the flip side, look at Sins of a Solar Empire, the best-selling game of its year, released 100% DRM-free. Consumers saw the lack of DRM as a positive feature that *increased* the perception of quality significantly.

There is only one way to get people to pay money for your game, and it's not by hacking their computer. It's by releasing a product whose perceived value is greater than the price you're asking for it. Don't waste effort even thinking about DRM; work on making a game people will want to play.
> 21 votes

# Answer
For a PC title, Steam is really the only one that should be considered these days. Safedisc and SecuROM install terrible things onto the user's computer and cannot be uninstalled.
> 14 votes

# Answer
From a security perspective, 3rd party DRM is never good, as it allows hackers to apply knowledge gleamed from other products using the same middleware.
Middleware and copy-protection are pretty much mutually exclusive, getting a custom solution will at least defer the process a bit allowing some sales before the game is hacked.
> 1 votes

# Answer
Although I assume you're asking for PC games, I would like to add that Google provides their own license system for Android developers.

http://developer.android.com/guide/publishing/licensing.html
> 0 votes

---
Tags: security
---


# Question
Title: Available Small Open Source Game Engines for tutorial
I'm learning to create a game engine from scratch in XNA. I'm seeking examples of very small game engines, specifically the architecture and structure of source files, etc. It should include a scripting engine. Articles are also appreciated.

More specifically, I have a problem knowing how to connect the scripting engine to the rest of the game engine, like loading a models from the script.

# Answer
> 2 votes
The Angel Engine is a very nice, small Open Source engine written in C++ and OpenGL. Plus it has a Python scripting interface. Although the engine is not written in C# it should give you a few pointers and ideas, and from the little I've played with it the code is very clean and easy to understand even if you're not totally up on C++.

# Answer
> 4 votes
I like the book Programming Role Playing Games with DirectX (2nd edition) for its scripting section; I haven't really seen a start-to-finish tutorial on making a scripting engine elsewhere. And of course, being a book, it will walk you through step-by-step creating the scripting part of the engine (and the whole rest of the game engine that he establishes throughout the book, of course). Unfortunately the source code isn't available online.

Once you have a scripting engine, I would **keep separate the 3D models from the scripts**. Scripts are typically in the logic side of things, while 3D models are most certainly the presentation/view side of things, and those shouldn't really be mixed. When a script commands a character to "walk to (3,5)", it doesn't need to say "load walking animation, set velocity to (-1,1), wait 3 seconds, set velocity to zero, load idle animation"; you'd typically just have a `walkTo(x,y)` function available to the script, and the intermediate code would take care of 3D models, animations, etc.

But hey, if you really need to, then define your own functions in your scripting interpreter which get 3D models and do whatever you need with them. I think you're thinking a bit too far ahead; worry first about writing a simple script interpreter, and then add the necessary functions to the interpreter as you're writing your scripts.

---
Tags: open-source
---


# Question
Title: Why isn't my world coordinate mapping back to the proper local coordinate?
I'm using XNA and am having a simple issue which I can't figure out. I'm just messing around and want to get a firm grasp of local/world space coordinates.

```
        Matrix rotateCharacter= Matrix.CreateRotationZ(MathHelper.ToRadians(45.0f));

        Matrix moveCharacter = Matrix.CreateTranslation(new Vector3(10,10,0));

        Matrix multMat =Matrix.Identity * rotateCharacter * moveCharacter ;

        Matrix WorldToB = Matrix.Invert(multMat);

        Vector2 worldCoord = new Vector2(10, 10);
        Vector2 worldToB = Vector2.Transform(worldCoord, WorldToB);

```

So all I'm doing here in my example is initially rotating my sprite's local axis around the world origin and then translating it out into world space. Thus, a world space coordinate of something like (10,10) would be 0,0 (my pixel's starting coordinate) in the local space (worldToB should be (0,0)). However, this is not occurring I guess as my inverted matrix is incorrect. Can anyone give me an answer of what I'm doing wrong exactly?

# Answer
> 1 votes
> (worldToB should be (0,0)). However, this is not occurring

But the vector2 worldToB does end up being 0,0 in your code above..., within the realm of floating point error anyways.

The actual value of worldToB.X is -0.0000002843... on my computer which for all practical purposes is 0.0f.

---
Tags: xna, mathematics, coordinates
---


# Question
Title: Make Windows game appear in Games Explorer (Start Menu - Games)
How can I make my game (right now just a C# Console Application) appear in the Start Menu under Games??

I mean is it possible for any program to register as a Game in Windows Vista / 7?

# Answer
Turn to MSDN for all your Windows answers!

"Games for Windows Technical Requirements: Best Practices for Games on Windows XP, Windows Vista, and Windows 7" has a section on Games Explorer Integration.

> Integration with Games Explorer requires that you author a game definition file (GDF), which is an XML text file that is embedded within a binary file (an executable file or a DLL) as a resource, along with a Windows icon. The game must then be registered with Games Explorer.
>
> ...
>
> Details on integrating with Windows Games Explorer are provided in the DirectX SDK. The DirectX SDK includes a game definition file (GDF) editor, as well as an example GDF that is included in GDFExampleBinary, a sample. Another sample, GameUxInstallHelper, provides routines for integrating the required functionality into existing installation systems. The Game Definition File Validator (gdftrace.exe) provides debugging support for evaluating a GDF. Also see "Windows Games Explorer Integration" in the DirectX SDK Documentation for C++.

There is another article too, "Windows Games Explorer for Game Developers", which might provide additional information, especially if you use an InstallShield or MSI installer. It looks like you can just integrate it into the installer.

Also this blog post looks like a really great tutorial; even though it supposedly applies to XNA games, I read through it and it looks like it would still apply to you! Especially pay attention to this:

> Which brings us to our final task – the actual registration of the game. This stage is generally done by an installer such as Inno Setup or InstallShield rather than by the user or developer directly.

And that (integration with an installer) seems to be covered by the above Windows Game Explorer for Game Developers article. So I think, given this information, it should be pretty straightforward!
> 13 votes

---
Tags: c#, windows, console
---


# Question
Title: Is there an easy way to create an AI opponent for the Othello game?
Is there a well known AI technique to create an opponent in the game Othello (aka Reversi)?

# Answer
Standard game-tree search techniques will beat most human players easily. Othello has less combinatorial complexity than chess, and humans have a harder time forecasting the future in Othello.

http://en.wikipedia.org/wiki/Reversi#Computer\_opponents\_and\_research

http://en.wikipedia.org/wiki/Computer\_Othello
> 7 votes

---
Tags: game-design, ai, competition
---


# Question
Title: Hardware acceleration for the Flash Player
What do we know about hardware acceleration for drawing operations in Flash? I know that since 10.1 it's there for video playback (and mobile graphics) but that doesn't really help with rendering desktop game graphics.

So, is there any information about it, or maybe talk or rumours going around? Do you think it's something we'll get at all within a reasonable period?

I personally really keep hitting the ceiling with Flash' software renderer. A game scene that, were it hardware accelerated, my PC from 2003 could render while sleeping, runs at a low 20 fps on my quad core laptop. It's a shame because the Flash VM is otherwise rather fast.

Or maybe I am wrong and Flash is already using the GPU, and my games are slow for other reasons?

# Answer
This is what you're after:

http://www.bytearray.org/?p=1836

Seems like all will be revealed at MAX on October 27 2010. From what I've heard there will be GPU accelerated 3D, which of course can also be used for 2D. If they are sensible though they will also provide 2D APIs, but we'll see. Someone can always write a framework on top of it to 2D-ize it. Personally I can't wait til October to find out!
> 3 votes

# Answer
> I'm using various scaled Bitmap objects and a few vector gradient overlays

You can use really inefficient methods with any other programing languages too.

Scaled Bitmap objects = really bad performance.

Vector Gradient overlays = really really bad performance.

If you want to use the flash native render, use non scaled bitmap objects, and any vector stuff, make sure you use a low amount of curves, with no gradients other than on a small amount of objects.

If you want performance with better looking graphics look into Blitting, it is less flexable than the native render, but if you are looking for performance, you are going to have to use this.
> 1 votes

---
Tags: flash, gpu, hardware-acceleration
---


# Question
Title: What technology is best for building my first game
I have started a few game projects in the past, but have never finished anything. I decided that it was probably because I was writing everything thing from scratch, and just ended up dropping the project once development started taking too long.

I've decided that I want to finish my first game now, and needed some opinions on what sort of middleware would be good to use. I was hoping that with an engine provided for me, I'd be able to finish the game.

I am most familiar with C++, but do know quite a few other languages as well.

# Answer
> 4 votes
Depends on what you want to achieve and your current skillset. I'm taking this from the point of 'I want to learn gamedev' rather than 'I want to learn language X and gamedev'. Since you're comfortable with C++, I advise using that. The other major advice here is start 2D. It's more complex than it looks, so starting as small as possible is good. (Nobody wants a 1D game.)

Then it comes down to what you want to do. The two routes are going to be using a lower-level graphics library, such as SDL or SFML, against a higher level graphics engine such as OGRE3D or its 2D cousin, TROLL2D. I would again advise the former. You gain a lot more from making your own little rendering routines (I'm not meaning rendering routines as shaders and the like, but more how sprites work) rather than using what people have done.

Start small. Tetris may seem small, even Mario might. But these are still pretty big. I advise something like Tic-Tac-Toe if you aren't sure - no real time involved. But you would still need graphics, some AI, winning, a game loop, etc.

If you want to aim a little higher, Pong is good. It is real time, so you would need real-time input, as well as collision detection (bounding boxes), better AI, maybe a simple menu. All this will teach you important skills.

Then try Tetris: you've got timers, random generation, more collision detection. Then PacMan or something. After you've made a few, you can go more wild.

All it comes down to is practice. It's quite possible to learn gamedev by coding a 3D RPG in C++ (let's say you can, for example's sake) when the closest you've done to any programming is Excel macros. You would get there, but it would take an awfully long time from all the stuff you have to learn. Not to mention the fact you'll probably give up from finding it too difficult.

# Answer
> 9 votes
I'm surprised **XNA** hasn't been mentioned yet!

* The tools are free.
* The language (C#) is like C++ but so much nicer.
* There's a huge library of *well coded* samples.
* You can easily port your game to Xbox 360 and Windows Phone 7.
* Suitable for 2D and 3D games.

I found, when I moved from C++, that XNA and C# cover much of the boilerplate code that tends to bog down a C++ game project.

# Answer
> 5 votes
I would recommend Flash and probably the Flixel engine. The engine abstracts a lot of Flash-isms from you and takes care of many common game components. Things like collision detection, tilemaps, spritesheets, and animations are all taken care of for you. As for tools you can use Flash Develop on Windows, it's free and one of the best editors for Flash. On Linux and OS X your options are slightly more limited I might recommend using the command line compiler and Vim, or Flash Builder at least while it's available on trail.

The reasons I recommend Flash are as follows:

* Very high level language keeps you focused on game specific stuff instead of memory leaks, etc
* Large, mature community has likely solved any problem you run into, code and examples is easy to find with your favorite search engine
* Established market has simple ways to distribute your game to customers, you can self host, go through a sponsor, post to a portal, use Facebook, etc
* Mostly everyone can play a Flash game, getting a million plays isn't considered a big deal, so if you want to get your game out there it's a good choice.
* Likewise it's very easy to share with a friend or tester. Just send a link, no need to worry about run-times, installations, etc.
* Flash CS IDE is a world class editor for layout and asset management. Plus if you later want to hire an artist he will likely be an expert working with it.
* Great libraries such as Tweenlite make it really easy to polish your game
* Multiple ways to monetize your game -- though don't expect it to be easy -- through sponsorships, advertisements, direct sales, etc
* Adobe AIR makes it pretty easy to make your game available as a "native" application, in my experience the process is better than, say, Java

# Answer
> 2 votes
Your question is pretty broad as you haven't said what type of game you're making. I'm using 'pygame' as I like to make simple 2D games with sprites.

# Answer
> 2 votes
**Unity3d** is a good way to start. They have good documentation and its a complete development package. The languages for scripting are C#,Boo, and Javascript. I had a simple first person "shoot the bouncing balls" game going in about a month and a half using only provided assets and default shapes. The documentation is great and the whole system is easy to understand and manipulate. The community for Unity is also of a nice size. If you want you can program custom shaders in C++ for Unity as well.

The only thing that would be an issue is that Unity is 3d and making assets can be a big stopping point. I use **Google Sketch Up** to make most of my models and then export them as collada files which can be pulled into Unity. Sketch Up is incredibly simple and easy to use. The only time it becomes difficult is when you start trying to work with spheres or rounded surfaces so for the most part I stay away from those.

# Answer
> 1 votes
**HGE - Haaf's Game Engine** is a C++ 2D engine. A very well established and very stable engine based off of DirectX.

I would definitely recommend making clones of very simple 2D games to stop yourself from getting too ambitious. Tetris, mine sweeper, pacman, etc.

# Answer
> 1 votes
You don't mention whether you're looking at building a 2D or 3D game, but as you say youy're most familiar with C++ there's also the Angel Engine, which is an open source 2D game prototyping engine available here: http://code.google.com/p/angel-engine/

It's cross-platform (Windows, MacOS X and Linux) and is very much geared towards rapid development.

# Answer
> 0 votes
Start simple. I prefer Flash due to its easy-to-connect graphics and code nature. Flash is also the choice of thousands of people. The coding can be done in Actionscript, the latest being AS 3.0. And as you asked using an engine would be good. I prefer Box2d as it has a good way of applying physics into our games.

I'd also like to tell you that, DO NOT EXPECT to make a gorgeously amazing physics bike race in a week! The first thing you have to learn from Game programming is that , This is programming taken to a whole new level of creativity. You can say a Game programmer is worth 3 Application Programmers. And I mean it. There is a lot of hard work and most importantly "patience" and will power to try again and again till you succeed.

---
Tags: c++
---


title: OpenGL wireframe

text:
# Question
Title: OpenGL wireframe
No, I'm not looking for glPolygonMode. I'm searching for a method, possibly a GLSL shader that would produce that retro-style wireframe look for objects. Any suggestions?

Something like Vector Tanks had.

Preferably the solution should work on OpenGL ES 2.0 also.

Any hints and pointers (as long as not NULL) appreciated!

# Answer
> 10 votes
Some links of interest:

Baerentzen et al. "Single-pass wireframe rendering" http://www2.imm.dtu.dk/pubdb/views/publication\_details.php?id=4884

Nividia Corporation "Solid Wireframe" white paper http://developer.download.nvidia.com/SDK/10/direct3d/samples.html

edit: I see the first one was already mentioned, sorry!

# Answer
> 5 votes
I would highly recommend using textures, as Dave said. It may be something of a pain, but it would provide much better performance, I think.

You could try searching for **edge detection** algorithms. If you create your meshes using vertex coloring with solid colors and medium alpha values (for slight transparency), and then use an edge detection shader, it might look good enough. It wouldn't be quite the same, but you might like it even more; or maybe not.

Otherwise you may be looking at a two-pass solution, drawing translucent polygons (again, set the vertex colors to a solid color with a medium alpha value), then setting glPolygonMode(GL\_LINE) and tweak glLineWidth as desired (perhaps based on the object distance) and draw the polygons again.

It's a little late and I'm having a hard time reading through this, but a forum discussion points to this PDF: Single-pass Wireframe Rendering. My apologies if it isn't relevant.

# Answer
> 2 votes
I know it's probably not what you're after, but it looks like Vector Tanks just uses textured models. The texture gives the wire frame look, it runs on my iPod touch which doesn't support shaders.

# Answer
> 2 votes
The only way I've seen it done is with high-resolution, mostly-black textures, such as the ones in Tron 2.0. Their textures are almost universally either a flat black with a thick, colored border, or a simple Perlin noise texture.

They applied some simple post-processing to achieve the glow effect.

# Answer
> 1 votes
You could try some kind of simple distance function in the pixel shader. Perhaps something like barycentric coordinates (store different RGB at the vertices and the rasteriser will do most of the work for you).

Then your pixel shader will have the information it needs about where on a polygon the current pixel is - near a vertex, near an edge, or in the middle...

I suspect in practice it'd be easier to texture it though.

# Answer
> 1 votes
How about this: Take your model, and bevel the edges you want to appear as outlines. Color the faces that were created with a bright opaque green, while all the old faces are a dark translucent green.

This requires no use of pixel shaders at all. (No textures either, in fact; just face colors.) It does require some model preprocessing on your part, which may or may not be an issue.

You won't be able to see the outline when the beveled surface is perpendicular to the view. If this bothers you, you can extrude the beveled surface out a bit, coloring the extrusion as you would have the bevel. You can play around with different degrees of bevelling and extrusion to make thinner and thicker lines.

---
Tags: opengl
---


# Question
Title: Tools/methods for creating demo videos of iPhone/iPod Touch games?
I'd like to create a simple demo video of a game for iPhone and iPod Touch. **What tools do people use for this?** Ideally I can capture the device's screen... as opposed to the simulator. Also the game uses tilt controls... hence capturing the device's screen helps put actual game play into the demo video.

# Answer
> 2 votes
See this stackoverflow question: https://stackoverflow.com/questions/200049/is-there-a-way-i-can-capture-my-iphone-screen-as-a-video

---
Tags: video, screen-recording, demo
---


# Question
Title: Use of solid brushes and CSG in level building
Since Quake 1 (I think it was the first), level design tools for FPS games have used solid brushes and CSG operations to define level geometry instead of more conventional poly modeling tools you see in general purpose 3d applications like 3DS MAX.

Why is this? Is it:

* More productive for the level designer?
* More likely to lead to closed geometry that won't screw up potentially visible set pre-calc?
* Results in lower poly count (more cumbersome tools dissuade designers from adding too much detail)?
* ...

# Answer
> 4 votes
Mostly, in practice, it comes down to optimising lighting and visibility calculations. Portalling up a CSG world is relatively easy compared to polygon soup.

It doesn't usually end up with a much lower poly count because many people who do use it allow decorative objects to spice up the world after building the body of the level. It's not normally better or worse for a level designer, but does allow a more "rough it out" approach than traditional mesh builder level design.

---
Tags: tools, level-design
---


# Question
Title: How to client/server game using Google App Engine (Looking for tutorial.)
(NOTE: This is a duplicate of a question I asked on SO, having temporarily forgotten about GameDev \<hang head in shame\>. When one is answered, I will link it back to the other.)

I'm trying to do my first client/server game using Google Apps Engine as my back end (specification requirement.) I've done the tutorials (Java), but that all seems highly browser-centric.

Basically, I'd like my (mobile, not that it matters) app to:

* Allow the user to create a game-account (NOT their Google account!)
* Log-in with that account.
* Press the "MARCO" button to send an account-identified request to the server.
* Get a "POLO" response from the server.
    + As data (like a JSON object, XML-DOM or similar), not as a web-page.

Can anyone point me to a good tutorial/sample project/detailed reading to help me achieve that? I'm pretty sure that, once I get that working, I can do all the rest of it -- but I'm having the "stuck at the starting gate" problem, not being able to work up basic account-login, and non-HTML data exchange.

Thanks!

# Answer
> 0 votes
The part that wasn't clicking for me -- and, as I suspected, was very very simple -- was that it's just a matter of implementing the doPost() (or doGet(), but I use POST) routine, and write back to the responder.

There were also some bits that I didn't follow quite correctly the first time about setting-up the responder class-names and URLs, in the web.xml file (in the war folder.)

Once I got that (web.xml) set up correctly, then the doPost() routine was simply something along the lines of:

```
public void doPost(HttpServletRequest req, HttpServletResponse resp)
  throws IOException {
    String reqTypeStr = req.getParameter("reqType");
    if (reqTypeStr.equalsIgnoreCase("marco")
        resp.getWriter().println("Polo!");
    else
            resp.getWriter().println("huh?");
}

```

There are myriad other details but those were the two that hung me up the most. Once I broke that simple barrier, everything else flowed together very quickly.

# Answer
> 3 votes
I have a working example of a client/server game built on App Engine. You can fork it on GitHub and try the live demo.

I haven't written about it or anything yet, but the code is relatively well commented. Have fun!

# Answer
> 0 votes
For something that simple I would recommend using python(and in general the python GAE experience is quite good.)

I am pretty sure that for what you want to do the simple app engine tutorial and documentation woud be enough. You want to create an application that has 3 controllers( check credentials, create credentials and answer marco-polo).

There are a bunch of open source examples of python code for the app engine in github, and a lot of documentation on the official site, i would say go try it out and if you run into a wall ask a specific question =D

Hope that helps!

---
Tags: client-server, google-app-engine
---


title: Gui Implementation techniques

text:
# Question
Title: Gui Implementation techniques
I've been working with a few game oriented gui libraries trying to find a good fit. More specifically, a GUI that will work on Windows,Linux,iPhone, and Android with minimal special code.

In my tinkering I've noticed a few libraries like to render the their GUI's to an off screen texture that just display the texture instead.

Is this a common GUI technique?
Isn't there a performance hit with rapidly changing GUIs?

Were I the implementer I would have just rendered the GUI directly each frame. Is there anything particularly wrong or inefficient direct rendering?

---

Update: By *'game-centric GUI'* I mean a GUI framework that doesn't own the window or the main loop. There are other features I'd add but the main loop is the only critical one. This usually involves various rendering backends, input injection, and an update method.

# Answer
Yes, this is a common technique and two immediate benefits spring to mind:

1) The render-to-texture technique as a way to circumvent the inherent issues that come with supporting several resolutions and/or aspect ratios. You can scale the texture to your screen size or just render it in the centre. It's just a way of virtualising your coordinate system.

2) If rendered onto a texture then this can be applied to a mesh or a quad and transformed. For instance, if you wanted your GUI (Menu) to appear at a 30 degree angle to the camera then you'd render to texture, wrap the texture on a quad and then transform the quad.

Most rendering into a texture is essentially the same as rendering into a buffer, so no, there is little-to-no performance hit.
> 5 votes

---
Tags: gui
---


# Question
Title: Networking in Flash games. Socket or Stratus?
Working on a prototype for a Flash game that will use networking communication. It would be better to use Peer 2 Peer connection, since it will be a multiplayer game.

Has anyone used Stratus or tried to make a multiplayer game via the built in socket?

The game will be a turn based game, similar speed to poker but if I could get faster turns that would be great.

# Answer
> 6 votes
I am not sure flash allows P2P without Stratus (and v10+ only). But if you want to go socket route I suggest you give Red5 a shot http://osflash.org/red5 . I wrote a small how-to on installing it on ubuntu here: http://www.vga.hr/blog/?p=65 It's a bit old, but should still be valid. If I were to make a networked flash game today I'd weigh my options between RED5 and SmartfoxServer http://www.smartfoxserver.com/

# Answer
> 3 votes
For a turn based game you don't need the extra speed of peer to peer, and you want to use the server to do some cheat detection. Electroserver, player.io, smartfox and red5 will all do the job.

# Answer
> 2 votes
I think the real bottom line is this: Do you care that clients could easily hack the game experience?

If the answer is yes, develop on an authoritative server model. I'm a fan of ElectroServer.

# Answer
> 1 votes
ActionScript does have a socket class. It is XMLSocket. If you can support ActionScript 3.0, it has a better Socket class.

# Answer
> 1 votes
You might want to consider also BlazeDS, Union Platform and Firebase.

Even though Stratus seems to be a very efficient from data transfer efficiency point of view, it doesn't come without problems. As far as I understand, it works on top of the UDP layer (instead of TCP/IP), which could cause firewall related issues to some of your players. Furthermore, the technology seems to be at beta stage so I wouldn't build a commercial application on it yet (never tried, though, this is just an emotion based opinion).

---
Tags: flash, networking, multiplayer
---


# Question
Title: How to loop over a part of an ogg vorbis stream?
I'm successfully streaming ogg vorbis data to openAL with the Java library JOrbis, but now I want to loop over a part of this stream, e.g from 30" to 1'30".

I thought that at the end of the loop, I could redecode from the beginning of the file, skip the unwanted part, and then keep streaming until the end of the loop, and restart again. But I'm not really convinced by this method, as for example, if I want to loop over 4' and 4'30", I'll need to decode each loop 4 minutes of ogg data for nothing.

Another way would be to put all the loop in memory, but it won't be streaming anymore and I want to avoid this.

So is there a way to reach a point in an ogg vorbis stream without decoding the previous data every time ? Does ogg contains a kind of index that can be used, or is it possible to make one by decoding the whole file once before ?

Thanks

(ps: I could't give this question the right tags as I haven't yet 150 rep)

# Answer
Backtracking and seeking in Vorbis files is notoriously tricky. Restarting from the beginning may be your best option, especially if you are using someone else's API.

Another option would be to cut up the file into two, one of which is the full track and then a second 30 second track which you (hopefully) can transition to without a gap.

A third option, if your API provides the information, would be to build a custom lookup table of granulepos -\> file offsets, and binary search through that, then read linearly from there. The table size can be adjusted based on memory requirements, unlike the disk file. Although, there are some tricky issues with that...

Sean Barrett wrote an Ogg Vorbis decoder for RAD and explained in some detail why the format is no good for seeking. It mirrors my experience working with Ogg Vorbis, and I didn't even have to touch the Vorbis part for my work.
> 5 votes

# Answer
Yes, you can seek into an ogg, assuming the off file you are reading is seekable (which most file are). As I am not familiar with JOrbis, I will present native C/C++ solution (using vorbisFile.h - i.e. libvorbis), hopefully you will find some counterpart in your library.

Use ov\_pcm\_seek to seek into your desired position, then you can continue reading normally using ov\_read
> 0 votes

---
Tags: optimization, java, audio, openal, ogg-vorbis
---


# Question
Title: Need some advice on a java api to use for a 'presentation display board' - based on game 2d/3d tech
As part of the project i am working on I am looking to produce some software that works on a LCD display (think call center info boards) and displays various graphs (the bars grow etc in realtime, so incoming call stats etc etc) and flicks between various 'plug-ins'.

I asked before, and WPF was suggested, and it looks excellent.. However i really need to keep to Java (work standards).. So the question is what XNA style API is the best for this, I can see that JMonkey etc seem to provide 3d stuff, but I also need sprites etc.

For example: Think, defused 3d planet rotating in the background, while call stats are printed over the top.

# Answer
Depending on how much 3D you're really going to use will most likely be the largest factor.

**Primarily 2D:**

If your application is primarily 2D(*like 95% to really make this a viable option*) then use the **Slick** engine which is a 2D engine. 3D models will have to be done directly in openGL via **SlickCallable**.

**Primarily 3D:**

It might be a lot easier to use the **JMonkeyEngine** 3 and use textured billboards if you need a lot of 3D graphics. A lot of the expected sprite handling will needed to be coded by yourself though, although you can stay within the world of JMonkey and not have to drop to openGL.

**Unique Hybrid of 2D and 3D:**

Depending on how much interleaving of 2D and 3D technology you need it might be more beneficial to create your own hybrid engine straight from **LWJGL**.

A tutorial on how to build a **2D/3D asteroid game is located here**

**Source code here**
> 2 votes

---
Tags: 2d, 3d, sprites, java
---


# Question
Title: Opinions on using AE and/or Flash for 2D animation?
I am each day making the art in illustrator more complete and now comes the time where I decide to invest in an animation program/route. I hear at times for people to use Toon Boom but the problem is I don't see a ton of tutorials and it seems like it's more for hand drawn animation. So, I'd use AE for example to draw out 15 or so frames for my robot rolling animation, adjusting the lines in different areas and then use a script to export that to a spritesheet I suppose. The main thing I want to avoid is the stiff puppet animation I see in many flash animations. So, do you guys have any thoughts on starting on either of these two programs for 2D animation or tips in general in relation to this process?

# Answer
> 2 votes
The stiff puppet animation you see is not a result of flash, but rather enabled by it. I've seen really great animations done in flash, it just depends on how you use the software. If you make an arm movieclip and put it on a spline or just rotate it in place then yes, you'll get the puppet animation. Flash has functionality to ghost previous and next frames, to help you draw smooth transitions. I've used it to draw pretty smooth stick figure animations before (my art abilities are limited).

I think the major difference you need to factor into your choice is the type of drawing you want to do. I find flash better to draw things precisely. If I need it do be symmetric, with equivalent angles on every side, flash does it better for me. For example, drawing tanks, cannons, spaceships.

Actually making them look good, artistically, becomes a challenge. Sure you can apply a simple gradient, but I find it harder to add the "finishing touches" in flash. I usually export to images that I finish in Paint.NET or something.

Of course, flash is very expensive. If you have access to it, or have lots of spare money, I recommend using it. Other wise, I have *tried* Toon Boom and it didn't seem that bad. I just was familiar with Flash and Paint.NET, so that's what I used.

I don't feel that flash will be worth it to you for the price. But you should at least download a trial and see for yourself.

# Answer
> 1 votes
I haven't used Flash for a very long time, but I do remember it supporting 'tweening' which is where you move each vertex by hand for each keyframe and then Flash generates the inbetween frames. This is esstenially what Disney was doing for decades so of course you can achieve fantastic results with it. The downside is it's very time consuming. Programs like Anime Studio support a 2d version of the skin/bones animation found in 3d applications like Maya. A similar thing is called Puppet Warp in Photoshop CS5. In this you set up a skeleton behind your hand-draw art and then you can just move the skelton to where you like (within limits) and the art move with it, smoothly bending at the joins.

---
Tags: 2d, art
---


# Question
Title: How do you decide when your feature list is long enough?
I know a bit about this question but I find that there are quite a lot of diverse opinions on the subject?

I know from a players perspective that more options is almost always good. But on the other hand if it has multi-player more means higher complexity (meta game) both for the developers as well as players.

On development complexity and time constraints always go hand in hand. Another would be resource and platform constraints. Possible economic ramifications of holding back for later is sometimes a reason as well.

So from people experience here aside from the above when should features be cut or be for later release?

# Answer
> 13 votes
I'd say it's a two-step process for us:

* **Establish the game's goals.**
* **Determine which features help us reach these goals.**

The feature list is long enough when those two points match up. So:

**1. Establish our goals** -- Figure out all the things that we want the game to do for the player/reviewer/whomever, then state them measurably. For example, with our latest (see alpha test vid here), we want to do these:

* **Visuals:** We want every review to mention that the visuals are unusual and sexy, especially for an indie title. This is important to us because gamers often use their eyes as a quick metric of quality (though, of course, it's just one of many!), and we want that to draw them in.
* **Exploration:** We also want to reward folks for exploring the game. To put that measurably, we want something around a fifth of the player's game time is spent doing neat little things outside the core gameplay. This is important to us because (IMO), much of the delight of a game comes outside of expected, core areas (we think about how clicking on pieces in Starcraft amuses us).
* **Community:** We want everyone to tell at least one friend about the game.

**2. Determine features that help us reach those goals** -- These almost fall naturally out of the above. So, the features that correspond to the above examples might look like this:

* **Visuals:** As a small studio, if we want sexy visuals, we can't go up against EA or Sony on realism. So to approach the goal of remarkable visuals, one of the game's features is a surreal aesthetic. (From this, we're able to determine which tools we need, and so forth.)
* **Exploration:** Tidbits corollary to the game's action fall out of this. In our most recent title, we dropped a quick reference to Ryo's questionable search for sailors in Shenmue. It was a silly throwaway, but people liked and talked about it!
* **Community:** We're asking ourselves all the ways to make a game worth mentioning to a friend. Making it fun is #1, of course. But we could also reward the players with a special item or level if they tweet about it. Pokemon made it worth while to have friends pick up the game -- there are some critters you could only get by interfacing with other people.

When we go through this process, it helps us determine:

* How much we need to implement for a minimum viable product (MVP).
* What's most important, what can wait, and what we can drop altogether.
* When we finally have all the features we need.

It's worth noting that we don't slavishly stick to these rules! More often than not, some awesomely interesting things come about as a result of mid-project prototyping and just general futzing around. Especially for small games such as ours.

# Answer
> 14 votes
Complexity doesn't make your game fun.

The right combination and balance of gameplay elements does. The player must be pushed to the extent of their skill-level and get a feeling of mastery from conquering challenges.

Your feature list should change whenever you feel the current gameplay isn't fun. These changes must be made within your budget / time constrains. Make sure any changes you make aadd value to your game.

Also, prototype early, don't just write up a huge feature list and assume it will all be fun when put together.

# Answer
> 6 votes
> Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
>
> -- Antoine de Saint-Exupery

# Answer
> 4 votes
**When the time and effort needed to include them is greater than the value they add to the game**.
For example, if you were creating a sporting game or something where players are likely to want to showcase their skills, multiplayer is a must. Guitar Hero wouldn't be the same without it. However, a solely individual game, where you reach beginning to end on your own, following a story or plot doesn't need multiplayer. The shoddy multiplayer system in Grand Theft Auto San Andreas is testament to that (even though that company probably didn't find multiplayer too hard).
Also, features that don't really fit with the story of the game, just are there because they can be. If it's not completely essential to gameplay, it's probably a good sign that they can be pushed to a later release if time is an issue.
The thing is, extra features aren't the quintessential element of a game. An exciting storyline combined with enjoyable gameplay is.

# Answer
> 3 votes
While there is a degree to which variety in features is great (being able to do tons of random stuff in a GTA-ish game, having tons of variety in weapons and accessories in an RPG or Call of Duty-ish game, etc), I think more minimal gameplay focused tightly on a few core features can be highly effective.

Look at Portal, it took its one core mechanic and really effectively built its puzzles around that without needing a lot of extra clutter.

I think being strict about keeping the feature list as minimal as possible and really fleshing out a few core features allows for a more feasible project and often a more enjoyable experience (if Portal added RPG elements and driving sequences and slowmo and whatever other "cool features", would it have been as good? Would the core mechanics have been as polished?).

Now, as an indie dev I'm surely biased, but I think that usually "less is more" in features, and even though something might be cool or popular at the moment, if it doesn't make the overall experience noticeably better it should be cut.

# Answer
> 2 votes
I have found from my personal experience that it is best to avoid adding new unplanned features as soon as possible.

From a design point of view a feature which has been added during a spur of the moment "wouldn't it be nice to have feature x" period will add a lot of development time, might not integrate well with the code, and might not fit completely with the rest of your design.

In the worst case a project which has had a lot of these moments can feel like a messy, hacked together combination of features, which really should have had a lot more time spent on them in the design phase and look less professional as a result.

As a general guideline I try to follow these rules:

* If a new feature comes up early in the project, take the time to go back to the design phase and really see how this feature can work in with your product while still remaining consistent with the rest of the design.
* If the project is drawing closer to release, consider making a list of features to add to a new version.
* If you find that a lot of features keep coming up which you really want to implement, maybe you should consider going back to the design and look at why these new features haven't been considered earlier, possibly due to a lack of effort spent in the design phase.

Obviously this fits some projects better than others, but really if you have a feature come up late in the project, you will probably will fine without it, at least until you start working on a new version.

# Answer
> 2 votes
## Keep lists short, be agile

Do not build feature lists at all, or if you do, build them very short, only worth a few weeks of development.

Develop in agile style - start with the few most important features at all, test, based on what works and what does not, and then think about if it is worth adding some more features (you will be able to judge them a lot better if you already have some experience with the basic gameplay).

## How to judge individual feature

Other than than, I would agree with bennybdbc criterion, "When the time and effort needed to include them is greater than the value they add to the game.".

That said, you also need to consider "external" world:

* are you running out of money or out of time given by a contract?
* are you running out of the publishing media space (DVD full)
* are you running out of the performance space (new features would cause the game to run too slow)?
* is a competing game coming to be published soon?

Simple real-life issues like that need to considered as well, unless you are developing the game just for you fun.

# Answer
> 0 votes
When you run out of paper to write it on.

The definite limit is going to be the media size; you can't fit 10GB of features on a 4.7GB DVD, for example.

You don't want too many features as to overcomplicate the game, either. The best way is to wonder 'is this going to be significantly fun for the player? is it going to eat into our development time too much? is this even possible?'

---
Tags: game-design
---


# Question
Title: How to take into consideration the effect of initial rotation of a ball hitting & reflecting off a surface
Hey all, I am trying to take into consideration the effect of inertia of the initial rotation of a ball, hitting a surface, into the exit velocity vector of the ball.

My current theory is this:

1. Assume Ball initial rotation is **Ri**
2. Calculate an exit Velocity vector without any consideration for the ball's initial rotation, call this **Ve**
3. Rotate **Ve** by an angle proportionate to **Ri** \[while limiting the rotation, so ball new vector does not point *into* surface\]. Call this new vector **rVe**
4. Calculate exit rotation of ball, by calculating it as a portion of max ball rotation speed, bas on angle between **rVe** & **Vi** using dot product of these two vectors

Does this sound right to you? Am I missing something here? Is there an easier way to do this?

# Answer
> 2 votes
I believe that you're missing consideration of both rotational momentum, and acceleration. See the answer by Danik on your other question.

The impact imparts a frictional force to the surface of the ball in a particular direction, tangential to the ball's surface. That force, combined with the ball's momentum, can be used to determine the rotational acceleration in the direction of the impact vector. If the ball is already spinning, that acceleration is going to act against whatever rotational velocity is already present.

In certain cases (perfectly rigid balls, instantaneous collisions) the rotational velocity is roughly equivalent to the force * some fudge factor. But for more correct simulations (ball deforms, contact time during which the force is applied is non-zero), you're modelling acceleration against the mass/momentum of the ball to determine the velocity delta over time.

That's for rotational velocity changes. To model how the initial rotation of the ball pre-collision affects the output velocity, again you're modelling the force acting on the surface of the ball.

E.g.: A ball spinning to the left impacting on a surface travelling straight ahead, the surface acts against the ball, so the left-hand spin is reduced (will tend towards a forward spin instead). But similarly, the ball acts against the surface, imparting a force against the ball, changing the output velocity so the ball skews to the left as well.

---
Tags: 2d, physics
---


title: Plants vs Zombies style game

text:
# Question
Title: Plants vs Zombies style game
I have just recently became intrigued by the whole concept of making video games. I am not new to programming, but I am new to the process/requirements/methodologies of programming a video game. I would like to inevitably make games with similar 2d style as POP Caps Plants vs Zombies. Where would one start to do that? I have knowledge in C++, Java, (whole array of web technologies), but I have never done anything as large scale as a game. I am left with several questions:

1. What languages are needed?
2. What do I need to learn for the graphics (I know how to use vector and raster editors)?
3. Is there a common game SDK? If not what tools work the best?
4. Any Book recomendations?

I am a total newb, I just need to know what it entails so I can dig up what I need.

# Answer
> 7 votes
1. Lots of languages can be used to write simple 2D games like Plants vs Zombies, so it's really down to personal preference. As you know C++ and Java already, I'd maybe stick to one of those. Java has libraries like Slick which you may find useful (I've not used it myself). Seeing as you know Java it also wouldn't be too much of a learning curve to get into C# and use the XNA framework as well.
2. 2D games tend to use Sprite based graphics, so generally tools like Paint Shop Pro, Photoshop or specialist editors like Pro Motion are used. There's no reason you can't use vector editors like Inkscape or Illustrator though and export in a format suited to sprite use (PNG for example).
3. There's a huge variety of very good libraries and frameworks out there, the aforementioned Slick for Java, Angel Engine for C++. I'd have a look at the APIs for a few (when you decide on a language) and see which ones suit your coding style and platform requirements the best.
4. I quite liked Game Coding Complete, Third Edition which covers a lot of the basic requirements for a game engine in detail, and is also C++ based.

# Answer
> 4 votes
Muttley did a decent job of summarizing answers to your four questions, but you really just need to take a look around the site. Make use of the **search** box in the top right corner of every page:

1. a search for language reveals questions like "What are the most commonly used programming languages?" (remember, we're on a gamedev site so it is implied that the author means the most common languages *for game development*) and other questions about the use of specific languages for game development;
2. Not as many good search results for this; feel free to break it into a separate question to get detailed answers about pros and cons of the two types. But both have been used for game development; vector graphics mostly in Flash games (and all 3D meshes are vector-based), and raster (or sprite) graphics for, well, all other 2D games, and 3D textures (the images on 3D models).
3. A search for library or engine reveals many great questions.
4. A search for book reveals many great questions, including one asked just yesterday, "What is a good book to start programming a 2D C++ game?"

Once you use the advice in the other questions to get started, feel free to ask more specific questions about how to develop very specific parts of your Plants vs Zombies imitation. But **always remember to check if your question has been asked before, and try to keep it to one question per, uh, question.**

---
Tags: education
---


# Question
Title: What is the best toolchain for ActionScript3 social networks game development?
I'm new to flash and web development too. But I have some background in c#/c++/Qt/python. So, I want to know, what is the best toolchain for quickest dive into.

My task is to write a game for facebook.com/vkontakte.ru. I already have the design doc, great artist and game-designer, so, the coding is the only stumbling block we met. There are no significant obstacles at server-side, but, since we have not much time, I decided to ask some help on suitable toolchain definition.

I think, that web-services (maybe WCF) are perfect for the backend, so, some of them should transfer JSON-ed data from/to client, incapsulate game-logic, and... here is the place I stuck. What next, what should I learn, what tools/toolsets will provide learing/productivity curve that meat least action principle.

Maybe I'm on the wrong way and missing some basic and obvious (for web-devs) things... I do not know, so, any advices will be highly appreciated.

*Yes, this is the copy of my question on SO, but it seems, that here is the really proper place to post it.*

# Answer
> 5 votes
Try using Flash Develop or if you are willing to spend some money Flash Builder. I have used both and would say they are comparable. Flash Builder is an Eclipse plug-in meaning it can integrate with the rest of your workflow a little better, but it is quite expensive. Another alternative is to download the Flex SDK (will likely need to do that for Flash Develop anyway) and use Vim. With the right Ant build file you can get pretty far with that.

To manage content, I would recommend using Flash CS to manage your art assets. Your artist should be able to create animations, sprites, buttons, etc and lay things out visually using that. When he's finished he can export the whole thing as a swc which can be easily incorporated into your game.

If you're coming from Visual Studio it might be worth ponying up for Flash Builder (try the 60 day trail first of course). It has unit testing integrated and through various plug-ins can support most other things.

# Answer
> 3 votes
For developing a web game, i'd actually recommend learning HaXe. It has much friendlier syntax than ActionScript, as well as many more features you'll likely want (generics, automatic performance optimization, extra useful libraries, etc.). As Alex pointed out, FlashDevelop is a great tool to use and seems to be quite capable.

---
Tags: actionscript-3, methodology, facebook
---


title: F# Game Development

text:
# Question
Title: F# Game Development
I'm a F# user. What library should I use to develop games (2D and/or 3D) in F# and being cross-platform? Like how Processing is.

Don't answer DirectX or WPF or other things that are "too .NET" because they are not cross-platform.

Show me a library suggestion and a code example and a link to help me to get started in your answer.

# Answer
OpenTK has OpenGL and OpenGL ES bindings and works well with F# on .NET and Mono
> 10 votes

---
Tags: cross-platform, .net
---


# Question
Title: Random Ghost Behavior in PacMan Clone Not Random?
I'm currently programming a PacMan clone as my first ever game with the XNA Game Studio before eventually going to DirectX.

As a first ever game, lots of things have given me great headaches, especially collision detection with the walls.

The problem I have now is the "AI" I have implemented for the ghosts. It's wish-wash, really. The basic method is that, if the Ghost runs into a corner, it will change its speed vector, and ultimately its direction.

However, the seed seems to be giving me the same pattern. If I launch them from the same corner multiple times, they keep taking the same direction. They have only rarely ever not taken the same route before getting stuck.

I'm not sure how much code can be posted here, but this is my current algorithm. Beware, it's not very pretty at the moment. It was implemented just to see if it's viable. Now I just want it to work properly before refactoring it and making it more intelligent.

```
        // OMG! Is the ghost trying to hit a wall? Ha! No wall-hacking for you!
        if (!wall_.Collides(frameSize_, pos_, direction_))
            pos_ += direction_;
        else
        {
            // a and b will change speed.
            // if a and b are both 1 (diagonal vector), then c will determine
            // which value a or b shall be taken.
            // d negates the values for reversed direction.
            Random rand = new Random();
            int a, b, c, d;
            a = b = 0;
            while (0 == a && 0 == b)
            {
                a = rand.Next(2);
                b = rand.Next(2);
            }

            if (1 == a && 1 == b)
            {
                c = rand.Next(2);
                if (0 == c)
                    spd_ = new Vector2(a * 2, 0);
                else
                    spd_ = new Vector2(0, b * 2);
            }
            else
            {
                d = rand.Next(2);
                if (1 == d)
                {
                    if (1 == a)
                        spd_ = new Vector2(a * 2, 0);
                    else
                        spd_ = new Vector2(0, b * 2);
                }
                else
                {
                    if (1 == a)
                        spd_ = new Vector2(-a * 2, 0);
                    else
                        spd_ = new Vector2(-b * 2, 0);
                }
            }
        }

```

Addendum: What I also meant to add is that the ghosts get stuck eventually. They stop taking corner with a different direction. I've waited for about 20-40 tries, but they simply reversed direction. This happened repeatedly with several restarts of the game.

# Answer
> 7 votes
Break down the probabilities. Work down the tree of your conditionals, figuring out the probabilities at each step.

There is a 1/3 chance of a == b == 1. Then is a 1/2 chance of (2, 0) and a 1/2 chance of (0, 2), so a 1/6 chance overall of either.

Within the remaining 2/3 chance, there is a 1/2 chance of d = 1; then either a = 1 and you get (2, 0) or b = 1 and you get (0, 2) with equal probability, 1/2 each. So 2/3 * 1/2 * 1/2 = 1/6 chance each overall.

Then the same math for d = 0. Either (-2, 0) or (0, -2), 1/6 overall chance of each.

Summing those, we find there is a total of 1/3 chance for (2, 0), 1/3 chance for (0, 2), 1/6 chance for (-2, 0), and 1/6 chance for (0, -2).

Since e.g. up/right is now twice as likely as down/left, they will get stuck.

# Answer
> -1 votes
Your problem is that you are recreating the Random object every time you do your computation. You should only create one Random object (and assign it to a member variable, for instance) and query it when you want new random values.

---
Tags: random
---


# Question
Title: Can I make an entire game in Unity 3D for the iphone?
Can I make an entire game in Unity 3D for the iphone without using any Objective - C or Cocoa?

# Answer
Yes, but you're limiting your options. If you want to include things like OpenFeint or analytics you're going to have to go through the native code plugin bridge.

There are also some new things in iOS4 that aren't handled properly by Unity iPhone by default, like the resolution of the iPhone 4, or the application callbacks by task switching.
> 3 votes

# Answer
The short answer, is Yes, you can definitely make an entire game in Unity3d. Many developers have.

RE the previous answer: actually, for analytics, this link will take you to a C# integrated google analytics helper for Unity 3D http://www.persistentrealities.com/code/

And now with Apple's "Game Center", you might be able to skip Open Feint integration, though I still prefer Open Feint for now, personally.
> 2 votes

---
Tags: iphone, unity
---


title: Where should the animation be done?

text:
# Question
Title: Where should the animation be done?
Let's say I want to make a character (an animal) with a stick in its mouth.

I dont understand if the animation (done in Blender) should have the stick in its mouth or if it should be done in Unity/Shiva, etc.

Is there any place where I can read the theory behind it? How shall I do interaction between two objects like an animal eating something?

Thank you

# Answer
I don't know where you could go to read about it, but the best way to go if you don't intend for the dog to always have the stick in its mouth is to make the stick a separate object, animate the dog as if the stick were in the mouth, and along with the dog have a "locator" for where the stick should be (including its orientation) as the animation progresses.

It's ok to put the stick in the dog's mouth while you export it, but only if you can do it in such a way that they remain two separate objects for the export. E.g. in Maya you would reference in the stick, and then your exporter would know not to export referenced geometry.
> 6 votes

# Answer
I prefer to create an EMPTY in blender, that when Unity Imports the .blend file considers a separate object at the position of your EMPTY.

From there, I would assign the world/global-space location to the stick via "Transform.position" of the EMPTY, of which you could also create separately in Unity itself.

As long as you're using "Transform.position" in your code, your stick should always be able to position itself at the point of the empty(if you place it in your "public void Update" code section).
> 0 votes

---
Tags: animation, unity
---


title: Deal with mini states in game

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

```
enum
{
  ROAD_CONSTRUCT,
  BUILDING_CONSTRUCT
  VIEW_MAP
  etc..
}

```

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

# Answer
> 7 votes
In an OOP language, the standard answer is to use polymorphism:

```
// Current game state. Should *not* really be a global var.
// This is just for demonstration. The current state can be
// changed by setting this to a new instance of a class that
// inherits State.
State * state;

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

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

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

// Other states...

```

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

# Answer
> 1 votes
It sounds to me that the problem isn't the states but the way you're handling them.

Why do you need a big switch in the main loop? The only things that generally change are the mouse cursor and the click behaviour. Both of those should be wrapped up in separate functions.

# Answer
> 0 votes
This question may be identical to Game State 'Stack'?, but I'm not sure what you mean by mini-states.

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

---
Tags: architecture, state, game-loop
---


# Question
Title: Implementing a 2D Platformer Game Engine
Any ideas where I can find info about making 2D jump & run games? I need some general ideas, so I wouldn't reinvent wheel (at least where game design is concerned).

Another point is that I am thinking of using boxes instead of images for collision testing. However, it should possible that I can implement slopes. Commander Keen 4+ is a good example of my idea.

Actually, what is troubling me is of course the collision testing and simple physics (mainly gravity).

I've got to build the engine myself and it for the J2ME.

Thanks a lot, guys!

# Answer
Here are some ideas from Sonic games: Sonic Physics Guide.
> 13 votes

# Answer
You could always find some simple open source projects that are similar to what you want to build, and see how they structure their project.
Also, there are plenty of tutorials around the web. A few are:

If you are looking for a game framework to use, there is a good list at stackoverflow here
> 2 votes

# Answer
In Game Feel by Steve Swink, he covers a lot of great design topics, including a detailed breakdown of the movement feel in platformers. Worth a peek.
> 1 votes

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


# Question
Title: What kind of game is prisonblock? Any open source that I can learn the math behind it?
What kind of game is prisonblock? Any open source that I can learn the math behind it for user actions/gameplay?

# Answer
As it says in the browser title, Prison Block is a "FREE prison RPG game" (RPG meaning Role-Playing Game). It also appears to be multiplayer and therefore can be considered a "MMO" or "MMORPG", albeit browser-based (in contrast to popular MMOs such as World of Warcraft).

I recommend looking at the source of Legend of the Green Dragon (sourceforge project). I'm not sure if it's still being updated, but I remember finding it several years ago and being impressed by it; so much so, that I made my own little web-based multiplayer game (Magbor, sf proj \- warning, it's messy and not too impressive!). LotGD is a web-based multiplayer RPG like Prison Block, and completely open source.
> 3 votes

---
Tags: mathematics
---


# Question
Title: Handling Background & other objects in a Flash platformer
I asked a similar question in 'SO' not knowing about this place,anyways here goes:

I wanted to know what the best approaches are while creating a platformer based game for handling background & objects.

Tiled method - Using small objects & loading on-the-fly : I understand this is good for employing a level editor for the game later but wouldn't it become too processor intensive to manage so many tiles(using arrays, i assume). Especially if have many objects which also might be mutually exclusive (eg different sets of bg objects which react differently to user). Please throw some light on what usually the tile sizes often considered. I have a doubt that I used too small tiles which reduced my frame rate drastically.

Create, store & scale: Creating the whole level & storing them in separate movie clips, scaling them while the level loads. I found this method could solve the frame rate problem, but I then had to handle the issue of not being able to place objects (like enemy, power ups, etc) during runtime, as I no longer tracked the exact locations of the player (hero) in the game.

# Answer
Even if you're using vector graphics, I recommend rasterizing them and using the "blit to a single BitmapObject canvas" method. Since it seems that your game is suited to a tile-based approach, this would result in a much quicker game. Just use BitmapData.copyPixels to place tiles and bypass the Flash display stack.
> 2 votes

---
Tags: flash, actionscript-3, performance
---


# Question
Title: How much longer should I support iPhone 3G?
I'm in the process of developing and releasing an iOS game, and have found that it just won't run on an iPhone 3G (don't even ask about a 2G) for many reasons. Primarily, the number of sprites and sounds needed for each level continually cause low memory crashes. I've already pared it down to the bare minimum and strategically load/unload resources as needed, but some items need to be cached so they can be activated quickly. My last resort (which I'm trying to avoid) is to make lower quality versions of all audio. Graphics are already packed tightly into sprite sheets.

The game runs wonderfully on an iPhone 4 and iPad, and even performs nicely on a 3GS. Should I be concerned about no support for older devices?

# Answer
> 4 votes
I believe most developers will continue to support the 3G (and the similar spec iPod Touch 2nd Gen) until iOS5 is released in which it's expected that Apple will drop support for them.

If you really can't make your game run on a 3G though and you can deal with not selling to 3G owners, it's up to you. I would expect to get a number of 1-star reviews from the inevitable idiots who still buy it even though the description says it doesn't support their device.

There is an advantage in not supporting devices prior to the 3GS which is that you can use OpenGL ES 2 without having to provide an ES 1.1 fallback rendering path.

# Answer
> 5 votes
I highly recommend including an analytics tool such as Flurry in your app so you can get hard data after launch. (Apple is not enforcing their ban on Flurry for now).

For my game, currently 25% of my sessions are on the 3G, so I wouldn't even think of dropping it right now. I would highly recommend supporting it. There are a lot of performance tricks with getting your app to work faster, so keep honing away at it.

# Answer
> 1 votes
You can't really not support the 3G without also removing support for the 2nd gen touch (by making the app only run on armv7-supporting devices, for example). From the analytics from a game we recently released those users are a minority but still a decent percentage of our users.

The answer to your question, like so many others, is going to fall back to economics of your particular situation. Are you losing your competitive edge by paring down the design or art resources of the game to work on the 3G? Are the additional expected sales going to make up the money invested in that expenditure? If you can answer those questions then the answer is obvious.

# Answer
> 0 votes
There's older devices, and then older devices.

Something like the iPhone 1G, maybe even extending to the 2G, is/are obviously not capable to do what the 4G is. There are few users on these, and you're only missing a very small amount of users.

However, the iPhone 4 hasn't been out more than a few months. There's the few phone obsessed people, 'omg its new and better', and the geeks that upgrade whenever, as Nate Bross said. I'm still running on a 3rd gen iPod Touch (not exactly an iPhone, but close enough to it with a wifi signal).I know a good few people who still have 2G models.

You've got to choose between trying to reduce memory usage even more, and missing out on the significant proportion of users who don't upgrade.

# Answer
> 0 votes
Disappointingly, Apple has started to deprecate the 3G (not the 3GS) by not supporting Game Center on it.

There area a lot of these devices still out there. Really, if you're building games primarily for the 'low-def' iDevices, you might as well support the older iPhones and iPod Touches.

If you're building a game for the higher-performance 'hi-def' iDevices, and porting it to the 3GS, then it may be more reasonable to drop support for the 3G for performance reasons?

---
Tags: iphone, support
---


title: Box 2D Set Origin

text:
# Question
Title: Box 2D Set Origin
I'm trying to set the origin of a box2d shape. By default, a shape rotates around the center. But I'm trying to get it to rotate around the left of the shape. Like a clock for example.

I've heard of things like SetXForm but that function doesn't seem to even exist. I'm using C++ just in case you needed to know that.

Thanks in advanced, any help is appreciated.

# Answer
> 6 votes
There are two kinds of shapes and three ways to make them in Box2D.

A b2CircleShape always has its center at the center of the circle. If you want to make a "lopsided circle" you must fix the circle to another object (e.g. a tiny circle inside it) with a joint.

A b2PolygonShape may be initialized with SetAsBox. SetAsBox by default places the origin in the middle of the rectangle, but you can pass a b2Vec2 as the third argument to place the origin elsewhere.

A non-box b2PolygonShape is initialized with the origin at local coordinates 0,0. To make a shape that extents only one direction, e.g. right and up, simply specify coordinates like (0, 0), (0, 5), (5, 5), (5, 0), constructing the shape only along local coordinates that move up and right (and in CCW winding order).

Remember, the origin of the shape is always local coordinate (0, 0). If you try to think of it as "moving the origin" you are just going to confuse yourself - what you are doing is offsetting the other vertices relative to the origin.

# Answer
> 2 votes
Never mind, I fount the answer. Apparently in the b2PolygonShape, when you call the function

SetAsBox()

There's a 2 overloads. And one of them is:

SetAsBox(halfwidth, halfheight, center, angle);

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


title: 3D Model package for Mac/iOS

text:
# Question
Title: 3D Model package for Mac/iOS
I am getting my 3D modeling pipeline started and a few questions have come up about modeling packages and formats:

What 3D model format is easy to parse, free to use, and is usable on the iOS/Mac platforms? Will I be able to create my own wrapper classes for said 3D model formats, or is it a code-and-format packaged deal? Does this format come with a free or cheap toolchain for creating new models and editing old models?

Thanks for the insight ahead of time!

# Answer
> 2 votes
A popular 3d package is Blender. It is used as the toolchain for SIO2, which you might want to look into.

---
Tags: 3d, iphone
---