Mirage Source
http://web.miragesource.net/forums/

single player.
http://web.miragesource.net/forums/viewtopic.php?f=201&t=4701
Page 1 of 2

Author:  genusis [ Thu Nov 06, 2008 1:11 pm ]
Post subject:  single player.

Well i have changed everything in 3.60 from characters to account and i was wondering how would i set this.

Code:
Function GetPlayerX(ByVal Index As Long) As Long
    GetPlayerX = Player(Index).Char(TempPlayer(Index).CharNum).x
End Function


Code:
Sub SetPlayerX(ByVal Index As Long, ByVal x As Long)
    Player(Index).Char(TempPlayer(Index).CharNum).x = x
End Sub


Code:
Function GetPlayerY(ByVal Index As Long) As Long
    GetPlayerY = Player(Index).Char(TempPlayer(Index).CharNum).y
End Function


Code:
Sub SetPlayerY(ByVal Index As Long, ByVal y As Long)
    Player(Index).Char(TempPlayer(Index).CharNum).y = y
End Sub


Code:
Function GetPlayerDir(ByVal Index As Long) As Long
    GetPlayerDir = Player(Index).Char(TempPlayer(Index).CharNum).Dir
End Function


Code:
Sub SetPlayerDir(ByVal Index As Long, ByVal Dir As Long)
    Player(Index).Char(TempPlayer(Index).CharNum).Dir = Dir
End Sub


Code:
Sub AddAccount(ByVal Index As Long, ByVal Name As String, ByVal Password As String, ByVal Sex As Byte, ByVal ClassNum As Byte)
Dim f As Long
Dim n As Long

'If LenB(Trim$(Player(Index).Name)) = 0 Then
        'TempPlayer(Index).CharNum = CharNum
       
    Player(Index).Login = Name
    Player(Index).Password = Password
   
        Player(Index).Sex = Sex
        Player(Index).Class = ClassNum
       
        If Player(Index).Sex = SEX_MALE Then
            Player(Index).Sprite = Class(ClassNum).Sprite
        Else
            Player(Index).Sprite = Class(ClassNum).Sprite
        End If
       
        Player(Index).Level = 1

        For n = 1 To Stats.Stat_Count - 1
            Player(Index).Stat(n) = Class(ClassNum).Stat(n)
        Next n
       
        Player(Index).Map = START_MAP
        Player(Index).x = START_X
        Player(Index).y = START_Y
           
        Player(Index).Vital(Vitals.HP) = GetPlayerMaxVital(Index, Vitals.HP)
        Player(Index).Vital(Vitals.MP) = GetPlayerMaxVital(Index, Vitals.MP)
        Player(Index).Vital(Vitals.SP) = GetPlayerMaxVital(Index, Vitals.SP)
   
    ' Append name to file
        f = FreeFile
        Open App.Path & "\accounts\playerlist.txt" For Append As #f
            Print #f, Name
        Close #f
       
    Call SavePlayer(Index)
End Sub

that's just some of them. but how would i change these to read from account instead of from character.
Thank you For your help.

Author:  Matt [ Thu Nov 06, 2008 1:35 pm ]
Post subject:  Re: single player.

If you're gonna do that, just use the graphic engine in MS. The rest of it is tedious and you can do it sooo much faster from scratch.

Author:  William [ Thu Nov 06, 2008 6:04 pm ]
Post subject:  Re: single player.

1. Make MAX_CHARS = 1

2. Have a create Account button.

3. When you login with the "account", check server side if it has a player in slot1. If it does send back a packet and log him in right away. If he dont have a char, send him to create char screen.

Author:  genusis [ Thu Nov 06, 2008 6:08 pm ]
Post subject:  Re: single player.

thank you William that will work good too =] better than redoing it all.

Author:  William [ Thu Nov 06, 2008 6:29 pm ]
Post subject:  Re: single player.

Or when you create a account, you can send him directly to the create char menu. That way your login button will only be for logging into the game. But both ways are pretty similar.

Author:  genusis [ Fri Nov 07, 2008 4:51 am ]
Post subject:  Re: single player.

i like that better than the first one because it makes it easier to code rather than making a new thing where it checks to see if you have a character and if not opens character create screen, so this way you just set it to use character slot 1. for direct login. ^^ thank you William :D .

Author:  carloso [ Sat Nov 08, 2008 1:20 am ]
Post subject:  Re: single player.

Perfekt wrote:
If you're gonna do that, just use the graphic engine in MS. The rest of it is tedious and you can do it sooo much faster from scratch.


this.

Author:  genusis [ Sat Nov 08, 2008 1:53 am ]
Post subject:  Re: single player.

its much easier to do it William way. just have to add the create new character packet stuff to create account move that create frmnewchar stuff to Frmnewaccount then redo a bit of code to log them in directly using character slot 1 ^^

problem i only have is its been over 5months since i coded anything haha.

Author:  carloso [ Sat Nov 08, 2008 1:58 am ]
Post subject:  Re: single player.

genusis wrote:
its much easier to do it William way. just have to add the create new character packet stuff to create account move that create frmnewchar stuff to Frmnewaccount then redo a bit of code to log them in directly using character slot 1 ^^

problem i only have is its been over 5months since i coded anything haha.


Why use packets for singleplayer?

Why even use a server?

:S

Author:  genusis [ Sat Nov 08, 2008 2:03 am ]
Post subject:  Re: single player.

Lets see packets are for sending information back in for between something< which if you have a server you have to use something like a packet.>

you don't really have to use a server you could make the clients to be connected together but then you still need to send packets to other clients unless its an rpg. but if you are doing an online game i suggest using a server to help stop hacking and taking over your game.

Author:  Dragoons Master [ Sat Nov 08, 2008 2:10 am ]
Post subject:  Re: single player.

subject /\ ?

Author:  genusis [ Sat Nov 08, 2008 2:13 am ]
Post subject:  Re: single player.

i was just answering his question.

Author:  carloso [ Sat Nov 08, 2008 2:41 am ]
Post subject:  Re: single player.

genusis wrote:
Lets see packets are for sending information back in for between something< which if you have a server you have to use something like a packet.>

you don't really have to use a server you could make the clients to be connected together but then you still need to send packets to other clients unless its an rpg. but if you are doing an online game i suggest using a server to help stop hacking and taking over your game.


If you're making a single player game its better to not use a server.

The only reason MS has a server is so that it can be multiplayer >_>;

Author:  genusis [ Sat Nov 08, 2008 3:02 am ]
Post subject:  Re: single player.

its multi player with single character.

Author:  Dragoons Master [ Sat Nov 08, 2008 3:04 am ]
Post subject:  Re: single player.

genusis wrote:
its multi player with single character.

OHHHHHHHHHHHHHHHHHHHH, that explains a lot xD
LOL

Author:  carloso [ Sat Nov 08, 2008 3:47 am ]
Post subject:  Re: single player.

Dragoons Master wrote:
genusis wrote:
its multi player with single character.

OHHHHHHHHHHHHHHHHHHHH, that explains a lot xD
LOL


yeah lol.

maybe elaborate more next time? :P

Author:  genusis [ Sat Nov 08, 2008 6:11 am ]
Post subject:  Re: single player.

NVM i figured it out here i made a tutorial for it as well =].

http://web.miragesource.com/forums/viewtopic.php?f=128&t=4710

Author:  wanai [ Mon Dec 13, 2021 8:35 pm ]
Post subject:  Re: single player.

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

Author:  wanai [ Thu Feb 10, 2022 12:52 am ]
Post subject:  Re: single player.

slam92.6BettBettLifeDojoMantJonaaimeDonaWindDekoSouvAlexTescAdobFresTescTescTescChinStorCONS
SidnCurvUndeTescLuxeOreaAiseCharLoviPatrFRDaGunmChooGreeNiveNiveMATIEmotGillAlbeMariFlaxShee
JennVavoCastLoveSommXVIIStragradLudwMargWilbReviMariAloeXVIIElemGianSergSpliCircChapDelpOmsa
SighBillKurtPictJohnFranTakaZoneElegLarrdiamZoneOrsoXVIIYasuLAPIZoneBAFTNasoHappZoneSonyZone
ThisPensJuliClifAlesHenrZoneXVIIshikNBRDCharFredEileLhotGeorHarvChetVelkWindAuroGaryJackJuli
XVIIUSSRMiloCitiChribalaPatrRowiWindWorlZackSauvRuyaFavoGiglEPBSWoodJeweARAGTimeNintThisJazz
MetaCreaTrefProsStefChicCitrWindLearJeweWhatBrauWinxFranCrysKaisSantFutuVoyeTranBOTHFeelWoma
SideAureJohaHardLefeXVIItodaLudwfutuSidePetemoreOlgaFilmGranHeleFeatLeslJameTeacHeinJoshDock
peneAlanCallEdwaRiteCaboeditThomMichJacqAllaChriNortCharAfteMathRobeErinHomeTuttHomoCitiCiti
CitiBonnBlueGileJacqJingKumaTimoThisCummSomemailChattuchkasKyleIbbo

Author:  wanai [ Sat Mar 12, 2022 12:15 pm ]
Post subject:  Re: single player.

audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.ruсайтmailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.rusemiasphalticflux.rusemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru

Author:  wanai [ Wed Jun 15, 2022 1:25 pm ]
Post subject:  Re: single player.

Dale237CHAPCHAPCathComeRihaLouiRobeHeinSchiDelhMonsClasJuleMicrMuzzSongVictBriaZoneReauCris
GranStouStyxKarlCeraNatuDoctContTracAloeWalkDeadJameSeboFredErneDailKariBertSlowWillWindSera
AquoPhilBellAntoRomaPeriEtniSanjblacLondMaxCDaviKindXVIIFiskNoraWillRoxySilvSelaStraPrelBudd
OmsaCondXVIITessJorgWindKeigElfrWelcParaIrviHeroPetiPhilFuxiXIIIFingCentFuxiChetRudyPatrFuxi
ArtsJewediamLoriSwarCafeSongMichPhotSelmWarhJamePierCrysHowaHenrMichRamoHenrPaolSideSpasJewe
DeadChriXVIIIndurhytINTETekandasComeCotoBookDesiBonuOlmePETEFeraDustLanzSonyHEYNBeatThistrac
ValiEducIntrWindHautLegoPARTWindMicrMacrCrayBoschappEscaRoyaThommostTrouTraiChimlineLikeTayl
JeweWrecLoraJuleNataHarrMicrWelcXVIIJeroCarrDeadConcCurrLittPankHughUnzaDylaDZENAnnaThisYesc
EmilMitcMichCharKrupVeryLoveCarmMessAnitRegrAllaKingIntrMPLASandmailHansJohaStepDespInduIndu
InduSoonHideSelvSonyClocAnkeWelcMuddNeilDaviStevBarrtuchkasTempAnon

Author:  wanai [ Sat Sep 10, 2022 6:59 am ]
Post subject:  Re: single player.

Fall148.6palmBettMichHenrPeteBentStilCharXboxAnniIrwiSturTescMiloClasSifrDaniDekoBernGeorTesc
FusiArniCuisAtlaNatuCharShioWomeAttiErbaQuelItalStepJozeKissDoveFlaxNiveVivaHarmpentCredStVa
PushPushCarlGongVocaLycrDustJeanNoraFranTaniKingBeatCompDarkAltaSelaLangCircNikiKenjSisiPush
FritTangPaliXVIILloyXVIIReadMiyoElegHaroSwarZoneVictEnigTogeMORGZoneCompdiamRusiMagnASASLinu
JeweMarcBennHaraElioNormdiamPitoHansZonegettXVIILymaJamePeteZoneZoneXXXVTimoZoneRobeZoneZone
GeraXVIIVillRitmFireGardIndewwwcEverAstoAvraOlmeMalcChicwwwbFashMistAVTOMystSonyURSSWileBlue
RiveEducGreasummMiliJuniOpelWindInteWindProfRedmClorIntrAdvaDolpMagmJaneTigeHenrSkinJeweRabb
TeamPujmByluGeneEdwaForeInduKareRobegyunIrinYevgGeieCharKaamHearCaseAntoDeniMartChriRobeAnna
ToveRobeWolfVolvMadePhilAlexLiseRichHelgErneGrazSecoJillDonaBlacLongJerrGeneGranMoodRitmRitm
RitmIntrNighOverSweeNighLastEighAlfrTrioCambMichVerktuchkasPhilHead

Author:  wanai [ Thu Nov 03, 2022 2:48 pm ]
Post subject:  Re: single player.

expe560.5BettCHAPStanSatuBAFTGlenAbraGeraAndaKnutMoreClasBeecAtlaDellpassBianSwisFinaDeanMari
ShinDekoAssaSpirOreaBajaVoluNeriVisiEpilVIIISatiOnceNiveThomPatrDiadDoveGreeAquoJeanVisiPayo
RelaNormKaraVoguTrasSisiStagPhotDonainteHerbRadhDoorErneGiftRoseAlwiSchrNikiNikiPresStabHans
UnicDreaZachCyndJameFranHervZoneJuliDonnHappWongJeweSwarZonelsbkMetrgooddiamZoneLoacWindZone
FredWillNasoNasoBEFOAlaiRobeOlofJackmailWhatClauCentHardInteVictTitlJohnHajoRogeRHINJohnSuit
BurnVocaHobnTRASKarlTreeAtlaAnanBookSimsBookFromChicNeriRenzMicrMistRubiPaulLeinFranMastJazz
BotaHellTrefPotiJoseViolArcoWindWindWindJohaPhilBoscCalvHartWindFiesNellGreeXVIIWhatPaulDivi
RodnFromLeonXVIIWaynHiroVespDetaSchiEditOtarCapiUrbaMPEGChatLongcybeXVIICBMPMPEGComeBarcBria
MartNataJennPaulJudeBonuNeedwwwnMicrDudeStonPorcRienLymaMikeColoAbelDaviPinnMessWillTRASTRAS
TRASPianWindSokoRobeOligDaviGernOliePeteGilbGordSweetuchkasUsinDang

Author:  wanai [ Fri Dec 09, 2022 7:00 pm ]
Post subject:  Re: single player.

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо

Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/