Posted: 23rd Dec 2011 14:36
In a game like Sonic or iDork, is it feasible to build a whole gigantic level out of tiles (using sprites in the placement editor), and use SetViewOffset to scroll the viewport around the giant level?

Or are there better & less memory intensive ways to do this on mobile devices with AppGameKit?
Posted: 23rd Dec 2011 20:18
You could always move the sprites yourself and when they are out of view you can reuse them on the other side of the screen. You store the map in an array and read from that as the player moves. Keeping track of the sprites might be a bit tricky though. Was really easy to do with paste sprite. Maybe it would be fast enough to simply delete sprites outside of view and then create new sprites as the player moves. I think that might be easier to code.
Posted: 23rd Dec 2011 22:02
Creating new screens on the fly is the other option I thought of, which would not be so tough on memory requirements. That would involve much sprite management though. A problem might pop up if the main character of the game is running fast (like Sonic). I don't know if AppGameKit can redraw so fast.

Any other options ?
Posted: 24th Dec 2011 11:35
I am using several hundred level sprites that are all controlled using a parallax scrolling system with no apparent slow down.

In this month's TGC newsletter (I hope) will be the first of a set of tutorials by me. The first one deals with view offsets and demonstrates a simple parallax effect that could easily be integrated into a new or existing game made in AppGameKit basic.

AGK deals very nicely with having hundreds and possibly thousands of sprites in play at once although I haven't tested the limits I know from experience that my larger levels have caused me no problems.
Posted: 24th Dec 2011 13:55
I have a game that uses sprite blocks and scrolling, all held in an array. I have a slow Android phone, and it is absolutely pants - 8FPS. So, I plan to implement hiding of offscreen sprites to see if it's any better, I'll let you know how I get on.
Posted: 24th Dec 2011 20:32
Batvink:
I would assume that offscreen sprites are handled well by AGK. I believe that you would earn more by reducing the amount of sprites. But do let us know what you find.
Posted: 24th Dec 2011 21:38
Baxslash, your game plays well on a pc or also on ios?

I have no problem with AppGameKit and putting thousands of sprites onscreen on windows. But on mobiles I'm afraid the story would look different...
Posted: 25th Dec 2011 9:01
My game plays great on the iOS AppGameKit Player.
Posted: 25th Dec 2011 11:47
My only concern is phones with less modern hardware.
Posted: 25th Dec 2011 13:55
I can't say I'm afraid as I don't have anything else. We'll start to find out as more AppGameKit users start testing on multiple devices I guess.