creating a game background problems

Member
Posts: 43
Joined: 2009.04
Post: #1
i have already made the game background and just put it in a uiimagview. it works on the simulater but when i put it on my phone it turns the background i made black, and when i try and move my character it makes multiples of themLOL. Can anyone explain to me the proper way to make a big game background that is bigger than the screen?
Thanks
Chris
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #2
It sounds like you might be running out of memory or trying to store files where you can not access them. What is your current memory usage?

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Member
Posts: 43
Joined: 2009.04
Post: #3
ok i feel really dumb asking but how can i tell how much my memory usage is? also is it ok to load a picture that goes out of the iPhones bounds, because my picture is about 9000 pixels? If there is an easier and more efficient way can you tell me because i have everything working on the simulater, but when i get to the iphone it stops working!Sad
Thanks
Cam
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #4
Max texture size on iPhone is 1024 x 1024, as stated in the iPhone developer guide. You're getting the multiple drawings because you aren't clearing the color buffer, which is perfectly acceptable and even desireable, but you aren't drawing an image over the background since it was rejected because of size constraint.
Quote this message in a reply
Member
Posts: 43
Joined: 2009.04
Post: #5
Hey thanks, so are there other ways of creating backgrounds that are bigger than 1024x1024 or do I need to create multiple uiimageviews?
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #6
I'd try the multiple imageView route. Also, be sure to save RAM by not loading images that are off-screen, and thus not visible.
Quote this message in a reply
Member
Posts: 43
Joined: 2009.04
Post: #7
Thanks that works great but it is kind of complicated oh well. Really appreciate the help. Oh and by the way i am working on this game and my goal is to do with out open gl or quartz 2-D.
Thanks
Cam
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Need help in creating a memory game(2) soulesstps 9 6,962 Dec 13, 2010 07:44 PM
Last Post: soulesstps
  Need help in creating a memory game soulesstps 12 8,680 Dec 4, 2010 11:58 AM
Last Post: shazi
  Creating an Age-Of-Empires-2-Esque Game for iPhone Simie 5 5,460 Aug 19, 2008 04:35 PM
Last Post: SethWillits