PDA

View Full Version : Double Dragon/Final Fight style game



RedUncle
August 19th, 2007, 06:07 PM
I'm sure everybody's familiar with the classic, 2D side-scrolling beat-em-up games of the 80s and early 90s... One quick question before I begin:

should I use the platform game tutorials, or is there a specific tutorial I should study which focuses on fighting games? I don't need anything overly complex - just the standard punch/kick attacks, about ten different (respawning) enemies plus bosses at the end of each level... basically, exactly like Double Dragon

thank you very much in advance! I'd grately appreciate a push in the right direction before I head down a dead-end and concentrate some something completely off-course... :beer:


-red

Charleh
August 20th, 2007, 04:36 AM
Ah dude, this one should be easy enough :)

Platform game tutorials probably won't help as double dragon wasn't a platformer (although on the later levels of the gameboy version it got a bit platformy)

What's your AS experience like? It should be pretty easy to do...

I'd concentrate on getting your movement working, and then get some punches/kicks combos going and so on and see where that takes you.

Is there a specific problem you are facing or are you just not sure where to start?

RedUncle
August 20th, 2007, 10:41 AM
Hello Charleh!

Thanks a lot for the response! I have to be honest - this is my first attempt at making a game in Flash. So I'm sort of wondering where to start. If my game morphs into a platform game, I won't be too upset - but ideally, I'd love to maintain a combat element. If not punching/kicking, then perhaps shooting (something like an early Contra game).

Essentially, I'm wondering where to start looking for tutorials. I wish I could be more specific, but I'm a sort of in the dark when it comes to making Flash games. I really appreciate your comments! You're right, Double Dragon isn't really a platform game. I'd love to create a Double Dragon clone, however - so I'm extremely grateful for guidance in any form!

radical! -- red C:-)


p.s. AS is "action scripting", right? I'm just getting into it - I don't mind AS at all, but I'll have to take it slow because I'm pretty new to it. I think it's complex, and I don't fully understand all the coding - but as long as I can copy/paste, I'm cool with anything!! thanks again

Charleh
August 20th, 2007, 12:58 PM
Well I think the grounds of a good game design and a good game 'feel' come from understanding the mechanics of how something should work in code.

Contra 3 - one of the greatest games ever, I actually played it the other night just so I could play through level 3 (the one with the terminator thingies) and the bike level...that game is insane!

Well basically I'd start with getting a game loop running. I'd probably not look at a lot of tutorials as

a: none of them are very specific to the type of game you want to create and
b: some of them are written by people without much of a coding background

The important thing to learn about is ActionScript (programming in general) and how it works. Understanding classes is also very important as some people work without using classes, or don't really understand how to use them effectively.

I will tell you this though - getting this all to work without using any actionscript is an impossibility. You will need to get your hands dirty!

I don't think copying/pasting will get you very far in creating a game as you will need a lot of help, and there's only so much someone can give you before you need a custom snippet of code - pretty soon you'll end up having someone write it for you, which is no challenge and pointless in the long run in developing your skills and helping you learn.

...however, I do agree having something to study can bolster the learning process greatly so I could help you with whatever you want. I usually hang around these forums all day and I'm currently working on a Flash game and sometimes need a break for a couple of hours!

Have you got MSN messenger? If so we could chat on that and I can talk you through some ideas and how to use AS

What version of Flash are you using by the way?

RedUncle
August 21st, 2007, 06:46 AM
Wow! Thank you, man! you're really kind - - - I'm using Flash MX 6.0 ... I actually look forward to learning the intricacies of AS - Flash is such an incredibly adaptable and interesting program - I can't wait to figure out how to push it to its limits!

You're so right about Contra 3! Believe it or not, it's one of my absolute favorite games ever - I know level 3 very well!! It's outstanding!! I totally love the atmosphere of the first section - the unending vista of pollution-spewing factories in the distance ... it's awesome!! - - - - and the music on the last level is remarkable!! It's like the climax of ALIENS --- especially the part when you fight that weird digging/jumping crab/face beast ...... Utterly outstanding!! What's your favorite gun? I always go for the blue missiles -- the ones with an after-explosion that cause mass damage... I load both guns up on those, and lay waste to everything!! I also like the flamethrower...

Anyway, thanks a lot for those pointers - I'll do some research online (and I've also bought TWO books!!) ... I'll continue posting on this thread as I progress............. radical!! Good luck with the Flash game you're working on!! If it ever appears online, I'd love to give it a try!!

awesome

-red


p.s sorry man, I don't have MSN Messanger - if I did, I think I'd spend all day on it! haha, so I'm deliberately denying myself the opportunity to get hooked! I used to be a total fiend on IRC and ICQ back in the 90s ...... But I work at home, so I can log on here anytime ... :thumb:

Charleh
August 21st, 2007, 07:05 AM
Ok I've done a basic combo system, there's a lot of room for improvement to add more features..

At the moment the stick man doesn't walk (I couldn't be arsed to draw the walking anim) but if you hit space he will jab, space again he will do a second jab, and space again he will do a straight - all part of a combo chain which will trace to the output window (to let you know which moves hes doing)

Basically you need to do a couple of things to add a new combo -

Draw the moves on the stick man - you only need to draw each unique frame, you don't need to draw a frame and copy it multiple times to get a delay on frames, this is handled by the animation system

Add the animation to the player object (frames and delays)

Add the new combo to the player object.

------------------

Animations are stored in a list on all objects, it's basically an array of Animation objects.

To create a new one just declare:



var anim:Animation = new Animation("AnimationName");
anim.addFrames(<Frame numbers as array list>);
anim.addDelays(<Delay times as array list, must be same number of delays as frames>);


Frame numbers are the frames from the movieclip that you are using (i.e. the stickman) and should be in order that you want them to play. i.e. the jab is frames 1,2, and 3.
You need to add an extra frame at the end - explaining why would take too long, see if you can work it out :P


anim.addFrames(new Array(1,2,3,3));

Then add your delays - which is the time in frames before the next frame in the list is shown


anim.addDelays(1,1,1,-1);

The -1 means that when the game reaches this frame it should end the animation and set the current animation for this object to null

A value of 0 means loop on the last frame, and a value of 1 or more means play this frame as normal then loop to the first frame.

Once you have added the animation you need to push it onto the players animation array



Anims.push(anim);


Now you can add the combo

Combos are made up of an opening move and a set of follow on moves - there can only be 2 follow on moves at the moment - one for the punch button, and one for the kick button.

Adding more just results in nothing! (That's why this needs improvement!)

Basically you declare a new Attack object and give it the following parameters


var myAttack:Attack = new Attack("AttackName", "Animation Name to Play", <attack power>, <recovery time in frames>, <punch or kick attack :Boolean, true = punch>, <opening attack :Boolean>);


You need one opening attack to start the combo - and at the moment you can only have 2 (one for punch and kick etc - improve it!)

You need to declare the attacks, then for each attack add the attacks that are going to follow it to it's FollowUps array - for instance in my code



// Declare new jab attack, it's an opening attack using the punch key
var jab:Attack = new Attack("Jab", "Jab", 5, 10, true, true);
// Declare new jab2 attack, not an opener but uses the punch key
var jab2:Attack = new Attack("Jab2", "Jab", 5, 15, true, false);
// Declare straight attack, not an opener using the punch key
var straight:Attack = new Attack("Straight", "Straight", 5, 25, true, false);
// Make jab2 a followup from jab
jab.FollowUps = new Array(jab2);
// Make straight a followup from jab2
jab2.FollowUps = new Array(straight);


So now you have a 'chain' of combos.

Push the opening attack onto the Combos array



Combos.push(jab);


It's possible to have a 50 hitter if you really want, with all sorts of kicks and punches, but it's still limited to that opener - so you could have

P,P,P combo
P,P,P,P
P,K,P,P
P,K,K

etc etc and so on!

Oh there's the start of a game engine going on there too - you can add a couple of players and you can control them both at the same time etc

Charleh
August 21st, 2007, 07:10 AM
Yeah them blue missiles are called Crush missiles - if you manage to get 2 of them (you can get 2 in the first mission where the plane bombs the ground and it all sets on fire) then you can fire extra missiles by swapping guns quicky while you are shooting

It's the most powerful gun in the game and you can kill the terminator boss before it even gets to the first 'fire shooting' bit by doing this :D

Charleh
August 21st, 2007, 07:45 AM
I couldn't resist doing a dodgy spinning kick -

it's PPPK

(space = punch, control = kick)

(space x 3, then control)

Charleh
August 21st, 2007, 08:48 AM
HEY MAN PANTERAAA?!??! Jesus how can I have not found someone who loves Contra 3 and Pantera before?

Panteraaaa Panteraaaa memmedmemdmedlmedmeelllemeedllleeemdeddlyyy DUN DUN DUN DUN DUN DUN DUN DUN DUN DUN DUN DUN DAAA DAA DAAA DAA

A NOOOOOOO LEVELLLL OF CONFIIIDEENNNNCEEE ANNDDD POWAAAAAA

My fave band :D

Charleh
August 21st, 2007, 12:35 PM
You've made me want to write this now :O

Shift to jump, space for punches, control to kick, arrows to move

(you can only kick as part of the PPPK combo at the mo)

No walking anim yet - but the areas for attacks work so you can see where the attacking point is :P

What ya think?

RedUncle
August 22nd, 2007, 07:19 PM
Hey Charleh!!! wow! you've done so much amazing coding! this msg will be a bit short - I'll write you a proper message tomorrow morning - - - I've had a brutally long day/been working like mad.... I'm off to bed - - - I can't wait to check out what you've posted in the morning!! .....

take care for now!! :snooze:

p.s. ah yes, my friend! united through our shared taste in excellent music!! that's outstanding!! put on Vulgar Display... and fast forward to 3:07 on "Hollow" -- now THAT'S what I love about Pantera ...... fantastic!! :crazy:

Charleh
August 23rd, 2007, 04:12 AM
Yeah as soon as I manage to play the Throes of Rejection solo like Dimebag can I know I've become one of the greatest guitarists ever!

For now I can't even quite work out some of it :D

p.s.

I did some more on this game for jumping/walking/flying kicks etc

RedUncle
August 24th, 2007, 10:43 AM
hey!! man, I'm trying to open your files but my Flash is being difficult - - which version should I use? maybe I can get my hands on a newer version!! I can't wait to test them properly!! --- It sounds like you've created some insanely excellent and spot-on fight moves/combos - - - I really love how it's actually possible to make a Double Dragon-style game in Flash! I've developed some plot lines and image designs, and I've got a good buddy who said he'd make the soundtrack (he's really good!) -- he totally gets the concept! I think we should bring back arcades!!

But like I said, I'll hunt down a better/newer version of Flash so I can proceed - - - is Flash 8 the newest? radical! :)

I'll test out the codes after dinner - - and get back to ya!! thanks again for all the work you've put in! it's really nice of you, man!!

-- bye for now! -- Red

Charleh
August 24th, 2007, 10:59 AM
I use MX 2004 at work so most of it is probably MX2004 although I do have Flash 8 at home. The newest is Flash CS3 I think, but MX2004/8 has plenty of stuff in it to make a DD game.

I'm currently working on a game at the moment for someone which is coming to completion which I'll show you - but until then I can't really do much with the DD one except in spare time :P

I'm not bad at pixel art too I've made quite a few gritty looking games so given concepts or my own ideas I can draw/animate, I usually lack in the story/background graphics department!

In fact I could convert a lot of my current game engine over and import the new stuff from DD in - shouldn't take more than a day and it would mean there's a lot of UI/menu stuff already present

RedUncle
August 27th, 2007, 07:30 AM
Hey Charleh!

