vendredi 25 décembre 2015

organization of adventure game with Flash AS3

first of all, Merry Christmas to everyone :-)!

I while ago, I started learning flash with AS3. My goal is to create an adventure game. I have had people here helping me and also watched some youtube videos and read some flash beginner sites. I make this question a new thread, because I think it is not a concrete command line question like before, it is more a general question for the basic organization of my game.

This is what I have in mind for the game: Lets say it contains 4 rooms. R1 kitchen, R2 living room, R3 lobby, R4 Bedroom. Goal is to find the mobile phone in the house. There are buttons connecting the rooms. Say in the living room is an arrow on the left side of the screen, when clicking it you will “be” in the kitchen. Classic point and click adventure room escape.

In the bedroom you find a key and put it in your inventory. In the lobby you can use this key with little box. It opens, revealing mobile phone. Pick up mobile phone, go to livingroom, use mobile phone, finish game. Just an example, hope you can follow me.

Now, when asking ppl and reading other manuals on how to create flash applications (like this good one: I have the impression I should avoid using different SCENES. My first approach was to have each room R1 R2 R3 R4 in a different SCENE with different layers, like background picture layer (picture of a lobby), object layer (little box) and AS3 layer. This is tempting for me, because the Scene and layer interface is very intuitive, feels like using Photoshop.

Anyways, since ppl say “AVOID SCENES,AS3 hates Scenes”, I avoid them now. Now my whole game is in ONE scene. Instead, I want to have each room attached to its own frame: R1 in frame 1, R2 in frame 2…

Then there is two layers which are extended for all scenes: The AS3 layer containing all the AS for the game. And the inventory layer. It works like this: It contains all the items in invisible form. It only covers the area on the bottom of the screen. Example: How do I pick up key in R4 bedroom? There is a keybedroominventory movie clip in the inventory visible = false, in other words invisible and not clickable. But when you are in the bedroom and click on keybedroom movie clip (a little key next to the bed), it triggers keybedroomvisible = false and keybedroominventory = true.

Keep in mind that I am a total beginner. I am only able to do little stuff: I manage to learn the “Press button” command for AS3 somewhere, design a button in an object layer, give it its instance name. Or find the AS3 commands for visible = true. I would like to stay on “photoshop mode” as much as possible, using frames, having different layers and so on. And learn other commands when needed. (Say maybe later I will have some password (text field) in R1, which is found on a paper sheet in R2. Giving me reason to look into that text-field-String-nerd-thing commands) So far I have been able to walk around rooms and click on items.

I still stuggle often with beginner mistakes like mixing up capital letter commands, mixing up ( ) { } ; ; and so on…Therefore using stuff like seven different .as files like document and so on is way to advanced. MY QUESTION: Does that basic “1 room 1 frame” organization make sense? Or is that just replacing SCENES with FRAMES, but the concern from you more experienced programmers are the same?

Aucun commentaire:

Enregistrer un commentaire