Problems with Level Editor


#1

So as I was working on my latest level I came across a couple of things that are difficult to deal with:

  1. When adding a square of grass it does not contain movement.Land by default, this causes my guys to run under the grass. It would also be nice to be able to automatically add a grid of grass that covers a specific size.
  2. When adding an invisible obstacle the first time I had to put the coordinates in based on the top left corner of the obstacle, when I submitted the new code it reset that coordinate to be the middle of the object. Now in the editor I reset the coordinates to be in the correct location for the center and all was well.
  3. Adding the grass squares also adds some ugly shadows and I don’t know how to get rid of them. (There is a bunch of large shadow basically the same size as a grass square but offset by roughly (-15,-15); there is also a small square of shadow at the center of the grass square).
  4. Ogres still rotate to face me even though they are dead. On top of this, their shadows are spinning while they are laying motionless. Actually, the ogres seem to just flip opposite directions randomly.

That is all I can think of that came up right now. Any thoughts on any of it? If you need a reference, this all happened working on http://codecombat.com/editor/level/lets-go-fly-a-kite.

Should this be posted here or on github?

Thanks


#2

It seems the shadows are caused by the grass type grass01. Especially the thang named grass01 2 casts a very large shadow (see what happens if you remove it). I replaced it with grass and that worked fine. I did not know how to go about things, so I just made a fork to show you.

I also added some more cliffs so that there are no longer gaps.

Cheers!


#3

Thanks for testing that for me. I’m updating the looks of the level now.

I couldn’t decide between having gaps in the cliffs and having overlapping cliffs. Now I’m going for no cliffs!


#4
  1. Fixed all the grass types to have the land components by default for the future.
  2. Hmm, can you describe a bit more? Coordinates should always be in the center.
  3. Fixed all the grass types to not have the shadows.
  4. Your ogres have the “RotatesToTarget” Component; you probably just want to get rid of that one.

#5

So for #2 what happens is that in the editor I would place an invisible obstacle and the position on the screen would be set based on the top left corner. Then, when I actually run the level it is based on the center. I think it is basically an appearance thing in the editor, as I’m pretty sure when you play the level it is treated properly.

See the last obstacle? Notice the coordinates are 10,10, but the obstacle is not centered on 10,10. Rather, the top left corner is 10,10.

If I were to close the editor and come back to it, the obstacle would move to its proper place.

After a simple reload it looks like this.


#6

I think this is because you changed the width/height at the same time as changing the pos, right? This particular Thang knows how to update its width/height visually, but the middle offset positioning code doesn’t know that the width/height have changed. Hmm.

I think this might get fixed if we solve #1019.