Some technical questions

Discussion and feedback on Construct 2

Post » Tue May 12, 2015 5:45 am

i recommend that you use this:

each 0.2 sec + has sight towards player
find path to player
move along.

instead of using var to check if it has some value. an setting it and stuff. now 0.2 sec is way slower then 0.016s (60hz)
but it will work perfectly on any pc and won't be as taxing when doing it each 0.016s and won't calculate stuff with vars. also your vars thing won't work good when you go higher hz like 120hz screen.
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
41
S
14
G
12
Posts: 623
Reputation: 9,359

Post » Tue May 12, 2015 9:43 am

I think you're confusing your own event bugs with the C2 event system. Construct 2 has a very strict ordering of events. All events are evaluated in top to bottom order (except for triggers, which fire in top to bottom order when something happens). Within those events the actions are run in top to bottom order. Everything happens synchronously (i.e. the same tick) except for long-running actions like AJAX's 'request' action, and these generally then fire a trigger when they complete. There are a very few rare exceptions (like the Pathfinding behavior's 'regenerate map' action takes a tick to take effect), but there are so few you can probably ignore them.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,226

Post » Tue May 12, 2015 2:02 pm

Ashley wrote:I think you're confusing your own event bugs with the C2 event system. Construct 2 has a very strict ordering of events. All events are evaluated in top to bottom order (except for triggers, which fire in top to bottom order when something happens). Within those events the actions are run in top to bottom order. Everything happens synchronously (i.e. the same tick) except for long-running actions like AJAX's 'request' action, and these generally then fire a trigger when they complete. There are a very few rare exceptions (like the Pathfinding behavior's 'regenerate map' action takes a tick to take effect), but there are so few you can probably ignore them.


Thanks, could you list those exceptions please, because not knowing them, puts me back in the development sometimes by days. Also, I wonder if there is any way of selecting animation from within one of animation folders? For example "play animation: folder name/animation name" ?

Thx
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
85
S
27
G
20
Posts: 1,962
Reputation: 18,651

Post » Tue May 12, 2015 2:04 pm

I really can't think of any other actions which finish the next tick, they are very rare IIRC. You can probably assume all other actions complete immediately.

Animation folders are not exported - the runtime only identifies animations by their name.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,226

Post » Tue May 12, 2015 2:39 pm

Ashley wrote:I really can't think of any other actions which finish the next tick, they are very rare IIRC. You can probably assume all other actions complete immediately.

Animation folders are not exported - the runtime only identifies animations by their name.


Ok, thank you for clarification. You know, I'm using construct since CC Alpha 0.19 and always been stumbling on those little unusual quirks in both cc and c2. I do web programming professionally, wordpress php and such, so I'm not a newbie, but in construct it is bit different. In scenario where I have to generate random map, i have to create a lot of objects. It's working all of it now, but only after I've set events in the following way:

Is Boo_D: Set Boo_D: False
For each "Dudu" : Regenerate obstacle map
Is Boo_C: Set Boo_C: False, Set Boo_D true

Is Boo_B: Set Boo_B: False, Set Boo_C true
--For each "DUDU" : do stuff
Is Boo_A: Set Boo_A: False, Set Boo_B true
-- for each floor: Spawn something called "DUDU"

This is roughly as it goes, and obviously it works, giving some "breathing space" to all elements that are completed on the next tick, but sequences has to be placed in reverse.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
85
S
27
G
20
Posts: 1,962
Reputation: 18,651

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: AthleticDesign and 5 guests