Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-06-2010, 11:37 PM   #1
ActionScript Newbie
Join Date: Jan 2010
Location: Nicaragua
Posts: 6
Send a message via MSN to andrei.d
Default First step with pet game

Hello everyone , i'm developing a 2d game in flash cs4 with actionscript 3. The idea revolves basically around a pet, u can customize the pet, its appeareance(clothing) and stuff like that. The first thing i want to do is being able to render the pet on stage dinamically, by that i mean load from a database MY pet's properties(eg. the url for the shirt it wears, the url for the pants my pet wears, etc..), at first i wont be using a database but thats the final idea. The pet must be able to move too, for that i was thinking of using IK and animating all this different kinds of poses on my pet.

Well for starters, my idea so far(please give feedback on this idea):

The pet movieclip is going to have 6 pieces, head, left arm, right arm, left leg, right leg, and body(to start with). I was thinking of creating a bunch of .gif for each piece, and just load them on top of each piece of the pet. And for the skeleton if I may call it like that, just animate(using ik) the different movements the pet will be able to make in frames, for example, from frames 16-40 in my pet movieclip the pet will jump(with arms and legs moving and that kind of stuff). So when i instantiate my pet movieclip and press a button jump it will go to frame 16 and stop playing at frame 40, something like that was my idea, i dont know if it is correct or if it will work, I ACCEPT ANY SUGGESTIONS ON EVERYTHING IVE SAID!

Thats about it for now, any ideas are greatly appreciated.

Andrei D.
andrei.d is offline   Reply With Quote
Old 01-07-2010, 02:04 PM   #2
Salmon Eater
TomMalufe's Avatar
Join Date: Jun 2007
Location: Doylestown, PA, USA.
Posts: 740

It sounds like a good idea and that you are approaching it in a similar way that I would. I've actually made a dynamic customizable pet game in AS3 before. I had my friend make movieclips for each animation (eat, sleep, laugh, cry, sweat, shiver, etc.) and each part of his body in those MCs were separate MCs.

I used a simple class structure that allowed me to remove the default Bitmaps on each part and replace it with the custom piece. At that point I was done with the animation part and my friend could work on all the rest of the art and test it while I worked on the logic behind the game itself.
Actually, the way I had designed it, if he had wanted to make a few new animations (which he never did) he would have just had to follow the same guidelines as the others and inherit the same base class and I wouldn't have had to do anything else but incorporate that animation into the game logic some how (like a dead state).
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." -- Chinese Proverb.
TomMalufe is offline   Reply With Quote
Old 01-07-2010, 09:23 PM   #3
ActionScript Newbie
Join Date: Jan 2010
Location: Nicaragua
Posts: 6
Send a message via MSN to andrei.d


Ok, so now i have everything working , thanks for the reply, glad to see someone made a similar approach to this kind of game and it actually worked.(BTW nice website very clean and elegant)

Well, i made a few changes to my idea, for example, I no longer load a bitmap onto the pet but a swf file, which would be drawn in flash, and if i am correct, it would be a vector so we wont have any pixelation issues. Ive tried out some parts and they arent really that large in filesize so that wont be an issue either. //COMMENTS ACCEPTED //

Well the next step will be creating a world for my pet, i was thinking of creating 2 types of worlds, a house, where he could go from 1 room to another and do some stuff in it. And the outside world, where he could go to shops or any other place. Any ideas on how to make the "world" for my pet?

Last edited by andrei.d; 01-07-2010 at 09:27 PM.
andrei.d is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 06:47 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.