• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Game Code

This game has a lot of ActionScript. Don't be intimidated by it, though, because there is not much in the way of techniques that you haven't seen before, and for the most part the code is simple. It's just that in this game, many things can happen that we have to use code to check for. For instance, when detecting a collision of the hero with a platform, we need to do the following:

1.
Check the left side. If hitting, reposition the hero.

2.
Check the right side. If hitting, reposition the hero.

3.
Check the top. If the hero is on the top, then do we also need to move him a little bit if the platform is moving?

4.
Check the bottom. If the hero hits from underneath, are there collectable items hidden in there? If so, how many? Is the hero crouched under the platform? If so, move him out.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint