Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Graphics] Sprite sorting incorrect #6

Closed
EvilTelephone opened this issue Jul 6, 2016 · 8 comments
Closed

[Graphics] Sprite sorting incorrect #6

EvilTelephone opened this issue Jul 6, 2016 · 8 comments

Comments

@EvilTelephone
Copy link

This may be an emulator related issue as I cannot test on real hardware at this time.

Sprites appear to be sorted in reverse order. This makes things like beds, terminals, doors, and other background objects appear in front of NPCs. Does not affect the player character.

Let me know if providing screen shots would be of assistance.

@andwn
Copy link
Owner

andwn commented Jul 6, 2016

The sprite sorting is incorrect everywhere. It is in the TODO list. I want to fix the slope collision issue first.

@andwn
Copy link
Owner

andwn commented Jul 6, 2016

Keep this open though I should have really just converted the list into issues :)

@sikthehedgehog
Copy link

Definitely not exclusive to Fusion. I think the sprite order depends entirely on the order in which the objects were spawned.

If you can afford it, before uploading the sprite list you could quickly go over it and change the links so high priority sprites appear above low priority sprites... but that probably wouldn't work for those background things I suppose (as the player is already low priority, right?). Dragon's Castle repurposes the unused bits from the size field as extra priority bits just for the sorting - one bit could be used to indicate "superlow" priority i.e. below low priority (appearing below "normal low" priority sprites).

You can see here, scroll down to "Sprite priority in-game":
https://github.com/sikthehedgehog/dragon/blob/master/doc/sprites.md

The possibly faster but more complex alternative is to group objects of the same kind, then draw each group of objects (ensuring that between objects of different groups the sorting is always correct). The more adequate way to do this is with another linked list (meaning each object is both within the global list and within a group list).

@RaccoonyDave
Copy link

I played the game on my everdrive and the bug also happens on real hardware (no surprise there).

Andwn, I'm mostly posting to ask if you want feedback on how the game handle on real hardware. Or would you rather dedicate all your efforts to making it work on emulators before openning that can of worm ?

@andwn
Copy link
Owner

andwn commented Jul 7, 2016

I use Gens GS for emulator and a UMDK on my model 1 and don't know of any differences at this point apart from the music in Gens being a bit "off". Everything up to the end of Egg Corridor should be "finished" apart from a couple minor things I forgot (and Sue going all over the place during the Igor cutscene). Feel free to report anything up to that point no matter what emulator or flash cart is being used. I will probably already know about most of them but just having people talking about it will help motivate me more to fix it.

@sikthehedgehog
Copy link

don't know of any differences at this point apart from the music in Gens being a bit "off"

Make sure to turn on SuperHQ (or whatever it's called) in the sound options. The Sonic end signpost sound effect is affected by this too, don't worry =P

@EvilTelephone EvilTelephone changed the title Sprite sorting incorrect on Kega Fusion [Rendering] Sprite sorting incorrect on Kega Fusion Jul 7, 2016
@EvilTelephone EvilTelephone changed the title [Rendering] Sprite sorting incorrect on Kega Fusion [Graphics] Sprite sorting incorrect on Kega Fusion Jul 7, 2016
@andwn andwn changed the title [Graphics] Sprite sorting incorrect on Kega Fusion [Graphics] Sprite sorting incorrect Aug 28, 2016
@andwn
Copy link
Owner

andwn commented Oct 3, 2016

After much thought I decided to rewrite the sprite engine over the past month. While that means all the sprite order issues are now fixed, it broke almost everything else. Making some run throughs of the game and fixing everything I notice... be done with that this weekend hopefully.

@andwn
Copy link
Owner

andwn commented Oct 17, 2016

With 0.2.1 the sprite order is now ~99% correct. Any other sprite order issues that come up can be handled per case in their own issue.

@andwn andwn closed this as completed Oct 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants