Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[PRInput] New Faster Input Module

compile everything??? isnt that pretty much what he did?
the only thing i dont think he did was the execution (Input.press? blablabla) which cant really be changed as even thats exactly what the original module does / uses... i think that its good enough as it is anyway XD (its only an input module after all)

next thing hes gotta do is make a blit blitting function for an x11 window (let my cries be heard XD) - openGl for the win!!!
 
no way can that be... coz my results from MY input module are:
t = Time.now
10000.times do
  Input.press?(Input::A)
end
print Time.now - t

and the resturns 0.063

no offence but either you got it wrong or have executed the code in a strange manner / place or these input modules just plain suck...

*EDIT*

sorry i was using ruby for this test - but still the VX version - which is exactly the same - returns 0.094 on the same test so SOMETHING is seriously wrong here...

*EDIT AGAIN*

and the default returns 0.015... what the hell did you actually test???
i think you should recheck what you did and try again as currently, for 10,000 presses, its:
default - 0.015
mine - 0.094 / 0.078 (switchs between them randomly... but usually 94)
this one - not sure... havnt downloaded
Hey mechacrash, the speed depends on the computer of the tester. So slower computers will need more time.
Here are my tests on RMVX of various Input modules, including mines. The test consist on FPS on the same map, title and menu for all scripts, and 10000 times test for various Input methods.
=== Default Input ===
FPS Title - 60
FPS Map - 40~42
FPS Menu - 23~27
10000 - Input.update
  0.328
10000 - Input.press?
  0.032
10000 - Input.trigger?
  0.031
10000 - Input.repeat?
  0.031
10000 - Input.dir4
  0.032
10000 - Input.dir8
  0.031

=== PR Input - Added all 255 Keys ===
FPS Title - 56-58
FPS Map - 36~39
FPS Menu - 23~25
10000 - Input.update
  5.688
10000 - Input.press?
  0.109
10000 - Input.trigger?
  0.109
10000 - Input.repeat?
  0.109
10000 - Input.press? - For all keys
  33.250
10000 - Input.dir4
  0.172
10000 - Input.dir8
  0.187

=== Poccil Input Module 255 Keys ===
FPS Title - 13-18
FPS Map - 9~11
FPS Menu - 11
100 - Input.update
  0.969 - Estimated 10000 times = 96.690
10000 - Input.press?
  0.610
10000 - Input.trigger?
  0.531
10000 - Input.repeat?
  0.641
100 - Input.press? - All keys
  1.516 - Estimated 10000 times = 151.600
10000 - Input.dir4
  2.968
10000 - Input.dir8
  1.984

=== Near Fantastica Input 255 Keys ===
10000 - Input.update
  33.328
10000 - Input.press?
  0.031
10000 - Input.trigger?
  0.078 Doesn't work well
10000 - Input.repeat?
  Doesn't have
10000 - Input.press? - All keys
  8.954
10000 - Input.dir4
  Don't have
10000 - Input.dir8
  Don't have

=== Aleworks Input Module 2.03 255 Keys - Mine ===
FPS Title - 9
FPS Map - 7~8
FPS Menu - 7
100 - Input.update
  2.078 - Estm 10000 = 207.800
10000 - Input.press?
  0.250
10000 - Input.trigger?
  0.121
10000 - Input.repeat?
  0.109
100 - Input.press? - All keys
  0.640 - Estm 10000 = 64.000
10000 - Input.dir4
  2.719
10000 - Input.dir8
  10.031

=== Aleworks Input Module Lite 255 Keys (I am still developing it) ===
FPS Title - 41~42
FPS Map - 21~23
FPS Menu - 21
10000 - Input.update
  52.219
10000 - Input.press?
  0.125
10000 - Input.trigger?
  0.125
10000 - Input.repeat?
  0.187
10000 - Input.press? - All keys
  33.563
10000 - Input.dir4
  2.094
10000 - Input.dir8
  6.937

And the results are: Default Input is the fastest one, but doesn't have all the keyboard keys. So I must congratulate you RTH for this idea, because it is the fastest input script which includes all keys. However the repeat? method doesn't work well, nor the dir4 and dir8. Try walking with 2 keys pressed at the same time with the default and your input script.
 
haha... i was wondering how long it would be before someoone with the knowledge of APIs such as yourself (vgvgf) would turn up... and thankfully you did what i really couldnt be bothered to do XD

still im surprised at some of the results (especially your input modules - they dont seem to fair well against the others, though they have ALOT of functions aswell as requiring a MASSIVE Aleworks / API module aswell... on the other hand how the hell did you get the results at 41-42 / 40 fps??
 
mechacrash":2l6x9kfe said:
haha... i was wondering how long it would be before someoone with the knowledge of APIs such as yourself (vgvgf) would turn up... and thankfully you did what i really couldnt be bothered to do XD

still im surprised at some of the results (especially your input modules - they dont seem to fair well against the others, though they have ALOT of functions aswell as requiring a MASSIVE Aleworks / API module aswell... on the other hand how the hell did you get the results at 41-42 / 40 fps??
I got 40+ FPS, because you didn't read this: "Here are my tests on RMVX...".

PD: The "MASSIVE Aleworks" Library is just a kind of compilation of features I use in my scripts, or I will use in some planned scripts. My Input script just uses only few functions/APIs from it.
 
*PD: The "MASSIVE Aleworks" Library is just a kind of compilation of features I use in my scripts, or I will use in some planned scripts. My Input script just uses only few functions/APIs from it.*

yes but it includes the entire thing at the beginning thus making the script slower, simply using partial library functions (through my own tests) seems to speed it up dramatically... also the VX thing was a follish mistke on my behalf... i never really used VX before moving onto ruby itself so hey... i didnt even remember about the fps increase... XD
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top