Tile cursor renders over global animations

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
User avatar
Eizzoux
Posts: 526
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Tile cursor renders over global animations

Post by Eizzoux »

Intentional or not, but the 'global.tile_cursor' graphic seems to be drawn over even the pointer global anims.

asdkasbdjasd.png
asdkasbdjasd.png (37.97 KiB) Viewed 646 times

Image
User avatar
amirnatsheh7
Posts: 5
Joined: Sun Apr 30, 2023 3:59 pm
Location: israel
Contact:

Re: Tile cursor renders over global animations

Post by amirnatsheh7 »

red_orb_by_kayosa_stock_d9c80hn.png
red_orb_by_kayosa_stock_d9c80hn.png (427 Bytes) Viewed 548 times
hmmmm interesting levelsets, but they tile laser goes like that from animations on rnd?
Last edited by amirnatsheh7 on Fri May 12, 2023 4:08 pm, edited 1 time in total.
User avatar
Eizzoux
Posts: 526
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Re: Tile cursor renders over global animations

Post by Eizzoux »

I'm sorry but I even after reading your message ten times I don't understand what you mean. Could you explain, somehow?
Image
User avatar
amirnatsheh7
Posts: 5
Joined: Sun Apr 30, 2023 3:59 pm
Location: israel
Contact:

Re: Tile cursor renders over global animations

Post by amirnatsheh7 »

maybe
User avatar
Holger
Site Admin
Posts: 3985
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Tile cursor renders over global animations

Post by Holger »

Intentional or not, but the 'global.tile_cursor' graphic seems to be drawn over even the pointer global anims.
It's definitely not intentional! :shock:

In fact, the tile cursor is drawn above all other global animations, and as the pointer is just a special type of global animation, the tile cursor (which is handled differently and somehow "special") is drawn also above the pointer.

But this does not look right, of course. Maybe the easiest solution is to just draw the tile cursor first, then draw all other global animations (including the tile cursor, which is only used for the MirrorMagic game engine anyway).

I have thought about this a little bit, and the case seems to be clear for the global animation marked as being a "pointer" (that is, draw it above everything else), but is maybe not as clear for the tile cursor: Draw it (directly) over the playfield (of course), but under all other global animations? This may depend somehow on how those global animations are used. If they have a more or less decorative character on the screen (like the notorious "toons"), tile curser at lowest drawing level probably makes sense.If some global animations are used to look like being some static part of the playfield, the tile cursor propably should be drawn above these global anims.

So, maybe I will have to extend the tile cursor to properly support the "draw_order" attribute some day...

Update: Fixing this issue was easier than I thought it would be.

Global animations are now drawn in the following order:
- draw all global animations below screen border (class "playfield", "door_1" or "door_2")
- draw screen border
- draw all global animations above screen border (class "window" or "border", which is the same)
- draw tile selection cursor
- draw mouse pointer global animation (class "pointer")

That should do it! :)
User avatar
Eizzoux
Posts: 526
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Tile cursor renders over envelopes

Post by Eizzoux »

That also reminds me, this one probably can't really be prevented because of cursor's "global anim" kind of nature, but cursor also can render over request and envelopes.
ssghdasgdsfdsd.png
ssghdasgdsfdsd.png (115.91 KiB) Viewed 63 times
Image
User avatar
amirnatsheh7
Posts: 5
Joined: Sun Apr 30, 2023 3:59 pm
Location: israel
Contact:

Re: Tile cursor renders over global animations

Post by amirnatsheh7 »

oh you working in your WIP?, Very nice :D
Post Reply