The Daily Click ::. Forums ::. Klik Coding Help ::. A neat solution to slow loops from clickteam forums
 

Post Reply  Post Oekaki 
 

Posted By Message

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
24th September, 2008 at 17:54:00 -

http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=109880#Post109880

many people probably noticed that running excessive fast loops is slow; this turns out to be because ALL "on loop" events are retrieved by the compiler when ANY loop is called. So even if theres only a single "on loop A" in your game, it will call the other 1000 "on loop X" events for every single pass through the loop.

nifflas had the neat workaround of putting loops into event groups, and opening/closing them when called.

So instead of doing
"Start loop A for 1000 loops"

do
"Open Group: Loop A"
"Start loop A for 1000 loops"
"Close Group: Loop A"

and suddenly your game runs much much faster

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
24th September, 2008 at 19:28:04 -

That's odd, but potentially very useful.
Thanks for bringing it to our attention.

 
n/a

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
24th September, 2008 at 22:53:57 -

Article this so it doesn't get lost, maybe.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
24th September, 2008 at 23:20:12 -

yesh I should make an article with some of the random things I've picked up. This is by far the most important one I've gotten so far.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
25th September, 2008 at 11:48:40 -

I'm sure it's going to be fixed in MMF3. Yay, we have to fork over another $100 to get another MMF bug fixed!

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Codemonkey

Always Serious

Registered
  06/11/2007
Points
  164

Code MonkeyKlikCast StarVIP MemberAttention GetterWii Owner360 OwnerThe Cake is a LieCardboard BoxHero of TimeI'm a Storm Trooper
I'm on a BoatIt's-a me, Mario!PS3 OwnerSonic SpeedGOTM - SEPTEMBER 2009 - WINNER!Evil klikerPokemon Ball!I am an April Fool
25th September, 2008 at 12:11:11 -

-_-

 
You can log off any time you like, but you can't ever leave.

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
25th September, 2008 at 21:01:43 -

Hey, that's real useful information.
It does sort of make sense, since the MMF2 identifies loops by names/strings, and this string can be a variable if you want to. So I guess MMF checks every "on loop" to see whether it belongs to the loop it's currently running.

 
This space is for rent

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
26th September, 2008 at 03:32:34 -

<3 whoever gave me the rating

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
26th September, 2008 at 03:45:26 -

Finally we have someone to replace Tigerworks

 
.

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
26th September, 2008 at 04:11:17 -


Originally Posted by Pixelthief
<3 whoever gave me the rating


Lol, I have a "Pixelthief flag system" in my games. About time you got a rating for it

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image
   

Post Reply



 



Advertisement

Worth A Click