Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Remaking my original iPhone app

Author
Message
anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 19th Jul 2012 13:13 Edited at: 19th Jul 2012 13:16
So, I'm interested in remaking my original iPhone app, Water. I know what additional features I'd like to add. I'm just not sure how I can improve the rendering process for my app.

In my original app, I used a single picture as my background, and then layered sprites to give the illusion that the picture was being destroyed (to let water flow through). If the player 'bombed' a portion of the screen, the app positioned a sprite that that same location. This sprite was layered between the background image and water sprites to give the illusion that part of the picture was destroyed.

Like so:


While this worked good on my native-resolution device (iPhone), it caused slight image tearing on devices where AppGameKit had to scale up the resolution - e.g., on an iPad or my Android tablet, you could sometimes see where the images didn't match up and a sliver of the background would still peer through (causing what I feel would be an unsatisfactory gaming experience).

So, my next idea is to make my own 'screen', of let's say X by Y sprites down and across the screen. I'd use the map data stored in memory and color/hide the sprites accordingly. If the person scrolls the map left, I'd just shift the data offset accordingly, and just recolor/enable sprites on the screen. This would give be the added perk of being able to manipulate all colors/etc. in memory and not have to worry about having additional media resources. I would only have to deal with the sprites on screen, and not have to worry about creating more sprites during gameplay. However, this I've noticed has the unfortunate side effect of absolutely slaughtering the rendering process if all the sprites on screen are enabled and visible. I think I can handle 20x15 col/row fine, but anything above that starts murdering my frame rate.

Of course, on my PC it works fine. But I'm gasping at the thought of starting to develop a time-sensitive puzzle game when rendering a simple demo - with no logic or additional commands at all - drops my FPS down to 30FPS on my iPhone 3GS and 50 on my iPhone 4.

Any suggestions?

Hi there. My name is Dug. I have just met you, and I love you.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 19th Jul 2012 15:25
Perhaps the screen copy commands may be useful for this? If you can say position a sprite and copy the backdrop, delete the sprite and use the new backdrop image created it should reduce the number of sprites needed. But the image copying may be a little slow too unfortunately so I am not sure if it would improve matters.

Login to post a reply

Server time is: 2024-11-23 18:19:49
Your offset time is: 2024-11-23 18:19:49