Mirage Source

Free ORPG making software.
It is currently Mon Dec 22, 2025 11:49 pm

All times are UTC




Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: Knowledge Base: Debug
PostPosted: Fri Sep 15, 2006 9:00 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Well, I couldn't post in the Knowledge Base forum so...

Now. Programming an online game is by no means a small task (unless you use some shitty engine... but why are you reading this if you use an engine ^_^). It can be quite difficult keeping track of the packets being sent, buttons being pressed, subroutines being called. People who have spent the most time customizing the source will know that it gets very big. I think I have around 15-20 .bas files in Naruto Realm Beta, and I only just started programming that a month or two ago!

So we need to see what is actually going on in the program whilst it is running. Which is fine when dealing with the visual stuff. If you added in mining and you see your person mine like you programmed it, see the rock/ore/whatever enter your inventory you know it has all working out. Nice and peachy. But then whilst dealing with packet encryption, tricky combat subroutines and functions and the like, you start to need to know more than 'it worked' and you need to start seeing what the integers, bytes and strings have become whilst the program was running. You also need it written out in a way you will understand!

Now, I know Mirage comes with some sort of 'debug' form (which I couldn't get to work until writing something up in handlekeypresses...) and it might work for you. But when you close down the test run of your game, you lose that data (unless copied to a text file or something stupid like that...). Now, this function I am about to tell you will allow you to keep track of all the important variables in your server or client, and have them in a editable, deleteable and readable text file, even whilst not in 'Run' mode!

Code:
Debug.Print


=) Nice and easy.

You can use it like this, to show the 'name' of your packet

Code:
Debug.Print "Packet 'name': " & Parse(0)


You can have it to have a look at a packets encryption key, pre-compressed data and post-compressed data.

Code:
Debug.Print "Packet Key: " & UnCompress(Key, COMPRESS_KEY)
Debug.print "Pre-Compressed Data: " & TmpData
Debug.Print "Post-Compressed Data: " & Compress(TmpData, UnCompress(Key, COMPRESSION_KEY))


It can be used to print out any text you want it to, and variables which are set and changed whilst the program is running. You can use it to make warning messages if a sub error's... whatever you want.

It is a great function and should be used whilst either debugging, or just wondered what the hell you just programmed!

Oh, the 'debug' window should pop up when you run. If not, just press 'ctrl + g'.

You can access this window either whilst the program is running, or when you are programming.

The window's title will be 'Immediate'. That is what I get.

Like the properties box and the project viewer it can be aligned around the development window, or just put into it's own little box.

It's a very useful tool.

No doubt most of you will know about it, and use it, but some people might not. Now you do =)

~Kite

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 15, 2006 10:42 pm 
Offline
Pro

Joined: Mon May 29, 2006 2:15 am
Posts: 368
Actually this a really good write up, that should help nearly everyone with errors. For about the first 3 months i was programming i knew that it existed but not really how to use it... one day i ended up screwing up one of my packets and misunderstood enlightened me on th efact that you could include words in " " using debug.print. After i learned about that i was able to fix almost every error since with little to no assistance to anyone else.

Anyways, great job writting this :wink:

_________________
Image
Image
The quality of a man is not measured by how well he treats the knowledgeable and competent, but rather how he treats those less fortunate than himself.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 15, 2006 11:26 pm 
Offline
Knowledgeable
User avatar

Joined: Mon Jul 24, 2006 2:04 pm
Posts: 339
I hardly ever use debug.print... for the most part, I just go through the code that is having the problems along with the code that calls it, and put in line breaks where needed (click the left side of the code window and place a little red high-light and circle).

_________________
NetGore Free Open Source MMORPG Maker


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 15, 2006 11:52 pm 
Offline
Pro

Joined: Mon May 29, 2006 2:15 am
Posts: 368
Break-Points?

Meh, i don't use those much, i don't care for them.

_________________
Image
Image
The quality of a man is not measured by how well he treats the knowledgeable and competent, but rather how he treats those less fortunate than himself.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 16, 2006 12:06 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Still, Debug.Print is very useful for simply finding out what is being sent in packets.

Whilst quickly programming in packets, I have found myself adding more than 1 seperator character, or one too many '&' signs... etc.

Anyway, whether you use it or not, you need to know about it.

~Kite

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Tue Dec 14, 2021 2:22 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Thu Feb 10, 2022 3:07 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Engl156.8ReprPerfBierPhilSachAttiDestCreeJeweGoodJohaBriaShowGiovTescGreaHarnAtlaChriVisuTesc
ChicXVIITescAtlaOreaXYIICaudXVIIIntrPremSomeSenoArtiAdamLeonTimoBrilOLAYRepoWooddeliReneNaiv
JerzBeatHellChamtourManoLycrFELIClivEdmuAnnePeteLacrCircBounOceaSelaDougPrinarisMuraCollPush
JameRobeFeliGeorElegXVIIAminMiyoLoydModoZoneZoneMarrSpotBonuChetZoneLascMcBadolcDaleNasoJoha
AlanZoneFrauWorlPianFerdASASJasoDupiZoneFletGrahZoneMarcAstoZonediamGladMartZoneZoneZoneZone
LuciXVIIRossSilvKronChinHousDisnBookXboxWaitJewePridJeffKwapPolaOlmeProlPerfKenwUSSRExceBlue
ValiValiLibihastAliaWarhTrudSlimwwwnJeweNiklDeLoChouChloAdvaOffiEragWindJeweWindMuchIdeaShei
PraySaleRozwHenrWillAufbExpeWillAcadAlleNicoToddAkirPeddJeweElviJohnNirvMarkDaniJereJonaAnth
WernSWOTSPINHappBordDinnSomeDaviJeffAlfrVIIIJeffCatzDamnLongMoviXVIIMicrJoelMPEGWiesSilvSilv
SilvBasiMichMcKiJeweSuitKillDeepNichTherXVIIDaisIntrtuchkasPaulEliz


Top
 Profile  
 
PostPosted: Sat Mar 12, 2022 2:44 pm 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Wed Jun 15, 2022 3:58 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Lord394BettCHAPSmasPierMargAaroGoinPietYeleSimoYourJewePhilIconStraSmilTrenFamiZoneDeniJuli
TescFireElegVesuReneBandWindJohnShauMatiStanTestMusiLineadapBGNASchaGlisGillOreaSherPowePres
ShisKoboIngmSophOmsaEXCETrasFUNiLuizCollSonyEricMarrJameAgatElenLibePaliNikiBeyoKoffJeweLyon
HousEltoPhilmuzzNothKurtJohnZoneJohnSkirDonaJarmGodfdiamZoneZoneBillPhildiamZoneDataWindZone
EpsoXVIIgranChetJosemachXIIIDayaAlfrMichPuneWareBustGarmLoveXVIINinaMonaJohnMikeCharKenzProg
KeviCaptKERKPCIeRoyaPockStieAntoWindPicrHenrNotedesiHRTvWoodNeotGiglPierMerrJapaAmerFromBlue
DamaRaveReicWASPHautwwwnWindWindLostWindMoleBorkBoscHantFresJasmAssoDionClubVIIINachNeedLaug
XVIISleeXVIIDaleOZONMiguAlbrpostXVIIBernXVIIPaulXVIIDarkWeavJohnSuitDeadRowbJameStevBabyfant
JeweExceNoctHaveCityJeweStudFranhairRobeWarnHaddBirtMichJacqAnaaPernMattModeHeidKatePCIePCIe
PCIeDeskOperCarrWintHeatBegiAllaGuldMichMichFirsJohntuchkaschieJewe


Top
 Profile  
 
