Author Topic: Editor Shadows Problem  (Read 5602 times)

TheRaptor28

  • Posts: 2
  • Maggot Crusher.
    • View Profile
Editor Shadows Problem
« on: July 14, 2014, 03:39:04 PM »
Hi everyone :D
I just started using the HammerWatch Level Editor and it seems to have a problem with doodads shadows.
I wanted to try to use custom tiles and sprites so I took some from Pokémon Emerald and set them up with Hammersprite.
That's what I came up with:
Spoiler for Hiden:

The only problem is that when I run the game it looks like this:
Spoiler for Hiden:

So, what happens to the shadows? Everyting else is fine, I tried running other levels and they work as they should.
This is the XML of the houses:
Spoiler for Hiden:
Code: [Select]
<doodad ao="false">
<sprite random-start="false" scale="16">
<texture>doodads/Palette.png</texture>
<origin>48 79</origin>
<frame>1867 17 81 79</frame>
</sprite>
<collision static="true" shoot-through="false">
<polygon>
<point>32 0</point>
<point>-48 0</point>
<point>-48 -59</point>
<point>32 -59</point>
</polygon>
</collision>
<polygon collision="false" shadow="true">
<point>32 0</point>
<point>32 -63</point>
<point>24 -63</point>
<point>24 -79</point>
<point>-40 -79</point>
<point>-40 -63</point>
<point>-48 -63</point>
<point>-48 -1</point>
<point>-48 0</point>
</polygon>
</doodad>

Hope you guys can help me :(

rpc190

  • Posts: 44
  • Map Maker
    • View Profile
Re: Editor Shadows Problem
« Reply #1 on: July 15, 2014, 01:51:57 AM »
I can't speak for everyone else but I can't see anything put in [ spoiler ] [ /spoiler ]. Can you respost your screenshots or attach your doodad?

Hipshot

  • Developer
  • Posts: 455
  • Level Designer
    • View Profile
Re: Editor Shadows Problem
« Reply #2 on: July 15, 2014, 06:21:02 AM »
I deleted the spoiler tag, there was too many errors with it at this point. The post should be readable now.

Hipshot

  • Developer
  • Posts: 455
  • Level Designer
    • View Profile
Re: Editor Shadows Problem
« Reply #3 on: July 15, 2014, 10:32:59 AM »
I think this has to do with something inside hammersprite when creating shadows, like that the shadow coords are inverted or whatever. _Or_ the engine might have issues displaying complex shadows like these inside the game.

Try and reduce the shadow to a single square instead, should be better anyway.
« Last Edit: July 15, 2014, 10:43:10 AM by Hipshot »

TheRaptor28

  • Posts: 2
  • Maggot Crusher.
    • View Profile
Re: Editor Shadows Problem
« Reply #4 on: July 15, 2014, 02:06:28 PM »
OK, so, I did some testing and I think I figured it out.
The problem was indeed with Hammersprite shadow coordinates: if you look them on a X-Y chart the shape has a clockwise direction while the shadows of the original doodads have a counterclockwise direction.
I just needed to invert the coordinates order to make them work :)


Thank you for your help, I hope that's useful :D