Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I updated Patches.zip with Build 1903
it has an improved support XBox controllers (if you are interested)

it finally arrived today:  turns out both shoulders use the Z axis
still needs some adjusting  and I still need to account for possibly multiple controllers ones plugged in
but at least now you can move and aim at the same time

of course I'm assuming that all XBox controllers use the same input setup 🤔

Great work, I think this can be productive used by any user!  it was a good idea to handle the triggers as buttons and not as axis. I am not the right person to tell you the best (most common) defaults but it seems to work very well.

In my opinion the assignable actions are complete but maybe someone could wish quicksave/load
D-Pad diagonal does nothing, doing both would be better at least if you move with it
I would call the "nubs" left and right stick

To name the buttons 1-12 is safe but which controllers for Windows really exist which have a complete other button layout than XBox? For me it would be nice to call them what they are: X, Y, A, B, shoulder, menu, start,...

I searched for my "gamepad mouse" code for cursor movement in the menu, it's in a very odd Basic dialect but should be readable as pseudo code.

Proc Joy_StickMouse
  parameters device&, axis1&, axis2&
  declare newx&,newy&,dist&
 
  'bring rest position from 32767 to 0
  joy_x_raw! = Joy(device&, axis1&) - 32767
  joy_y_raw! = Joy(device&, axis2&) - 32767

  '6,25% deadzone
  if (abs(joy_x_raw!) < 2048)
    joy_x_raw! = 0
  endif

  if (abs(joy_y_raw!) < 2048)
    joy_y_raw!= 0
  endif

  if (joy_x_raw! <> 0) OR  (joy_y_raw! <> 0)

    'set new cursor position
    newx& = %mousex + min(24,(joy_x_raw! * 0.0005 * (1 + joy_mouseacc!)))
    newy& = %mousey + min(24,(joy_y_raw! * 0.0005 * (1 + joy_mouseacc!)))
    SetCursorPos(newx&,newy&)

    'calculate acceleration based on "distance" last input
    joy_mouseacc! = joy_mouseacc! + sqrt(abs(int(joy_x_raw!)*int(joy_x_raw!)) + abs(int(joy_y_raw!)*int(joy_y_raw!))) * 0.0000025
  else

    'no input? reset acceleation to stop movement immediately
    joy_mouseacc! = 0

  endif
EndProc