A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Tile based questions?

  1. #1
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976

    Just a few questions

    1/ How do i detect collision on a scrolling map when i have heaps of tiles in my game ?

    2/if the map has reached it maximum scrolling enable the character to walk .

    3/ if when scrolling the character hits a non walkable tile stop the scrolling .

    4/ when the character reaches a certian distace in the map start scrolling ?

  2. #2
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    i think i figured out the problem with the multiple tile collision

    would it be smart to store all the non walkabble tiles in an array ?

    nonwalk = [1,2,3,4,6,7,9,15,16];

  3. #3
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    Anyone ?

  4. #4
    Gross Pecululatarian Ed Mack's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    2,954
    Well, collision is just the same.

    Have a look at this fla, though it isn't perfect:
    http://ed.gamegeared.com/flash/tuts/...l2_example.fla

  5. #5
    Wannabe Game Designer
    Join Date
    Jul 2001
    Posts
    135
    You should not let the screen scroll because the person that plays the game presses some keys!

    In my game the game scrolls depending on the x/y coordinates of the player on the screen.
    If the player gets too far to the edge of the screen the game will scroll.

    I think that is the best way.

  6. #6
    Gross Pecululatarian Ed Mack's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    2,954
    That's the way I do it in that one, it only scrolls when they get to the center and it needs to scroll.

  7. #7
    uhm
    Join Date
    Nov 2000
    Location
    Leeds(ish), UK
    Posts
    99
    is there anyway to check collision with oblique objects in a tilebased engine without resorting to hittest?

  8. #8
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    Yeah this is what im trying to get working

    the player is able to move around till it reaches 3 tiles away from each side then the player movement stops and the crolling kicks in , when the scroll reaches its max scroll the player movement kicks back in.


  9. #9
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    Hey ed are you retrieveing the array from an xml file ing that scroll example ?

    Error opening URL "file:///C|/My%20Things/Flash/tbw_scroll1_example.xml"
    Couldn't load map

  10. #10
    Gross Pecululatarian Ed Mack's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    2,954
    Yeah, you need to right-click and save this:

    http://ed.gamegeared.com/flash/tuts/...l1_example.xml

  11. #11
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    Thanks ed

    be prepared for questions

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