Will the top level design be removed in C3?

Discussion and feedback on Construct 2

Post » Thu Oct 01, 2015 10:26 am

It's slower simply because it's more work to iterate two lists than one, and that overhead would apply to every single condition in the project. Currently the engine uses a simple flag to indicate that there are instances on the temporary list that need to be transferred, and checking a flag between every top level event has negligable overhead.
Scirra Founder
B
403
S
238
G
89
Posts: 24,648
Reputation: 196,133

Post » Thu Oct 01, 2015 10:30 am

Ashley wrote:It's slower simply because it's more work to iterate two lists than one, and that overhead would apply to every single condition in the project. Currently the engine uses a simple flag to indicate that there are instances on the temporary list that need to be transferred, and checking a flag between every top level event has negligable overhead.


What about the idea of having temp grouping when picking, to make diversifying same objects when picking easier?
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
93
S
30
G
22
Posts: 1,987
Reputation: 20,203

Post » Thu Oct 01, 2015 11:07 am

Ashley wrote:It's slower simply because it's more work to iterate two lists than one, and that overhead would apply to every single condition in the project. Currently the engine uses a simple flag to indicate that there are instances on the temporary list that need to be transferred, and checking a flag between every top level event has negligable overhead.

This is probably a stupid question, anyway :D. But instead of using a temporary list couldn't the objects in the main list just contain a flag as well marking them as existing or as temporary and based on this they would be handled differently, maybe the flag could keep track of where in the scope they were created, so the problem you mentioned about infinite loops wouldn't happen. Or is that not possible? Because that way you wouldn't have to spend resources transferring, I would guess. You could just change the flag for all existing objects at the end of top level if that makes sense or would that still be worse than it is now, if possible?
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Thu Oct 01, 2015 4:27 pm

As it stands, the only real performance overhead applies at the end of a top-level event that created new instances, when it transfers the temporary list. If every condition checked both lists, all conditions would have a performance overhead, regardless of if the event created new instances or not.
Scirra Founder
B
403
S
238
G
89
Posts: 24,648
Reputation: 196,133

Post » Thu Oct 01, 2015 6:54 pm

@Ashley ,
Is it possible to mark where an instance was created, then skip every event until it gets back to the place is was originally? That way it would have the instances updated, but nothing will have changed, so it can then continue with the new instance. I would imagine that skipping everything would be quicker than having everything check the lists.
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » Thu Oct 01, 2015 7:17 pm

Prominent wrote:@Ashley ,
Is it possible to mark where an instance was created, then skip every event until it gets back to the place is was originally? That way it would have the instances updated, but nothing will have changed, so it can then continue with the new instance. I would imagine that skipping everything would be quicker than having everything check the lists.


Why do you need to pick just created instance?
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
93
S
30
G
22
Posts: 1,987
Reputation: 20,203

Post » Thu Oct 01, 2015 7:43 pm

megatronx wrote:
Prominent wrote:@Ashley ,
Is it possible to mark where an instance was created, then skip every event until it gets back to the place is was originally? That way it would have the instances updated, but nothing will have changed, so it can then continue with the new instance. I would imagine that skipping everything would be quicker than having everything check the lists.


Why do you need to pick just created instance?

An example is If you have to spawn an object based on some value of another newly created object and you then have to use those information for something else. But there are several places where this can cause problems, that are not that easy to give examples of. So guess its just as much this way of creating objects that, if it could be changed would be nice for C2/3, as it would make it easier to use, but also potential problems that you will have to workaround could be removed.

But if you look at my example on one of the other pages, it shows how it occurs and what problems it causes. But since that is a very simple example, it can become a bigger problem in larger projects, where you might have thrown in waits etc. But in general, at least when I design my projects I always try as best as I can to avoid having to solve things with waits. But in some cases its just not always possible in my experience. But its very difficult for me at least, to troubleshoot or even post my projects on the forum, because they are rarely less than 2-3000+ events so I don't expect anyone to care looking through the code trying to troubleshoot. But also its very difficult to recreate something that occurs at some point during such a huge project. So even picking out a part of where the problem occurs and trying to recreate it in an example to be posted on the forum, its very likely that it wouldn't reflect the actually problem in a correct way.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests