Interaction between behaviors and events

New releases and general discussions.

Post » Sat Jun 07, 2008 3:46 am

I'm trying to understand how behaviors and events interact with one another. I've noticed while playing around that if I add behaviors having to do with movement and then try to tweak aspects of the sprites positioning it leads to conflicts. A simple example of this is the following:

Add a sprite to an empty layout, give that sprite the ball behavior and turn on "Rotate Object" ball property so that when the ball sprite hits a solid wall it will rotate on bounce. Add solid wall objects for the ball to bounce off on the borders of the layout. Now everything will work fine in this simple example. But try to add an event that updates the rotation of the ball sprite and it will not rotate unless you turn off the "Rotate Object" property. I wanted the ball to rotate between bounces but to my surprise it ignores all changes made to it's rotation during an event and only rotates when the behavior's built in functionality tells it to (ie. every time hit hits a solid wall).

Could someone explain to me at a technical level why the system works this way (I'm a software developer so you don't have to simplify things). Is the behavior implementation running after my events and overwriting my changes? Could behaviors run before my events so I could tweak their results in my events? Or are behaviors able to make certain object properties read only? How are user events and behaviors inserted into the game's main loop.

Thanks,
Snoop
B
2
G
4
Posts: 57
Reputation: 1,164

Post » Sat Jun 07, 2008 11:16 am

Good midday Snoopie.

I have read your threats. I followed them. And i am sure many did.
I trust Ashley will take care of them.

I feel like the bubble up your post action is a little unneeded.

***shrugz***
(he told me to be nice in a unconditional while loop)
***shrugz***

But .. To Stay on topic.

[quote:cmn4o6fv]Could someone explain to me at a technical level why the system works this way (I'm a software developer so you don't have to simplify things). Is the behavior implementation running after my events and overwriting my changes? Could behaviors run before my events so I could tweak their results in my events? Or are behaviors able to make certain object properties read only? How are user events and behaviors inserted into the game's main loop.[/quote:cmn4o6fv]

Now well, thats a good question.
I would love the know the answer.
I've been fighting with the systems priority's from day one.

Now well but, since you are "software developer".
Would you be so nice to look into the CVS ..
http://construct.cvs.sourceforge.net/construct/
and tell me what exactly is going on ?

Thank you.

Oh and when you are reading into the code.
Plz also explain me how events pick objects, and how it keeps track of the "picked".


Thank you very much in advance.
Appreciated.

Always nice to have a real "software developer"in the community.
B
3
S
2
G
4
Posts: 322
Reputation: 2,119

Post » Sat Jun 07, 2008 7:19 pm

[quote="TheInstance":23z97juv]Good midday Snoopie.

I have read your threats. I followed them. And i am sure many did.
I trust Ashley will take care of them.
[/quote:23z97juv]

Good day to you, I hope you meant threads and not threats :D I'm sure Ashley will take a look at them when he gets a chance. I've posted them on the official bug tracker. I'm simply trying my best to help.

[quote:23z97juv]
I feel like the bubble up your post action is a little unneeded.
[/quote:23z97juv]

What did I do to you to upset you? I'm not trying to bubble up anything.

[quote:23z97juv]
***shrugz***
(he told me to be nice in a unconditional while loop)
***shrugz***

But .. To Stay on topic.
[/quote:23z97juv]

Well it's good to be nice I don't know what are you trying to say? Did I offend you some how???

[quote:23z97juv]Could someone explain to me at a technical level why the system works this way (I'm a software developer so you don't have to simplify things). Is the behavior implementation running after my events and overwriting my changes? Could behaviors run before my events so I could tweak their results in my events? Or are behaviors able to make certain object properties read only? How are user events and behaviors inserted into the game's main loop.[/quote:23z97juv]

[quote:23z97juv]
Now well, thats a good question.
I would love the know the answer.
I've been fighting with the systems priority's from day one.

Now well but, since you are "software developer".
Would you be so nice to look into the CVS ..
http://construct.cvs.sourceforge.net/construct/
and tell me what exactly is going on ?
[/quote:23z97juv]

I don't know if you are offended by me disclosing that I'm a software developer. Hopefully your intent was lost in translation. Construct is really nice in that you can accomplish a lot through visual programming, but since I was interested in the internals I wanted to let Ashley or anyone else know that they could explain things at the code level without having to over explain things. My long term goal is to contribute however I can and hopefully that can include lending some help with the Open Source C++ code. Right now I still haven't learned all the basics.

[quote:23z97juv]
Thank you.

Oh and when you are reading into the code.
Plz also explain me how events pick objects, and how it keeps track of the "picked".
[/quote:23z97juv]

I'll be sure to share anything that I learn and update the wiki as I've already started to do as I learn more about Construct.

[quote:23z97juv]
Thank you very much in advance.
Appreciated.

Always nice to have a real "software developer"in the community.[/quote:23z97juv]

I hope you are not trying to "sarcastic" I don't appreciate it and I wasn't trying to "brag" or whatever you took away from my post. It wasn't intended to be negative.

Snoop
B
2
G
4
Posts: 57
Reputation: 1,164

Post » Sat Jun 07, 2008 9:51 pm

I am always sarcastic, certainly when i sense dishonestiness or laziness.

Do you really call yourself ""software developer"?

But you can not ...

Locate the source of a open source program ....
Read into to the code, wich i think is just C++ ..
and tell me, a computerlanguage dumb person ..
what exactly is gooing on ..

apparently you dont even have VCExpress, wich is FREEWARE, laying arround on your computer ...

Or you are able to do all this, but to lazy to do so.

Shall i write another word? not knowing if i misspelled it or not ? So you can catch me on that?
Thats so ok dude, i am used to that.

And let me bubble up all your posts.
You are welcome for saying ty for bubbleing them up.
I only try to help.
B
3
S
2
G
4
Posts: 322
Reputation: 2,119

Post » Sun Jun 08, 2008 3:36 am

Instance, English is a very difficult language to convey in words alone. It may not be very logical, but most people quickly consider things as anger if sarcasm is not very well conveyed. And sarcasm is but one of many purely verbal things in English that can get you in trouble if misunderstood in writing. I think for now you would do well to avoid it.

To everyone else, I really believe that Instance is not generally trying to stir things up. In the interest of advancing Construct, let's forgive and move on.
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Sun Jun 08, 2008 4:13 am

I'm starting to see why jOh is so famous around here :D
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Sun Jun 08, 2008 10:49 am

[quote="midnight":2hv8vem8]I'm starting to see why jOh is so famous around here :D[/quote:2hv8vem8]
Rather infamous than famous.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Sun Jun 08, 2008 6:03 pm

Thanks Captain, I appreciate you trying to diffuse the tension. I do believe the language barrier may have something to do with it. But I think there is also more to it than that. TheInstance really does seem to want to go out of his way to upset people, me in this instance (no pun intended).

I admit that I posted multiple bug threads and suggestion threads that could be centralized into fewer threads. I already did that with my bugs keeping them in only one thread and posting them on the official bug tracker exactly as Ashley asked me to. When I posted them I wasn't sure if each issue should be put in a separate thread and I didn't follow the best procedure, but I wasn't trying to cause anyone grief or "bubble" things. TheInstance has now gone and posted "bubble" in all of these threads in effect contributing, in this case on purpose, to what he is accusing me of doing. I'd be happy to have an admin delete the old redundant bug threads, but there was no need to attack me. It seems to me he is the one causing the greater disturbance.

Then on top of all this he gets offended even after I explained that no offense was intended because I mentioned I was a software developer. "ell me, a computerlanguage dumb person ..
what exactly is gooing on" here he is with more sarcasm followed by more accusations and even going so far as calling me lazy. There is more than a language barrier there. It says more about him than it does about me that he took such offense to what I said and continues to do so even after I explained myself.

I am a software developer working on C++, that's what I do for a living, I didn't say that to boast nor do I think it is something to boast about. I like Construct because it's such a high level tool that you can get a lot done easily and quickly. Time for my hobbies is limited and I do hope to be able to help more in the future including the Open Source C++ code. I don't think that being the case should mean that I can't ask questions about how the engine works on the forum without expecting to be called lazy.

Well I've had my say and I'll try to leave it at that. TheInstance if you still want to attack me please create your own thread and do not take this one further off topic. If you want to be civil about it feel free to send me a private message. If you want to drop it, I'm fine with that to. Lets move on from this, we both like Construct and are here because of that there is no reason to get into more conflicts.

I started this thread because I had questions about the interaction between behaviors and events, lets stay on that topic.

Thanks,
Snoop
B
2
G
4
Posts: 57
Reputation: 1,164

Post » Sun Jun 08, 2008 7:37 pm

here is a Quick & Dirty .cap illustrating how to aproach the ball behaviour.

download/file.php?id=40

And sir ? me upset ? Uhhh nopes. Why should i ?

It just dont match "software developper" and not able to read a well documented c++ source code.
And you know it !
Get real.

Did i attack you ? Oh boy then you got to be sensitive on that point.

I can not apologize for just beeing honest.

If you are what you say you are, takes you 10 minutes to find out the answher to your own question ?
And thats less then the time you took to you type that last book in an attemped to get poeple on your side.
Thats wasted time, Sir.

For one.
I have no side to stand at. I have no camp. I have no army. I have no team. I have no gun pointed at your head.

For two.
They will always be at your side. So smile. The majority is always with you.

Now stay on your own topic, and read the source. Geez.
Stop acting this sensitive. Stop acting hurt. You want a cookie ?
B
3
S
2
G
4
Posts: 322
Reputation: 2,119

Post » Sun Jun 08, 2008 10:20 pm

Well at least we are getting somewhere now. That's a good work around for this specific case using two behaviors on two separate objects to get the net effect that I described. Thanks for sharing it. I'm still interested on how behaviors and events interact. When I do spend some time with the source code I'll be sure to share what I find out about this if no one else explains it.
B
2
G
4
Posts: 57
Reputation: 1,164

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests