Twin stick mod and FULL XBOX controller support

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
Post Reply
Dege
Jaywalker
Jaywalker
Posts: 8
Joined: 04 Apr 2018, 21:06

Twin stick mod and FULL XBOX controller support

Post by Dege » 24 May 2018, 22:44

Hi all, in the last weeks, since the last MISI release I worked on a Twin stick mod for GTA2 (like the controls of games like Hotline Miami), and now the work is complete!
This first release contains only a modified MISI.ASI and an alternative_controls.lua script.
To use it you should:
-install MISI
-replace MISI.ASI in the gta2 directory with the one in this release
-insert the alternative_controls.lua script in the scripts directory
-plug an XBOX controller in your PC and play!


The controls are:
A - Jump - brake in car
B - Enter/Exit car
X - Shoot/Punch - Brake in car
Y - Special 1: Car Horn
LB - previous weapon
RB - next weapon
LT - unused (maybe I'll use it to change radio station)
RT - Shoot/Punch - Brake in car
Back - Special 1: Car Horn
Start - exit menu - to confirm use the A button, to stay in game press B or Start again
Left Stick/D-pad - walking direction of the character - in a car works like the normal controls
Left Stick Click - Special 2: you can use the stick movements to control the effect of the special 2 command
Right Stick - direction of bullets

In the next days I'll release the source code, a standalone ASI and some videos.

Thanks to all the awesome reverse engineers that published offsets on this forum, in particular thanks to:
Sektor - various offsets and really useful answers to other users on the forum
robotanarchy - for the input offsets and for the idea of a twin stick mod for GTA2
Logofero - for the awesome library that he wrote, for the source code of the library and for a little bit of support in PM
without MISI.ASI I would never have even tried to make this mod

Let me know how it works, and if you have any suggestions or bug reports!


Update 2018-07-09:
I've released the sources of the mod and you can download them here: http://gtamp.com/forum/download/file.ph ... ew&id=1891
Attachments
ModdedMISI_TwinStickMode_src.zip
The sources of the Modded MISI library and the code of the lua script (versioned with git)
(4.88 MiB) Downloaded 423 times
TwinStickMOD.7z
The Twin Stick MOD ready to use
(232.82 KiB) Downloaded 379 times
Last edited by Dege on 09 Jul 2018, 13:34, edited 1 time in total.

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: Twin stick mod and FULL XBOX controller support

Post by Logofero » 25 May 2018, 05:07

If I had a controller I would check it but it's not. I can only imagine.

Good job. Especially for lovers of joysticks is very useful.

Also you can add a display resolution setting. Author ThirteenAG provided the sources in the repository https://github.com/ThirteenAG/Widescree ... llmain.cpp

This is for all MISI users:

Just want to mention. When using MISI.ASI, you do not need to download ASI Loader. Some authors have a tendency without permission to send statistics on the use of the plugin on the Internet resource of its author. MISI never collected statistics. Moreover, I am against the connection of local libraries connecting as demons with the servers of the software authors. Do not use ASI Loader, you do not need it.

User avatar
Sektor
Boss
Boss
Posts: 1369
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Twin stick mod and FULL XBOX controller support

Post by Sektor » 27 May 2018, 07:21

It works nicely on foot, circle strafing is fun!

Dege
Jaywalker
Jaywalker
Posts: 8
Joined: 04 Apr 2018, 21:06

Re: Twin stick mod and FULL XBOX controller support

Post by Dege » 09 Jul 2018, 13:34

I've released the sources of the mod and you can download them here: http://gtamp.com/forum/download/file.ph ... ew&id=1891

Devastator
Hitman
Hitman
Posts: 120
Joined: 06 Dec 2011, 16:54

Re: Twin stick mod and FULL XBOX controller support

Post by Devastator » 03 Aug 2018, 06:44

I'm definitely gonna have to check this out if I can get a 360 controller set up with my laptop. Been looking at some of the maps I quit working on last year & definitely want to get back into scripting & map design when viable, & given that my maps aren't meant to play like a practical GTA2 death match something like this could be fun for a map, does this work for multiplayer?
& so it's fair to assume this allows the player to strafe / tank strafe? Man the potential for this sounds pretty awesome.

Dege
Jaywalker
Jaywalker
Posts: 8
Joined: 04 Apr 2018, 21:06

Re: Twin stick mod and FULL XBOX controller support

Post by Dege » 03 Aug 2018, 07:05

Devastator wrote:I'm definitely gonna have to check this out if I can get a 360 controller set up with my laptop. Been looking at some of the maps I quit working on last year & definitely want to get back into scripting & map design when viable, & given that my maps aren't meant to play like a practical GTA2 death match something like this could be fun for a map, does this work for multiplayer?
& so it's fair to assume this allows the player to strafe / tank strafe? Man the potential for this sounds pretty awesome.
I don't know what the clients communicates to the server during multiplayer. If they send the keypresses, this will not work (but a limited version without the aim stick separated from the walk stick could be made), if the clients just sends raw player objects and bullets it could be modified to work fully in multiplayer as well.

At the moment with a controller you will always strafe while walking and always tank controlling while driving.

If you get that controller let me know how it works for you ;-)

