Global Events and Object Events


#1

I am making game for The Candy Jam and I’d like to request two features. You probably will be able to reuse some code from External Events as they are quite similar to it.

Global Events
They’ll execute no matter of scene, etc. Usable for things that are always happening in the game like managing lives.

Object Events
They will be linked directly to a game object. Think of it as user-defined automatism - those will execute for every object in the scene if that specific object is placed in it. Usable for things like controls, etc. Generally any thing that is object-specific.


#2

Yeah, of course, you could make your events in an external event, and link it in every scene, the events should be “globals” now :slight_smile:

Maybe I don’t get it… What is the difference between “Object Events” and a “For each object” loop?


#3

Except now you need to remember to add it to each scene and one day you will get a bug of “it’s just damn not working” kind. Why? Because you forgot to add that!

Again, think of it as user-defined automatisms, with events. That will clear your confusion.


#4

Bump. I’d like to see 4ian opinion on this.


#5

True but on the other hand you pollute every scene in your game with events that are not necessarily relevant (Think about a main menu, nothing to do with the game engine) so I won’t add it.
Moreover, it make GD more complex just to avoid you inserting a single event. So baaaaaad :laughing:

I’m not yet really sure about it. I’m afraid it could render everything more complex even for the developer.


#6

Except people won’t be forced to use these new object behaviors. They can still dump everything into scene event view, but those who want to take more object-oriented approach when making game, this would be useful option to have.


#7

.
Ohhh hahaha :smiley:
I think I understand now. Are you talking about events “inside” each object, just like methods in OOP?
(I know them as methods)


#8

Isn’t that sort of what automatisms do? Also object (instance) properties?
You can define if an event is global or local to a specific object in the event sheet. Not sure if you can pick a specific instance of an object, as I couldn’t find a UID anywhere. How is that called in gamedevelop?

You can simply create a new event sheet if you like.
Granted, I wish gamedevelop had a GROUP feature in the event sheet which would allow me to group my logic - toggle it on and off with a single click. Collapse and uncollapse it. It’s extremely useful to have.

Where do you see this approach to attaching scripts to objects most useful?
Unity is a game engine that does that. Also rpg maker. It makes it a bit more difficult to find your code, compare it, debug it :unamused:
The more you scatter it , the harder it is to manage it.
This is personal preference of course.

I think with gamedevelop’s current design,
incorporating this sort of an object oriented approach (attaching custom logic to objects) should be designed to add some sort of a real benefit to an aspect of game design that is currently lacking- a new feature. Something to justify the time spent in implementing it.
Personal preference is not enough.


#9

MMF2 does just that!
docs.google.com/viewer?url=http … viours.pdf

You can write custom behaviors/automatisms (with visual coding) and attach them to any objects. Perhaps a good case study of how this can be useful?
Maybe we will start sharing not just test examples, but also custom behaviors? :smiley:

Idk, anything to get the community to contribute would be helpful.
For example if I write an NPC speech behavior and share it with the community, others will be able to reuse it with zero effort.

It is one thing can help elevate the ease of use of the software and the feature richness. Plus the less we have to reinvent the wheel for doing basic stuff, the better.

So yeah, I support this feature request. It sounds like a bloating feature, but it is in fact a feature that can help it grow. People will share behaviours and reuse them without the need to understand what their code does and customize it a lot - or rely on top level engine programmers in getting a tidy reusable logic that is currently not available as an automatism.


#10

Yup pretty much, although I was thinking more in terms of Stencyl’s behavior as I barely touched MMF2 and even then it was “free” and bit outdated version :wink:.


#11

Clickteam is releasing a free version with limited html5 support this week or next week. Their engine (and editor) runs almost perfectly with wine under linux, which is a rare thing to see for game engines.
So yeah, more competition. They suckered me into mmf2 through one of the indie humble bundles- practically giving it away for almost free. Then when I saw the updates and features in 2.25, I spent almost 30 euro to get the upgrade. It’s worth it- the engine is stable and feature rich. But I have to spend like 60 euro if i ever want to export to html5 and spend 90 for ios and…you see how expensive it gets. Construct2 in comparison charges much less and is more intuitive. But construct 2’s editor will never run in lunux. It’s super annoying.

Some of the things I dont like how they are designed in mmf2. But Stencyl is the absolute king of confusing. There are so many editors and things to click through to set things up and their Sketch-like visual programming is the least intuitive thing ever- you are forced to work on fragmented pieces of code. Perhaps the worse part of stencyl is the license. You can not buy it- only rent it. That puts me off, even though their editor works in linux natively.


#12

Actually it’s quite common. It’s the opposite that is rarer. Unity (almost) runs on wine thanks to some nice folks - there is PlayOnLinux script floating around to run it, just change wine version in it to 1.7.13, even they made Webplayer work. MMF2 as you said runs great on Wine, GD runs on Wine as well (used it to create Windows version of my MiniLD #33 game, Dragon’s Story as GD still doesn’t support crosscompiling for some reason), Most versions of RPG Maker runs fine on Wine (though last time VX Ace’s editor crashed all the time, but they probably fixed it by now, VX Ace’s games run fine though, but no support for MIDI in games made with XP and newer, for 2k3 you can use timidity trick which I posted on AppDB entry related to RM2k3 - it doesn’t work for XP tho).

The only program that doesn’t work on Wine is GameMaker and games created with it (seriously, games made with GM, both 8.1/earlier and Studio crashes on Wine all the time and never I was able to make them work - boot logo and crash). Even Construct 2 can be made to work with some (quite counter-intuitive and complicated) hacks in wine config, although you’ll need to save like every minute because it likes to crash even then.


#13

fair enough. Wine is great, but it is almost always a bit less stable in one way or another. :smiley:

Btw to keep on track with the point of this thread: I could see “object events” being useful. But they should be more like custom user-made automatisms.
And in order for that to work, a considerable amount of work probably has to be done to gamedevelop’s design. How does this custom-automatism listen to and talk to other objects in the scene? You need make it more static or easier to relink if you are going to be reusing it. How do you link them up together? What sort of limitations/additions do you need to introduce to the event sheet when the user is editing a “custom-automatism”. How did other engines (such as MMF2) design it? What are the limitations and issues there.

All that might look ok to us, but when you actually have to design and code it is a different story. :stuck_out_tongue:
So I wouldnt blame 4ian for not picking it up as a concept. Scirra guys havent done it yet- probably for a good reason.


#14

This post was flagged by the community and is temporarily hidden.