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

Similar Threads
thread Thread Starter Forum Replies Last Post
Which one is more powerful Drask MacBook Pro 4 Oct 31, 2013 08:25 PM
Which one is more powerful? Drask iMac 3 Oct 30, 2013 02:17 PM
Which is more powerful? virginblue4 iMac 6 Jan 10, 2013 05:17 PM
Powerful enough? silentownage001 MacBook Pro 4 Jun 13, 2012 12:39 PM

Forum Jump

All times are GMT -5. The time now is 12:23 PM.

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

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