EDIT:
In alternative if it's possible to transfer data between clients by some side channels it's possible to get the full support even with only the keypresses commands sent.

User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Twin stick mod and FULL XBOX controller support

Post by Cuban-Pete » 24 Aug 2018, 15:55

It worked right away, nice work! and better than 'built-in' controller support. Thanks! :)

But to be honest it plays a bit weird and looks also a bit weird when aiming with right joystick. Entering a car did not always work/trigger. Also once in the car one cannot push on gas and steer at the same time... which does work with arrow keys.

Is it possible to have different controls when in the car? Maybe left joystick for gas/brake and right joystick for steering...

Edit: Also somehow I find Y more logical for entering a car. Most games (newer GTA) use that.
"Mmmm, your eyes are so beautiful."

User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Twin stick mod and FULL XBOX controller support

Post by Cuban-Pete » 24 Aug 2018, 17:27

I made you an icon for the program script. Don't know why, just wanted to play with GTA2 icons again. Hope you like it.
TwinStick3.png
TwinStick3.png (13.64 KiB) Viewed 8128 times
Edit: This bloody new 4k screen makes pixel graphics (like GTA2) look ugly and its hard to get correct 'look'.
"Mmmm, your eyes are so beautiful."

Dege
Jaywalker
Jaywalker
Posts: 8
Joined: 04 Apr 2018, 21:06

Re: Twin stick mod and FULL XBOX controller support

Post by Dege » 26 Aug 2018, 11:04

Cuban-Pete wrote:It worked right away, nice work! and better than 'built-in' controller support. Thanks! :)

Thank you for your kindly words and for your feedback!

But to be honest it plays a bit weird and looks also a bit weird when aiming with right joystick.

How do you suggest that the right thumb-stick aim can be made better, and what are the issues for you?

Entering a car did not always work/trigger. Also once in the car one cannot push on gas and steer at the same time... which does work with arrow keys.

Is it possible to have different controls when in the car? Maybe left joystick for gas/brake and right joystick for steering...

I totally agree with you on car controls, I feel like the cars are even more difficult to control than the base game!
I'm not a big fun of racing games, but I'll look into how modern top down racing game manage their controls schemes to draw inspiration :D (and I'll also try with your suggested control scheme)


Edit: Also somehow I find Y more logical for entering a car. Most games (newer GTA) use that.

I admit that I picked some controls very randomly and I have no issue with changing them in a future release, so if you find something else not working nicely feel free to give your feedback ;)



I made you an icon for the program script. Don't know why, just wanted to play with GTA2 icons again. Hope you like it.

Thank you for the icon! I'll surely use it for the first standalone version!

User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Twin stick mod and FULL XBOX controller support

Post by Cuban-Pete » 27 Aug 2018, 08:57

I think one of the issues is with the animations. If you walk a direction and aim the other way, the character is floating and gives a feeling of disconnection with the game ('realism' is gone).

I played in the old days besides offline also some time online and there you have 'walking illusion' with for example the rocket launcher or with throwing molotov cocktails. The "walking illusion" (thanks to animation) of going a direction and suddenly changing direction (going backwards with a turn for example) and shooting a rocket was a big part of the game mechanics (for online anyway).