I'm sorry for the late response - I'm exceptionally busy these days... finishing company website, writing press releases, organizing exhibition, AND involved in personal business/sale --- it's supremely busy this week, and possibly next... Just wish to express my gratitude for your posts - the game is on my list of projects! I'll let you know when I get the artwork finished...

I wish you continued good luck on *your* game!!

---- rock on! ... Red :tb:

Sauceofallevils
August 29th, 2007, 12:14 AM
Pantera is the **** guys! I love the Cowboys from Hell album and Vulgar Display of Power albums especially, most of there stuff is sick. The album cover for Vulgar Display of Power is pretty sweet to. "Cowboys from hell!". Cool Double Dragon esc idea, check out the pre-alpha of my game. http://www.kirupa.com/forum/showthread.php?t=273318
It's rap esc music right now, but I don't know how to get a metal band. haha
Anyways good luck with your project, oh I have a newer version of this game to, just not on the net. The game is much faster pace now, the ship moves like twice as fast.

Charleh
August 29th, 2007, 04:16 AM
I can play guitar dude, not drums though :O

RedUncle
August 30th, 2007, 04:10 AM
thanks for the kind words, Sauceofallevils!!

like I've said previously, I'm really (stupidly) busy this week and into next - - - so I can't wait till it's time to dive into this game project. I'm looking forward to making it, AND playing it!! -- by the way, your game looks utterly RADICAL!! I love the ship designs!!


hi Charleh! - what's your favorite Pantera song??

Charleh
August 30th, 2007, 05:14 AM
Er good one...not sure - my favourite(s) are probably

Throes of Rejection, 10s, Floods, Slaughtered, A New Level, Mouth For War, 5 Minutes Alone, Revolution Is My Name, 25 Years, Use My Third arm... I dunno I don't think there's a track I don't like...

I prefer the albums after Vulgar, VDOP was good - Cowboys from Hell had it's moments, but it's the two after VDOP that really shine.

Oh a bit of Down never went amiss either - new Down album out soon, Down III!

I made this desktop too The Great Southern Trendkill style

Sauceofallevils
September 5th, 2007, 05:28 PM
Thanks guys, I'm happy you like my game. My favorite albums are "Cowboy's From Hell" and "Vulgar Display of Power" I think thats what most Pantera fans say.
Charleh: If you ever want to write guitar songs for my game, do it! I would love that.

Charleh
September 24th, 2007, 08:20 AM
I disagree!

Cowboys from Hell and Vulgar are the two worst albums :p

I mean Cowboys was OK, but it doesn't have the gritty production of the 3rd...there are some good solos but it's still quite close to their old hair metal albums - I like Domination, Psycho Holiday, Shattered, Cowboys From Hell, a couple of others. Vulgar was a bit better, though the guitar tone was a bit weak compared to later on, and the songs get a bit repetitive - I can only really say I love a few songs on Vulgar,

This Love, A New Level, Mouth For War, By Demons Be Driven...the rest are good, but not as good as Far Beyond Driven.

Far Beyond Driven is the most sickeningly good album - every song is purely amazing, Phil sounds brutal and disturbing at times! The Great Southern Trendkill has most of Dimes most soulful guitar work - check out the solo on 10s and Floods...amazing! It also has the most crushingly heavy guitar tone I've ever heard! It's like Dimes playing a chainsaw with strings on!

Anyway - also, get your hands on 'Down - NOLA', 'Down II - A Bustle In Your Hedgerow' and 'Down III - Over The Under'

If you like stoner metal/Pantera then you'll like that - it's Phil (and Rex in the 2nd two albums on bass) and they are 3 of the best albums ever!

Aquilonian
September 24th, 2007, 07:44 PM
Im interesed on those kind of games too but i was always confused on how they work because i was thinking that when two guys hit one each other at the same time there should be some kind of argoritm to figure out wich one has the strongest punch...kind of chun li kickng blanka when he is in chock, sometimes his chick his the others sometimes not

Charleh
September 25th, 2007, 03:56 AM
Yeah I reckon it's something like the hits in those games have 'priority' - the one with the strongest priority cancels the other hit if they are completely simultaneous.

