Forums

Full Version: Things to do for next version
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I've set up customizable mouse controls to a point. I have set the GAMECONTROLS and CONTROL classes to handle the mouse device and I've set up the menus to be able to handle mouse movements and buttons. Stuff left to be done on this:
  • Make game input handling code read custom mouse controls and stop using hard-coded ones
  • Make some better graphics for mouse control icons
  • Fix problem of mouse control descriptions for buttons being different when loaded than when added
  • Make sure all buttons are recognized, not just ones with index <= 5
I'll try to get this finished up soon so I can mark this one off the list...

You can check out the latest work in SVN r1225.
I just checked in r1227 which now allows custom mouse controls added in the Assign Controls menu to work in the game like any other control. Now you can assign mouse buttons to any action including gas/brake, and it is possible to assign mouse motion also to any action.

The old mouse handling code is still there, I will remove it soon. I will need to remove the option to enable or disable the mouse in Mouse Options, as well as the middle-mouse enable/disable linking in-game. The other things I mentioned in my last post still also need to be done.

Instead of a enable mouse option, I think I'll make the "mouse bars" optional. Instead of being in the Mouse Options menu it'll go in the Display Options menu and be called "Input Graphing" (shows the position of the steering, gas and brake after adjustments). When enabled it will show the gas/brake and steering values of whatever type of controls (joystick, mouse or keyboard) are currently being used - not just mouse.
I just checked in r1227 which now allows custom mouse controls added in the Assign Controls menu to work in the game like any other control. Now you can assign mouse buttons to any action including gas/brake, and it is possible to assign mouse motion also to any action.

The old mouse handling code is still there, I will remove it soon. I will need to remove the option to enable or disable the mouse in Mouse Options, as well as the middle-mouse enable/disable linking in-game. The other things I mentioned in my last post still also need to be done.

Instead of a enable mouse option, I think I'll make the "mouse bars" optional. Instead of being in the Mouse Options menu it'll go in the Display Options menu and be called "Input Graphing" (shows the position of the steering, gas and brake after adjustments). When enabled it will show the gas/brake and steering values of whatever type of controls (joystick, mouse or keyboard) are currently being used - not just mouse.
I made a few slight changes tonight, fixed a bug which caused the mouse movement controls to get messed up if you entered the menu to change it and then pressed OK without changing anything.

Also, I attempted to get scroll wheels working by changing the button handling code. I thought scroll wheels could be handled similarly to buttons. I was wrong...it seems SDL has little/no handling for mouse wheels, in fact it only seems to recognize the left, right and middle buttons. So the current functionality for VDrift is that if you try to add a scroll wheel, it adds nothing.
I made a few slight changes tonight, fixed a bug which caused the mouse movement controls to get messed up if you entered the menu to change it and then pressed OK without changing anything.

Also, I attempted to get scroll wheels working by changing the button handling code. I thought scroll wheels could be handled similarly to buttons. I was wrong...it seems SDL has little/no handling for mouse wheels, in fact it only seems to recognize the left, right and middle buttons. So the current functionality for VDrift is that if you try to add a scroll wheel, it adds nothing.
Probably the wrong thread but I could start a parking lot level in Blender and maybe someone could finish it off with some texturing? :?
QNev Wrote:Probably the wrong thread but I could start a parking lot level in Blender and maybe someone could finish it off with some texturing? :?
Go for it. We need such a track.


Alright here's a long-due update on my work on Mouse controls. Tonight I have tried to tie up some loose ends related to this. First off, I have converted the sliders that used to appear when mouse controls were enabled, and displayed the mouse input. Now I have changed this to a general input graph controlled by an option in the Display menu.

Sort of unrelated, I have added a toggle option in the Display menu to turn car shadows off. Later when we have some dynamic shadows, I'll change this option into a selector to choose which type of shadows to draw (if any). This and all the above mentioned stuff is in SVN r1243.

I've found a lingering bug related to the work I've done on mouse controls. I've noticed that when I have both mouse and joystick controls defined, only the last one I added (mouse or joystick) works for a given control. In the VAMOSWORLD class in the ProcessControls method, there is a loop which iterates through each of the controls and gets out the values to use and the function to apply. When it's all done with the loop and has processed all the controls then it commits the steering values (at least this is how I think it works). I tried moving the steer_commit call inside the loop, but it didn't help, in fact less controls worked than before...

Otherwise, mouse controls are completely customizable now and all traces of the old hard-coded mouse controls stuff is gone. While I was poking around tonight I also cleaned up vamosworld.cc and vamosworld.h a little, reorganizing, deleting empty functions, and removing long-commented code. I didn't change much but the files are much shorter now.

So, summary of mouse controls stuff remaining to be done:
  • still not sure what to do about scroll wheels
  • mouse definitions cancel out other control types
  • mouse controls could have better graphics (though that could also be said for many other control types...)
Alright I've gotten some reports on problems with the mouse controls, and have just fixed them. First the mouse up/down movements were reversed. Also non-analog controls were not working with mouse buttons. Both of these bugs have been fixed. All this and a few other little things in r1246.

The mouse controls still conflict with other types of controls, but actually other types of controls also conflict in some ways with each other anyway. I hope not many people try to define both mouse and joystick controls to the same action and expect both to work at the same time...

Yeah the control grab icon graphics are simple and not the prettiest or most informative. For now I think they'll do. In fact...

Since it's been a while since the last release, and the remaining changes we'd like to make will probably take a long time, and there are several good new features and bug fixes already in SVN (plus it's pretty stable), we're thinking about going ahead and releasing what we've got right now. I'm going to start testing packages...more on this as it develops. I'm shooting for a source + autopackage release by the end of the weekend.
That would be excellent.
Pages: 1 2