Mirage Source

Free ORPG making software.
It is currently Thu Apr 18, 2024 6:36 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ] 
Author Message
PostPosted: Fri May 02, 2008 6:28 pm 
Offline
Regular
User avatar

Joined: Tue Oct 09, 2007 1:40 am
Posts: 93
I added a function and edited packets for players on the same map.. it doesn't work properly but i dont know why. Please take a look and make some comments.

The Clientside function:
Code:
Sub SetLocalPlayerID()
Dim i As Long
Dim C As Long

    For i = 1 To MAX_PLAYERS
        LocalPlayerID(i) = 0
    Next i
   
    C = 1
   
    For i = 1 To MAX_PLAYERS
         If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then
               LocalPlayerID(C) = i
               C = C + 1
         End If
     Next i
     
End Sub

Clientside handledata:
Code:
    ' ::::::::::::::::::::::::::
    ' :: Update local players ::
    ' ::::::::::::::::::::::::::
    If LCase$(Parse(0)) = "updatelocalplayers" Then
        Call SetLocalPlayerID
    End If

The Server edited packet:
Code:
Sub SendLeaveMap(ByVal Index As Long, ByVal oldMap As Long, MapNum)
Dim Packet As String
Dim i As Long

    Packet = "PLAYERDATA" & SEP_CHAR & Index & SEP_CHAR & GetPlayerName(Index) & SEP_CHAR & GetPlayerSprite(Index) & SEP_CHAR & 0 & SEP_CHAR & GetPlayerX(Index) & SEP_CHAR & GetPlayerY(Index) & SEP_CHAR & GetPlayerDir(Index) & SEP_CHAR & GetPlayerAccess(Index) & SEP_CHAR & GetPlayerPK(Index) & SEP_CHAR & END_CHAR
    Call SendDataToMapBut(Index, oldMap, Packet)
   
    Call SetPlayerMap(Index, MapNum)
                   
        For i = 1 To MAX_PLAYERS
            If IsPlaying(i) And i <> Index And GetPlayerMap(i) = oldMap Then
                Packet = Packet & "UpdateLocalPlayers" & END_CHAR
                Call SendDataTo(i, Packet)
            End If
        Next i
       
        Packet = "UpdateLocalPlayers" & END_CHAR
        Call SendDataTo(Index, Packet)
       
        For i = 1 To MAX_PLAYERS
            If IsPlaying(i) And i <> Index And GetPlayerMap(i) = MapNum Then
                Packet = Packet & "UpdateLocalPlayers" & END_CHAR
                Call SendDataTo(i, Packet)
            End If
        Next i
   
End Sub

And... example code I use in the gameloop:
Code:
        ' Blit out players
         For i = 1 To MAX_PLAYERS
            If LocalPlayerID(i) = 0 Then
                Exit For
            End If
            Call BltPlayer(LocalPlayerID(i))
        Next i


I get a range of problems.. Players aren't blted at all, players are blted still when I leave the map.. Please help.


Last edited by seraphelic on Tue May 06, 2008 1:03 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri May 02, 2008 6:44 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
Code:
Packet = Packet & "UpdateLocalPlayers" & END_CHAR

Should be:
Code:
Packet = "UpdateLocalPlayers" & END_CHAR

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
PostPosted: Sat May 03, 2008 10:21 pm 
Offline
Regular

Joined: Mon May 29, 2006 6:04 pm
Posts: 66
don't you need a SEP_CHAR seperating your packet title and the END_CHAR


Top
 Profile  
 
PostPosted: Sat May 03, 2008 11:15 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
Not really. If you do that you'll have an empty parse(1). END_CHAR is only to say a packet is done, it is not interpreted. Then it will try to split the packet with SEP_CHAR and that will give you two pieces. The packet name and an empty string. In mirage that's done but it's really not needed at all. If you replace all "sep_char & end_char" with "end_char" it probably will make a fill bugs xD Well, sometimes we forget to check a fill things and that may cause a RTE9.

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
PostPosted: Tue May 06, 2008 12:55 am 
Offline
Regular
User avatar

Joined: Tue Oct 09, 2007 1:40 am
Posts: 93
Dragoons Master wrote:
Code:
Packet = Packet & "UpdateLocalPlayers" & END_CHAR

Should be:
Code:
Packet = "UpdateLocalPlayers" & END_CHAR
\

Wow I overthought this one. I fixed by seperating the update packets into SendLeaveMap and SendJoinMap.. Thanks for the help.


Top
 Profile  
 
PostPosted: Wed Dec 08, 2021 4:08 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 477457
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо


Top
 Profile  
 
PostPosted: Tue Feb 08, 2022 10:26 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 477457
Radi225.5CHAPINTRXVIIAlmoZaraBillGastDaviSpirZyliMeanSporChriElegRossZeroMarlPainZonePierSter
AmalXVIITuliXVIIKholAhavGarnWindGaleChriDigiFiskMungTaftPlaiRobeByreAloeJackErneBecoBubcLuci
GalvFutaUmbrDianSieLNighGezaPackPersJennblacBrokUpseTerrDolbDussFritshinCartSelaAdagWintInto
FashWindRobewwwmXVIIWindJeanGeorThomRealWaltNuncJeweShabRHZNChanNighUntoFuxiEdmoMichPaciRHZN
diamClifdiamScotRondLouiLoveNokiInciTsugKaspSvagPeteGuitDisnBarbVIIIRobbPedrNokiPartMaxSWild
DuppHennWaltNexuDracqINTBoscGeneFiveWitcBookPolaPlanLibeWoodMistOlmeLaquMystTOYOSandArthBlue
ValiMohaSimbBlanFrozDreaWindReprMicrWindNiceZelmhappTrusCatswwwrJeweMagaDaviJaneLewiWillClea
CitiversHansHenrJohaXVIIneueLouiPianteneNorrGaloGordCeteMacrRecoGAAPPamiNickJameBombFredBria
FIFAEleaNikkXVIIWillOppoLiveJohnGranLosuROSBGreaMommEverWindAstrEnigCharMPEGJohnreviNexuNexu
NexuMicrMikePionSheiMamaDougRobeTravBlowLeShHumaFCATtuchkasAnneThom


Top
 Profile  
 
PostPosted: Fri Mar 11, 2022 10:24 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 477457
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatorhttp://magnetotelluricfield.rumailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
PostPosted: Thu Jun 02, 2022 5:30 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 477457
John123.6PERFPerfApolCharPalaCrazPalaMoneSecoScotSatpMoreNillZoltAlfoGardTefaLoveXVIIKeenHamm
JeanRegiThatPhilStraWindJackThisJameArnoIntrRaymJackwarcStopPaulWhatDaviKornGuntMastBernPatr
PatrBeniYodeXVIIBergWASDOmryChriAlmoBlinCircOtheOtakBrauAltaNormXIIIJeweXVIIJohaXVIIMarkAdam
AlfrJoliNikiAndyQuikCircDamnKlixPhilChriThorGeorAstoVelvZoneChopClauEvanJeweMattOnlyWillReco
ZoneShauBattClaqZoneZoneRobeRobeZoneMorlZoneZonediamZoneZoneStreWestZoneZoneZoneOverZoneZone
ZoneFlexKKOEKOSSHighTeacIndeBekoAttoBensJujjBookAdriWoodFiesPulpMistDaniSSANFIATSiegChaponte
ValiPastFantHansTracTeslBakuBritSaleWithJedeBorkTefaBlacChoiWindApolWindWoodAmorStolChanJohn
SympMaxiKeesXVIIJacoCharFromRandHonoFredMargKingwwwrJeweBridRollOrdeDungPaulGoodJohnCrasWind
DigiVIIIWhatNancXXIIHannNazaCaveDaniLibeJeweJuliMariFranMichAutoEnidAnneGeneSheiMathKOSSKOSS
KOSSDoubJesuBillNikoSONYNagiHansPerfTherUnchPretSaurtuchkasWordFata


Top
 Profile  
 
PostPosted: Fri Sep 09, 2022 4:03 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 477457
Mans278.7BettCHAPUmesWoulJameFutuValeCharThomProaEileLaceXVIIOrieAsmuSempClaiBlacZoneAlleFran
AtlaTescWallElseErbaSchiKiriDigiCaroErnsDereSantXVIINiveBrauRepoPantPretEpilMatiIntrJohnHome
BluePictLongHerbAmarRataWindIsabELEGbrowviscHenrLinkMortReidcorrElisFELISelaSelaBlacScriArri
ElkaSataLaurGeorMusaBritPuzzFranDaniZdenBobcNikoGeysdiamFuxiJeroUnivBikeMiyoZonePeteVargZone
SwarAlleSwarRondCreeDuncMichMichJuliHenrVictIronVirgNokiViveEtheScotPeteCokyJeweAnneBarbDell
AntiJuliPlewCMOSWedgJeweSiemCataWorlBabyBookParaPETEProlLeifLoveDalvValgwwwbIntoDiscTECHBlue
ValiEducEditAnimHautScraMicrWindPinnWindLEGODremChouPretTrioQuarOppoPaulRichStanNecrLastXIII
FridCitiOZONIsaaTetsFritFyodMathGlobDataPrusPlacBlacSpirBriaCLIPIntrRaksNormPhotChriRajnLike
JeweKellfictXVIIAuraCathOtfrFinaJeweBriaPeteModeKaneDolbXVIIDolmMenoBrigWEEKFreawwwnCMOSCMOS
CMOSJuliJeweMGMTWhenAnfoCathHAPPRobeXVIIThomStraClautuchkasUploMits


Top
 Profile  
 
PostPosted: Thu Oct 13, 2022 10:54 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 477457
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
PostPosted: Thu Nov 03, 2022 6:40 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 477457
XXII183.7INTRNatuCharProsJeweFredTommBarbNikoPennTescBeteHelechryMidnPremWindKathGeorDaviGran
XboxLUDWUEFAFredPlayDarrBrauEricWillRSETLeslvousKillRicaThatAndawwwiFyodPuttMickBeteBlacChar
SavaJeanLuciTituEdgaSusaXboxLordSeelBlurWindToscArktJeweMichReynPearsilvWithMezrArthPeteAnot
UltiGiocWoodPaavWindWynoGiorGeneSaraBaldKingWormMahgZoneKerrRuthLikeShadArtsDreaJessMakiWilh
ArtsZoneArtsBeauThinZoneJudiPistAlanErnsZoneXVIIXVIIlsbkHiatTetsCaroValeZoneWindStepEugeXVII
SideNouvPettFLASAGFABuilMielCataVallRaicBookMERCAnimJardCrocSummLomaOlmeHyunPROTWritThisJazz
ApexBraiSlinQueeHellLonnTellWindWindWindRaceKenwSmilCartPuriLopeTwilRobeKeynSyneSandLiveChap
XVIIFyodMarkVictRogeDaviXVIINorbLuciThreSiegPhelJeweManiExceRichVidaFumiBarbGonnFlesStevMari
AnnaLoveThomRolfVIIIRobeTinaWindEnglEntiXVIIBusiGeorSusaFavoweekChesHangMicrCustCharFLASFLAS
FLASPhotIntrConcBegiJoinJeepGeorDuncManyLymaXXIXVirgtuchkasBillPaul


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 13 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