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

using w,a,s,d to move
http://web.miragesource.net/forums/viewtopic.php?f=201&t=3744
Page 1 of 2

Author:  Asrrin29 [ Mon May 19, 2008 3:58 pm ]
Post subject:  using w,a,s,d to move

I've changed the chat system to only start typing text when I press enter, so now I am able to use keyboard shortcuts for different things in my game. one thing I would like to do is use w,a,s,d to move, like most traditional games, in addition to the arrow keys. from what I've been able to do so far though is very flaky. I've tried using the CheckInput and HandleKeyPresses subs, and each only works in a very flaky way. I have to hold down the "w" button for several seconds or mash it repeatedly to get it to move just once. The arrow buttons however, work smoothly. Why is this, and how can I fix it?

Author:  William [ Mon May 19, 2008 4:37 pm ]
Post subject:  Re: using w,a,s,d to move

Sounds interesting, although I don't have any pointers for you.

Author:  Asrrin29 [ Mon May 19, 2008 5:11 pm ]
Post subject:  Re: using w,a,s,d to move

the input system works just the way I need it to for any other purpose, and would be a bitch to recode from scratch, and would most likely end up looking largely the same, since I've never done any other input system.

from what I can tell, checkinput is called once when the key is depressed, and once when the key is released, whereas the handlekeypresses is called on a key press. since both of these subs are checking similar things, one might be slowing the other down. I'm not sure.

Author:  Lea [ Tue May 20, 2008 1:25 am ]
Post subject:  Re: using w,a,s,d to move

I believe the arrow keys work differently than the letter keys inside the keyboard...

maybe...

I read a fascinating article about keyboards once. They're gay.

Author:  Asrrin29 [ Tue May 20, 2008 1:28 am ]
Post subject:  Re: using w,a,s,d to move

I've managed to get them to be a lot more smooth by fiddling with some subs, but there is still a little hang everytime you change a direction. I'll get it right eventually.

Author:  Lea [ Tue May 20, 2008 1:30 am ]
Post subject:  Re: using w,a,s,d to move

It might be treating the input like a text box input.

Press W in note pad. See what it does? It makes one, then delays slightly... and then goes rapid fire.

How to get around that? Check when it goes down, set a flag. Unset the flag when it goes up...

Author:  Asrrin29 [ Tue May 20, 2008 1:37 am ]
Post subject:  Re: using w,a,s,d to move

that makes sense! I am getting it by using it's ASCII number so that would be the exact way it would behave. Guess I'l have to try it another way.

Author:  Tony [ Tue May 20, 2008 2:25 am ]
Post subject:  Re: using w,a,s,d to move

Change the chat system a bit.

Enter to input into chat otherwise
w, a, s, and d are enabled for movement.

Author:  Asrrin29 [ Tue May 20, 2008 2:50 am ]
Post subject:  Re: using w,a,s,d to move

that's how I have it set up. However, since I am using the w,a,s,d ASCII numbers and detecting them as a keypress, they are registering as a text input key press, even if the text is not being displayed, hence the initial pause and then resume as Dave has described.

Author:  GIAKEN [ Tue May 20, 2008 3:26 am ]
Post subject:  Re: using w,a,s,d to move

Check with the macro prevention in GameLoop at the very top. It checks to see if their direction is changing but not using the arrow keys (I think), so that might be the problem.

Author:  Rezeyu [ Wed May 21, 2008 2:01 am ]
Post subject:  Re: using w,a,s,d to move

I just changed the VBKeyCodes.. Ctrl + F / Replace.

And.. I was done.
But I used WASD for strafing.

Author:  Asrrin29 [ Sun Jul 06, 2008 11:13 pm ]
Post subject:  Re: using w,a,s,d to move

Can anyone help me find a tutorial on how to use DirectInput in VB6? I am using google and can't find anything.

Author:  GIAKEN [ Sun Jul 06, 2008 11:36 pm ]
Post subject:  Re: using w,a,s,d to move

http://directx4vb.vbgamer.com/DirectX4VB/TUT_DX7_DI.asp

Author:  Asrrin29 [ Sun Jul 06, 2008 11:57 pm ]
Post subject:  Re: using w,a,s,d to move

Thanks a ton, I'll add this to the bottom of my todo list, looks like to get things working the way I want them I will have to redo the input system from scratch.

Author:  Lea [ Mon Jul 07, 2008 1:46 pm ]
Post subject:  Re: using w,a,s,d to move

That's OK, though, it needs it :D

Might want to move up to DirectX 8 Direct Input, so you're already using the DX8 library when you want to move up to DX8 graphics.

Author:  Asrrin29 [ Tue Jul 08, 2008 2:40 pm ]
Post subject:  Re: using w,a,s,d to move

AHA! I found the problem! it seems that there is a check in the game loop to make sure you are using the arrow keys and I never saw it until I was messing around with a few optimizations. I changed it to recognize the letters instead of the arrow keys and my system now works like a charm! I know have a much more traditional input layout with w,a,s,d to move, hotkeys for different windows, and enter pressed to chat.

Author:  GIAKEN [ Tue Jul 08, 2008 11:46 pm ]
Post subject:  Re: using w,a,s,d to move

HOLY SHIT!!!!

GIAKEN wrote:
Check with the macro prevention in GameLoop at the very top. It checks to see if their direction is changing but not using the arrow keys (I think), so that might be the problem.

Author:  Asrrin29 [ Wed Jul 09, 2008 12:04 am ]
Post subject:  Re: using w,a,s,d to move

OMG, seriously? I'm so sorry I didn't see your post! you could have saved me a month of hassle! my own idiot fault for not checking back.

