Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It said 10,000 lines of code?

Does it really take that amount of code for a simple iPhone game?



I used to pair the words simple and game in the same sentences, as well. Mostly when I would be brainstorming game ideas and then trying to pitch the ideas to my friends. That is, until I got into game dev and learned that even the simplest of game concepts are still very complex bits of code. I mostly write 3D games, but even 2D games are complex in relation to your average CRUD-based web app, or single form GUI app, etc. So, 10000 lines of code you think is a large amount of code for a game? It's really not.

http://www.informationisbeautiful.net/visualizations/million...


Not at all unreasonable. You can mitigate this somewhat with algorithimic design (eg. randomn layouts), but a lot of what makes good game design "good" comes from its specificness - which is not easily abstractable. So you have a lot of special cases in your code.


Yep, skywing and quantumpotato have the general gist of it.

When I first started I thought it was going to be really simple, but it turns out that building a game can be quite tough. Compared to building a web or mobile app where you have lots of generic scaffolding available to you (web frameworks like RoR, stuff like UIKit for iOS that provide all the UI elements for basic apps), for a game your code has to manage every image and every interaction, so all the special cases and checks and loops add up pretty quickly.

Plus, implementing stuff like ragdolls and physics adds a lot of complexity.

Objective-C is pretty verbose, so that adds to the total.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: