News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Sprite Looping Screen Issue *SOLVED?*  (Read 1241 times)

justin3009

  • Hero Member
  • *****
  • Posts: 1650
  • Welp
    • View Profile
Sprite Looping Screen Issue *SOLVED?*
« on: January 30, 2016, 10:45:11 am »
I'm working on another game as a side project and I've completely rewritten how it handles the graphics storage and how it sets them up so now it uses sprite assembly instead of hardcoded data... but I noticed this came with a price.

The original game has a VERY specific check if you're at the top of the screen or the bottom of the screen (Using coordinates of the PC).  If it hits those points, it stops the sprite from looping vertically.. the problem being now is that since I use Sprite Assembly is that it will now continuously loop across the screen vertically if you fall down a pit, climb down something into another screen, etc..

If I use the original games code combined with mine, it works, but the problem is that some Sprite Assembly pieces NEED to loop around the screen to hit the right height, but since it has that hard check on the coordinates, they just go off screen and never show up again.

Right now I have a specific bit flag set on certain animations so it refuses to loop.. but that will cause the issue of certain stuff on the PC not being set properly due to the height issue making it more of a problem.

Any advice on how to solve this?


Edit: I took a really cheap route but it works.  I subtracted 20 from the current PC Y value, thus giving 20 more pixels to work with on Y height.  The PC does NOT loop around the screen now when falling down a pit or anything (The game actually had it check technically after you looped through the screen once).  So now it sets everything right as you go off screen and now gives a bit more leeway on height for Sprite Assembly.
« Last Edit: February 03, 2016, 08:41:22 pm by justin3009 »
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'