Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: My first iPhone game, Devils in Heaven (brianchu.com)
58 points by brianchu on Nov 21, 2013 | hide | past | favorite | 22 comments



> By the way, I’m looking for a summer internship! So contact me!

In case someone didn't get to the end but is looking for an intern, FYI!


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.


That's so cool! And for your first effort!?! Looks like you're going to have a lot of job offers when you're done with your internship. Keep up the amazing work!


That's pretty awesome for a first game. Congratulations :)


Nice work! How was your experience learning cocos2d-iphone?


cocos2d-iphone is really simple and easy to use; it's my own code that messes things up :).

The thing that added the most complexity was Box2D. I'd probably use Chipmunk if I were to write an iOS game again, simply to keep everything in pure Objective-C (due to available Obj-C bindings).


Nice work! Hope to see you at Bearhack this weekend!


Yep!


Congrats - and nice control system as well.


Curious - Why did you choose to use cocos2d-iphone vs SpriteKit?


SpriteKit is new to iOS7 right ? If he started in June 2012 it wouldn't have been an option.

I have the same 'issue' with a game I'm developing.


If anyone has used both, please let me know some overall impressions. I am considering building a game soon and am curious about the best platform moving forward.


I've not used both, but keep in mind that SpriteKit is only for iOS 7.

Cocos2d-iphone is also really mature, compared to SpriteKit.

If you want something cross-platform, look into cocos2d-x, which uses C++, but you can use their JavaScript bindings.

This is all for 2D games. For 3D look into Unity.


Android?


I believe the iPhone is iOS only.



http://www.theregister.co.uk/2013/11/16/android_powers_7x_mo...

Marketshare is almost entirely irrelevant when it comes to picking a platform - potential profit, usage and ease of development is key - iOS wins on all three.

Really though, it's not as if it's trivial to port a game from iOS to Android. Do you really expect someone who has just made their first iOS game to be thinking of a bringing it to a completely different platform (and language)?


It is very simple (at least for cocos2d games) using apportable (http://www.apportable.com/). We at MakeGamesWithUs have done that with multiple games in our portfolio.


Why that probably doesn't mean what you think it means: http://www.theguardian.com/technology/2013/nov/07/android-ma...




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

Search: