A Flash Developer Resource Site

Page 1 of 3 123 LastLast
Results 1 to 20 of 59

Thread: AS3 version of Tile Based Tutorials

  1. #1
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223

    AS3 version of Tile Based Tutorials

    Hey

    Not sure if you know, but I have little tutorials about Tile based Games:
    http://www.tonypa.pri.ee/tbw/

    These were written some years ago for Flash5 and are getting too old very fast so I want to update them into F9/AS3 (there wont be AS2 version). I have started already (but wont show anything yet). I am not going to simply update the code to run under AS3, they will be completely rewritten and many basics will completely change. Now would be good time to post requests about new version

    What kind of file type would you like to see? Flex projects? Flash9 fla? External class files?

    What parts in old version did you like/hated? Something that needs to be added or some useless parts trashed? Something was not clearly explained? Some rants bored you?

    Thank you

  2. #2
    Senior Member walnoot's Avatar
    Join Date
    Apr 2005
    Posts
    751
    I don't know if this is really something solvable or something that you could agree on, but:

    The most difficult thing I find to get through in your tutorials is the way you handle object-references and function-functionality. Allthough I see why you are doing it, and it definately makes the code very neat and reusable, for just learning the basics of a gameplay-element it's often too much for me to see through.
    Sometimes elements have so much reference in other objects and changing their properties by calling global-functions, that I get lost in the maze of code.

    I don't know if I'm really clear, but sometimes it might be better to do something like:
    "Ofcourse it's better to put all mc's in an array and call one onenterFrame, but for the sake of simplicity of the example we just give every mc it's own enterframe when it's created"
    or :
    "It's better to create a seperate function for the upcoming code, but for the clearly arrangement I just put it here in the herohitswall-function"

    Great news that you are upgrading the tutorials, thank you!

  3. #3
    Yes we can tomsamson's Avatar
    Join Date
    Sep 2001
    Location
    Team Titan Secret Lair
    Posts
    4,666
    "Ofcourse it's better to put all mc's in an array and call one onenterFrame, but for the sake of simplicity of the example we just give every mc it's own enterframe when it's created"

    I don´t agree with that one at all. It may be ok if you did always two versions of a tute (the quick´n´dirty beginner friendly version and then a real propper way to do it for those who want to use the things or learn how to do it in better ways) but yeah,as long as there´s just one version for each tute, i´d go for showing how to do things in propper way.
    People relying to tutorials often don´t know several ways how to do something and therefore which ways make more sense structure-/resultwise so saying something like
    "Ofcourse it's better to put all mc's in an array and call one onenterFrame"
    wouldn´t bring them much really. What brings more in longer term is seeing and learning the better way to do it,even if it may be more difficult to get into at first.
    Sure there´s always a balance to be handled between showing a good way to set things up and still having it accessible for not so experienced fellas but i don´t think its nailed well if one would always opt for showing the simplest seeming approach at any cost.

    to tony:
    i read some of your tutes a good while back, since its been so long ago i don´t remember the content in detail that well really but that i felt like you explained the concepts well. I think with AS3 good learning material is required more than ever so i highly appreciate your efforts

    Regarding project setup/sample files, as long as its just about one file i think a simple .as file or fla would do, once it gets more indepth with several classes etc i´d suggest you deliver it as flex actionscript project and for beginners also a fla in which you just set the main entry class as document class.
    Last edited by tomsamson; 06-27-2007 at 05:11 AM.

  4. #4
    Developer
    Join Date
    Apr 2007
    Location
    UK
    Posts
    324
    Tony, your tutorials helped me a lot when I first started. I think you new tutorials should be written in the same style as before (if it aint broke dont fix it )

    Also, I think using external AS files would definitly be best. I'm not how easy it would be for beginners to understand...

  5. #5
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    Are you going to remade the vector ones too, after this one?
    if(this==true){

    there is something in the vector ones that i dont get, i dont know if its just me but i get confused when there something like a ball that hits a vector and bounces.That i dont understand cos i used to think that vectors were for movements, i was always told that, you cant hit and bounce a movement, you hit a hall
    }

  6. #6
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    Sweet I'll think of something

  7. #7
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Quote Originally Posted by Cimmerian
    i get confused when there something like a ball that hits a vector and bounces.That i dont understand cos i used to think that vectors were for movements, i was always told that, you cant hit and bounce a movement, you hit a wall
    You are correct in that vectors can represent both movement and line (wall). But in the end these are same things: when you move (straight) from point A to point B your movement can be described as a line between these points. So the vector describing a wall (line) and vector describing movement (line) can be used together to find and solve collision.

    Vectors are mathematical system, how you finally use them is up to you. Same way numbers are mathematical way to describe things.
    Last edited by tonypa; 06-27-2007 at 06:08 AM.

  8. #8
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    Hummm...so its my fault, i was thinking they were just movements, not lines
    Anyway, about the tiles, this is not 100% tiles but i think that could be cool if they have some BitmapData update, like for example how to destroy the ground

  9. #9
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    i would like for the tutorials to develop an extensible TileEngine. Theres always quite a few posts on this board that say "how do i add another guy into tony's tilebased tuts" or something like that. And when looking at their code it always looks like their adding on weird methods that dont fit in with the engine.

    If you explain how to add more functionality to the engine that would be super.

    also, will the updates require a knowledge of OOP? if not i guess you'll have to explain some OOP concepts.

    if i can think of anything else i'll post it up.
    lather yourself up with soap - soap arcade

  10. #10
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Quote Originally Posted by mr_malee
    also, will the updates require a knowledge of OOP?
    No. It probably wont use any OOP at all.

    Quote Originally Posted by tomsamson
    I think with AS3 good learning material is required more than ever
    I doubt I am able to teach AS3 with these tutorials, its about "tile based games", not "how to code in actionscript version 3". Plus I dont know AS3 well enough to teach it.

  11. #11
    Developer
    Join Date
    Apr 2007
    Location
    UK
    Posts
    324
    You know a heck of a lot more than most people, plus to complete beginners to coding games in AS3 it will still be a great help.

  12. #12
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    Quote Originally Posted by tonypa
    No. It probably wont use any OOP at all.



    I doubt I am able to teach AS3 with these tutorials, its about "tile based games", not "how to code in actionscript version 3". Plus I dont know AS3 well enough to teach it.
    hmmm, i guess i'm a little confused here. So your saying the "new" tutorials are simply going to be exactly the same except converted to AS3 syntax. You say it wont have any OOP at all, you might be being sarcastic i dunno, but i thought the whole reason for AS3 was to introduce people to OOP? readers might get off to a bad start. I know i used your tutorials for my first games. I used the style of programming for a good while. Wont it bit harder to keep it non OOP in a language designed for it?

    anyway, good luck
    lather yourself up with soap - soap arcade

  13. #13
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Quote Originally Posted by mr_malee
    So your saying the "new" tutorials are simply going to be exactly the same except converted to AS3 syntax. You say it wont have any OOP at all, you might be being sarcastic i dunno, but i thought the whole reason for AS3 was to introduce people to OOP?
    No, not exactly same, I am using features available in AS3 of course (bitmapdata instead of movie clips etc). But there wont be any "now lets extend walkable tile class from main gameobject class which can be later extended into walkingobjectwithbighead class". To make an AS3 game you dont really need OOP more then you did with Flash5.

  14. #14
    Zombie Coder EvilKris's Avatar
    Join Date
    Jun 2006
    Location
    Fukuoka, Japan.
    Posts
    796
    To make an AS3 game you dont really need OOP more then you did with Flash5.
    That's what I'm recently discovering to my pleasant surprise.

  15. #15
    FK founder & general loiterer Flashkit's Avatar
    Join Date
    Feb 2000
    Location
    Sydney
    Posts
    1,149
    nice one tonypa, im looking forward to these bad boys. My preference is for flash 9 interface.

    I just want a sweet tile engine thats supoer super fast.
    Regards Mark Fennell - Flash Kit Founder, general loiterer
    -------------------------------
    I Hate Zombies - iPhone Game | markfennell.com

  16. #16
    Member
    Join Date
    Jun 2007
    Posts
    64
    Hi,

    I'm new to this board, and flash in general. However, I've been an OOP developer for many years. Because of the knowledge I have with a bunch of other OOP languages, I was able to pick AS3 up in a very short amount of time (the coding aspect).

    That being said, I can't imagine trying to teach young flashers how to code a full blown gaming engine of any type without using an OOP approach (since it is now possible).

    I've read a couple of your tutorials Tony, all of which were great resources. I think it would benefit young developers the most to get exposed to OOP techniques as soon as possible though.

    I may be willing to convert your tutorials to an OOP approach sometime in the future, with your consent of course. I'm always looking for a way to learn more myself!

    Currently though, I'm still trying to learn the "best" way to go about doing things, which is hard to find resources on. You can view my first flash project here: http://www.coregraphic.com/Rick/Flas...oTD/herotd.swf

    It is far from done, but uses a fully OOP design. I'm currently hashing out the pathfinding code. The blocks on the right hand side are meant to be clicked and placed in the orange area to act as towers.

  17. #17
    Senior Member
    Join Date
    Nov 2005
    Posts
    192
    I think an engine entirely class based would be good (no code in the timeline)

    useful stuff included could be:
    1. well that said, the maps would also be stored externally so an xml loader

    2. How to organize your code so that its easily changable and reusable in other sections of your code. using classes

    3. Organizing all your sprites/tiles.

    4. Maybe some more complex tile types. Icey floors, etc. The most interesting tile type in the Legend of zelda:Minish Cap was the mine cart/track. Though I think thats a little bit extensive to cover. Though for basic games: doors/levers and moving platforms for sidescrolling games.

  18. #18
    Zombie Coder EvilKris's Avatar
    Join Date
    Jun 2006
    Location
    Fukuoka, Japan.
    Posts
    796
    Quote Originally Posted by tonypa


    I doubt I am able to teach AS3 with these tutorials, its about "tile based games", not "how to code in actionscript version 3". Plus I dont know AS3 well enough to teach it.
    Could have fooled me.

  19. #19
    Member
    Join Date
    Jun 2007
    Posts
    64
    Sorry to dig up a dead thread, but...

    As I'm learning flash I'm finding out that I don't really know how to layout my game, and I wasn't able to find much info on this topic. So I thought I'd add this to the list of tutorial ideas.

    For instance, the game I'm currently working on has a GUI (most games do). Right now I have the gui handlers implemented in the document class of my project. Is that the best place for this? I was considering writing a GUI class, but my interface isn't that complex.

    My document class creates an instance of a new class called gameManager. This class is more or less the main class of the game since I used the document class to organize the gui. The manager class contains my enterFrame event as well as a mouseclick event for the stage. It also creates npc and tower objects as the game needs them. All game logic is handled here.

    Anyway, I guess this stuff is probably common sense once you get to a certain level in game dev. I'm new to game dev in general, but I'm certainly learning as I go. However, I can see how a general layout of a project would be useful when trying to learn the scope of developing a game.

  20. #20
    Senior Member The Helmsman's Avatar
    Join Date
    Aug 2005
    Location
    _root
    Posts
    449
    It will be great if you'll write them as external AS classes united in some package with good OOP and opportunity to extend them easily to add new features, behaviours and so on. Actually it will be great if you make a clear structure for the tile based game engine and show through new approach a good style of OO programming.
    Anyway, no matter what you'll decide to do mate, the Flash Community people will be grateful for this.

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