Highlighted

AIR for Desktop Game Design Questions

Community Beginner ,
May 19, 2019

Copy link to clipboard

Copied

Greetings!
I am delving into game design with Animate CC and so far it has been very easy and enjoyable to realize my ideas.
I'm at a point now where I am ready to get into some heavy duty development but before I begin I want to have a plan for efficiency.

My goal is to first create a game for Windows Desktop and then convert it to HTML5 Canvas and other AIR packages.
It will be a 2D Point & Click Adventure with simple mechanics and flashy animations.

I've been doing a ton of research and I keep seeing the same advice (for Actionscript 3 projects) that it is best to have only one layer and one frame and use classes and code for the game engine. This is cause for concern because so far, I have done the exact opposite. For instance my Intro Movie has over 4000 frames and dozens of layers with various MovieClips that can also have thousands of frames. Lots of dialogue and mouth animation. I use Actionscript in the main timeline and inside MovieClips. Lots of stops, gotos, and enter frame events.

My questions are:

1. Is my method wrong or inefficient and will it cause problems?

2. Is the one layer/one frame method much more efficient, a little more efficient, or negligible?
3. With the one layer/one frame method, what's the best way to progress a lengthy animation?

TL;DR: Is my game going to be bad because I use thousands of frames and layers and code in the timeline and inside MovieClips?

1. Your method works, but makes it tedious to fix bugs, update or convert the game to other formats.

2. Much more efficient, but can be less creative.

3. Using coded tweens like GreenSock's TweenMax.

I still use layered frame animations for my apps and games, but they reside inside movieclips that I add to stage with code. Animating using frames is convenient for experimenting and come up with creative game mechanics, but using classes makes it way easier to maintain the code. So except for simple stop commands I'd recommend to avoid using code in movieclips.

So, you're game is not necessarily going to be bad if you use plenty of frames and layers and code in the timeline, but it will make it less efficient to update.

TOPICS
Discussions

Views

127

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

AIR for Desktop Game Design Questions

Community Beginner ,
May 19, 2019

Copy link to clipboard

Copied

Greetings!
I am delving into game design with Animate CC and so far it has been very easy and enjoyable to realize my ideas.
I'm at a point now where I am ready to get into some heavy duty development but before I begin I want to have a plan for efficiency.

My goal is to first create a game for Windows Desktop and then convert it to HTML5 Canvas and other AIR packages.
It will be a 2D Point & Click Adventure with simple mechanics and flashy animations.

I've been doing a ton of research and I keep seeing the same advice (for Actionscript 3 projects) that it is best to have only one layer and one frame and use classes and code for the game engine. This is cause for concern because so far, I have done the exact opposite. For instance my Intro Movie has over 4000 frames and dozens of layers with various MovieClips that can also have thousands of frames. Lots of dialogue and mouth animation. I use Actionscript in the main timeline and inside MovieClips. Lots of stops, gotos, and enter frame events.

My questions are:

1. Is my method wrong or inefficient and will it cause problems?

2. Is the one layer/one frame method much more efficient, a little more efficient, or negligible?
3. With the one layer/one frame method, what's the best way to progress a lengthy animation?

TL;DR: Is my game going to be bad because I use thousands of frames and layers and code in the timeline and inside MovieClips?

1. Your method works, but makes it tedious to fix bugs, update or convert the game to other formats.

2. Much more efficient, but can be less creative.

3. Using coded tweens like GreenSock's TweenMax.

I still use layered frame animations for my apps and games, but they reside inside movieclips that I add to stage with code. Animating using frames is convenient for experimenting and come up with creative game mechanics, but using classes makes it way easier to maintain the code. So except for simple stop commands I'd recommend to avoid using code in movieclips.

So, you're game is not necessarily going to be bad if you use plenty of frames and layers and code in the timeline, but it will make it less efficient to update.

TOPICS
Discussions

Views

128

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 19, 2019 0
Enthusiast ,
May 20, 2019

Copy link to clipboard

Copied

1. Your method works, but makes it tedious to fix bugs, update or convert the game to other formats.

2. Much more efficient, but can be less creative.

3. Using coded tweens like GreenSock's TweenMax.

I still use layered frame animations for my apps and games, but they reside inside movieclips that I add to stage with code. Animating using frames is convenient for experimenting and come up with creative game mechanics, but using classes makes it way easier to maintain the code. So except for simple stop commands I'd recommend to avoid using code in movieclips.

So, you're game is not necessarily going to be bad if you use plenty of frames and layers and code in the timeline, but it will make it less efficient to update.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 20, 2019 2
Community Beginner ,
May 20, 2019

Copy link to clipboard

Copied

Thank you Lars!
Good answers and reassuring insight, I will take your advice and plan accordingly.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 20, 2019 0
Adobe Community Professional ,
May 20, 2019

Copy link to clipboard

Copied

Hi.

In my opinion, there are two extremes:

1 - Coding everything in one single class, using only one single frame - and maybe one single layer. Again, in my opinion, this is one of the reasons I think that contributed for the popularity loss of Flash - yeah, Flash - about 10 years ago. Several people think that this approach is the best, but I don't agree. Because it makes the Animate IDE practically useless. And the IDE along with the whole software drawing-animating-design-workflow is what makes ANCC - and Flash - really powerful. It was very common about a decade ago to find several users coming up with tutorials in which you had an empty FLA and one single class file that could create all display objects at runtime. But what's the point of having authoring tools? It's like using Unity but leaving the IDE aside, open up VS Code and only write code.

2 - Spread out the code throught several frames and nested instances. This is the worst scenario for maintenance and debugging. But unfortunately it is the most common scenario, specially in e-learning projects.

What I like to do is to:

- Mix external class file code with timeline code;

- Write a main code that handles all main events (enterFrame, mouse events, resize, and so on) and then use callbacks to respond to the events of this main code instead of creating countless event listeners throughout the timelines;

- I like to use the main timeline as a state machine. For example: the first frame is called "splash", the second "menu", the third "inGame", the fourth "gameOver", and so on.

- Distribute the in-game and GUI artwork into layers. Specially if you have content that should last for more than on frame;

- Keep Movie Clip instances with internal animations for characters and other stuff in each frame of the main timeline.

Below there is a link to a structure suggestion in case you're interested. It's also a template for responsive content. I coded the main code in the main timeline so it will be easier to understand.

FLA download:

animate_cc_as3_responsive_app_game_structure.zip - Google Drive

I hope this helps.

Regards,

JC

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 20, 2019 2
Community Beginner ,
May 20, 2019

Copy link to clipboard

Copied

Thank you JC. My favorite way to learn is by dissecting files and learn-by-doing so I really appreciate it.
With the help I have found here on the forums I believe I am ready to take it to the next level.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 20, 2019 1
Adobe Community Professional ,
May 20, 2019

Copy link to clipboard

Copied

You're welcome!

And happy coding!

Regards,

JC

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 20, 2019 1