Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 5, 2010, 07:26 AM   #1
MatthewF
macrumors newbie
 
Join Date: Jun 2010
CALayers powerful enough?

Would CALayers be powerful enough to handle a tile-based game with around 800 tiles moving at once?
(Would it also work well with one CALayer per tile?)

Thanks,
-Matt
P.S. Would OpenGl be better for this task then CALayers? I really like using CAAnimation instead of making timers and manually doing it by hand. Is there a way to have incredible performance and CAAnimation?

Last edited by MatthewF; Nov 5, 2010 at 07:32 AM.
MatthewF is offline   0 Reply With Quote
Old Nov 5, 2010, 10:20 AM   #2
jared_kipe
macrumors 68030
 
jared_kipe's Avatar
 
Join Date: Dec 2003
Location: Seattle
Send a message via AIM to jared_kipe
Of course openGL would be better.

The only good way to tell would be to try it out.
jared_kipe is offline   0 Reply With Quote
Old Nov 5, 2010, 11:04 AM   #3
MatthewF
Thread Starter
macrumors newbie
 
Join Date: Jun 2010
An OpenGl tile base engine produces good results. I'm working on the CALayer tile engine at the moment.

If CALayer results are dissatisfying is there a way for me to use OpenGl with CAAnimation?
I think I saw something about a CAEAGLLayer...


-Matt
MatthewF is offline   0 Reply With Quote
Old Nov 5, 2010, 12:57 PM   #4
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
Quote:
Originally Posted by MatthewF View Post
If CALayer results are dissatisfying is there a way for me to use OpenGl with CAAnimation?
I think I saw something about a CAEAGLLayer...
That is for iOS. For OS X you can use CAOpenGLLayer.
kainjow is offline   0 Reply With Quote
Old Nov 5, 2010, 01:53 PM   #5
HiRez
macrumors 601
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
Is this a Mac game or an iPhone/iPad game? 800 layers on the desktop seems entirely reasonable (in fact I've seen CoreAnimation layer demos with more than that moving simultaneously). On a mobile device it's questionable, especially if most of your layers are not very small. If I had to guess, I'd say 800 layers on an iPad is not going to work very well currently. Also have to consider the limited RAM. Big difference between a 2+ GHz multicore desktop CPU with dedicated GPU and a mobile CPU/GPU with limited resources.
__________________
Go outside, the graphics are amazing!
HiRez is offline   0 Reply With Quote
Old Nov 5, 2010, 04:58 PM   #6
MatthewF
Thread Starter
macrumors newbie
 
Join Date: Jun 2010
I have my CALayer tile engine working and the results are great. Though the only downside is that it appears that a white line can appear between the tiles as the world moves... is there any way to fix that?

Figured it out. Just had to make the frame extend 1 pixel out on each side.


Thanks,
-Matt
P.S. Would CAOpenGLLayer have better performance than a CALayer when just displaying an image?

Last edited by MatthewF; Nov 5, 2010 at 07:14 PM.
MatthewF is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
CALayer to pdf MrFusion Mac Programming 1 Aug 6, 2011 03:39 PM
USB port powerful enough to power a external USB drive? NRose8989 MacBook Air 8 Feb 21, 2009 01:49 AM
Will a 12" PB be powerful enough for me Anthony8720 Macintosh Computers 24 Dec 14, 2005 05:07 AM
Powerbook powerful enough for H.264 snackcakeofd00m Macintosh Computers 17 May 3, 2005 08:48 PM
iBook G3 Powerful enough? McGuillicuddy Buying Tips, Advice and Discussion (archive) 4 Nov 26, 2004 02:57 AM


All times are GMT -5. The time now is 08:57 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC