Author Topic: Snap-to-tile  (Read 2476 times)

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Snap-to-tile
« on: 2008-02-20, 03:56:27 PM »
When in the map editor, moving a sprite, the "Snap To Tiles" option has no effect.  I wanted to post more errors to make this post seem more worthwhile, but it was the only one I came up with right now.  So I'll just ramble on for a bit until it seems long enough.  I think that should do it.
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Snap-to-tile
« Reply #1 on: 2008-02-20, 06:04:50 PM »
Yeah, that's by design actually.  'cuz what happens if you have multiple sprites selected?  How the heck are they supposed to all snap, and to what?  If sprite 2 is 1.5 tiles to the right of sprite 1 (and sprite 1 was aligned to a tile), and you're dragging both (but the mouse is over sprite 1), what happens to sprite 2 when you move the mouse to the right half a tile?  It can't snap to the position of the mouse -- you wouldn't want all the selected sprites to suddenly end up in the same place.  Snapping to the next tile might make sense, but what's that based on, some invisible mouse pointer associated with each selected tile?  Where does this invisible mouse pointer start?  The middle of the sprite?  Should the sprite have immediately snapped back to the invisible mouse's tile position when you started dragging?  It's all just far too complicated, so that piece doesn't do snapping.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Snap-to-tile
« Reply #2 on: 2008-02-20, 09:40:37 PM »
Well, I would assume that snapping to tiles does either one of two things:

1. Once dragging begins, all sprites snap to the nearest tile.
2. Once dragging begins, the sprite under the mouse pointer snaps to the nearest tile, and all other sprites snap the same distance.

From there on, all movements are relative to the position of the sprite being dragged by the cursor.  Personally, I dislike systems that do #2 and always thought they should do #1.  After all, you do have "Snap to tiles" turned on

Also, even if you don't want to fix it for multiple sprites, when only 1 sprite is being dragged this isn't a problem, and that's the majority of sprite movement, at least for me, and the reason I move sprites is because the map has changed, and I still want the sprite to be aligned to tiles.
Edward Dassmesser

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Snap-to-tile
« Reply #3 on: 2008-02-21, 08:03:36 AM »
this reminds me of something.
it is annoying me that when i click somewhere where several sprites are, all sprites are selected. this is very painful if someone has a big sprite and before it several small sprites. you can never select them properly without moving the background sprite. why isn't only one sprite with the highest priority selected? to select several sprites at once, i would prefer the method i know from all programs i ever used: dragging a rectangle.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Snap-to-tile
« Reply #4 on: 2008-02-21, 12:17:11 PM »
That was just because I was lazy I guess.  But you should be able to un-select the large sprite by holding CTRL and clicking on it.  Then you don't have to move it out of the way at least.