Tile « Design « Flash Tutorials

Home
Flash Tutorials
1.Actionscript Programming
2.Animals
3.Animation
4.Colors
5.Design
6.Effects
7.Game Cartoon
8.Humans
9.Models
10.Nature
11.Operations
12.Shapes
Flex
Flash / Flex / ActionScript
Flash Tutorials » Design » Tile 

1. About using a tile system in games | Aksel Kornesjo    boxmonster.890m.com

About using a tile system in games | Aksel KornesjoMail (will not be published) (required)

2. Tile Systems - part 2 | Aksel Kornesjo    boxmonster.890m.com

Tile Systems - part 2 | Aksel KornesjoMail (will not be published) (required)

3. How to Create a Tile Game Like Destruct-O-Match on Neopets.com    drooza.com

One of the games there caught my eye, Destruct-o-Match, which is in its third installment.  One of my favorite time-killing games.  I didn't just kill time playing the game but analyzing how it works and developing my own version. 

4. How to load levels in a Flash tile based game : Emanuele Feronato    emanueleferonato.com

How to load levels in a Flash tile based game : Emanuele FeronatoLine 1: Declaring level variable as a new array

5. Tile Based World - Part 1 the Engine    flashkit.com

6. Why Tiles?    tonypa.pri.ee

Why Tiles?Sad part about tile based games in Flash is, that we wont benefit much from the drawing or timeline parts, our game is made with actionscript and basically we just have bunch of code to create, move and modify images on the stage.

7. More Maps (Tile Based Games)    tonypa.pri.ee

To load maps from external files, XML might be good solution as most of XML parsing can be done with Flash MX built-in functions. Loading two dimensional arrays from text files is not that easy, you always get string from loading variables and you have to split the string into array, which again, is very slow.

8. Creating Tiles (Tile Based Games)    tonypa.pri.ee

Once we have movie clip for all the tiles, we also link it to our game object game.clip = _root.tiles. Now when we need to access tiles movie clip, we can use game.clip. Thats handy, if we ever need to place tiles somewhere else, we only have to rename this line and not go through all the code.

9. More Tiles (Tile Based Games)    tonypa.pri.ee

10. The Hero (Tile Based Games)    tonypa.pri.ee

Then we save the path to the char movie clip into char object, so every time we want to access the movie clip, we can use simpler char.clip instead of typing this movie clip's full path _root.tiles.char. It also saves us from going through all the code if we might need to move char movie clip to somewhere else.

11. Keys to Move (Tile Based Games)    tonypa.pri.ee

Dont have calculator? Lets see if it works: right arrow key was pressed, dirx = 1, diry = 0. Find the frame. diry * 2 = 0. dirx + 0 + 3 = 1 + 3 = 4. Its going to show frame 4. And frame 4 is where we did put our char_right animation.

12. Hit the Wall (Tile Based Games)    tonypa.pri.ee

Hit the Wall (Tile Based Games)

13. Open the Door (Tile Based Games #06)    tonypa.pri.ee

14. Jumping (Tile Based Games #07)    tonypa.pri.ee

For changing jumpspeed we will declare new variable "gravity". Gravity is pulling hero back to the ground, thats down. In every step we add gravity to the jumpspeed: jumpspeed=jumpspeed+gravity. You can change the value of gravity, when you make less gravity, hero will fly higher (balloon-type), when you increase gravity, hero will pop down sooner (stone-type). As we have lotsa objects and character is also an object, you can actually give different gravity to different objects.

15. Clouds (Tile Based Games #07a)    tonypa.pri.ee

16. Ladders (Tile Based Games #08)    tonypa.pri.ee

In tile B ladder tile itself is walkable and tile above it also have ladder, so hero should be able to climb up and down. Hero can also move left or right, but when he does, he should fall down after leaving the ladder.

17. Stupid Enemy (Tile Based Games #09)    tonypa.pri.ee

We then call getMyCorners function to check if enemy will step into wall. If he wont go into wall, all the variables upleft, downleft, upright and downright will be true saying those tiles are walkable. Its safe to call moveChar function using xMove and yMove properties (which are -1, 0 or 1) same way we called moveChar from key detection to move char, but since we pass enemy object to moveChar, the enemy will be moved. Told you we can reuse same function to move many objects :)

19. Getting Items (Tile Based Games #11)    tonypa.pri.ee

20. Moving Tiles (Tile Based Games #12)    tonypa.pri.ee

Moving Tiles (Tile Based Games #12)Once, long time ago, in the land of tile based games, lived a young tile. He was a happy tile. One fine day a hero came to him and asked: "Young tile, why dont you move?"

21. Scrolling (Tile Based Games #13)    tonypa.pri.ee

Scrolling (Tile Based Games #13)"What?" you might wonder, "no scrolling? And how did snail fall to sleep?".

22. More Scrolling (Tile Based Games #14)    tonypa.pri.ee

More Scrolling (Tile Based Games #14)

23. Isometric View (Tile Based Games #16)    tonypa.pri.ee

Isometric View (Tile Based Games #16)

24. Isometric Scroll (Tile Based Games #19)    tonypa.pri.ee

Isometric Scroll (Tile Based Games #19)

25. Rotate the Hero (Tile Based Games #20)    tonypa.pri.ee

26. Pathfinding (Tile Based Games #22)    tonypa.pri.ee

"done" property is used in the end to check if we have actually found the path (done is true) or has player been foolishly clicking on some tile, which no path is reaching (done is false).

27. More Pathfinding (Tile Based Games #23)    tonypa.pri.ee

28. Slopes (Tile Based Games #24)    tonypa.pri.ee

Slopes (Tile Based Games #24)Next if statement checks for the slope on the tile hero currently is. The diry!=-1 part ignores the check, if SPACE key has been pressed and hero jumps up.

29. Hextiles (Tile Based Games #25)    tonypa.pri.ee

Hextiles (Tile Based Games #25)

30. Tiling Images in flash.    tutorio.com

java2s.com  |  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.