[4.1.5] Sprite Cycling

User avatar
chronicleroflegends
Posts: 190
Joined: Thu Sep 06, 2018 3:51 am

Re: [4.1.5] Sprite Cycling

Post by chronicleroflegends » Wed May 29, 2019 8:27 pm

Thanks again for this!

I found that when I played on actual hardware, I had an issue with my second boss battle where it was possible to go over the sprites per scanline limit and make part of the boss disappear (making an unfair encounter for the player)

This helped out quite a bit. It still doesn't look nice to flicker like that, but at least where you can see where the boss is shooting you from.
~Do you believe in legends? ~
My Games: Nix: The Paradox Relic
retrothunder
Posts: 9
Joined: Thu Aug 09, 2018 1:38 am

Re: [4.1.5] Sprite Cycling

Post by retrothunder » Tue Jul 09, 2019 7:11 pm

I'm pretty slow when it come to this could someone give me a step by step cause I can't seem to find the script please help..
User avatar
dale_coop
Posts: 4476
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: [4.1.5] Sprite Cycling

Post by dale_coop » Wed Jul 10, 2019 7:33 am

The "HandleUpdateObjects.asm" script in your "System" sub folder, under your root folder.
In "Project Settings > Script Settings", select the ROOT element and click on the "Edit" button :
Image

Then double clic on the "System" folder.... you will see a lot of scripts, find "HandleUpdateObjects.asm" and open it with your favorite text editor (notepadd++ for example).
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
retrothunder
Posts: 9
Joined: Thu Aug 09, 2018 1:38 am

Re: [4.1.5] Sprite Cycling

Post by retrothunder » Wed Jul 10, 2019 4:06 pm

Thank you so much
User avatar
Elarath
Posts: 40
Joined: Fri Apr 05, 2019 6:33 am

Re: [4.1.5] Sprite Cycling

Post by Elarath » Fri Aug 23, 2019 11:31 am

So I noticed that if you don't want the player drawn on top, whenever you interact with another object such as an npc, both objects with flicker. Both this and being drawn on top removes the illusion of depth, being able to walk behind an npc object for example. Is there anyway to use this without that happening, or a way to count sprites on a given line so that the cycling only happens when the limit is reached?
User avatar
AllDarnDavey
Posts: 45
Joined: Sat Jan 12, 2019 6:16 am
Location: Seattle

Re: [4.1.5] Sprite Cycling

Post by AllDarnDavey » Fri Aug 30, 2019 1:48 am

Elarath wrote:
Fri Aug 23, 2019 11:31 am
So I noticed that if you don't want the player drawn on top, whenever you interact with another object such as an npc, both objects with flicker. Both this and being drawn on top removes the illusion of depth, being able to walk behind an npc object for example. Is there anyway to use this without that happening, or a way to count sprites on a given line so that the cycling only happens when the limit is reached?
I can't think of an easy way to pull this off. My solution is stupidly simple, just shifting draw order every frame (excluding or including the player depending on the version). We'd somehow have to do more tracking, that's a lot extra coding work, and possibly too expensive on the NES. But I'll think on it, and if I can come up with anything I'll let you know.
User avatar
Electric cat
Posts: 90
Joined: Sun Oct 07, 2018 4:09 am

Re: [4.1.5] Sprite Cycling

Post by Electric cat » Thu Nov 28, 2019 7:03 pm

Do this have a size limit? Noticing yiur sprites look little smaller. I puth this in tried it and it didnt work but my sprites are larger.
Legacy Of Black
User avatar
AllDarnDavey
Posts: 45
Joined: Sat Jan 12, 2019 6:16 am
Location: Seattle

Re: [4.1.5] Sprite Cycling

Post by AllDarnDavey » Sun Dec 01, 2019 4:37 pm

Electric cat wrote:
Thu Nov 28, 2019 7:03 pm
Do this have a size limit? Noticing yiur sprites look little smaller. I puth this in tried it and it didnt work but my sprites are larger.
There is a bit of a size limit. A "sprite" is an 8x8 pixel block, but the draw order cycling is per character not per sprite block, so if you had a large boss or something that was wider then 8 sprite blocks this wouldn't have any affect. But I tested with characters that were 1 sprite wide through 4 sprites wide and didn't have any issues. The wider your characters are the quicker you'll start to get flicker, and the worse the flicker will be, but it should still work.

Maybe try the second version I posted that doesn't exclude the player character when cycling. If your characters are larger you may need to make sure the player gets included in the flicker cycle.
User avatar
Electric cat
Posts: 90
Joined: Sun Oct 07, 2018 4:09 am

Re: [4.1.5] Sprite Cycling

Post by Electric cat » Mon Dec 02, 2019 7:14 pm

That sounds like a plan. I have a tank the is 6 wide by 5 tall. I wanted to ask first. When the tank passes my 1wx2t player the tank ingulfs the player until the tank passes.
Legacy Of Black
WillElm
Posts: 77
Joined: Wed Mar 20, 2019 3:56 am

Re: [4.1.5] Sprite Cycling

Post by WillElm » Fri Dec 13, 2019 12:10 am

At some point this modification stopped working for me. The only other modification that I made to this script was the "make bosses not reset on hurt" trick from this thread: [url]http://www.nesmakers.com/viewtopic.php?f=40&t=2298&p=14039&hilit=timer#p14039[/url]

Any idea why this could be?
Post Reply