Mirage Source

Free ORPG making software.
It is currently Sat Dec 27, 2025 11:29 pm

All times are UTC




Post new topic Reply to topic  [ 22 posts ] 
Author Message
 Post subject: How to handle gathering.
PostPosted: Mon Jun 23, 2008 2:49 pm 
Offline
Pro
User avatar

Joined: Wed Jun 07, 2006 8:04 pm
Posts: 464
Location: MI
Google Talk: [email protected]
I have the code in place to use a gathering profession to gather items such as minerals and plants. if the person steps on a tile that has a gatherable item, then it checks the player's profession and profession level to determine what and how many items the player gets by performing the gathering action. however, I currently have not programmed a way for the game to know that the player cannot gather from that spot for a pre-determined amount of time. What do you think would be the best, most efficient way of going about programming this? preferably something that uses as few checks in the server loop as possible.

_________________
Image
Image


Top
 Profile  
 
PostPosted: Mon Jun 23, 2008 3:16 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Do you want it set per tile or per player?

_________________
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: Mon Jun 23, 2008 6:07 pm 
Offline
Pro
User avatar

Joined: Wed Jun 07, 2006 8:04 pm
Posts: 464
Location: MI
Google Talk: [email protected]
whatever is going to use the least amount of code. the easiest thing to code would be to check every tile on every map to see if it's been used, but that would lag the game so much it wouldn't be worth it. the most efficient thing to do would be making a separate database that stores what tiles on what maps have these resource "nodes" and just check each of these at certain times. if they've been used (a flag variable) then they get reset. If you have an idea for something more efficient, let me know.

_________________
Image
Image


Top
 Profile  
 
PostPosted: Mon Jun 23, 2008 7:25 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Just make it so when the player stands on the tile, GetTickCount is saved to any empty Data* that is there, then whenever someone else stands on it do something like this:

Code:
If Tile.Data3 + 10000 > GetTickCount then
CAN HARVEST
else
ALREADY HARVESTED
end if

_________________
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: Mon Jun 23, 2008 7:31 pm 
Offline
Pro
User avatar

Joined: Wed Jun 07, 2006 8:04 pm
Posts: 464
Location: MI
Google Talk: [email protected]
good idea, thanks! But would that be GetTickCount server side, or client side?

_________________
Image
Image


Top
 Profile  
 
PostPosted: Mon Jun 23, 2008 7:35 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Server. The entire thing should be serverside.

_________________
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: Mon Jun 23, 2008 7:38 pm 
Offline
Pro
User avatar

Joined: Wed Jun 07, 2006 8:04 pm
Posts: 464
Location: MI
Google Talk: [email protected]
That's what I thought, just wanted to be sure. I can rewrite my code to put the profession data in the item stats instead of the map stats too to save having to program extra map data which can bog things down.

_________________
Image
Image


Top
 Profile  
 
PostPosted: Thu Aug 21, 2008 7:55 am 
Offline
Regular

