The Daily Click ::. Forums ::. Klik Coding Help ::. Information about Fast Loops
 

Post Reply  Post Oekaki 
 

Posted By Message

]Alpha[



Registered
  19/09/2003
Points
  245
2nd October, 2008 at 18:16:23 -

Hi guys.
I'm bothering you again to ask a quick question :

Where can I find informations about fast loops?
I need to learn how to use it, so maybe a guide would be great (if it exists).
I never used fast loops so I need something easy to start with.

Every help would be greatly appreciated!
Thank you!

I used the "search" function in this forum but I found nothing useful

Image Edited by the Author.

 
All that I see is the years...

Lönnemyr



Registered
  30/06/2008
Points
  69
2nd October, 2008 at 18:36:35 -

I`m also interested. I read everywere things like "babla use a fastloop" but I have no idea what a fastloop is.. or what it`s for.

 
-

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
2nd October, 2008 at 18:37:59 -

start loop "a" -1 times is infinite loop i think.

on loop "a" then whatever

That's basic.

If u want to check objects, like 20 objects(trolls), if one has flag 5 on r something then destroy him.
Spread value 0 in alt val Z of trolls

start loop "a" no of trolls

on loop "a"
compare two general values. (Loopindex "a" = alt val Z of trolls)
Troll flag 5 on? = destroy!!!

That's it.

 
Code me a sausage!

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
2nd October, 2008 at 20:37:43 -

http://www.create-games.com/article.asp?id=106

That's a thorough explanation of loops, READ IT!

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

]Alpha[



Registered
  19/09/2003
Points
  245
3rd October, 2008 at 09:02:42 -


Originally Posted by Eternal Man [EE]
http://www.create-games.com/article.asp?id=106

That's a thorough explanation of loops, READ IT!



Thank you!
I'll check it ASAP

 
All that I see is the years...

]Alpha[



Registered
  19/09/2003
Points
  245
3rd October, 2008 at 11:10:45 -

Well, I read it and it surely is useful.
But maybe there is something more detailed about fast loops, somewhere.

Anyone knows?



 
All that I see is the years...

]Alpha[



Registered
  19/09/2003
Points
  245
8th October, 2008 at 15:08:21 -

Sorry to bother you, but I'm stuck with this fastloops thing.

I read carefully the guide Eternal Man linked and now I have a clear idea of what fastloops are and what you can do with it.

The problem is that I still don't have a clue to how to use them.
I tried on MMF and I learnt to do very simple things, but not the ones I need.
I have a .INI file with about 1000 values stored.
I created my own Save/Load system without Fast Loops and it takes about 17seconds to Save or Load the game.

I heard that with fastloops I can Save/Load those values istantly but I can't figure how
I searched on the net for a most detailed guide about fastloops but I can't find anything!

Can someone help me?
Thank you!

 
All that I see is the years...

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
8th October, 2008 at 19:43:14 -

You probably want to do something like:

Start loop [number of items] times

on loop:
get value from item name -> "item"+str(loopindex("loopname"))

That's it in a nutshell, shout if you need it spelled out for you.

 
n/a

WillWill

Give me stuff

Registered
  24/07/2006
Points
  552
15th October, 2008 at 09:03:37 -

Download examples lads, it's very easy to get into.

Sooner or later you'll want to deal with loop indexes and stuff aswell, or maybe it's just me.

 
http://www.morphboy.newgrounds.com/
^ Free tunes, as long as you contact me.

]Alpha[



Registered
  19/09/2003
Points
  245
15th October, 2008 at 11:04:32 -

Well I actually just learned how to deal with loop indexes.
I recreated my saving/loading system with fastloops and it works!!!

The problem is that it isn't faster than my previous system.
It takes about 17 seconds to save a game, just like before!
So... I used fastloops and it does work but it doesn't store data istantanely as everyone says.

What's wrong?

 
All that I see is the years...

WillWill

Give me stuff

Registered
  24/07/2006
Points
  552
15th October, 2008 at 13:00:12 -

The main difference between a fastloop and a regular action is that if you start a loop called "Stupidloop" 3 times, you won't experience any change on the screen until the loop is finished (after 3 times).

Performing an action 3 times will render the results after each time, while a loop won't show a thing until it's finished, which means that loops save a lot of CPU and simple makes some things more effective and pleasing in the click-environment.

I myself thought it meant that things are done after, but in fact they are not. If anyone has anything to object to what I'm saying I suggest they should do so now, because I'm only talking from my own experience.

Image Edited by the Author.

 
http://www.morphboy.newgrounds.com/
^ Free tunes, as long as you contact me.

]Alpha[



Registered
  19/09/2003
Points
  245
15th October, 2008 at 13:53:38 -

Yeah but aren't fastloops suppose to loop event at the speed of light?
Why my loop takes 17 seconds? T_T

 
All that I see is the years...

WillWill

Give me stuff

Registered
  24/07/2006
Points
  552
15th October, 2008 at 14:56:07 -

Because loops won't make your computer go faster. The only way to improve speed requires you to work on the events that you've made.

 
http://www.morphboy.newgrounds.com/
^ Free tunes, as long as you contact me.

]Alpha[



Registered
  19/09/2003
Points
  245
16th October, 2008 at 09:04:09 -

Well, the events are actually fine
The save system execute the whole operation in just 1 MMF Loop.
The problem is that it has to store about 1000 data, so it takes a while.

I really don't know how to improve it.
I think I'm stuck with this

 
All that I see is the years...

chrilley

Insane Beaver

Registered
  05/01/2002
Points
  704

Game of the Week WinnerVIP Member360 Owner
16th October, 2008 at 21:53:56 -

Could you upload an example/explain in more detail of your fastlooping method? Maybe someone can think of a faster way for you if you show more specifically what you want to be done.

 
Image
   

Post Reply



 



Advertisement

Worth A Click