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 May 17, 2005, 04:26 PM   #1
dave.h
macrumors newbie
 
Join Date: Apr 2005
okay this one should be easier...

I have my game working in windowed mode for the time being, and want to know how to

1) change the screen resolution and bit depth
2) ideally, create a custom 16-bit color array
3) apply the current subclass of NSImageView to the full-screen window.

I know options 1 and 3 must be pretty easy, so.... hopefully somebody can help...
dave.h is offline   0 Reply With Quote
Old May 18, 2005, 05:35 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Full Screen Tutorial

With reference to 3 it's no different that doing it in windowed mode. I would create a custom NSView and draw into that.
robbieduncan is offline   0 Reply With Quote
Old May 19, 2005, 12:14 PM   #3
dave.h
Thread Starter
macrumors newbie
 
Join Date: Apr 2005
okay...

hmm, well:

Using the tutorial you provided, I've figured out how to get the game into full screen mode. That is to say, put up a window covering the whole screen, thereby hiding the menu bar.

However, when I do this, my frame rate drops from a Nice even 60 down to 30 or even 20... Now, my code is in no way optimized - I'm redrawing the entire View on each frame update, mostly in anticipation of heavy background redrawing, scaling and sprite scaling.

To keep my frame rate at 60, my plan has been to use an 800x600 graphics context on computers as slow as mine (1.25 ghz), but I also have a 1280x960 sprite set from my original Adobe Illustrator exports.

Now that I'm pressed with the issue of running full screen, it seems to me that Quartz doesn't support changing of screen resolution, but I'm reluctant to use OpenGL for a sprite-based game -- and honestly, I find OpenGL somewhat confusing, and I can't get glDrawPixels to work properly. (ie, nothing is drawn) However, CGLayers aren't available until tiger, which seem to be exactly what I need for high speed 2d animation. I'll be getting tiger soon.. Should I just wait for CGLayers? If so, is it POSSIBLE to change to the 800x600 resolution WITHOUT OpenGL? That is, with Quartz??

I'd like as much input as possible, thanx
dave.h is offline   0 Reply With Quote
Old May 20, 2005, 03:58 AM   #4
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Quartz is not designed for what you are trying to do It is designed from the ground up to be resolution independant and as much as possible Vector based. You can change the screen resolution through some Core Graphics calls (I think) or Quicktime.

To acheive what you want and attain decent preformance you could try this: Do all your drawing into an 800x600 NSImage. The scale the final image to fit the screen. Whilst this is not free it is probably faster that scaling everything you draw. For faster (scaled) sprite drawing you can turn down the quality and scaling quality in Core graphics.
robbieduncan is offline   0 Reply With Quote
Old May 20, 2005, 10:45 AM   #5
whooleytoo
macrumors 603
 
whooleytoo's Avatar
 
Join Date: Aug 2002
Location: Cork, Ireland.
Send a message via AIM to whooleytoo
You can use the QuickTime call BeginFullScreen() to check for available resolutions and switch to them.
__________________
Mac <- Macintosh <- McIntosh apples <- John McIntosh <- McIntosh surname <- "Mac an toshach" <- "Son of the Chief"
whooleytoo is online now   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
One should be able to "message" as well as "tweet" links, photos etc. SvK iOS 5 and earlier 4 Oct 13, 2011 09:34 PM
Thread usage -- how many and which one should be on main thread 99miles iPhone/iPad Programming 1 Mar 2, 2009 06:54 PM
Selling my laptop on craiglists, can this one email be trusted? anamznazn Community Discussion 17 Oct 17, 2008 10:50 PM
Maybe I should be on this Thread(IPOD TOUCH) Because my IPHONE just turned into one! JoeJITSU iPod touch 6 Oct 14, 2007 02:12 AM
Now this keyboard should be sold with every PowerMac! hmg Mac Peripherals 114 Jan 10, 2006 06:45 AM


All times are GMT -5. The time now is 06:13 AM.

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

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