Maybe just using the left joystick for walking forward/backward (like up and down key) and using the right joystick for looking left/right (like left and right arrow key) will work, but I'm not sure and perhaps isnt the 'twin stick' you imagined.

I don't know, I just really your idea of good (xbox) game control support and a new way to control the game, but I also like to stay with 'old school'. :)

How were the controls on all the different console gta2 versions? (never really played it on console)
"Mmmm, your eyes are so beautiful."

Dege
Jaywalker
Jaywalker
Posts: 8
Joined: 04 Apr 2018, 21:06

Re: Twin stick mod and FULL XBOX controller support

Post by Dege » 27 Aug 2018, 22:33

Cuban-Pete wrote:I think one of the issues is with the animations. If you walk a direction and aim the other way, the character is floating and gives a feeling of disconnection with the game ('realism' is gone).

I played in the old days besides offline also some time online and there you have 'walking illusion' with for example the rocket launcher or with throwing molotov cocktails. The "walking illusion" (thanks to animation) of going a direction and suddenly changing direction (going backwards with a turn for example) and shooting a rocket was a big part of the game mechanics (for online anyway).

Maybe just using the left joystick for walking forward/backward (like up and down key) and using the right joystick for looking left/right (like left and right arrow key) will work, but I'm not sure and perhaps isnt the 'twin stick' you imagined.

I don't know, I just really your idea of good (xbox) game control support and a new way to control the game, but I also like to stay with 'old school'. :)

How were the controls on all the different console gta2 versions? (never really played it on console)
On console the controls were tank controls for driving and for the player. And that's the reason I decided to mod the game instead of playing the game on my PSP :D

User avatar
Drury
Mugger
Mugger
Posts: 17
Joined: 02 Feb 2013, 13:32
GH nick: Drury
Location: Slovakia

Re: Twin stick mod and FULL XBOX controller support

Post by Drury » 28 Aug 2018, 21:23

This makes combat much more fun, great mod!

Here's my suggestions for more intuitive bindings (in Foot/Vehicle format):

A - Jump/Handbrake
B - Attack/Attack
X - Special 2/Special 2
Y - Enter/Exit Vehicle
LB - Previous Weapon/Previous Weapon
RB - Next Weapon/Next Weapon
LT - Special 2/Brake
RT - Attack/Accelerator
LS - Walk Direction/Steer Vehicle (horizontal input only)
LS Click - Special 1/Special 1
D-Pad - Walk Direciton/Steer Vehicle (horizontal input only) and Change Radio (vertical input only)
RS - Aim/Tank Turret Control? Could you make this happen?
Back - Quit (Esc)
Start - Pause (F6)

I had a look at your source code but I couldn't make the heads or tails of it... I'm not great with computers :D

Dege
Jaywalker
Jaywalker
Posts: 8
Joined: 04 Apr 2018, 21:06

Re: Twin stick mod and FULL XBOX controller support

Post by Dege » 29 Aug 2018, 13:21

Drury wrote:This makes combat much more fun, great mod!

Here's my suggestions for more intuitive bindings (in Foot/Vehicle format):

A - Jump/Handbrake
B - Attack/Attack
X - Special 2/Special 2
Y - Enter/Exit Vehicle
LB - Previous Weapon/Previous Weapon
RB - Next Weapon/Next Weapon
LT - Special 2/Brake
RT - Attack/Accelerator
LS - Walk Direction/Steer Vehicle (horizontal input only)
LS Click - Special 1/Special 1
D-Pad - Walk Direciton/Steer Vehicle (horizontal input only) and Change Radio (vertical input only)
RS - Aim/Tank Turret Control? Could you make this happen?
Back - Quit (Esc)
Start - Pause (F6)

I had a look at your source code but I couldn't make the heads or tails of it... I'm not great with computers :D

Thank you for the suggested modifications to the control scheme, everything should be really easy to implement, except for the Tank Turret Controls on the right stick.
I'll surely implement even that one because I find it a really neat idea!

In the next days I'll probably release a version with an alternative control scheme to use.
For the turret controls I'll need some more time to find the right offsets to use ;)

Post Reply