lcl's GE lessons - PART 1 (Actors)

Learn how to make certain types of games and use gameEditor.

lcl's GE lessons - PART 1 (Actors)

Postby lcl » Wed Mar 26, 2014 12:03 pm

Hello all!

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
l1i1.png

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
l1i2.png

  • 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
l1i3.png

  • 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
l1i4.png

  • 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
l1i5.png

  • 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
l1i6.png

  • 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
thumbs.png
thumbs.png (2.56 KiB) Viewed 7819 times

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.
Attachments
geLessons2.png
Last edited by lcl on Thu May 01, 2014 10:48 am, edited 5 times in total.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby bat78 » Wed Mar 26, 2014 2:39 pm

Great intention lcl!
I appreciate the lessons, i think.. they are quiet useful to others in the self-learning process and even for myself, using them like summary. :)

My suggestion is to explain their structure as well. the Actor variable is intensively important.
Even that.. it surely looks more like a Scripting Part, but at least you can explain it on the common way.
And maybe you can make the environment pleasurable.. by adding pictures/GUI/Titles etc, as a user i like such details.

Have a nice day, keep charging people with useful lessons and don't forget about your own projects to work on! ^^
The future of "Game-Editor" here
User avatar
bat78
 
Posts: 816
Joined: Sun Dec 14, 2008 9:13 pm
Location: Bulgaria, Sofia
Score: 88 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby knucklecrunchgames » Wed Mar 26, 2014 5:07 pm

This topic should be a page on the ge site :D
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby digiot » Wed Mar 26, 2014 5:55 pm

Smooth start, clear presentation !

All what bat78 wrote, I can agree with.
Maybe links to already existing screenshots in the docs are helpful, not to
clutter the lessons to much.

The (at least for me!) mysterious "Actor" thing in the code section is very important.
What it is at all (a variable, a typedefed struct (of actor structs) or what?), and
its usage.
And the structure of the actor struct itself must be explained in every detail, all
the struct members, their types and the different methods to access them.
And soon we are deep inside coding. Maybe a "matl" for that, too ?
I would like to have it cleared before any other things, but I have the patience to
wait, and follow the lessons in the meantime.

There might occur an issue with the lessons, scattered around the forum after a while.
What do you think about the idea, to ask sky for a special sub-forum (in the Tutorials
Forum e.g.), only for these lessons ?

Keep on with your valuable work here, thanks in advance !


Cheers !
User avatar
digiot
 
Posts: 211
Joined: Sat Mar 17, 2012 2:29 pm
Score: 7 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby Turon » Wed Mar 26, 2014 10:10 pm

Thanks! :) Nice recap, I never knew that canvases were demanding!I thought filled regions were maybe unesesary! :lol:
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby lcl » Wed Mar 26, 2014 11:07 pm

bat78 wrote:Great intention lcl!
I appreciate the lessons, i think.. they are quiet useful to others in the self-learning process and even for myself, using them like summary. :)

My suggestion is to explain their structure as well. the Actor variable is intensively important.
Even that.. it surely looks more like a Scripting Part, but at least you can explain it on the common way.
And maybe you can make the environment pleasurable.. by adding pictures/GUI/Titles etc, as a user i like such details.

Have a nice day, keep charging people with useful lessons and don't forget about your own projects to work on! ^^

Thanks! And yes, I will be explaining about the Actor * pointer later. I didn't include it to this post because I thought it belongs together with scripting and especially the predefined variables and actor variables in GE. Thanks for the idea of adding visuals, I may add some when I get some time for that.

digiot wrote:Smooth start, clear presentation !

All what bat78 wrote, I can agree with.
Maybe links to already existing screenshots in the docs are helpful, not to
clutter the lessons to much.

The (at least for me!) mysterious "Actor" thing in the code section is very important.
What it is at all (a variable, a typedefed struct (of actor structs) or what?), and
its usage.
And the structure of the actor struct itself must be explained in every detail, all
the struct members, their types and the different methods to access them.
And soon we are deep inside coding. Maybe a "matl" for that, too ?
I would like to have it cleared before any other things, but I have the patience to
wait, and follow the lessons in the meantime.

There might occur an issue with the lessons, scattered around the forum after a while.
What do you think about the idea, to ask sky for a special sub-forum (in the Tutorials
Forum e.g.), only for these lessons ?

Keep on with your valuable work here, thanks in advance !


Cheers !

