Shuffling meta sprites
Moderator: Moderators
Re: Shuffling meta sprites
Well, I have zero grudge against you or anyone else - I just find it's a shame you didn't use the "search" function in those specific cases - but if you don't want to use it I guess I can't force you to. It would save you a lot of time as you'd immediately see the existing answers appearing.
Re: Shuffling meta sprites
Even on a purely factual level your complaint was not entirely justified:
The first thread that you linked only talked about logical organization of sprite order, not the ever changing, evenly distributed algorithm I'm looking for.
The second very short thread had maybe one single post where one possibility was explained a bit. The rest was mostly about slightly different stuff again. Hardly a full solution to my problem.
Besides, what am I supposed to do? Do you expect me to necrobump a seven or five year old thread?
The first thread that you linked only talked about logical organization of sprite order, not the ever changing, evenly distributed algorithm I'm looking for.
The second very short thread had maybe one single post where one possibility was explained a bit. The rest was mostly about slightly different stuff again. Hardly a full solution to my problem.
Besides, what am I supposed to do? Do you expect me to necrobump a seven or five year old thread?
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Re: Shuffling meta sprites
In the past, the preference here appears to have been necro over dupe. That's consistent with the worldview set forth in the classic Flash animation "Posting and You".DRW wrote:Do you expect me to necrobump a seven or five year old thread?
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: Shuffling meta sprites
Isn't the sentiment against necroing that the content of the thread is no longer relevant/the original participants are no longer active? In which case, each thread can be individually judged based on its content and knowledge of the users.
Restricting dupes on the other hand seems most important in forums plagued by questions like "when will raspberry pi 4 be released" / "gee, i wish the next raspberry will have x gigs of ram or other features that goes against the foundation's principle to make 35 dollar educational computers widely available" and such? Especially on bostad with active users in the ten to hundred thousands?
Restricting dupes on the other hand seems most important in forums plagued by questions like "when will raspberry pi 4 be released" / "gee, i wish the next raspberry will have x gigs of ram or other features that goes against the foundation's principle to make 35 dollar educational computers widely available" and such? Especially on bostad with active users in the ten to hundred thousands?
Re: Shuffling meta sprites
Indeed - you are "supposed" (that means really "encouraged") to look at existing info, and ask about things that remains unclear to you, including possibly necrobump something.DRW wrote: Besides, what am I supposed to do? Do you expect me to necrobump a seven or five year old thread?
Many active people back then are still active today - many of us had been active here for the last 15 years.Isn't the sentiment against necroing that the content of the thread is no longer relevant/the original participants are no longer active?
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: Shuffling meta sprites
Precisely - so necroing doesn't seem to cause the same dilemma other boards may experience.
Re: Shuffling meta sprites
(Necro posts vs new similar post)
My opinion is "you should start a new thread". You get more [new] comments on a new post than a necro one, especially if the same people already commented in the necro post that are still here today.
Another thing...if you are new and have MANY questions, don't start 15 new threads, just continue on one thread.
Edit - added a word, in brackets
My opinion is "you should start a new thread". You get more [new] comments on a new post than a necro one, especially if the same people already commented in the necro post that are still here today.
Another thing...if you are new and have MANY questions, don't start 15 new threads, just continue on one thread.
Edit - added a word, in brackets
nesdoug.com -- blog/tutorial on programming for the NES
Re: Shuffling meta sprites
Back on topic.
I've tried...
"pick a random starting point each frame" and start filling from there, wrapping around. But not really random, nor just adding 9 each time (I think someone suggested something like that). But step through a list of start points that are preshuffled...0, $80, $20, $a0, $40, $c0, $60, $e0 or similar.
Or,
4 alternative lists of object ordering, for drawing metasprites...
(1,2,3,4,5,6,7,8)
(8,7,6,5,4,3,2,1)
(1,3,5,7,2,4,6,8)
(8,6,4,2,7,5,3,1)
Both were simple and seemed to work.
I've tried...
"pick a random starting point each frame" and start filling from there, wrapping around. But not really random, nor just adding 9 each time (I think someone suggested something like that). But step through a list of start points that are preshuffled...0, $80, $20, $a0, $40, $c0, $60, $e0 or similar.
Or,
4 alternative lists of object ordering, for drawing metasprites...
(1,2,3,4,5,6,7,8)
(8,7,6,5,4,3,2,1)
(1,3,5,7,2,4,6,8)
(8,6,4,2,7,5,3,1)
Both were simple and seemed to work.
nesdoug.com -- blog/tutorial on programming for the NES
Re: Shuffling meta sprites
I don't have a huge number of metasprites, and I don't usually need Z-order, so
1.- The index of the first metasprite to be processed is incremented each frame, modulus the total number N of sprites, by a prime of N. That way each metasprite in the list gets to be the first in a cycle of N frames.
2.- Then I iterate N times adding M to the current index modulus the total number N of sprites, with M a (different) prime of N. That way the whole list gets processed (i.e. sent incrementally to the OAM copy) in the current frame.
That way the order of metasprites is different enough from frame to frame without having to resort to lookup tables or random numbers.
This method proved useful in systems with a harshed limit of sprites per scanline such the SEGA SG-1000, which only supports 4 monochrome sprites per scanline.
1.- The index of the first metasprite to be processed is incremented each frame, modulus the total number N of sprites, by a prime of N. That way each metasprite in the list gets to be the first in a cycle of N frames.
2.- Then I iterate N times adding M to the current index modulus the total number N of sprites, with M a (different) prime of N. That way the whole list gets processed (i.e. sent incrementally to the OAM copy) in the current frame.
That way the order of metasprites is different enough from frame to frame without having to resort to lookup tables or random numbers.
This method proved useful in systems with a harshed limit of sprites per scanline such the SEGA SG-1000, which only supports 4 monochrome sprites per scanline.
Re: Shuffling meta sprites
Too bad we can't see the actual effect in the video, since YouTube doesn't offer 60Hz playback for resolutions 480p and lower.na_th_an wrote:This method proved useful in systems with a harshed limit of sprites per scanline such the SEGA SG-1000, which only supports 4 monochrome sprites per scanline.
Re: Shuffling meta sprites
It is not 100% perfect but it does the job. Of course, with that number of sprites, the game is a blink fest You watch it yourself in any SEGA 8-bit emulator (for example Kega Fusion) as the game is free to download from our site or clicky, so no need for crappy youtube videos.
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Shuffling meta sprites
We don't see the entire flicker sequence, but at least this is a flicker sequence that is long enough and varied enough that it still works when you drop every second frame, so it still looks effective at 30 Hz. (As opposed to various simple techniques with only 2-frame sequences where you end up only seeing half the picture.)tokumaru wrote:Too bad we can't see the actual effect in the video, since YouTube doesn't offer 60Hz playback for resolutions 480p and lower.na_th_an wrote:This method proved useful in systems with a harshed limit of sprites per scanline such the SEGA SG-1000, which only supports 4 monochrome sprites per scanline.