Jump to content

Photo

[2.55, a85] Shadows and their offset are weird


  • Please log in to reply
5 replies to this topic

#1 Mitchfork

Mitchfork

    no fun. not ever.

  • Members
  • Real Name:Mitch
  • Location:Alabama

Posted 16 November 2020 - 09:49 AM

For enemies, items, and weapons (if the correct quest script setting is enabled) the shadow is drawn at the object's X and Y exactly as it's set in the MISC: Shadow (Small) sprite.

 

For Link, the shadow sprite is drawn at an offset of Y+8.

 

This means that shadows will always look wrong for either Link or enemies/items/weapons since they can't be configured for both.  For example, if configured for Link, enemies will seem to land in front of their shadows, which looks strange.

 

Additionally - and this may not be a bug - shadow sprites do not animate on any object.

 

I have not tested large shadows at all, since I really don't know how they work - they may have a similar issue.

 

This image shows the object's X/Y coord and their sprite so you can see the difference in how they're drawn:

 

ZkrZKvv.png


Edited by Ebola Zaire, 16 November 2020 - 10:23 AM.


#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 16 November 2020 - 11:36 AM

Err.... Are shadows not animating for Link or for Enemies???

 

Large shadows do not yet exist--or, at least, user-set shadow sprite size does not work. (It never did.)



#3 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 16 November 2020 - 11:38 AM

I had no problems with Link's shadow.
...just checked that out.



#4 Mitchfork

Mitchfork

    no fun. not ever.

  • Members
  • Real Name:Mitch
  • Location:Alabama

Posted 16 November 2020 - 12:00 PM

Err.... Are shadows not animating for Link or for Enemies???

 

Large shadows do not yet exist--or, at least, user-set shadow sprite size does not work. (It never did.)

Gotcha on large shadows.  There is a sprite placeholder for it, so I assumed it was implemented but that's fine.

 

Yeah this is actually two things - the inconsistent offset on different objects is one issue.  The animation is a separate issue.

 

I have my MISC: Shadow (Small) sprite set up to have multiple frames and an animation speed and I don't see it animate on Link, enemies, items, or weapons.  It just uses the first frame of the sprite.


Edited by Ebola Zaire, 16 November 2020 - 12:01 PM.


#5 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 16 November 2020 - 05:41 PM

Gotcha on large shadows.  There is a sprite placeholder for it, so I assumed it was implemented but that's fine.

 

Yeah this is actually two things - the inconsistent offset on different objects is one issue.  The animation is a separate issue.

 

I have my MISC: Shadow (Small) sprite set up to have multiple frames and an animation speed and I don't see it animate on Link, enemies, items, or weapons.  It just uses the first frame of the sprite.

 

Shadows are hardcoded (2.50.x). I intend to correct that.

 

I need clarification: Is the shadow on Link/npcs broken, or only the shadow on items and weapons?

 

The sprite editor for shadows has no effect at present. This was left unfinished in 2,50 and never touched again. It is part of my plan, but not on the top of my list. 



#6 Mitchfork

Mitchfork

    no fun. not ever.

  • Members
  • Real Name:Mitch
  • Location:Alabama

Posted 16 November 2020 - 09:36 PM

Shadows are hardcoded (2.50.x). I intend to correct that.
 
I need clarification: Is the shadow on Link/npcs broken, or only the shadow on items and weapons?
 
The sprite editor for shadows has no effect at present. This was left unfinished in 2,50 and never touched again. It is part of my plan, but not on the top of my list.

 
 
Okay - understood.  Then ignore everything about shadow animation in these posts.

 


The full bug explanation is that shadows are drawn with a different offset depending on the object that is casting them.
 
For weapons, items, and enemies, shadows are drawn at the exact X and Y coordinate of the object and Z=0.  This means that - for the standard Zelda perspective - the actual shadow graphic should be at the bottom of the associated tile.  
 
For Link, shadows are drawn at an offset of Y+8.  This means that, for the exact same perspective, the shadow graphic should be at the center of the associated tile.
 
Here's a graphic for what I mean.  If you setup the sprite to look correct for Link, it will look incorrect for every other object and draw the shadow at their waist.  If you set the sprite up to look correctly for other objects, it will look incorrect for Link and draw the shadow way below him.
 
WhVdvDu.png

 

In my opinion the way Link displays shadows is correct (and has longer historical precedent with ZC) and the other way is incorrect, but it's really more about them being inconsistent than one being right or wrong.

 

Does that make sense?  I realize this is hard to describe as a problem.


  • Bagu likes this


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users