Thanks for pointing out the importance of the Actor * pointers. I will explain them very thoroughly when it's the time for that, but for now, you'll have to wait. Happily, you can spend your time reading the other lessons when they come.

Also about your concern of the lessons getting scattered around the forums.. I doubt if this would be worth creating a new sub-forum, and actually I already have planned a way to keep all the lessons easily foundable. I am going to use the original topic of these lessons as an index page for the lessons. From there you can then find all the lessons. I will also put a link to that topic to the Tutorials page of the wiki. Here's the topic I'm talking about: viewtopic.php?f=1&t=13175
Thanks for reminding me about the Tutorials section, though. I've got to ask skydereign to move these topics to that forum section, since that's where they belong. I guess I'm still used to the old GE forums where there was no Tutorials section. :oops:

Turon wrote:Thanks! :) Nice recap, I never knew that canvases were demanding!I thought filled regions were maybe unesesary! :lol:

Thank you! It's good to see that this first lesson has already taught something to someone. :)
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby digiot » Thu Mar 27, 2014 5:41 pm

lcl wrote:Happily, you can spend your time reading the other lessons when they come.

I'm sure, I will learn something in every lesson !

In the simple actor stuff, I learned this here on my own :

The coordinate system for the actor types differs, the normal actors have their
0,0 position in their center, and the other actors at their top left position.
I'm not sure, if this is also true for tiled or text actors.

From a thread here I learned this:

If the wire frame region simply is to fat for some purpose, the workaround is,
to create a matching normal actor, make it invisible, but let it receive events.

Maybe, you like to add that in the actor descriptions ?


Cheers !
User avatar
digiot
 
Posts: 211
Joined: Sat Mar 17, 2012 2:29 pm
Score: 7 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby tvz » Fri Mar 28, 2014 2:19 pm

We can't use canvas until something is drawn on them?
User avatar
tvz
 
Posts: 98
Joined: Sun Mar 10, 2013 7:13 am
Location: Your PC screen
Score: 3 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby bat78 » Fri Mar 28, 2014 5:54 pm

tvz wrote:We can't use canvas until something is drawn on them?

No o.o
Just reread.
Canvas are just invisible, of course you can use the entire region.
The future of "Game-Editor" here
User avatar
bat78
 
Posts: 816
Joined: Sun Dec 14, 2008 9:13 pm
Location: Bulgaria, Sofia
Score: 88 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby tvz » Sat Mar 29, 2014 6:36 am

For mouse click events in menu, what should we use, canvas or filled region?
User avatar
tvz
 
Posts: 98
Joined: Sun Mar 10, 2013 7:13 am
Location: Your PC screen
Score: 3 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby lcl » Sat Mar 29, 2014 7:40 am

tvz wrote:For mouse click events in menu, what should we use, canvas or filled region?

Filled Regions, just as I wrote. Canvases are for drawing things. But of course, if you want to use canvas for adding some visual effects to the buttons, then you can use those canvases for mouse clicks, too.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby lcl » Tue Apr 01, 2014 2:01 pm

digiot wrote:The coordinate system for the actor types differs, the normal actors have their
0,0 position in their center, and the other actors at their top left position.
I'm not sure, if this is also true for tiled or text actors.

Thanks for pointing that one out. Totally forgot to mention it.
I'll add this to the lesson, and I'll give you a +1. :)
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby lcl » Tue Apr 01, 2014 10:44 pm

*Added some pictures and information about actor coordinate system
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby bat78 » Tue Apr 01, 2014 11:48 pm

(my hand automatically hang to press the [+] button)
The future of "Game-Editor" here
User avatar
bat78
 
Posts: 816
Joined: Sun Dec 14, 2008 9:13 pm
Location: Bulgaria, Sofia
Score: 88 Give a positive score

Re: lcl's GE lessons - PART 1 (Actors)

Postby digiot » Thu Apr 03, 2014 4:29 pm

lcl wrote: *Added some pictures and information about actor coordinate system

Nice pointer, so also a point for you !

lcl wrote: ..., and I'll give you a +1.

You make me feel ashamed, giving a point for such obvious, basic issue.
I'm sure, nearly every new GE user has noticed that positioning sceme in their
first hour with GE !
But written down in any doc/tut, it can save user from becoming disturbed by
some unexpected behaviour.
Anyway, now I'm at least no longer a point-virgin, so, thanks !


Cheers !
User avatar
digiot
 
Posts: 211
Joined: Sat Mar 17, 2012 2:29 pm
Score: 7 Give a positive score

Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest