Community

CommunityProgramming Forum

Good Programming Technique 101

Posted Nov 5, '08 at 12:50pm

LonLonRanch

LonLonRanch

178 posts

That's a good point Mike, I too wouldn't necessarily say that Actionscript is completely OOP, although (expecially with AS 3.0) it is headed in the right direction. And yes, OOP may not be best always, but it certainly has had history of good result in terms of good programming technique.

 

Posted Nov 7, '08 at 2:35pm

MikeRLee

MikeRLee

10 posts

In certain areas OOP has had a good history, mainly because it has become a craze which has pushed a lot of development into it. While this may be good for Flash, which I assume is prodominately used for animation and games, it is not so good for others. Functional, logical, procedural, generic and metaprogramming are still very important (procedural is a necessity even with OOP currently).
In fact, I just thought of a very good thought about OOP. It is almost dependant on procedural programming. A class isn't a class without methods, its a structure.
For a language to become completely object-orientated, everything from If statements to boolean operations need to be encapsulated in classes but you can see how ridiculous this is. Basically, even if AS ever becomes COMPLETELY object-orientated, it will have shot itself in the foot as it will have become tedious to create a new IfManager object and then ask it to run this method in this class if one value is {insert operation} than the other. This highlights that OOP will not nor ever work efficiently on its own.
After all that though, I agree it can bring out good results but I believe that that is also due to the amount of education that is spent on it. It is drilled into new programmers now to use it constantly and, as you will know, there are awful OO programs out there that could do with a bit of, lets say maintenance.
That was a bit of a ramble but what I mean to say is, and this is good advice so if you read anything, read this.
Find a paradigm that works for you. If concrete factory design patterns work for you, use them. If you prefer to split your programs into functions that each do a specific process, do that. Don't use a coding practise that does not work for you, otherwise your programs wont either. An application will only ever be as good - or as bad - as its programmer.

 

Posted Nov 25, '08 at 5:06pm

gameingkid

gameingkid

101 posts

right now i have gamemake 7.0 i think but it wont let me post my game on AG so i need to know what program to use to post games on AG and if its free or how much it costs so i know to start saving.

 

Posted Dec 1, '08 at 1:40pm

haYnguy

haYnguy

30 posts

If AS was purely OO, then you would NOT be able to directly modify the _x member of an object ( myObject._x = 34 )because it would violate encapsulation. Thus, AS is not purely OO...

Q.E.D :P

 

Posted Dec 19, '08 at 10:35pm

walkerm930

walkerm930

4 posts

hey gamingkid

if you want to make a game that you can upload to AG you gotta have make flash games using adobe flash. a 30 (i think) day trial can be found here-[url=https://www.adobe.com/cfusion/tdrc/index.cfm?product=flash&promoid=EBYEX&loc=en]

 

Posted Dec 19, '08 at 10:37pm

walkerm930

walkerm930

4 posts

i think the dash messed it up

link= [url=https://www.adobe.com/cfusion/tdrc/index.cfm?product=flash&promoid=EBYEX&loc=en]

 

Posted Dec 19, '08 at 10:43pm

walkerm930

walkerm930

4 posts

also lonlonranch has some good tips

if only i had known them sooner
i think the dash messed it up

link= https://www.adobe.com/cfusion/tdrc/inde … YEX&loc=en

 

Posted Jan 3, '09 at 9:49am

PixelSmash

PixelSmash

567 posts

What I usually tend to do is if it becomes too much code on the timeline, I put it in a seperate .as file. For me, this makes it easier since it keeps everything together, yet doesn't show the 'useless' timeline GUI - which I don't use when I'm coding anyway

And a few seperate classes ofcourse, such as for the player and the GUI of the flash.

 

Posted Feb 8, '09 at 10:55pm

Gamerzneed

Gamerzneed

12 posts

scripting is rele confusing for me

 

Posted Mar 6, '09 at 10:51pm

Sindyin

Sindyin

1 post

Keep it simple , solving a problem with simple steps  will  be far better then a  complex solution to a complex problem, what is known as elegant code.
It is far easier to  debug and get it working. Also the end result is better will run better on a wider variety of end use machines.

 
Reply to Good Programming Technique 101

You must be logged in to post a reply!