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 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
Ultraspeed Downloader - Let's become easier bright.future iPhone and iPod touch Apps 0 Nov 26, 2013 10:28 PM
How Can Murder Be Easier Than Divorce? DesertEagle Politics, Religion, Social Issues 25 Jul 14, 2013 02:53 PM
There needs to be an easier way to mute Siri chrf097 iPhone 9 Dec 4, 2012 04:21 PM
Easier to read tl01 iPhone 2 Sep 15, 2012 09:50 PM
Is There an Easier Way? MisterSensitive MacBook Pro 4 Jun 19, 2012 08:24 AM

Forum Jump

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

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

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