trufun101 Posted April 28 Share Posted April 28 Hey guys, I'm looking to restructure the backgrounds in my game from one large image to a tile-based system -- in hopes of improving performance. I've dug into the tilemap project, and I'm getting familiar with Mappy. So here are my questions: 1. I know Mappy supports animated tiles, but do these translate to Raptor? If not, is there a best approach when it comes to animating tiles in Raptor? 2. Does Raptor support multiple tilemaps at once? For instance, a background with multiple layers of parallax. 3. Does Raptor support horizontal / vertical flipping of tiles? Again, I know Mappy supports this, but I wasn't sure about the jaguar.lua export. Thanks! Quote Link to comment https://forums.atariage.com/topic/365657-questions-about-raptor-tilemaps/ Share on other sites More sharing options...
+CyranoJ Posted April 28 Share Posted April 28 To answer your questions first... 1. Not natively: I have this working in "Jumping at Shadows" and "Rocketeer: Rebounced" (not Mappy format) but have not yet brought it over to the general engine. You can manually change the sprite_gfxbase of the required tile *after* the map update is called. 2. Yes, at a performance hit: This involves a *lot* of transparency which is read/modify/write for the Object Processor instead of a single (opaque) write. There's an example bundled with JS/RAPTOR for split maps, which is just the split at the same screen x/y co-ordinates. 3. Not natively: Vertical flip is impossible at a hardware level, the Object Processor only supports horizontal flip. As with animated tiles, you can update the sprite_flip flag *after* the map update is called. I don't think you are going to gain performance by changing to tiles. You are still drawing the same amount of pixels per line, just using more objects instead of one. The absolute best ways to claw back performance are: Use branch objects - for example, if you are on the score lines at the top, you can skip the entire rest of the list, including all the fighters and background. Reduce the text overlay image as much as possible. If you are only printing to the top 16 lines of the screen, then it only needs to be 16 pixels high. Remember, that this object can be defined on multiple screens, so you can still have full page text for menus, titles, etc. You can also have multiple text objects split. so, eg, if you want a line at the top and the bottom, define two objects, say 8 pixels high, adjusting the gfxbase of the second one by 8 lines. You can then print to this second object by setting y=8. Use the collision lists instead of manually looping around the objects checking hits. Disable objects instead of moving them off screen. Reuse objects instead of having one for each thing you plan on showing. RAPTOR is FAST. Don't re-invent the wheel if there's a RAPTOR function you can call! (eg, auto-moving sprites or object culling) 7 Quote Link to comment https://forums.atariage.com/topic/365657-questions-about-raptor-tilemaps/#findComment-5456809 Share on other sites More sharing options...
trufun101 Posted April 28 Author Share Posted April 28 12 hours ago, CyranoJ said: The absolute best ways to claw back performance are: Use branch objects - for example, if you are on the score lines at the top, you can skip the entire rest of the list, including all the fighters and background. Where can I find documentation on this? I didn't see anything in the Reference Manual. I remember seeing branch objects in the tilemap example, but I didn't understand how they work. Conceptually, is this allowing a subset of the objects to be drawn independently from the entire list? Quote Link to comment https://forums.atariage.com/topic/365657-questions-about-raptor-tilemaps/#findComment-5457038 Share on other sites More sharing options...
+CyranoJ Posted April 29 Share Posted April 29 There's a section on branch objects in the RAPTOR documentation. I can help if needed. 1 1 Quote Link to comment https://forums.atariage.com/topic/365657-questions-about-raptor-tilemaps/#findComment-5457338 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.