A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: New to AS3, new to CS4, looking for pointers on game design (and paper dolls)

  1. #1
    Senior Member
    Join Date
    Oct 2005
    Posts
    108

    New to AS3, new to CS4, looking for pointers on game design (and paper dolls)

    Mainly looking for pointers to the tutorials I am sure exist (but which I can't find). But I am also very open to any general or specific advice you may have to spell out for me in the thread.

    I am looking to build a PBBG (Persistent Browser Based Game) which, while single player, has some few multiplayer elements. Indirect interaction. One example of this is a commodities market - yes, the good old space trading, fly to one planet and buy, fly to another and sell scenario. I want every player to impact the inventory of each planet, and to have that inventory affect the buy/sell margins, etc. Other Indirect interaction would be bars et al, where players can chat, maybe (a BIG maybe) trade inventory and such. It seems direct, but it is not fighting one another or fighting at each other's side, etc.; so to me it is 'indirect' to the game. But that isn't why I'm here (feel free to impart any wisdom you have anyway, if you so desire); just an aside to explain a bit about the game.

    The aspects I most desire help with are what I have seen referred to as 'paper dolling'. I would like two systems, one to let the players design their character (so many different games/avatars/etc. out there have variations of this it seems like it should be simple). The other major paper doll would be in space ship design. I have found some AS2 tutorials on this, and I *think* I could port it into AS3 with little difficulty (but since I am new, I may be WAY off on that assumption); however I haven't found any tutorials on preferred methods of saving the state of said paper doll.

    I would prefer a more or less free-form design if possible, where a player can move the wings of the ship (or the ears of the character) up or down as they see fit, maybe even resize the elements to make one element serve a greater variety of designs. I would prefer having a way to ensure no elements are 'free-floating' but all are touching at least one other element at some point.

    For the character, all I need is the overall image; though if I just take a snapshot, it would make editing the character later very difficult (I am not yet sure if I will be allowing editing, but why not?). For the ship, however, I need to know which components are selected; because they will affect performance of the ship in-game as well as the appearance. And since one needs each component saved, I may as well learn how to do it for both.

    I plan on having various flash games where either the character or the ship are used as 'sprites' in the game - be it a race through an asteroid maze, a 'shooter' or a fighting game, etc. I need to import those designs (character and/or ship) into these flash games. The Flash portions will be a series of mini games which are linked by the main HTML game...so I need a way to move the designed characters and/or ships from one flash game to another. My guess would be to save them as individual .swf files; but that could fill up a server quick with a lot of players!

    I know I have a very long way to go before I get this game designed. I have a very good outline, and have started coding some of the game elements (in PHP)... But I need to figure out how to do the flash portion before I get too far. Mainly, how to save the characters/ships, so that the returning players will have their avatar and their ships still, and indeed even so they remain from one mini game to another.

    Again, while I appreciate any direct advice, I am mostly looking to get pointed to tutorials. I have a decent idea of what needs to get done, and a little less strong but still decent idea of how it should be done . . . I think. But I need to learn a lot more before I start tackling this. I just bought CS4 2 days ago, and decided it is finally time to learn AS3. And what better way to learn than by doing?

    Thanks!

  2. #2
    Member
    Join Date
    May 2009
    Posts
    62
    For the Paper Doll / Avatar, you could use a single .swf file that compiles the customized character based on an XML (or a MySQL entry) at run time. Then just import that particular swf file into each of the games you make.

  3. #3
    Member
    Join Date
    Apr 2009
    Posts
    37
    Here's some really, really helpful advice.
    Don't delve right into it. Be patient. Maybe try a few minor projects at first, then build your way up to what you want to do. If you just bought CS4 two days ago, and haven't had any prior AS3 knowledge, then I think this project might be a bit to hard to start learning on. This is from experience. I had the same mentality when I first started. I thought I was going to make some super-sweet networked program with multiple levels. But it was the first time I did anything in Flash and it ended up being a 1 level single-user game. So I suggest to start out with some tutorials and do little mini projects, maybe one learning how to interact characters, and another to learn networking, another to learn item handling, and then bring it all together.

    Unless you have had extensive experience with this sort of game design before in another software and have a very good idea of how to make this sort of game, start with the basics.

    Anyways, here's a few sites that helped me, dunno if you've been to them
    http://asgamer.com/
    http://www.mrsunstudios.com/
    http://www.tutvid.com/index.php
    http://livedocs.adobe.com/flex/3/langref/index.html <--- always helpful
    http://www.tutorialized.com/

    Well, hoped that helped ya.

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Posts
    108
    Quote Originally Posted by Sharsnik View Post
    For the Paper Doll / Avatar, you could use a single .swf file that compiles the customized character based on an XML (or a MySQL entry) at run time. Then just import that particular swf file into each of the games you make.
    I was thinking of something along these lines... or possibly using a custom class to handle the avatar/paper doll. Just not sure which is easier, or which is best.

    Quote Originally Posted by Xanathalas View Post
    Here's some really, really helpful advice.
    Don't delve right into it. Be patient. Maybe try a few minor projects at first, then build your way up to what you want to do. If you just bought CS4 two days ago, and haven't had any prior AS3 knowledge, then I think this project might be a bit to hard to start learning on. This is from experience. I had the same mentality when I first started. I thought I was going to make some super-sweet networked program with multiple levels. But it was the first time I did anything in Flash and it ended up being a 1 level single-user game. So I suggest to start out with some tutorials and do little mini projects, maybe one learning how to interact characters, and another to learn networking, another to learn item handling, and then bring it all together.

    Unless you have had extensive experience with this sort of game design before in another software and have a very good idea of how to make this sort of game, start with the basics.

    Anyways, here's a few sites that helped me, dunno if you've been to them
    http://asgamer.com/
    http://www.mrsunstudios.com/
    http://www.tutvid.com/index.php
    http://livedocs.adobe.com/flex/3/langref/index.html <--- always helpful
    http://www.tutorialized.com/

    Well, hoped that helped ya.
    Thanks, and that is good advice. I have better than average knowledge of AS2, and have been using CS3 since before it was officially released... I am also very handy with PHP and JS, as well as HTML. So I don't believe I am biting off more than I can chew with this project... just looking for advice specific to the new variants I am trying to learn.

  5. #5
    Member
    Join Date
    May 2009
    Posts
    62
    Just not sure which is easier, or which is best.
    If you use a custom class you'll have to recompile all your mini-games everytime you update the paper doll system. Using a stand-alone movie means you can simply load the updated .swf file.

    Other than that, they're pretty much the same?

  6. #6
    Senior Member
    Join Date
    Oct 2005
    Posts
    108
    Thanks, that makes sense.

    I have an idea; for the spaceship design at least... I am fairly certain it won't work for the characters. I will probably need to post this in its own thread since it is a major tangent, but I will start it off here and see what response I get before I do that. Again, looking mainly for links to tutorials that can help me achieve the below, not so much asking for someone to send me completed code (I want to know the how/why of the AS, so I can change it, fix it, and duplicate it later)...

    I think I would like to arrange a 3x3 grid (9 squares) which the user can re-size by grabbing any one of the middle two horizontal lines or middle two vertical lines. I would like to load in a selection of images that the user can place in each of these squares.

    For example, assuming the 123/abc grid layout, with 1a in the top left and 3c in the bottom right, and each square defaults to 50px x 50px; a total of 150px x 150px. The user will select from various left wing pieces to place in 2a. They will select from various 'bridge' or 'nose' pieces to put in 1b. And so on.

    And I would like to accomplish this via AS3 and either PHP/mysql, or XML. When the user clicks on square 3B, the mySQL or XML list of images is scanned for all which have the '3B' tag, then they are loaded into a pallet the user can scroll through. When the user clicks one, it snaps into place in the selected square.

    And if they wish to make the center of the ship narrow, with wide wings, they simply grab one of the two vertical bars and drag them in toward the middle; the images are dynamically re-sized to accommodate this. Each column can be shrunk from 50px wide to 25px wide, or expanded up to 100px wide. Likewise, each row can be shrunk from 50px tall to 25px tall, or expanded up to 100px tall. If the left vertical line was dragged 15 pixels to the right (center), the first column becomes 65px wide and the center is 35px wide.

    Again, done with AS3, CS4, and either PHP+mySQL or XML (or a hybrid where I use PHP to create an XML file from a mySQL database).


    As I said above, my guess is I will need to start one or two new threads for this alone, as it is a fairly hefty divergence from my initial queries... but I hate cluttering up a forum so I thought I would give it a go in this thread first.

    Thanks!


    I would think by this means, the individual ships can be easily stored in a database, where each grid has a code like nXnYimg, where nX is the width of that cell, nY is the height of that cell, and img is the image path. 9 small variables easily loaded into any of the mini games to reconstruct a ship.
    Last edited by kargrafx; 06-19-2009 at 05:34 AM.

Tags for this Thread

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