-
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 ?
-
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];
-
-
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
-
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.
-
That's the way I do it in that one, it only scrolls when they get to the center and it needs to scroll.
-
is there anyway to check collision with oblique objects in a tilebased engine without resorting to hittest?
-
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.
-
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
-
-
Thanks ed :)
be prepared for questions :cool: