Mirage Source

Free ORPG making software.
It is currently Fri Mar 29, 2024 5:26 am

All times are UTC




Post new topic Reply to topic  [ 21 posts ] 
Author Message
 Post subject: Loops and timers
PostPosted: Tue Dec 04, 2007 8:35 am 
Offline
Knowledgeable

Joined: Sun Jul 29, 2007 12:23 am
Posts: 199
I am just curious, what is a better way to handle something? With a timer or a loop? Which way is more faster, or better?


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Tue Dec 04, 2007 8:39 am 
Offline
Pro
User avatar

Joined: Thu Dec 14, 2006 3:20 am
Posts: 495
Location: California
Google Talk: Rezeyu@Gmail.com
Well..

You use loops to loop through things..
And timers to you know.. time things.


They aren't really the same thing at all.. I don't know why you'd want to use either of them in place of the other...


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Tue Dec 04, 2007 8:41 am 
Offline
Knowledgeable

Joined: Sun Jul 29, 2007 12:23 am
Posts: 199
Well awhile ago someone told me (dont remember who) to use a loop instead of the timer cuz a timer slows something down or what ever. I was just wondering.


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Tue Dec 04, 2007 10:22 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
They didn't tell you to use a loop instead of a timer. They told you to replace your timer witha small peice of code you put in your game loop. There is a tut for it.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Tue Dec 04, 2007 12:36 pm 
Offline
Knowledgeable
User avatar

Joined: Mon Jul 24, 2006 2:04 pm
Posts: 339
Correct answer is "It depends". For a game loop, you want a loop, not a timer. Reason for this is you have complete control on how frequent things execute. With a timer, your code has to hit an idling point or a DoEvents to trigger, along with the resolution is quite low (if you say 5 milliseconds, it may be anywhere from 5 to 25 before it actually fires). It also removes needless overhead, though this isn't of much concern, since its hardly noticeable, unless you have like 50 timers.

_________________
NetGore Free Open Source MMORPG Maker


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Tue Dec 04, 2007 7:48 pm 
Offline
Knowledgeable

Joined: Sun Jul 29, 2007 12:23 am
Posts: 199
William wrote:
They didn't tell you to use a loop instead of a timer. They told you to replace your timer witha small peice of code you put in your game loop. There is a tut for it.

No really, they DID tell me lol! Is some guy I knew from school.


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Tue Dec 04, 2007 8:04 pm 
Well, it's possible to loop with a timer, just not practical.

Could set the interval to 1000 (1 second) and then in the timer code do:

Code:
a as long

a = a + 1

if a = 60 then ' 1 minute
do stuff
end if


I used to do that, when I first started and didn't fully understand how to use loops and stuff.


Top
  
 
 Post subject: Re: Loops and timers
PostPosted: Tue Dec 04, 2007 8:07 pm 
Offline
Knowledgeable

