From: Johnathan G. <da...@us...> - 2002-04-08 02:30:15
|
I turned it off; to re-enable it, the driver code must be hacked :P A possible solution is to make a separate SdlDriver that does support repeating Keyboard events, and then the user can either use one or the other. I was thinking about doing that for the networking support. I was thinking about making an input device that adheres to gamekernel's interfaces, and having an SDL driver that uses SDL_net to use implement that input device. It would only be useful for LAN applications, or networked infrared devices, etc. Suggestions? Johnathan On Sunday 07 April 2002 17:50, you wrote: > so it there a way I can toggle it without hacking the SDL code? > > It definately should not default to key repeat, but it *could* be > available as a bonus feature. although since keyrepeat isn't supported by > the GameKernel API, I'm not sure how you would turn it on or off... > > basically you can implement keyrepeat in terms of the non-keyrepeat mode. > but you cannot immplement the non in terms of the other. :( > > therefore, you should choose the most flexible one... > > > The play control is more fluid without the repeating key events, but it > > does work. > > I'm not sure I understand the "but". working and fluidness are both good > right? I'm not sure why you'd ever want the jerkyness (at least with > aster, which was a game designed to be fluid just like quake or unreal). > > @--@---@---@----@-----@------@------@-----@----@---@---@--@ > Kevin Meinert __ _ __ > http://www.vrac.iastate.edu/~kevn \ || \| \ / ` > Virtual Reality Applications Center \ ||.-'|--\\ > Howe Hall, Iowa State University, Ames Iowa \|| \| \`__, > ----------------------------------------------------------- > > On Sun, 7 Apr 2002, Johnathan G. wrote: > > Sort of :p > > The play control is more fluid without the repeating key events, but it > > does work. > > > > If you'd like to compare the differences, comment out the following line > > in SdlDriver.cpp > > > > (132) SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, > > SDL_DEFAULT_REPEAT_INTERVAL); > > > > On Sunday 07 April 2002 05:24, you wrote: > > > does this work without keyrepeat? aster was designed to not use > > > keyrepeat (just like quake, unreal, etc...)... > > > > > > really cool this stuff now... :) thanks for the work! > > > > > > @--@---@---@----@-----@------@------@-----@----@---@---@--@ > > > Kevin Meinert __ _ __ > > > http://www.vrac.iastate.edu/~kevn \ || \| \ / ` > > > Virtual Reality Applications Center \ ||.-'|--\\ > > > Howe Hall, Iowa State University, Ames Iowa \|| \| \`__, > > > ----------------------------------------------------------- > > > > > > On Sat, 6 Apr 2002, Johnathan Gurley wrote: > > > > daren 2002/04/06 14:25:34 PST > > > > > > > > Modified files: > > > > gamekernel/drivers/sdl SdlDriver.cpp SdlDriver.h > > > > Log: > > > > At long last, the SDL driver is now functional. There have been a > > > > few noteworthy changes... 1) The SDL driver DOES support repeating > > > > keyboard events. This works a lot better if a user tries to hold > > > > down a movement key to move forward, etc. > > > > 2) The SDL driver no longer sits and waits idly for messages. It > > > > will Poll devices for new events, and will continue to poll until all > > > > events have been handled. Pretty much it will loop doing this > > > > PollEvent, handle the event by changing the state of the kernel's > > > > input devices, call kernel->getInput()->update(), and then loop again > > > > until all queued events have been handled. Applications should be > > > > aware that more than one input device can change states before their > > > > onUpdate() function is called. > > > > > > > > 3) The flipside to no longer waiting idly for messages is that an > > > > applications onUpdate() and onDraw() functions can be called without > > > > any of the input devices changing states; ie, the user has not > > > > entered any input. > > > > > > > > These methods seem to work really well with aster; check it out! > > > > > > > > Revision Changes Path > > > > 1.10 +31 -19 lib/gamekernel/drivers/sdl/SdlDriver.cpp > > > > 1.8 +4 -4 lib/gamekernel/drivers/sdl/SdlDriver.h > > > > > > > > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/isugamedev/lib/gameker > > > >nel/ drivers/sdl/SdlDriver.cpp.diff?r1=1.9&r2=1.10&diff_format=h > > > > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/isugamedev/lib/gameker > > > >nel/ drivers/sdl/SdlDriver.h.diff?r1=1.7&r2=1.8&diff_format=h > > > > > > > > _______________________________________________ > > > > ISUGameDev-commits mailing list > > > > ISU...@li... > > > > https://lists.sourceforge.net/lists/listinfo/isugamedev-commits > > > > > > _______________________________________________ > > > ISUGameDev-commits mailing list > > > ISU...@li... > > > https://lists.sourceforge.net/lists/listinfo/isugamedev-commits > > _______________________________________________ > ISUGameDev-commits mailing list > ISU...@li... > https://lists.sourceforge.net/lists/listinfo/isugamedev-commits |