Forums

ForumsProgramming Forum

Good Programming Technique 101

Posted Feb 23, '12 at 12:55am

Ilovelegosalot

Ilovelegosalot

1 post

I geuss this will work good, Well,  I hope!

 

Posted Mar 11, '12 at 11:32am

mjrommel

mjrommel

7 posts

can you give me the download link???

 

Posted Mar 24, '12 at 4:17pm

xShiftedHD

xShiftedHD

58 posts

Thanks for the tip!

 

Posted May 21, '12 at 4:11am

Ratateous

Ratateous

14 posts

At first ... i want to make a game ... but after this ... I QUIT !!
It's too complicated for me ...

 

Posted May 21, '12 at 10:55am

manny6574

manny6574

862 posts

I just looked at the original post, and well, in AS3 you should really have no code on the timeline.

 

Posted Jul 2, '12 at 12:18pm

mindlesscoolman

mindlesscoolman

4 posts

hey i am trying to start a game myself but i dont have anyone to help me cause i dont know how to code but none of my friends would help me so i want to know if you can help me?

 

Posted Jul 4, '12 at 11:14am

PhsycoDragon

PhsycoDragon

42 posts

Thanks i'll try actionscript and get back to this for help

 

Posted Aug 30, '12 at 5:23pm

Blackbeltr0

Blackbeltr0

735 posts

HOW DO U MAKE A NEW FOURM POST????

 

Posted Apr 2, '13 at 2:08am

Darkroot

Darkroot

2,549 posts

At first ... i want to make a game ... but after this ... I QUIT !!
It's too complicated for me

Nothing in life worth pursing comes easy my friend. Though it not for everyone but if everyone quit there would be no games. Sometimes you just have to buckle down and mow through the hard times to get to the good times.

hey i am trying to start a game myself but i dont have anyone to help me cause i dont know how to code but none of my friends would help me so i want to know if you can help me?

Maybe if you don't know how to code you shouldn't be trying to make a game? It's like a kindergarten student trying to do calc, they will get there eventually but not before doing all the stuff in the middle. I recently made a post on how to start learning to program. It's apparently a sticky now so you can check it out. I provide mostly free resources that should be enough for motivated people.

I just looked at the original post, and well, in AS3 you should really have no code on the timeline.

Technically yeah but it's not like it won't work. Personally having all the code on the timeline and having all the code in a single external as3 class are just as bad. It just turns into a wall of code at that point.

 

Posted Jul 1, '13 at 8:46pm

mightybob

mightybob

351 posts

Although coding inside of frames is good for some games, I highly recommend to put code inside of movieClips for platform games.

Why do I say this? Well, in a platform game your going to have enemies/baddies to stomp or something to make a challenge in the game. And if you code in a frame, this is what you'll have to do for EVERY enemy/baddie:

function onEnterFrame() {

If(player.hitTest(enemy)==true) {
//what you want to happen
}

}

So I know what your thinking: that's not a lot of work!

But let's say your average level has 10-15 enemies. That could mean 100 lines.

Same thing for if you have springs in the platform game, or anything else of large quantities.

If code is inside an object, you can just duplicate the object, place, done.

Flash when exporting swf won't care about duplicate vars or anything like that as long as they are in separate movieClips.

So pretty much, code inside movieClips is best in most situations, and quoting what the original poster said "putting code in timelines can save so many lines".........

More than half the time it won't.

 
Reply to Good Programming Technique 101

You must be logged in to post a reply!