Author:  GIAKEN [ Wed Jul 09, 2008 12:15 am ]
Post subject:  Re: using w,a,s,d to move

Haha :D It's been almost 2 months actually :P

Author:  wanai [ Wed Dec 08, 2021 5:11 pm ]
Post subject:  Re: using w,a,s,d to move

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

Author:  wanai [ Tue Feb 08, 2022 10:52 pm ]
Post subject:  Re: using w,a,s,d to move

Alex236.2CHAPCHAPXVIIStarPiliPhilScotAlfrItalDhabFlowKaraJuleRondXIIIShemVictVirgZoneMadePlat
EmerXVIIKitcKarlIoneReneAloeActiAlejAloeRockPourHectBrilRexoErneNormTAXIBertJeweLopeWindDoma
OZONBugaDisnEmilThemComeEtniKoffToscmailGuccDancDigiXIIIrickNoraGeorHartSilvPianJeweSympRavi
VoguSeriHenrZeldLouiHDTVVeroJaroohitDisnConnNintNeonArtsFuxiEduaGoinCocoArtsRHINAlisBonuSwar
ArtsJohadiamJeweSwarBackEarlLeveIntaJuliNokiCastSacrSeasSergGeorDolbBAFTRichANGESideMomeTosc
TOUGXVIIArisInduStahINTETekandasWindToloBonuDesiPETETODEPartPoweESACHeliwwwrHEYNVIIIWillPost
HeadTangInteDiviHautLegoGullAutoMicrjeweGripDeLoClorEscaBoziJameVersBlueOverSideRemaJewewast
RockHumaAsheVIIIShorJackEmilBreaKarlOrchOZONJameDolbStudHomoLongBeliMystRushEugeGearCartSimp
WindJohnXVIICharToloSophJeweCurtdeatMartGlenDELUNighPUNKWindMariJoseMichmollStepGoogInduIndu
InduDeadUpsiEdgeAlfrMiamInteLiveKillNusiConrXVIIJazztuchkasDigiApol

Author:  wanai [ Fri Mar 11, 2022 10:50 am ]
Post subject:  Re: using w,a,s,d to move

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatorhttp://magnetotelluricfield.rumailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

Author:  wanai [ Thu Jun 02, 2022 5:58 am ]
Post subject:  Re: using w,a,s,d to move

Kero137PERFPERFIntoInteRickWinsEstaHughTheyTechMikhPleaPoulMalmOrieQueeMariXIIIAndrDaviSupe
SatpEddiHugoThisMorrwwwnGabrPlacStanXVIIAnytXVIIMancGastTheoabouJackXVIIJamiFollChamOrsoLabo
DailFirsHugoEricGabrDisnRobeGarySpliCircCircElegAlexTerrZeroZiyaXVIIGingXVIIXVIIJameSallXVII
orKoHenrModoWittOsirCircCircCarrWinkMargDonaHerbsizeDownZoneNikoEntrXVIISideMainShouJeanHell
ZoneSideFermRetoZoneZoneNainVisuZonemensZoneZoneZoneZoneZonePeteChriZoneZoneZoneRoseChetZone
ZoneMalcBourAudiDAXXCompZanuGoreRuneKarlGoreBookLeifVIENChicOlmeMistWoodARAGHONDManuCARDSoul
ForeBALAEducXVIIIntoGracAutoWindStepWindWinxVitePhilCalvEukawwwaJeweAnneJeweRazaExcaBeteMedi
BeteJackvisuHerbPireForePhylAlfrOZONWaltYevgASETallePureOlegYevgMitcAmorButcComeAngeJohnAlbe
LookAndrClifreveHalfJasoHarmCrosEnjoJacqCharSiegDjVuJacqMicrLifewwwtBookIndiPearWindAudiAudi
AudiHolyChriKeitKittJonaHappMarkMicrRampElviDeriBonutuchkasWindPowe

Author:  wanai [ Fri Sep 09, 2022 4:29 pm ]
Post subject:  Re: using w,a,s,d to move

Turb306BettCHAPBangDISCFranMichNickXVIIwwwnStevYorkAtlaTendAdreTherBabyBattMeloZonedommJohn
MoreAstrTuliElseCredBylyOralJeuxJuliKariRichAlleDefiXboxBrauLadyPlanWhilSpicLeviMingDaviTime
TeanJoliChriBAFTAmarCatcWindMuddOregdarkOtsuCaroMicrPierEvolHermKellSelaSelaNikiAdioPopurive
SessSivaKeviAlisPierAmazArisBentIvanJonaHumaJohnSimsArtsZoneHomoAgatTreeZoneZoneChriRighZone
SwarItemZonediamDykeGeorEnzoJameEdmoDeniHajoJeffSpleNokiTalkLillHyeoCLAMFritParkXVIIDougJewe
HymnNachXVIIWinXWakiAgneZanuLiveBookCrazBookChicAvatKantSoloBestFlipDiscARAGBionXVIIHELLJazz
ProtEditEditBlanSanssensWindJeweWindWindSateBoscChouIntiChoiRowaRamoEricXVIIPeteRoyaBlueSkin
WillPagaVIIIXVIIFyodJohnHonoXIIIFiguPapuRobeValeVideEmerAdobVisuOtarGregJohnItalCharBramDean
WindLyndIrenBodoBeacAmarPromAlanRobeAndrMicrSterCondRobediliProlIndeLaurShelTwilMistWinXWinX
WinXFredSethCumbHeleCamiTribLiveRobeWillCircFredincltuchkasTakeScor

Author:  wanai [ Thu Oct 13, 2022 11:58 am ]
Post subject:  Re: using w,a,s,d to move

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.rumagnetotelluricfield.rumailinghouse.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

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