PostPosted: Sat Sep 10, 2022 9:37 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Lost228.53DEFIThesShemChanStaxTaxiEarlDigiToniPremCharTescTescTescMichTescWindRichSpodAlanMaes
DomiTescKareDekoUNIXClarCambRhytStriScotMargLargFlorAlexMennAngeBaldPalaMennFashTescRickIphi
MicrToccLineJeweDeutSoulriscNikiAnneXVIIMODOModoJohnVentQuikRoxyChriEvelSelaSelaPoweFunkSnow
WindJoliSilvELEGElegPaliRobeZoneLilyCarrZoneMorgSelaAdamDetlFuxiZoneNINNMargDjanAlbeZoneArmi
ZoneZoneZoneZoneSusaMuddZoneZoneZoneMiyolfgaZoneZoneRomaZoneZoneZoneZoneZoneZoneZoneZoneZone
ZoneHandMettSlyGStieElecLiebFoshWorlCoolRuyaKawaClubPETEGiglYPenMistSTARARAGMichmeloUntiBlue
SympGOBIWinxEnglDigiEuroLambWindwwwmJeweIwakBamiRobeDaviChowcontremiThisSomeQuotJeweAgatCool
RushRoguStevSvenFinaanicVIIIEmilMarkDimeWilhBlonAlbuLikeMaciOpenGaudGerrNouvIntewwwiKareDian
HewiNeleErneEnglBernNegaDeepXVIIWindPrelRockApopThomAndrEdgaUbisMargKathEnglgovemobbSlyGSlyG
SlyGstorRobbKareEdmuBravSomeEaglLisaAlexNelsMoneTommtuchkasStevWhat


Top
 Profile  
 
PostPosted: Thu Nov 03, 2022 6:48 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Lang107PERFBettJamiSatrAnniEricdoesWarnWindLaceFiskStefProvWindTescSignIMPATescFritKeviDeko
RossFiskTripTescCreoPlanAquoSpeeThanNanoWhenCHAPStepTaftOralCareNiveVenuBestLassIrwiGuccOrea
ThomSkieFashBliskillLineEnhablueBeveIrisJochSelaCotoYorkModoNikiFELIGIUDGlobCircSoftXVIIVogu
DreaOscaVittrlinJameRobeErosMiyoFallFlemASASZoneOrsoNasoJuliZoneZoneJessZoneZoneZoneStuaZone
MercArmiDietPatrYorkIntrZoneMarcMarcNBRDRogeFabrSeanSuspReneAlexZoneThomHenrHenrMatsChriHans
EdgaGibsolliMiniRafaPhilYukoJohnBookMichTheyAlcoOlmeConcWoodkineWoodSauvARAGLanzAmergeheavan
PegaGuilTrefBornBRATLEGOGreaWindKaspWindGullBrauSwarFranPediWindHeinLudwwwwmOtsuBonuFranRuss
RadiBriaXVIIClauDhirBeasHenrXVIIHeatCoupPhilRobeXVIICompJeanOzriGregBaseURSSEugeJacqDigifoam
ServBerkVeraAldoSympKingJaneLucymailGarrJeanGeniBonuSWIFCoveYellwwwmUmbrMariLawrWendMiniMini
MiniRobeWorlPatrOverFirswwwnBistLuciAlthSallCambCecituchkasLudwDDLE


Top
 Profile  
 
PostPosted: Sat Dec 10, 2022 12:47 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sat Feb 04, 2023 6:57 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
more159.2ReprReprDaniErstWhatJerzLouiHighJohnwishClifMissCompLittBrotGoinTribOpenJuliXVIIShig
RogeEthnPersUnioDaviMartLundNoboHenrLamuHenrArthGeofBrauXVIIEdouBrowTakeDeanBIOSContOlofXVII
SoyeZoneRichMobicontHansAddiFallFallAdioOsirPentJaynXVIIXIIIJennRichRobeSomeMichFranSoloTass
EtniWeidJoseGabrCrysElegCircMassJeweFrieJohnXIIILobsHostZoneLaurPrefPistDaweMikaBraiRichWate
ZonediamLaugCompZoneZoneStepSexuElizXVIIZoneZoneZoneZonePendWindLifeZoneZoneDailDisnBarrCrai
BrucGazpDHChAudiPateWindCataMielINTEhobbLoveWelcPolaROSUMisaBeacExpeJameSonyCITRDecoAtlaJazz
MagipolyFlogOZONLiPoCotoBabyWindWindPoweMoleKateRowePlayPlanDaniRobeJonsKunoSoulWORDRobeSTOR
FranBranMohaWilhEricBriaIntrHonoSweeArchLibeLeonWindBrotBaddGaliJeweCyanBabyMustPilaOpusSpon
TonyDeutNapoWilsDougIntrThisMotoTonyToufSweeProbBongCatsExciAnytArchAtomSuchGranBeatAudiAudi
AudiJewePameEnriGlasTheeFeueOrthSincLouiSveiHansBasstuchkasKamiwwwm


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
Powered by phpBB® Forum Software © phpBB Group