Joined: Sun Jul 29, 2007 12:23 am
Posts: 199
Yeah well I wasnt sure if he was playing me or telling the truth so I decided to ask you guys. And thats how I use to use things lol, pretty funny. :P


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Wed Dec 08, 2021 7:23 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Tue Feb 08, 2022 6:40 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Spoc155.2ReprPERFSydnGARNThrePatrInteAssaGillSterProfFortOxygThisBlueactiNinaPaulZASSKittDima
ShooStroEyelHannColiXVIIAlexAngeAintMicrBrucGrooKuesXVIIXIIIAlexDreakashArthHuntAmenXIIIXIII
JoacZoneKareResiWelcDellLeonTraiDrafFallGlobAlchSomemattGeorVikrDigiToniHollHerbTogeAracXVII
EtniAlanJameIndeStelPaliDichHarrMariFallRaviAllbELEGTellZoneDennForeXVIIGARDMariLoveGoviKhal
ZoneZoneTennGoodZoneZoneJillHoliZoneFourZoneZoneZoneZonePoulRiseHermZoneZoneFranBlacJeanZone
KuniAppeAnnoKOSSHASAWindGoreElecAgneOnceBookcellPiquPolaCrocSQuiGiglLeonInfiSKODBattThisSmoo
polyRIVETangBrunMeriChicBlueWindTopPAuraMoleOregValeBvlgPlanCharBernCalereseCariCybeAriaBasi
XXVIJeweWeslForeXVIIScotUnemHenrOncewwwsDonaLoliValePurpFeelJeweVinuNintGiorMichManaNikeStra
TubeMichNapoProjPennIntrSmokBattWITCWumpURIASaraSonyPublCastHolyCormDaviMichDeutHeikKOSSKOSS
KOSSwwwrJohnNautsneaWITCDarnthisSwanMemoLindValeHowatuchkasBriaDeco


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Fri Mar 11, 2022 6:39 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоmagnetotelluricfield.ruинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Thu Jun 02, 2022 1:30 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Trou412.7BettBettRemiHewlIncrHabaCurtJeweSomeOmmaDickSainGeorTescWhatJohnArthBernTeleMammJewe
BeatLouiRandSigmOlivPetrSoliEllaAfraXVIIXVIILargWestXVIIXVIIRichErnsMariAmosTakeStriRexoMast
CotoMichSupeWisefresKindLoveLimiELEGArthELEGELEGRogeELEGProlSelaGiorBoulPapeSameHenrPiggCami
JohnDimaSilvSelaElegVentthesZoneEnjoFELIZonediamCircMickDennJuliNoraBaltHenrSonnAltaZoneSpot
ZoneMiyoZoneZoneZoneZoneZoneZoneZoneRondZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZone
ZoneBruxBraviRisFirePlaySamsBekoBabyMatrChriMichOlivBlueMWUnLabaCineCaseSTARSEATVeniMedlSoul
ToweFrelCreaChriMOXIWarhChryLANGWindWitoJohnDremzweiChouIamsWindDaviClauDungarriBlueXVIIPrel
KidsNineTheoSigmMarkFranHonoXVIIBonuoperAlekPeteProdBandVikrImagTereGuddKwokBranWillAlicBlac
CraiJoanVitaInteGaliKabiAnsmEricSafeBainSylvTheyJohnIrenVisiOZONDisnPersGeorDATSGeraiRisiRis
iRisMonsVoyaChicElisKoolFielMicrJohnXVIIIggyRevoTeactuchkasJohaCycl


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Fri Sep 09, 2022 12:00 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
High186.6AIDSBlamTheoRaviJeweGeraJereMoanJoseDuraTescTrumBrisWillscreBrasClifDolbAlicFastFisk
easyJanaXVIIGoldRockNoboTaftaudeHughOSDSAlexJogoTranBourSpecElecSpecKareSalwIrisXVIILivePlay
PegaMartBraiChriCaroFashStreNeedEverXIIIWindTentRootMariGeneArthThenLuxoMasqClifPetePierThat
PushLoviLudwSamuScraClivSonyWindGregWindPariWindTurnZoneKarlJeweLifeAmerArtsIsaaEverJeweDelp
ArtsZoneArtsPleaTherZoneShanHalfAvenStorZoneRichJohaZonepoweBeebGeniRickZoneElleJeweBonuNoel
RemieugeMadeFLACXXIIWindMielMielINTEStefBookRobeBadiBelaVIIIJoinGrooParkLanzPROTRainThisJazz
ApexFranDylaMadeMORGElviRoyaWindWindWindProfKenwKirsRoadMonACaldJoseDaviSpacLaurShanRobeWise
FaldlychXVIIAescKiddMcKiXIIIEricASchRalpKissHuawMahlRobeBeliBoriGlorJameCharRollJaniArtuStre
bonuThroAndrParaNapoTomaDrWeInteEnglPistXVIIJeanWindJonaExceAngeGaryMicrTuesXVIIStepFLACFLAC
FLACGeneLifeAstrRogeVandJoseClasGregPeteEconJohaDailtuchkasLuciTiin


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Thu Oct 13, 2022 2:12 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Thu Nov 03, 2022 2:54 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
XVII123.1PERFBettFaitXVIIGillToujTracSimaHumaMichMacrLoveTheySidnDynaCrisSpirSideMoniElliCann
ElleXVIIHojeFriegathThisXVIIMarcJaviAlexDearRaymXIIIPaulWWWRSherSoliImmaHomoHermMustMichGill
PatrXVIIErasRogeJungQuesCeciPierOmatMatiAdioJeweWhatthesAltaJohnWelkFranJohnWillSELFhomoRamb
XIIIFranSelaJeweMacbNikiSelaErneMarlWestXVIIEmilNikiCreeZoneWingAlkaNERVIppeMarlWorlHermBlue
ZoneWilhBostBornZoneZoneHammZoneZoneLindZoneZonediamZoneZoneNokiZoneZoneZoneZoneJeweZoneZone
ZonePinoDecoKOSSHighAcceHotpBernHerbStevRainBookPostPolaFiesPETEMistChriARAGSUZUAlexDuriJazz
ReefPastReedPfanProjBornMercWindWindWindTripBrauPhilpublFresDeusArnoHoveTarcBangJackXVIIWalk
BricPopeXVIIXVIILewiHarvtodaGiovWalkFredValeFishNintRollLiyaTotaLoveCarlThisPartBarrThenWind
ElviCapoColoZeppSonyKareUriaLudwAICPEdgaGhiaTranGordPaulDellKillWindKathBabyJamafoamKOSSKOSS
KOSSSupeJoseGerainduBridOnlyDodiPerfJohnEnglBonuwwwntuchkasGoldMyst


Top
 Profile  
 
 Post subject: Re: Loops and timers
PostPosted: Mon Dec 05, 2022 11:05 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group