Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NGPC Platformer Engine - Work in Progress
#20
   

I have been able to get better performance out of hblank effects and have a way to devote a tile row on scroll plane 1 to a static HUD.  No sprites overlap this row because they all get offset until hblank for row 8.  I had previously made use of some sprites for a HUD, but now I can save the sprites.  For the new effect, whenever the scroll plane 1 has to move, and a row or column of new tiles needs to be drawn, the HUD is drawn a few rows higher. It gets moved into the first visible row at vblank, and moved back at hblank row 8.  There is an overall sprite offset for x and y defined at a specific offset in memory, so all sprites can be simultaneously moved by setting them, meaning you don't have to waste time iterating over all sprites.

Another area of interest is with regards to rendering a large boss.  The sprite limit, once you factor in sprites needed for the player character and weapons/projectiles is pretty low.  If I sacrifice a scroll plane and devote it to housing the tiles for a large boss, I can make use of a lot more tiles and animate/manipulate the entire plane in a way that is akin to manipulating sprite chains.  In my screenshot, I am experimenting with a boss that is 80*64 pixels, or 10*8 tiles, which equals 80 tiles, which is more than the sprites available, let alone the sprites I have remaining.  So if I leave scroll plane 1 devoted to my level map, keep its tile count reduced enough, and forego a scrolling background, I can find a spare 80 tiles to draw the boss on scroll plane 2.  I can successfully write each frame of animation to the necessary tiles, and I can manage flipping the tiles on the plane to have the boss change directions.  My testing so far makes me think this is going to be a perfectly viable option, with no noticeable hit to performance.  An added bonus is that I have a decent number of sprites left to play with for boss projectiles and such.  I think the Metal Slug games are likely doing something similar with large bosses.
Reply


Messages In This Thread
RE: NGPC Platformer Engine - Work in Progress - by winteriscoming - 01-29-2022, 06:48 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)