[SUGGESTION] Vehicle dynamics suggestion-damping factor - Printable Version +- Xonotic Forums (https://forums.xonotic.org) +-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10) +--- Forum: Xonotic - Suggestion Box (https://forums.xonotic.org/forumdisplay.php?fid=20) +--- Thread: [SUGGESTION] Vehicle dynamics suggestion-damping factor (/showthread.php?tid=5007) |
Vehicle dynamics suggestion-damping factor - zwz - 07-09-2014 It's amazing that Xonotic is such an ambitious game which implements vehicles. But if you are familiar with UT, Halo series (I don't use BF as example because it's not a SF game), you will easily find that Xonotic's vehicles feel clumsy. The mechanics don't feel as what it is supposed to be. In fact, there exists a solution. For instance: I think hover vehicles in Xonotics maintain a constant hovering height, that's why it shakes a lot when moving on complex terrains. It does not feel like an "air cushion". This can be solved like this: Suppose the distance between the vehicle's bottom and the terrain is h, the air cushion force (F) that holds the vehicle satisfies the following equation F=K1*1/h-K2*dh/dt The first term is in inverse proportional to the height, which controls the hovering height at steady state. The second one is proportional to the time derivative (the vertical speed) of the height, which serves as a "damping factor". This will create an "air cushion" feeling. Besides, for other non-hover vehicles, such as tank and mech, the damping term could also be implemented to simulate the suspension. One more thing: when driving a vehicle (hover craft for example), my crosshair is always blocked by the vehicle's body. Could increase the height of the viewpoint to solve this problem. RE: Vehicle dynamics suggestion-damping factor - end user - 07-09-2014 The main problem with vehicles is that once you get several in one area and they are all shooting at the same time the bullets start to tax the server and the client side and you get lots of lag. This keep us from having DM only battles or playing Assault or Onslaught or creating maps for those. RE: Vehicle dynamics suggestion-damping factor - tZork - 07-10-2014 Xonotic vehicles are basically a ugly hakk in that the engine does not have the physics and collision models*1 needed to do it well. As such each vehicles movement model is done in gamecode using somewhat primitive and improvised methods. Doing it the "correct" way all tough would have made it far too slow. As far as the performance go, yeap they are resource hogs in almost every conceivable way. One major improvement would be to move the relevant parts to CSQC. That however is BIG job on a almost unused part of a almost unplayed game. Ergo chances that it will happen are slim. That said, the code is available for every and any -one to play around with, im sure theres tons of improvements to be made. If you (as in anyone who read this) decide to mess with it and wonder at some specific part, feel free to PM me. I can't promise i will be able / arsed to answer, but i may try *1 Darkplaces does have ODE support, but it seem to be a bit to half-hearted in its implementation to use for this. RE: Vehicle dynamics suggestion-damping factor - end user - 07-10-2014 Mario said a couple of months ago that he did some work and updatedon the vehicle code. Not sure if that was added. RE: Vehicle dynamics suggestion-damping factor - Melanosuchus - 07-10-2014 I think Mario started working on porting vehicles on CSQC http://dev.xonotic.org/projects/xonotic/repository/show/qcsrc/common/vehicles?rev=Mario%2Fvehicles this change is available in the esk mod so it's stable enough to be used on servers but if DeadDred/end user still had issues it means that it isn't fully optimized. RE: Vehicle dynamics suggestion-damping factor - tZork - 07-10-2014 As far as i can see theres nothing major there. My local CSQC vehicles branch turned into almost a total rewrite (and also a miserable failure xD). The amount of coding involved is likely around that tough; rewriting this part of Xonotic. RE: Vehicle dynamics suggestion-damping factor - end user - 07-10-2014 (07-10-2014, 05:04 AM)Melanosuchus Wrote: I think Mario started working on porting vehicles on CSQC http://dev.xonotic.org/projects/xonotic/repository/show/qcsrc/common/vehicles?rev=Mario%2Fvehicles Well there haven't been enough players around to test it on some of the better maps. I've updated the ESK mod but I think there's still quite a bit lag when lots of bullets/vehicles in one spot. |