A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Moving one tile at a time

Hybrid View

  1. #1
    Junior Member
    Join Date
    Mar 2011
    Posts
    3

    Moving one tile at a time

    Sup guys. I'm sure this is a simple question but any help would be appreciated. I have a game which has a 2d grid. How can I make it so that if the user taps a direction, the player moves exactly one grid tile in that direction. The easy way, if the tile size was 10x10, would be to just add 10 to the user's position. However, I'd like to make the motion smooth whereas adding 10 would just 'jump' from one tile to the next. Basically, the user shouldn't be able to stop inbetween tiles Thanks for any help on this.

  2. #2
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Tonypa has a whole article base on how to make 2D tile based games: http://www.tonypa.pri.ee/tbw/

  3. #3
    Junior Member
    Join Date
    Mar 2011
    Posts
    3
    Thanks for the link.

  4. #4
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378
    You can also use TweenLite to make the transition smooth without the fuss of coding it manually.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center