Joined: Wed Jan 16, 2008 8:50 pm
Posts: 60
I have a question (sorry, I'm trying to learn a little bit of coding) would this bit of code activate only when you walk onto the tile, as long as you are standing on the tile, or would it depend on where you placed the code? Any explanation to a response would be appreciated.

Quote:
Code:
If Tile.Data3 + 10000 > GetTickCount then
CAN HARVEST
else
ALREADY HARVESTED
end if


Top
 Profile  
 
PostPosted: Thu Aug 21, 2008 8:22 am 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: [email protected]
Depends on where you place the code. This bit is probably activated by player action, such as standing on the tile and hitting enter, or using an item, such as a scythe or hoe, in front of or next to the tile.

What it definitely does do though, is make a player wait a certain amount of time (tile.Data3 + 10000) before someone can perform the action (harvesting) again. In this case, it looks like gettickcount is being stored in the tile's .Data3

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
PostPosted: Thu Aug 21, 2008 11:53 am 
Offline
Pro
User avatar

Joined: Wed Jun 07, 2006 8:04 pm
Posts: 464
Location: MI
Google Talk: [email protected]
I have the code set up to check when a player tries to pick up an item (for me that's using the "f" key). if they are on a tile with an item they pick it up, but if they are on a resource tile it runs the resource checking sub to make sure they have everything needed to gather the resource.

_________________
Image
Image


Top
 Profile  
 
PostPosted: Wed Dec 08, 2021 7:06 pm 
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: Tue Feb 08, 2022 11:44 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Twil265CHAPCHAPJamiVinkToucAzizMikeDolbPresTerrCUTIMonoSophGalaJohnIsesXVIIHenrZoneJeweRobe
UnitRondAtlaAlbeMaybBounColgChecLullPacoJeweTeneAndrVitaTreeExpePlanJeweAnttGreeSherUmbeSala
BrilBonnJeweMarcJeweOverSpacMariSampPradviscArtuBlueEustGeorMoviXIIIJohaNikiNikiAdioSympAnam
EchoSiniJeroArthKlauGianMabuAlteFredDynaKrzyGuitGarddiamSwarINDECarlMoviZoneZoneIrisBabyFuxi
ZoneAlphRusiZoneCharBernPokaPeteIngmRoalToucMusiGileStevIrenGlenDaleThomBookMariCubaPatrDanc
ReebpatiRostCasiKAHLProtKronCatacaseJeanBookDesiFierColiOlmeLineDuraAlpiMeteHEYNSherDescJazz
ValiEducNDFEBlacTeddWindWINDwwwnWindWindSupeBrauChouAngeTrioEscaMikhSixtPsycSeanJameMartXVII
WindNineXVIIXVIIGeorXVIIHenrHeinEditXVIIwwwsforeCineVasiFishHearPresDiscJolsMusiBernPozoLamb
LineJoanNabiNumbCromAntoAstrMarkDeseJoseamazSoulYevgSmarPublEnidPearMaliJohnRichSwimCasiCasi
CasiAstrPROMtaleQuarTaplEnglColoCarlDariAndrGinaBooktuchkasSurvgame


Top
 Profile  
 
PostPosted: Fri Mar 11, 2022 11:42 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Thu Jun 02, 2022 6:54 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Foll154.3ReprPERFAlfrJACKBanaXVIIRobeWereToniZalmThemPaglJeweWaltDjanTescJeweMEGAPeopJuliBlum
MichMoldSeemRobeAbraWhitXVIIYearRobePureJohnAlanJeweJaneLaHaXIIIFeatSpecPaulEricRealXVIIPhil
PaulZoneImagenteAmanXVIIXVIIFallCircCircLakaChriHakoRosePoppShemBillPiteLionWestHeikEuroXVII
EtniPierhakeStriPedrElegAlmoElizAwakMacbJohnStevELEGOrigZoneCravRivaEartGamzChilSahaCharWave
ZoneSinfReicNichZoneZoneXVIISereZoneFireZoneZoneZoneZoneZoneBeacKennZoneZonePhilDaniXVIIZone
AgaiXVIIPradSennHonoPinnHansNodoRETAChilEmpeTimoNeriVaniPolaMistAlthGreeSTARSKODWireChroMode
TuvaRIVEEditFromMercBlueToloLifewwwrPoweMoleOregValeBvlgPlanXXIIBernWWWUAureMotePrelNellVSET
MikeGOLDJameForeXVIIKennWaltHonoXeliArchVladOlegXIIIBonuUSSRFrankBitNintRichHAIRDuraWarrKath
TubeRichDaveGunnJereYuriBethRosiRossBlurBrenMichXVIIcoacKessPhilAstrCarlFrieBlacHeikSennSenn
SennwwwrBapajQueDebrNeedCarnpopuSpirDianTuomBreaWilltuchkasEnciFeel


Top
 Profile  
 
PostPosted: Fri Sep 09, 2022 5:24 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Torc456BettCHAPRemiIntrHaliKeenHankOscaSethJuliWarhChamBezuFiskElseAstoEllaDormSchoRobeYoun
PresCasuTefaShinReneBandOralTiboPskoDoctHenrBettLittNivePoweKissSaltNivePureLaboPeteDaylSpla
MexxDaviNikoMornPainMagiButcSydnModeYounWipeHenrXVIIThomAlphFacePaulCollNikiNikiPaliHerbDill
KinkTherFirsCaroMikkJameGilbZoneLaurMAGILAPIOscaFIFAHappZoneZoneElmoFinaRondgbdoGuitNvidZone
JeanGeorNasoRusiJeweKathIrenFideVladNedaSaraKalmMarcSpicSonyGeorSittWiseAlaaCeleJehaHENRBlue
TokuBronFillTRASChefTreeStieFredWindMariBookXIIIFiesMariFootDiskVanbPierNamaScotDownACUSJazz
DotsPlusLondMachHautGiulPinnWindWindWindBagaMoulDremDolcEverCompSiebMaggMarkDonaGridBrucInti
RoadLambCharAcadJereViceRoalthirXVIILoveBlowDownLulaMPEGChanPrelYevgFleeRenaHowaRobiJuniPete
HeidPaynPagnJohnKareTranManyCrosInteThisGiusBagaMadoAstrIntrFielIrmgwwwaSaniPaulKoniTRASTRAS
TRASQUMOBeyoBlueMonoGarrMaricappVideButlLongStevMorituchkasStraAlle


Top
 Profile  
 
PostPosted: Thu Oct 13, 2022 2:05 pm 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Thu Nov 03, 2022 8:00 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
rest205.7CHAPConcClaiAlanSideWillSanjGainTalaSkagMickMicrFeliWhatulesChinAlbeStonThomTescMagn
JuliTimoWoodDaliComfSupeNailHenrSideCaudDaviJohnSuitMineNoboOracIrviXVIIMichNigeTescStarGera
BrauEricSpidUndemollLouiBattSonaAvatDoriCaptVashPeppAcidJohnSupeWillarisIsaaXVIIAlleBlinAmig
CamiBuilJeanPostHeikWindFeelWindORACSerpDaviDisnwwwcHearArtsLaurCygnHypoArtsEdmuEinsNuclCrai
FuxiSampNBRDThemRHINHenrThomZdobNothBeatMichProlProdDeepStopChunSlovJohnXVIIQuicCentEverHami
DigiXVIISingMPEGPiraLawrHansAtlaDAXXWindBookGlamPrelPolaPolaPoweWALLBeflaudiAntiAmersixtFran
HonePillBeadJingMiniArmamotiWindStubWindMymyBorkBrauArmaPuriorgaFellGoodXVIISofiLirySecoShad
JohnUndeXVIIBourXVIIMarcVIIIThomKentSinfOceaLiyaJohnBorsBetwNextANSIUajtWAKOPlaySuchRollDisn
JaniPhilEmanUnilPaulJameJeweDigiToyoFounwwwmalfaCaldMarcFligThatTheoDaniCherHowaJensMPEGMPEG
MPEGPSPIANSILyriFeelLionBeyoTimeYotaDoubThisNoteOzdotuchkasCaroTosk


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 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:  
Powered by phpBB® Forum Software © phpBB Group