Be a Supporter!

Flash normality questions

  • 177 Views
  • 7 Replies
New Topic Respond to this Topic
InfinityLooper
InfinityLooper
  • Member since: Jun. 30, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Flash normality questions 2013-06-30 12:44:46 Reply

I just have a few questions about how games are usually set up and if anyone could provide any insight that would be great.

-Do most flash games involve putting the code into the timeline or creating separate actionscript files?
-How is one able able to control different scenes when using a seperate actionscript file?
For example:
If I have the first scene titled "Pregame" with a start button. How do I move to the second scene when clicked?
-The general gist of how open games make the background move. For example, if the game had a town, the stage cannot fill the whole town but instead as the character moves in a direction, the background moves with it. I'm not necessarily looking for the code but like an explanation.
-Does flash have a level editor of some sort?

Sorry if these are obvious questions as I'm still learning the basics of Flash. However, if anyone could answer any of the questions I would be extremely grateful.

Thanks.

nitokov
nitokov
  • Member since: May. 8, 2012
  • Offline.
Forum Stats
Member
Level 05
Programmer
Response to Flash normality questions 2013-06-30 12:57:47 Reply

At 6/30/13 12:44 PM, InfinityLooper wrote: I just have a few questions about how games are usually set up and if anyone could provide any insight that would be great.

-Do most flash games involve putting the code into the timeline or creating separate actionscript files?
-How is one able able to control different scenes when using a seperate actionscript file?
For example:
If I have the first scene titled "Pregame" with a start button. How do I move to the second scene when clicked?
-The general gist of how open games make the background move. For example, if the game had a town, the stage cannot fill the whole town but instead as the character moves in a direction, the background moves with it. I'm not necessarily looking for the code but like an explanation.
-Does flash have a level editor of some sort?

Sorry if these are obvious questions as I'm still learning the basics of Flash. However, if anyone could answer any of the questions I would be extremely grateful.

Thanks.

1. For clean code you use separate AS files (actionscript 3.0 is recommended)
2. No scenes, scenes are for animations not games.
3. Google: Parallax background
4. No flash does not have a level editor, if you whant to make level from tiles you can find tiles map editor, but than you have to parse output from that editor, its simple when you get used to it.

anything else?


RangeError: Error #1125: The index 4 is out of range 4.

InfinityLooper
InfinityLooper
  • Member since: Jun. 30, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Flash normality questions 2013-06-30 13:41:47 Reply

Thanks for the reply!

What do you mean by clean code? And also if you don't use scenes then how would you go about having like a start menu and then proceeding to the actual game?

Thanks

milchreis
milchreis
  • Member since: Jan. 11, 2008
  • Offline.
Forum Stats
Member
Level 26
Programmer
Response to Flash normality questions 2013-06-30 13:59:08 Reply

At 6/30/13 01:41 PM, InfinityLooper wrote: What do you mean by clean code?

proper code

And also if you don't use scenes then how would you go about having like a start menu and then proceeding to the actual game?

Your menu would be a subclass of Sprite.
Your main class now adds/removes an instance of that class to/from the display list.

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to Flash normality questions 2013-06-30 14:08:25 Reply

At 6/30/13 12:44 PM, InfinityLooper wrote: -Does flash have a level editor of some sort?

Flash pro itself can be used as a level editor, or you can make your own and save the output. Google it if you're interested, it requires a bit of parsing or extra logic in the code.

4urentertainment
4urentertainment
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to Flash normality questions 2013-06-30 14:41:51 Reply

At 6/30/13 01:41 PM, InfinityLooper wrote: And also if you don't use scenes then how would you go about having like a start menu and then proceeding to the actual game?

It took me a while when I was younger to get my head around this. Basically, just think of it as, you're placing the menu on screen, then when everything is done, and you want to go to the game, you remove the menu, and add the game's assets, then when the game is over, you remove all the game's assets and add the menu back again. Just adding and removing what's on screen.

That's why games tend to have "initMenu" and "destroyMenu" functions, because everything that comes on screen eventually has to be removed.

At 6/30/13 02:08 PM, MSGhero wrote: Flash pro itself can be used as a level editor

I also want to stress this, especially if you're just starting out or in a hurry, you can use the Flash IDE as a nifty level editor, where you're just dragging and dropping your symbols from the library into your level movieclip, for example. (Or just marking the locations using movieclips and you loop over all the locations)

InfinityLooper
InfinityLooper
  • Member since: Jun. 30, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Flash normality questions 2013-06-30 16:58:14 Reply

One more question (Sorry D:)

Do most programmers use code editors and would you guys recommend using one? If so, which ones?

Thanks for all the help :D

milchreis
milchreis
  • Member since: Jan. 11, 2008
  • Offline.
Forum Stats
Member
Level 26
Programmer
Response to Flash normality questions 2013-06-30 17:02:53 Reply

At 6/30/13 04:58 PM, InfinityLooper wrote: would you guys recommend using one? If so, which ones?

Yes, FlashDevelop.