HOME | DD

GuyFlash — How to make adventure games...

Published: 2005-05-09 08:37:48 +0000 UTC; Views: 41820; Favourites: 349; Downloads: 2555
Redirect to original
Description [IMPORTANT EDIT!!!]
this tutorial is horrifically glitchy if you try and use flash 8, and there are lots of things I want to change, so I will be making another tut to replace this soon, as soon as I figure out how to make it work in flash 8

as a temporary solution, if you are using this code in flash 8, choose 'publish to flash player 7' and it should work



[Part2 Link]

My first tutorial, probobally not too good, let me know what you think.

If you need any help, just ask me here, it is likely there may be compability issues between different versions of flash, so if you get any error reports, let me know what they are and what version of flash you use.

If you want an example of this type of things application (other than making a REALLY cool game) check out my website, also what I'm teaching has no bugs (unlike my website) or at least when I test it.

Good luck, I want to see some brilliant games!


[Edit]
I should probobally let you know what I will cover in the whole tutorial;
-How to run around a (sort of) 3D world
-Jumping from platforms to platforms
-classic enemy killing (JUMP ON THEM!)
-Basic enemy AI

That is the basic area... I think it will be enough to get you started on making some brill flash games!

part 2 coming soon!
Related content
Comments: 158

ShadowandMaria [2006-04-15 01:03:23 +0000 UTC]

Excuse me for asking, but I'm kinda new to all this crap..... What progra are you using? I just wanna make my own Sonic Flash Game! I've literally got over a hundred Sonic sprites and backgrounds, and besides comix, I don't know what to do with them!!! WAAAAAAAAAAH!!! SOMEONE HELP ME!!!!

👍: 0 ⏩: 1

GuyFlash In reply to ShadowandMaria [2006-04-15 08:22:47 +0000 UTC]

[link] should explain what flash is and get you started

👍: 0 ⏩: 1

ShadowandMaria In reply to GuyFlash [2006-06-18 18:46:31 +0000 UTC]

Aw, thanx! That was nice!

👍: 0 ⏩: 0

Master-smiles [2006-04-06 06:09:57 +0000 UTC]

umm have you found out how to do this in flash 8? 'cuz thike you said up there it doesnt realy work.... well the code atleast for me

👍: 0 ⏩: 1

GuyFlash In reply to Master-smiles [2006-04-06 13:09:19 +0000 UTC]

yep, I'm afraid that flash player 8 has different priorities when it comes to keypresses
I have not only got this to work in flash 8 though, but I have a much better (and easier to understand) script which I wanna upload soon

👍: 0 ⏩: 1

Master-smiles In reply to GuyFlash [2006-04-06 18:53:54 +0000 UTC]

cool i realy, at least,want to learn the hit detection because im useing a diforent kind of engine and i can put moast of it in but instead of not leting me walk on it its lets me walk up it down it but not left its weird

👍: 0 ⏩: 1

GuyFlash In reply to Master-smiles [2006-04-06 20:03:23 +0000 UTC]

if you want a quick fix upload toe source somewhere and I'll have a look at it for you

👍: 0 ⏩: 1

Master-smiles In reply to GuyFlash [2006-04-06 20:10:23 +0000 UTC]

ok where do you want me to upload it and how? im not good at this kind of thing.... i guess

👍: 0 ⏩: 1

GuyFlash In reply to Master-smiles [2006-04-06 21:50:19 +0000 UTC]

err, I think it would be okay to put it in you're scraps for a while, the file isn't too big is it?

👍: 0 ⏩: 1

Master-smiles In reply to GuyFlash [2006-04-06 22:58:41 +0000 UTC]

no but do you want me to just give you the code or what? or just put the game in my scraps?

👍: 0 ⏩: 1

GuyFlash In reply to Master-smiles [2006-04-06 23:33:37 +0000 UTC]

it's probobally easier to look at the .fla so i'd say scraps

👍: 0 ⏩: 1

Master-smiles In reply to GuyFlash [2006-04-06 23:45:03 +0000 UTC]

ok ill put it in there but its the house that isnt working you cant walkleft over it but any other direction you can also i have to change the shape of the house but ok it will be there

👍: 0 ⏩: 2

Master-smiles In reply to Master-smiles [2006-04-07 00:00:44 +0000 UTC]

but if you walk inbetwene the fence there is another level and on that one i wanted to ad the same thing to the tree and the side of the stare level

👍: 0 ⏩: 0

GuyFlash In reply to Master-smiles [2006-04-06 23:48:42 +0000 UTC]

cool, send me a note when its up and I'll have a looksee

👍: 0 ⏩: 2

Master-smiles In reply to GuyFlash [2006-04-06 23:56:49 +0000 UTC]

ok its up just download and well figure out how to help please its just a short thing cuz i just started it yesterday

👍: 0 ⏩: 1

GuyFlash In reply to Master-smiles [2006-04-07 00:16:02 +0000 UTC]

okay then, you're problem is where you are doing the hitTest(), you are doing it as an else when you should be checking it every frame regardless. put the hitTest() code after the movement stuff and in it's own if statement and that should fix the main problem.
there are a couple of other problems with you're code, like there are bits of syntax you don't need and it could be laid out in an easier way to understand. if you want I can re-upload it (probobally tommorow ) with simplified code.

👍: 0 ⏩: 1

Master-smiles In reply to GuyFlash [2006-04-07 00:23:37 +0000 UTC]

that would be helpful and ill try it the way you just said so if i put it in its own thing it would lok like this?
onClipEvent(i dont know what to put there){
varPREMOVEX=_root.mcPLAYER._x;
varPREMOVEY=_root.mcPLAYER._y;
if(this.hitTest(_root.house)==true){
_root.mcPLAYER._x=varPREMOVEX;
_root.mcPLAYER._y=varPREMOVEY;}




so something like that i just dont know what to put in the brackets after the onClipEvent can you tell me what to put there? but do you think its a good start? my friend and i are going to work on it tomarrow

👍: 0 ⏩: 1

GuyFlash In reply to Master-smiles [2006-04-07 00:32:12 +0000 UTC]

yep, you're on the right lines, you're only problem from there on is the order of you're code, you will need to do the hitTest() after moving the character otherwise all collision detection will be a frame late. also I'm going to direct you to the 'auto format button' so that you're code is layed out in the standard way and it's easier to make sense of it. the button is the fifth button from the left above you're actionscript typing thingy. its the one thats got lots of horizontal lines on it

I'll throw together a simplified script for you tommorow and send you a note with a link to the new source
right now I could do with some sleep

👍: 0 ⏩: 1

Master-smiles In reply to GuyFlash [2006-04-07 00:38:35 +0000 UTC]

ok thanks alot your realy great

👍: 0 ⏩: 2

GuyFlash In reply to Master-smiles [2006-04-07 11:05:59 +0000 UTC]

ok, its uploaded [link]
I just worked on frame 2, but you can use the layout and approach on just about anything else, if you have any probs or questions I'll probobally be in #flashers all day (link in sig I think )
hope that helps

👍: 0 ⏩: 1

Master-smiles In reply to GuyFlash [2006-04-07 18:55:10 +0000 UTC]

you are my hero this is great it works perfectly and when im done with the whole game i'll show it to you first but i have the inside of the house done and another level this is great thanks ^_^

👍: 0 ⏩: 2

GuyFlash In reply to Master-smiles [2006-04-07 21:55:13 +0000 UTC]

no problems I'd love to see it finished, there aren't enough of this type of flash game
cant wait to see it finished

👍: 0 ⏩: 1

Master-smiles In reply to GuyFlash [2006-04-07 22:53:54 +0000 UTC]

yeah but do you know how i would change it to where i make a shadow that does the hit detection so it looks more realistic. like if the shadow hits it stops the movement of the charicter? oh and i was wondering what time it is in the U.K. right now i forgot what the time diforence was?

👍: 0 ⏩: 1

GuyFlash In reply to Master-smiles [2006-04-07 23:02:05 +0000 UTC]

midnight exactly now. any it's pretty easy to work with a hitTest shadow, whenever you have code to move the character, move the shadow by the same amount also. and just swap the player hittest so its checking for the shadow

👍: 0 ⏩: 1

Master-smiles In reply to GuyFlash [2006-04-07 23:27:37 +0000 UTC]

ok cool and i have all the buildings and inside of buildings done on what i have now but im adding more oh and thats a ummm 8 hour time diforence then wow i would have thought less but thanks for all the help your great there is one thing that i need to find out how to do but ill ask after im done with the layout and all that

👍: 0 ⏩: 1

Master-smiles In reply to Master-smiles [2006-04-09 08:48:51 +0000 UTC]

hey im having a little trouble with the hit test on the shadow instead of the player im just doing it on the first frame for now but when he and the shadow go up against the house the player gets shifted over for some reason so the he and the shadow are out of line could you help? if so just tell me and ill put it in the scraps

👍: 0 ⏩: 1

Master-smiles In reply to Master-smiles [2006-04-11 02:50:45 +0000 UTC]

so do you think you could help?

👍: 0 ⏩: 0

Master-smiles In reply to Master-smiles [2006-04-07 21:05:33 +0000 UTC]

hey i have one question and i would use the #Flashers but i dont know how to talk to you on there but umm if i wanted to add a shadow to my charicter and make it so if the shado touches the house or something the charicter wont move then so it would let the charicter get through a tighter space and make it look a little more realistic?

👍: 0 ⏩: 0

Master-smiles In reply to Master-smiles [2006-04-07 01:00:28 +0000 UTC]

ok i tryed the one way and its not working so ill just have to wait untill you reaload it but oh well thanks for the help there is one more question that i want to ask but ill ask later

👍: 0 ⏩: 0

Master-smiles In reply to GuyFlash [2006-04-06 23:56:45 +0000 UTC]

ok its up just download and well figure out how to help please its just a short thing cuz i just started it yesterday

👍: 0 ⏩: 0

DrewGreen [2006-02-18 23:30:29 +0000 UTC]

I may be able to use this. ^_^ Great tut! +fav

👍: 0 ⏩: 1

GuyFlash In reply to DrewGreen [2006-02-19 00:57:30 +0000 UTC]

thanks, just keep in mind the control system gets screwy in flash 8, but once my new tuts get there I can fix it

👍: 0 ⏩: 0

Messengerrobo In reply to ??? [2006-01-15 11:47:36 +0000 UTC]

Sorry, but it just isn't working for me. I haven't even managed to use the timer to make the ball move...

👍: 0 ⏩: 0

paki123 [2005-08-22 16:03:35 +0000 UTC]

also when i put the code in for the timer and the ball it doesnt move, no error it just doesnt move where do i put the code?

👍: 0 ⏩: 0

paki123 [2005-08-21 19:28:21 +0000 UTC]

it always says error code on mine and i dont know what to do

👍: 0 ⏩: 1

GuyFlash In reply to paki123 [2005-08-22 10:08:28 +0000 UTC]

where is the error, and what version of flash are you using, I might be able to help you out.

👍: 0 ⏩: 1

paki123 In reply to GuyFlash [2005-08-22 13:05:48 +0000 UTC]

im using flash mx 2004 and im having problems with mctimer and mcball and when i put in the code nothing happens it just stays there, then when i was making the timer, player and level the entire screen started blinkking.

👍: 0 ⏩: 1

GuyFlash In reply to paki123 [2005-08-24 15:00:04 +0000 UTC]

Upload you're .fla and i'll have a look myself, I used flash mx 2004 pro, so it should be fine, I'm not using and pro classes as far as I know...

👍: 0 ⏩: 1

paki123 In reply to GuyFlash [2005-08-25 14:03:22 +0000 UTC]

i use flash mx 2004 not professional but i thick i can

👍: 0 ⏩: 0

paki123 [2005-08-21 19:28:13 +0000 UTC]

it always says error code on mine and i dont know what to do

👍: 0 ⏩: 0

paki123 In reply to ??? [2005-08-21 19:27:45 +0000 UTC]

it always says error code on mine and i dont know what to do

👍: 0 ⏩: 0

KristenPlescow In reply to ??? [2005-06-26 03:40:18 +0000 UTC]

Wow! This is pretty useful! :3

Too bad I don't know where to buy the Flash program... can you find it at any electronics store, or is it a specialty item? For some reason, I always miss out on the cool programs... o_O

👍: 0 ⏩: 1

GuyFlash In reply to KristenPlescow [2005-06-27 08:03:03 +0000 UTC]

NOOOOOO not paint shop pro!
like all the best programs (eg PHOTOSHOP) if you visit the website of the peeps that make the program you can usually find a way of ordering it:

link: macromedia (flash)

hope that helps

👍: 0 ⏩: 0

neosarahbbb In reply to ??? [2005-06-01 23:00:04 +0000 UTC]

um... i didnt really read anything of it... Becouse i dont know flash

Can someone PLEASE teach me how to do flash?! I wanna make videos!! I wanna make a little show! I dont need to make a game. I just want a show! Is that so hard?
So, can anyone PLEASE teach me?

👍: 0 ⏩: 0

sachsen [2005-05-30 02:08:32 +0000 UTC]

this is really cool.
i want to make a side scrolling shooter flash game like alien hominid.

👍: 0 ⏩: 0

3pepe3 [2005-05-11 14:21:46 +0000 UTC]

thanks a lot, veruy impresie tutorial.... is going to be hard but who cares, i'm going to try to learn !!!!

👍: 0 ⏩: 0

Markanime [2005-05-10 21:54:14 +0000 UTC]

thanks this is a great tutorial

👍: 0 ⏩: 0

GuyFlash [2005-05-10 07:43:29 +0000 UTC]

thanks for the offer, but I've kinda started doing part 2 now and it's covering that stuff, if you want to write a tut yourself I'm sure people will be interested and I could point them your way!

👍: 0 ⏩: 0

dylanjones [2005-05-09 17:14:10 +0000 UTC]

Thank you for the beatiful Tutorial I have never seen that much Actionscript in one tutorial, lol. I love the style of the tutorial, its not boring like most people do. I cant wait for number two I could do a tutorial on how to make them have animation with like an rpg dude, so you can do the platforms and enemy stuff? if not its ok, i just wanted to help casue i want to see the platforms code! lol

👍: 0 ⏩: 0

Vrvy In reply to ??? [2005-05-09 14:27:15 +0000 UTC]

great to see someone taking the time to write tutorials... keep it up

👍: 0 ⏩: 0


<= Prev | | Next =>