It also depended on the type of attack - I think most weak attacks would stop strong attacks - I remember the best way to stop blankas roll attack was a light punch

It changed a lot in Alpha - SFA3 having super combos, super counters etc etc - still same basic premise!

SpaceNinja
September 26th, 2007, 02:21 PM
Red Uncle and Charleh, this is a great thread and I know the files you Zipped must be great, but Flash CS3 crashes when I try to open the FLA! :( What could the problem be?

I'm just starting game development and have one basic game done, which was really hard because I JUST got into actionscript, but I personally love it: http://www.sectorfive.com/challenge/

I'll be reading more from you guys, can't wait to see what each of you do next! :rd:

Charleh
September 27th, 2007, 11:01 AM
Red Uncle and Charleh, this is a great thread and I know the files you Zipped must be great, but Flash CS3 crashes when I try to open the FLA! :( What could the problem be?

I'm just starting game development and have one basic game done, which was really hard because I JUST got into actionscript, but I personally love it: http://www.sectorfive.com/challenge/

I'll be reading more from you guys, can't wait to see what each of you do next! :rd:

Hey dude this double dragon game was just a 5 minute aside, the real game I'm working on can be found in this thread (check out the screenshots)

http://www.kirupa.com/forum/showthread.php?t=266841

RedUncle
October 3rd, 2007, 06:12 PM
Hey dude this double dragon game was just a 5 minute aside, the real game I'm working on can be found in this thread (check out the screenshots)

http://www.kirupa.com/forum/showthread.php?t=266841



those screenshots look awesome!! keep it up! :thumb:

RedUncle
October 3rd, 2007, 06:17 PM
Red Uncle and Charleh, this is a great thread and I know the files you Zipped must be great, but Flash CS3 crashes when I try to open the FLA! :( What could the problem be?

I'm just starting game development and have one basic game done, which was really hard because I JUST got into actionscript, but I personally love it: http://www.sectorfive.com/challenge/

I'll be reading more from you guys, can't wait to see what each of you do next! :rd:

hey SpaceNinja! I played your game six times in a row! It was great! I love those types of games - - I'd love more levels! I really like the design of the guy and his body-movements. The color scheme is really cool too! Awesome

parad0xl0g
October 4th, 2007, 03:46 AM
I wanted to add some sprites... ;)

http://usuarios.lycos.es/lakr0p0lis/tmp/dd.html

Charleh
October 4th, 2007, 07:52 AM
Hehe, movement is like lightning though! I say draw new DD sprites that are HUGE!

Sauceofallevils
December 8th, 2007, 11:12 PM
I haven't been here in awhile, so this is an extremely delayed post:) I just wanted to say I have been a Down fan for along time now, and I love the Nola album! Also I was curious to see how the game was coming along. Also check out the new release of my game!

http://northernmost.org/cosmos/Cosmos.html

I'm a huge metal fan, and I have a large collection of music! Keep on rocking!

Charleh
December 9th, 2007, 03:36 PM
Hey sauce my game got finished at http://www.hesco.com/HDII/gameselector.html

Sauceofallevils
December 9th, 2007, 06:24 PM
That game is sweet, good job! Great gameplay, nice graphics and voice acting, it's pretty challengine and it's got neat objectives. Overall, this is a great game. My game is still in the works, I'm tyring to get it finnished but it's a big project. I'll probably need to find more help.

Sidar
November 2nd, 2008, 03:23 PM
Old thread but still,

Charleh,

It's all nice that you have those scripts made but i hardly understand anything from it.
I'm trying to make a game my self...i just started the (super) playable character class...
it can walk and jump...but the transitions are really "buggy"...now im trying to make a basic combo function but i can't understand what you have done with your classes charleh.

I would like to have a combo function inside the playable character class...
Can you help me out with this one?

the "sprites" come from the library, those are the only thing im planning to make within flash.
But im doing scripts external(classes).

Thanks.
Sidar

Sidar
November 8th, 2008, 02:41 PM
Super Bump...