25 chars of wasted space.
|
I have a project I want to work on that requires hundreds (hopefully thousands) of shapes drawn to the screen, all moving and knowing when they collide. However I am very new to Cocoa and not really sure about the best way to go about this. In fact I am not sure HOW to go about this since I've never done Quartz/CImage/CAnimation anything before and was hoping people could give me a push in the right direction.
Before I even embark on this first…is this something that I'm going to be able to do? I mean can a normal computer handle thousands of 2d shapes being drawn and all moving around with some sort of collision detection? If it can, where do I even start? Edit: All this stuff is going to be 2D. |
quote |
Senior Member
Join Date: Nov 2004
|
That kind of code can use a few Cocoa API's but it will mostly be straight C or C++. There are people who do that kind of thing as career projects or degree research into how to make it work well and quickly.
If you are not already a crack coder with a desire to spend a couple years on getting it right, go straight to http://www.box2d.org/ and use it as the engine. Do the windowing environment in Cocoa. Marriage made in heaven. |
quote |
Member
Join Date: May 2007
|
A few places to help you find information:
http://www.cocoadev.com/ http://developer.apple.com/ As pointed out above, a game/physics engine might be the easiest way to go. |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
Quote:
The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
|
quote |
Senior Member
Join Date: Nov 2004
|
ODE is old, creaky and uses a set of algorithms that require hacks to keep things stable. Bullet is a FAR better open source 3D physics engine. Box2D is done with many of the same techniques as Bullet, but in the 2D versions.
|
quote |
25 chars of wasted space.
|
Thanks guys, this is definitely going to be a lot more work than I originally planned, but it'll probably be a great learning experience.
I decided to go with box2d because I'm not sure I could wrap my head around 3d stuff right now although I think that would be something cool to add in the future. I have box2d working, although right now I need to figure out the best way to animate things in cocoa. |
quote |
Senior Member
Join Date: Nov 2004
|
Don't try to "animate it in Cocoa". Animate it in you code using Box2D and just display the result in a Cocoa-based display. http://developer.apple.com/samplecod...aGL/index.html
|
quote |
Posting Rules | Navigation |
|
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
iCal graphical representation event plugin... thingy. | katori | Third-Party Products | 0 | 2006-08-25 13:19 |
Can iChat lose the graphical smilies? | alcimedes | Apple Products | 14 | 2006-08-10 11:52 |
graphical personality test | ghoti | AppleOutsider | 55 | 2006-05-17 13:20 |
Learning Cocoa? | pmazer | Programmer's Nook | 10 | 2005-11-23 20:56 |
Cocoa Programming | adam_tj | Genius Bar | 1 | 2005-01-14 16:49 |