Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #37801
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Game loop losing fast key presses |
| Date | Sat, 16 Nov 2019 21:21:23 +0000 |
| Organization | A noiseless patient Spider |
| Lines | 19 |
| Message-ID | <87pnhrikks.fsf@bsb.me.uk> (permalink) |
| References | <d1816a5d-ec3c-4f41-ac3a-c4cd96c8f788@googlegroups.com> <g9ru1qe6qi7j.bpid4srhpodm.dlg@40tude.net> <8675e9ad-cdfa-4490-9236-c733637de017@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | reader02.eternal-september.org; posting-host="be2541e1a9b03a313fb1efc4d4a352c5"; logging-data="9925"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/NNLjswa8US9r+RWGrUwwlLW93mgjoFXM=" |
| Cancel-Lock | sha1:d10J9FbpEQ8oqpNx2YYlL1RXOCQ= sha1:2RLMwiocx6RLlA1YkohRoZ6w0u0= |
| X-BSB-Auth | 1.8ae7aa3ea5987b714b87.20191116212123GMT.87pnhrikks.fsf@bsb.me.uk |
| Xref | csiph.com comp.lang.javascript:37801 |
Show key headers only | View raw
luserdroog <luser.droog@gmail.com> writes: <cut> > That's interesting. I think I can make that work. So the fact of the > keypress propagates through a few layers until the inner game loop can > handle it. > > If I make it an integer then the keydown can increment it and the game > sets it to zero. That way the game can respond to multiple taps when it > gets around to it. Surely you have more than one key that matters? If so, you can't just count the presses because the order will most likely matter. You need a small queue of key actions that gets processed when the app can get round to it. (Jumping in here, so I may have missed the point.) -- Ben.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
Game loop losing fast key presses luserdroog <luser.droog@gmail.com> - 2019-11-15 10:22 -0800
Re: Game loop losing fast key presses "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-11-15 11:03 -0800
Re: Game loop losing fast key presses luserdroog <luser.droog@gmail.com> - 2019-11-15 21:05 -0800
Re: Game loop losing fast key presses JJ <jj4public@vfemail.net> - 2019-11-16 12:07 +0700
Re: Game loop losing fast key presses luserdroog <luser.droog@gmail.com> - 2019-11-16 12:27 -0800
Re: Game loop losing fast key presses Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-11-16 21:21 +0000
csiph-web