iDevGames Forums
Re-making games purely in OSX - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Design (/forum-5.html)
+--- Thread: Re-making games purely in OSX (/thread-3202.html)



Re-making games purely in OSX - DeputyDoofy - Jul 2, 2007 01:43 PM

Ok, for the most part, I've got the game design thing understood. I've made my own javascript version of Tetris and I'm interested in re-creating it using Objective-C. More times than not, my biggest issue is learning the IDE and API's to make my idea possible. The programming skill is there for the most part. Is there a good way to make some kind of sprite-collision detection (without using someone else's)? This is where I always get stuck when wanting to make an OS X game. Thanks.


Re-making games purely in OSX - unknown - Jul 2, 2007 04:17 PM

For tetris I would just have a grid of cells with on/off states (on if a block in that cell) and check if you would be putting a box in an already occupied cell (x, y) by moving it down, if so you know that a collision has occured.


Re-making games purely in OSX - DeputyDoofy - Jul 2, 2007 07:55 PM

Ok, that answer is fine, since that's how I did my javascript version. Thing is, I can create the array if I read up on objective-c. How do I actually draw the 2D grid? I never quite find a straight-forward answer on 2D graphics. I'm not even going to try 3D. Blink


Re-making games purely in OSX - unknown - Jul 3, 2007 11:43 AM

Create an NSView and draw an NSImage with compositeToPoint:
You can learn about drawing graphics in Cocoa with Quartz from for example, http://cocoadevcentral.com/d/intro_to_quartz/


Re-making games purely in OSX - DeputyDoofy - Jul 4, 2007 02:16 PM

Oooh. Appreciate that link. Will have to read up. Thank you much! Smile