Recent Posts

Pages: 1 ... 8 9 [10]
91
Code: (glbasic) [Select]
Remap on a [ps4 fun controller]|Hold [Down] with your primary [Left Stick/Pad]
Remap Controller: [ps4 fun controller]|Dont touch any Sticks/buttons
Remap on a [ps4 fun controller]|Hold [Face Bottom] Button|wait [5] to end mapping
Remap on a [ps4 fun controller]|Hold [Face Bottom] Button|wait [4] to end mapping
Remap Controller: [ps4 fun controller]|Dont touch any Sticks/buttons
Remap on a [ps4 fun controller]|Hold [Face Right] Button|wait [5] to end mapping
Remap Controller: [ps4 fun controller]|Dont touch any Sticks/buttons
Remap on a [ps4 fun controller]|Hold [Face Left] Button|wait [5] to end mapping
Remap Controller: [ps4 fun controller]|Dont touch any Sticks/buttons
Remap on a [ps4 fun controller]|Hold [Face Up] Button|wait [5] to end mapping
Remap Controller: [ps4 fun controller]|Dont touch any Sticks/buttons
Remap on a [ps4 fun controller]|Hold [Back Left Top] Button|wait [5] to end mapping
Remap Controller: [ps4 fun controller]|Dont touch any Sticks/buttons
Remap on a [ps4 fun controller]|Hold [Back Right Top] Button|wait [5] to end mapping
Remap Controller: [ps4 fun controller]|Dont touch any Sticks/buttons
Remap on a [ps4 fun controller]|Hold [Back Left Bottom] Button|wait [5] to end mapping
Remap Controller: [ps4 fun controller]|Dont touch any Sticks/buttons
Remap on a [ps4 fun controller]|Hold [Back Right Bottom] Button|wait [5] to end mapping
Remap Controller: [ps4 fun controller]|Dont touch any Sticks/buttons
Remap on a [ps4 fun controller]|Hold [Dpad Down] Button|wait [5] to end mapping
Remap on a [ps4 fun controller]|Hold [Dpad Down] Button|wait [4] to end mapping
Remap Controller: [ps4 fun controller]|Dont touch any Sticks/buttons
FINISH

Also if dpad was used as a stick, the stick will been skipped (only uses as a hat), as im asume the controller dont have such of one.

Would works like this. Currectly working from logcat. Still working on it. Should show Key rather than button when on keyboard. hihi.
92
im is not intersered for any button combos as this is not what a controller api, like that one im doing is. This is what a game that using the api should do. All im want to do is make sure the remapping is easy as possible and let api do the job when remapped.
 
etc im started on the remapping, and do something like this when a user call it:
Code: (glbasic) [Select]
LOCAL result=GameInput.Remap_ScanCode(1, "a:Face Bottom,b:Face Right:,x:Face Left,y:Face Up")
LOCAL status$=GameInput.RemapStatus$

the result would simply just return TRUE when finished or the user quit. Api does the rest. That include keyboard and joypad. (number 1 is a player).

btw need to deal with the stick. Some controllers might not have a stick, but only a dpad. Those that only have a dpad might have reduced number of buttons. So you can quit/end it anytime. So first you should do is move the stick..... im havent implemented it yet.
93
One small suggestion, as my old lib does it this way, is for each button to buffer each button scan. This would be a list of the button states, discarding the very earliest states in the list, I save the last 2 seconds, of button scans.

This would allow more history of key presses. Examining the list for certain action.

Easy to see if the user is holding down a button, say for in my case a secondary fire mode with a large single shot.
Check for combos, double presses, or even triple presses. Up and down, in quick succession.
Check if he is cheating with an auto fire 🤪

You can obviously do it in the game code but this way abstracts the usual fluff of having to set flags outside the lib.

Good luck with the lib, I've decided to rewrite mine because of some of the points raised here, which is a good thing!  :good:


94
getting more code today. Etc im choosen to uses the digital button and not the analoge trigger on a switch/ps4 for to get more combatible as possible. Those controllers sends 2 inputs, the analoge and a digital one. Im just choosen to take advance of that in this case. Most of time, we dont using the analoge trigger anyway, except its a racing game.....

Also im did a another SCANCODE, like INKEY$, which can been used per player here today (this include both keyboard and controllers). Its seens the button one on the analoge trigger might invoke before the analoge one. This is just to been aware when doing a remapping lol.

Also..... some controllers has AB and XY swapped. Im should do code for that as well as a user selectable. But the game can both disable and enable it. Like using it in menus, but not ingame.

Sooner or later im will also release the code as well. Property later next week.
95
Interesting, sounds good. I have been using my basic controller library for a while now. Unfortunately this thread has highlighted some shortcomings in my own approach...  :'( Seriously though, it will be interesting to see what you finally come up with Spacefractal.
96
its would been something like that, but of course with only the input a game would need.

Also that string based system did caused the code to been vastly shorted with fewer lines, since only the init and a function take care most of it really.

Also im will also see how im can save the code for a controller, so people a least could tweak it, even there is no remapping feature in a Windows game.

Today im implemented keyboard keys as well. On Android, its would been keyboard only of course as this would been easier its should, that way im impleneted using KEY(), while its why a outout is from 0-128 rather than 0-1.

But all in all, its totally impossible to support every gampad, but 99% of times, remapping should do the job. That is the main goal here. This time the utility should do this for you as well. even for each player.

btw, for standard, its of course ps4, switch and xbox. the main layout would been  after ps4, not xbox. The main thing here, its depend how the trigger is used (on Ps4, 3 axis returns -1 on 3 axis, while a xbox does do that).
97
Looks good.   :good:

Yeah, my 8bit do pro 2 wired is not in the controller database either(even though Valve uses this DB for Steam) but my Xbox One controller is.

Better to cycle through a diagram of a generic joypad, highlighting buttons and asking the user to press(or skip) the equivalent button on their controller, to make custom templates. Maybe setup some of the more popular ones by name by default. Xbox, Ps4 for example.
98
Looks different than me. This cause its very important to also possible to remap on controllers, so you can support them all, regaardless thier configuration.

etc im will improve GameInput and clean its vastly up and also would been possible to remap keyboard too with the utility in same method with a String. etc a was seen as axis, while b was a button, then im uses k for a keyboard button....

Etc im will uses a screen like it.

PS. IM guess its could been looks much better.
99
This guys got quite a few vector art based ones...

https://zacksly.itch.io/

There CC By 3.00 license, so you can share if credit is given.

Oh and here is the 8bitdo Pro 2...
100
Im consider im should a little seperate remapping utilty you can uses for the game, rather than doing it from ingame. In that way GameInput could automatic tacle that rather than the game needs to do the same.

Howover can somebody draw a nice controller image that resemple a controller that could been used from a big compony, which should should like a generic controller.

Something like this in the same resolution, but without colors and antialasing:
https://opengameart.org/content/generic-gamepad-template

Then im will give it a try. Im also could do same kind of utility for key binding as well.

By now the utilty would been Windows only (but im will include the source code of course).
Pages: 1 ... 8 9 [10]