Groups VS Event Sheets

For questions about using Classic.

Post » Fri Jan 06, 2012 2:42 pm

I remember seeing some people using seperate event sheets, and just including them in the current one for the layout.

I was wondering if there was any benefit I can't see over having groups inside the event sheet?


Thank You
B
3
G
1
Posts: 70
Reputation: 615

Post » Fri Jan 06, 2012 2:51 pm

I am still new to this, but after studying some of the great examples provided here, it seems that a separate event sheet would make things easier to import later, especially for bigger games. Like you can have a very complex animation blending system for the main character and if you have put it into one big event sheet, it will get messy. If it had been separated, all you got to do is import it in the layout.

Make's creating new 'level' much easier too. Just do import all the event sheets that you need and start playing with the level's design.

This is just based on my limited knowledge. Perhaps someone more experienced could provide more light on this.

B
27
S
9
G
5
Posts: 108
Reputation: 5,744

Post » Fri Jan 06, 2012 6:37 pm

Hmmmm. I look at event groups and "include event sheet" as two separate concepts. The groups are used inside a specific event sheet to keep the event codes you've created organized and defined to certain functions.

"Include event sheet" is used to copy/carry over the event process of another layout without having to waste event lines in the new layout's event sheet.

@Yung... when you copy a layout, you're given the option to also use the event sheet of the layout you copied, in the new layout's event sheet. However, a lot of people like to make level editor or some type of system that randomly creates levels which adds a new wrinkle into the mix.
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Sat Jan 07, 2012 2:48 am

But You see, that's where I feel there is not much more than a cosmetic difference.
Let's say we have a separate event sheet for our animation system.
Then for every new level (new layout), we include it into the new layout's event sheet. What we then see is a small line, saying "Inlcude Event Sheet: ..."

Now, what if I just had all the code from the animation event sheet inside a group?
Then what we would have is, instead of "Include Event Sheet: ...", a line saying the name of the group "Animation System", which we could expand.

Now for every new level, we just copy the layout with it's event sheet, or include that layout's event sheet in the new layout, and delete all the parts not fitting the new level, and add the parts specific to that new level.
B
3
G
1
Posts: 70
Reputation: 615

Post » Sat Jan 07, 2012 4:11 am

Groups are used to organize code sections within an event sheet, includes are used to reduce the amount of events needed for a project.

Includes are reusable event sheets, they exist only one time while used in several other event sheets. This reduces the file size on disk as well as it reduces the effort needed, when you have to change or correct something in those sheets. You only need to do it once, it is then corrected for all sheets, where those changed ones are included.

Example
You have three layouts, and the player's sprite is always controlled the same way on all of them.

Organized in groups it will look like:

Layout 1
-group player control
--event
--event
--event
-other events

Layout 2
-group player control
--event
--event
--event
-other events

Layout 3
-group player control
--event
--event
--event
-other events


Organized with includes it will look like:

sheet player control
-event
-event
-event

Layout 1
-reference to player control sheet
-other events

Layout 2
-reference to player control sheet
-other events

Layout 3
-reference to player control sheet
-other events


Now you need to change an event of the player control.

Working with groups:

Layout 1
-group player control
--event
--event <- You change this event
--event
-other events

Layout 2
-group player control
--event
--event <- You change this event
--event
-other events

Layout 3
-group player control
--event
--event <- You change this event
--event
-other events


Working with includes:

sheet player control
-event
-event <- You change this event
-event


Obviously there's an advantage over groups. In short:
-Whenever there is a set of events that will be used in more than one layout the same way, use a seperate event sheet and include it.
-Whenever you need more overview, or have alternating sets of events that may be switched, within an event sheet, use groups.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Jan 07, 2012 4:23 am

Thank You tulamide. Yeah, that makes perfect sense now, I didn't think about that. If I'd want to change something later on, I'd have to change it in every single event sheet again and again for the layouts. And of course the reduced amount of events. Indeed, with repeated groups it could get huge later on.

It would be nice to include this thinking on the use of the event sheets and groups in the documentation. Maybe list it in optimisation tips or an area for "good working habits", or a reference on the page for event sheets and groups respectively.Shindoh2012-01-07 04:39:07
B
3
G
1
Posts: 70
Reputation: 615


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests