Site Navigation
QuakeOne News
» Latest News
» News Archives
» QuakeOne Movies

QuakeOne Help
» File Downloads
» Quake Help
» Quake Servers

QuakeOne Community
» Forums
» Chat *new*
» Poll Booth
» Memberlist
» Member Map

Site Info
» Community Rules
» Moderator List

» Buy Quake

Visit QuakeOne.com On Facebook!Visit QuakeOne
on Facebook

Log in
User Name:

Password:

Not a member yet?
Register Now!
Online Users: 369
4 members and 365 guests
Lucifex, Mathuzzz, nahuel, Rampage
Most users ever online was 2,542, 06-04-2016 at 12:58 AM.
Go Back Home > Forums > Quake Talk > Quake Central > Joystick Handling Code Search Forums

Reply
LinkBack Thread Tools
Unread 02-09-2017, 03:42 AM   #1 (permalink)
Grunt
USER INFO »
Posts: 25
+/-  Reputation: Syber Raith is on a distinguished road
Join Date: Feb 2017
Currently: Offline
Joystick Handling Code

Hi,

I'm looking at tweaking the joystick handling code and was wondering where in the DP source that was done. Specifically where the cvars for the joystick are set and how the input from the joystick is read, processed and then sent to the server.

Regards,

SR
Reply With Quote
Unread 02-09-2017, 07:16 AM   #2 (permalink)
Chthon
Baker's Avatar
USER INFO »
Posts: 9,975
+/-  Reputation: Baker has a spectacular aura aboutBaker has a spectacular aura aboutBaker has a spectacular aura about
Join Date: Nov 2005
Currently: Offline
vid_shared.c line 1406 +/- a few lines.

But if you can't do even do a text search, you are in for rude awakenings upon rude awakenings --- I'm just saying.
__________________
Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...
Reply With Quote
Unread 02-09-2017, 08:25 AM   #3 (permalink)
The man who sold the world
MadGypsy's Avatar
USER INFO »
Posts: 5,008
+/-  Reputation: MadGypsy has a spectacular aura aboutMadGypsy has a spectacular aura aboutMadGypsy has a spectacular aura about
Join Date: Feb 2011
Currently: Offline
lol
__________________
X_Michael
Reply With Quote
Unread 02-09-2017, 09:42 AM   #4 (permalink)
Chthon
nahuel's Avatar
USER INFO »
Posts: 927
+/-  Reputation: nahuel will become famous soon enoughnahuel will become famous soon enough
Join Date: May 2011
Currently: Online
textcrawler
__________________
the invasion has begun! hide your children, grab the guns, and pack sandwiches.

syluxman2803
Reply With Quote
Unread 02-09-2017, 09:52 AM   #5 (permalink)
Grunt
USER INFO »
Posts: 25
+/-  Reputation: Syber Raith is on a distinguished road
Join Date: Feb 2017
Currently: Offline
Ha, it works. Thanks everybody.

Last edited by Syber Raith; 02-11-2017 at 03:54 PM..
Reply With Quote
Unread 02-10-2017, 09:52 PM   #6 (permalink)
Chthon
Baker's Avatar
USER INFO »
Posts: 9,975
+/-  Reputation: Baker has a spectacular aura aboutBaker has a spectacular aura aboutBaker has a spectacular aura about
Join Date: Nov 2005
Currently: Offline
Originally Posted by Syber Raith View Post
Well, it works. Thanks everybody.
Congrats
__________________
Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...
Reply With Quote
Unread 02-11-2017, 02:13 PM   #7 (permalink)
Grunt
USER INFO »
Posts: 25
+/-  Reputation: Syber Raith is on a distinguished road
Join Date: Feb 2017
Currently: Offline
I'm playing with scaling the joystick input in various ways. I've got it significantly better. Plus I'm building skill at using a joystick. I've only uses a mouse and keyboard since I first started playing the game.

I have a basic change that smooths out the deadzone transition. I'd like to push that to the git repository. Do I need to sign up anywhere to do that?

***

Another thing I noticed is that when I I just input max yaw, the rotation in the game varies a bit as 360 degree are passed though, it kind of slows down at one point and then speeds up again. The yaw speed varies in the game a little bit without any change on the user input.

Last edited by Syber Raith; 02-11-2017 at 03:14 PM..
Reply With Quote
Unread 02-12-2017, 06:31 PM   #8 (permalink)
Grunt
USER INFO »
Posts: 25
+/-  Reputation: Syber Raith is on a distinguished road
Join Date: Feb 2017
Currently: Offline
Just to make sure I comprehend what I am doing here. Is this correct?

Say if cl_speedforward were set to 100,

And joy_sensitivityfoward was set to 1,

Then at max foward joystick input the forward speed of the player in the game would be 100.

And if the joy_sensitivityfoward was set to 2, then at max forward joystick input the player speed in the game would 200, give there was free area ahead.
Reply With Quote
Unread 02-12-2017, 09:17 PM   #9 (permalink)
The man who sold the world
MadGypsy's Avatar
USER INFO »
Posts: 5,008
+/-  Reputation: MadGypsy has a spectacular aura aboutMadGypsy has a spectacular aura aboutMadGypsy has a spectacular aura about
Join Date: Feb 2011
Currently: Offline
that sounds wrong. That implies that you could hack the game by simply changing your joystick properties.

I bet it's more like

joystick pushed >= 1/sensitivity = fwd speed
__________________
X_Michael

Last edited by MadGypsy; 02-12-2017 at 09:57 PM..
Reply With Quote
Unread 02-13-2017, 09:05 AM   #10 (permalink)
Grunt
USER INFO »
Posts: 25
+/-  Reputation: Syber Raith is on a distinguished road
Join Date: Feb 2017
Currently: Offline
The joystick puts out a value from -1 to 1 on each axis.

It is easy enough to see in the game that for any particular cl_forrwardspeed setting that a higher sensitivity results in faster motion or greater response to a particular joystick input. If the sensitivity was used as a divisor then a higher sensitivity setting would result in less forward speed or response to a given joystick input.

In the code the joystick input is multiplied by the sensitivity setting. This means that the the sensitivity is a linear as opposed to a non-linear acceleration curve. I am in the process of trying to create a non-linear sensitivity response.

It would be helpful if the game had a current forward speed display like the fps one. Hmm...

Maybe, I could hack the FPS display to reflect current forward speed. That would be interesting.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 10:52 PM.


eXTReMe Tracker