[RESOLVED] (Arrays and) reloading layout CPU usage

Bugs will be moved here once resolved.

Post » Sat Oct 01, 2011 6:07 pm

Hello Ashley and Scirra community,

Today I started working on an algorithm for Dungeon generation, but pretty soon I encountered something which appeared as a bug to me. Here is the situation:

- Layout which is bigger than the canvas
- Ability to scroll through layout using arrows
- An array which gets filled with random values
- Reloading the layout with any mouse button
- Browser used: Firefox 6.0.1

Every time I reload the layout, scrolling through the layout goes slower. It appears that something is clogging my CPU. Either I'm doing something in a way C2 doesn't like or the engine is flunking. (sadface)

Naturally, a .capx is supplied.TehLulzinator2011-10-01 19:46:47
B
21
S
3
G
5
Posts: 14
Reputation: 4,189

Post » Sat Oct 01, 2011 7:24 pm

http://dl.dropbox.com/u/36472942/construct/forumhelp/DungeonCrawler_Fixed.capx
I've commented the capx.
You should use subevents.

Also as you had your code done, your array was looped through every tick.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sat Oct 01, 2011 7:46 pm

Thanks a lot! I'm terribly sorry for the idiotic mistake... I'll never know how I missed that.
B
21
S
3
G
5
Posts: 14
Reputation: 4,189

Post » Sat Oct 01, 2011 8:07 pm

No need to be sorry, we all do mistakes, don't beat yourself up.
I'll move the topic to the "How do I" section now, trying to let the bug section for... bugs
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 5 guests