Re-making games purely in OSX
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.
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.
Sir, e^iπ + 1 = 0, hence God exists; reply!
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.
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/
You can learn about drawing graphics in Cocoa with Quartz from for example, http://cocoadevcentral.com/d/intro_to_quartz/
Sir, e^iπ + 1 = 0, hence God exists; reply!
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Newcommer wanting to start making games help? | Rampage | 2 | 3,567 |
Nov 18, 2008 04:39 PM Last Post: stevejohnson |
|

