This is the first part of my series of Game Editor lessons. In this part, we will have a look at the different actor types in Game Editor.
There is four different actor types in Game Editor, and they are called
- Normal
- Canvas
- Wire Frame Region
- Filled Region
Now, here's a quick introduction to these four actor types.
I will use the acronym MATL (= More About That Later) to tell you that I have more to say about something, but won't explain it in this lesson, because I consider it out of the bounds of the topic of the current lesson.
Normal actor
- Before adding any animations or fonts to a normal actor, it appears as a Game Editor logo alike pacman in the editor.
- Normal actor's x and y coordinates are in the center of the actor.
- Normal actors can have mouse events on the area their current animation covers.
- Normal actors can have collisions on the whole area their current animation covers.
- Normal actor is the most common actor in games made with Game Editor.
- You can add animations to normal actors.
- You can clone normal actors, meaning that if you, for example, create an actor called door, by cloning it you can have multiple actors named door in your game. The different clones will be distinguished by their cloneindex. (Cloning and clones, MATL)
- You can use normal actors as tile actors to, for example, draw the walkable ground for platformer games. (Tiles and tile drawing, MATL)
- You can use normal actors as text actors if you give them a font. Text actors can be used to show text and numbers on the screen or as a way of adding text inputs to your game. Text actors can't have animations. (Text actors, MATL)
Canvas actor
- Canvas actor appears as a cyan rectangle in the editor, but it won't be seen in the game if nothing is drawn on it.
- Canvas actor's x and y coordinates are in the top left corner of the actor.
- Canvas actors can be resized by dragging them from corners.
- Canvas actors are used for drawing things by using game editor's drawing functions (erase, setpen, moveto, lineto, putpixel and draw_from). (Drawing on a canvas actor and using drawing functions, MATL)
- Canvas actors with something drawn on them can have collision events. This allows using canvas actors for making shape changing collision areas.
- Canvas actors can be cloned.
- Canvas actors should not be used when you don't need to draw anything, because they are quite heavy for Game Editor and thus can make your game lag.
Wire Frame Region actor
- Wire Frame Region actor appears as a green rectangle in the editor, but it won't be seen in the game.
- Wire Frame Region actor's x and y coordinates are in the top left corner of the actor.
- Wire Frame Region actors can have mouse events only on its edges.
- Wire Frame Region actors can have collisions on the whole area their edges surround.
- Wire Frame Region actors can be cloned.
- Wire Frame Region actors can be used, for example, to limit actors movement areas. For example, two Wire Frame Region actors can be placed on the left and the right side of an enemy in a platformer game to make it change walking direction every time it collides with one of them.
Filled Region actor
- Filled Region actor appears as a blue rectangle in the editor, but it won't be seen in the game.
- Filled Region actor's x and y coordinates are in the top left corner of the actor.
- Filled Region actors can have mouse events anywhere on the are they cover, hence the name Filled Region.
- Filled Region actors can have collisions on the whole are they cover.
- Filled Region actors can be cloned.
- Filled Region actors can be used, for example, as a sensor for mouse clicks. For example, one can place Filled Region actors on the elements of a menu in a game to allow people to just click the area the menu element text is on instead of having to actually click the letters of the text of the menu element (having to click a text actor is a common problem in beginner made games).
That closes the introduction to all four different actor types in Game Editor. However, the Game Editor's view actor could be considered as a fifth actor type.
View actor
- View actor is the big white rectangle seen in the editor.
- View actor's x and y coordinates are in the top left corner of the actor.
- View actor is used to indicate the area that will be shown in the game. Things inside the view actor's edges are shown in the game. View actor can be moved around in order to change what will be shown on the screen.
- View actor can't have mouse events.
- View actor can't have collision events.
- View actor can not be cloned.
- The size of view actor, and thus the resolution of the game, can be changed from [Config] -> [Game Properties] -> [Game Resolution].
That's all this time, there's no excercises on this lesson. Feel free to try out and experiment with all the different actor types, though.
Your opinion about the lesson
This is first time I'm trying to do something like this, and because of that, I may be doing things in a wrong way.
If you feel you have something to say to help me teach better, just bring it up and I'll see what I can do. I want to do this as well as I can and for that I need help from the people I'm teaching.