Author Topic: Controller support for blockland using Xpadder  (Read 2899 times)

i added controller support to Blockland with Xpadder and triggered control scheme switching

Media Fire link: https://www.mediafire.com/?mgiwiwi2xoo2xqw

Puush link: http://puu.sh/ivvsP/f44f56bca7.zip\

Xpadder website: http://www.xpadder.com/



Video: https://www.youtube.com/watch?v=hFL9E9VAsyQ



Controls:
You're going to want to change the Inventory up, down, left, and right controls to I K J and L for this to work correctly

Standard Controls


Building controls


Paint/Brick menu controls
paint controls are just standard but the numpad is used to select colours and the brick menu is just everthing but X A and RT and LT scroll up and down



Feel free to edit and release your own control schemes
« Last Edit: June 19, 2015, 11:25:07 PM by TreeAtmos-2:55 »


They said it was impossible. I wish i had one of these controllers, ive always wanted to use a controller for blockland

They said it was impossible. I wish i had one of these controllers, ive always wanted to use a controller for blockland
how do you not have an xbox controller

how do you not have an xbox controller
I don't have a controller because I've never needed one
lots of people are the same way
(personally tho i want a steam controller, mmmmm...)

TGE actually does have native controller support. I made a script that let me play with a standard Xbox 360 controller just fine a few months ago, directly in the game. Proper sensitivity on movement/aiming and all. I don't really see the need for Xpadder unless you're using a knockoff controller.

TGE actually does have native controller support. I made a script that let me play with a standard Xbox 360 controller just fine a few months ago, directly in the game. Proper sensitivity on movement/aiming and all. I don't really see the need for Xpadder unless you're using a knockoff controller.
you should actually release this, it would be really useful

They said it was impossible.
idk if anyone says it's impossible to execute, it's just difficult to execute well and have the game actually be fully playable

like port says, TGE supports controller input, so it's totally poss to make a controller support mod if one so desired. actually making the player control is the easy part

and you get proper joystick support instead of translating it to button presses

you should actually release this, it would be really useful
It's pretty easy to do, just spend a hour or so remaking it to your liking.

you should actually release this, it would be really useful

Doubt he will..

you should actually release this, it would be really useful

$JoystickDeadzone = 0.175;

function joystick_x(%value) {
    if (mAbs(%value) < $JoystickDeadzone) {
        %value = 0;
    }

    $mvRightAction = %value;
}

function joystick_y(%value) {
    if (mAbs(%value) < $JoystickDeadzone) {
        %value = 0;
    }

    $mvBackwardAction = %value;
}

function joystick_rx(%value) {
    if (mAbs(%value) < $JoystickDeadzone) {
        %value = 0;
    }

    $mvYawLeftSpeed = %value * 0.25;
}

function joystick_ry(%value) {
    if (mAbs(%value) < $JoystickDeadzone) {
        %value = 0;
    }

    $mvPitchUpSpeed = %value * 0.25;
}

enableJoystick();

MoveMap.bind("joystick0", "button0", "plantBrick"); // a
MoveMap.bind("joystick0", "button1", "cancelBrick"); // b
MoveMap.bind("joystick0", "button3", "useLight"); // y
MoveMap.bind("joystick0", "button2", "useBricks"); // x
MoveMap.bind("joystick0", "button4", "mouseFire"); // left shoulder
MoveMap.bind("joystick0", "button5", "jet"); // right shoulder
MoveMap.bind("joystick0", "button6", "toggleZoom"); // select
MoveMap.bind("joystick0", "button7", "toggleFirstPerson"); // start
MoveMap.bind("joystick0", "button8", "jump"); // left hat
MoveMap.bindCmd("joystick0", "button9", "scrollInventory(1);", ""); // right hat
MoveMap.bind("joystick0", "xaxis", "joystick_x"); // left stick left/right
MoveMap.bind("joystick0", "yaxis", "joystick_y"); // left stick up/down
MoveMap.bind("joystick0", "rxaxis", "joystick_rx"); // right stick left/right
MoveMap.bind("joystick0", "ryaxis", "joystick_ry"); // right stick up/down


The individual action mappings are completely arbitrary and don't make too much sense (I was just messing around at the time as I just got a controller). Feel free to change them to whatever.
« Last Edit: June 20, 2015, 09:46:58 AM by portify »

Alright, I can make that into an addon to allow: custom keybinding, sensitivity, etc.

call it, Support_Joystick

Alright, I can make that into an addon to allow: custom keybinding, sensitivity, etc.

call it, Support_Joystick
you should make that a thing that happens

My control inverts y and b with a and x, can someone make a scheme that fixes this?

See all the bind lines at the bottom? The first 4 have xyab at the end of them. Change the numbers in "buttonN" by the start to another one in order to flip them.