Game Development Community

dev|Pro Game Development Curriculum

Answering questions about my vehicle physics work

by Ronald J Nelson · 07/25/2013 (10:32 pm) · 15 comments

I've received a lot of emails over the past few months as well as have been asked on the forums about my work with vehicle physics. This is my attempt to answer those.

As some of you know, I am the individual that wrote the vehicle physics code being used in deepscratch's AVK and that I have returned to advance my work further primarily as a hobby now as I have a full-time job as a programmer these days.

1. What am I working on?
The work I am putting together includes a updated version of my raycast vehicle code for Bullet with a currently in the works PhysX version. I still have a few kinks to knock of of that.

I am also adding a hover vehicle class that has true hover physics, just ironing out a couple things in damping on that. There is also the flying vehicle class I did before with the addition of variable hover physics for use with aircraft like the Harrier. Again, the hover physics still need some tweaks. Both Hover and Flying vehicle classes are also in PhysX right now.I'm also doing the Helicopter and Tread(Tank) Vehicle classes in Bullet and PhysX. I should be done with those shortly.

Next, I am adding buoyancy physics in with the vehicles and expanding upon it in my work with water vehicles to include submersible types. I've already gotten the buoyancy added and it is nearly where I want it. For a kick I expanded my work to the rigid shape class included with the engine.

I'm also doing motorcycles using gyroscopic style balancing instead of the old invisible balancing wheel trick. This is something that is still in my development documents and hasn't been put to code just yet as I've been hitting the other stuff.

Adding hitches and a trailer class to the wheeled vehicles and perhaps water and hover classes. a pretty simple thing using joints to provide realistic towing physics with a raycast connect to hitch ability. Also, still just on paper but very easy to create.

Finally, wheeled vehicles using articulated suspension systems. That means real rigid body wheels with joints and very realistic physics. I've gotten tons done on this already, for both Bullet and PhysX. It is all networked as well, which means it will work in multiplayer, although I wouldn't recommend such a thing with a large number of players in a game, that is a lot of network traffic. I'm still addressing a few sections on this, but it is coming along nicely.

2. Will This be an upgrade to deepscratch's AVK?
Definitely not. However, since many of my classes are based upon old resources and existing T3D vehicle class code, I'm sure anything his kit had beyond the my physics code could probably be integrated. I can say his tank model can as I am using it to test with, I found the model design more elegant that what was available in the Combat Starter Kit. The AVK aircraft will likely also be compatible since his code is compatible with my original work in that area.

3. Will this be made available to the public?
Probably, but I cannot promise a timeline. As I mentioned before, I do this mostly as a hobby these days so planning projects around my timeline would be a bad idea.

4. Am I interested in having someone collaborate with me in that they provide me 3D models to sell with my kit in exchange for access to my code?
I am going to have to politely decline on that. I'm afraid I have trouble trusting others with my work.

About 4-5 years ago I agreed to the same kind of thing with someone else. I was still active duty military at the time and was forced to deploy to the desert for an extended period. When I returned, I retired from military life, moved to my new home and worked to finish my Master's degree. When I was nearing the completion of my degree, I decided to come back here, to pick up my work again and see what advances had been made. When signed in and looked around, I was surprised to see that individual was selling my work as his, let alone ever getting my consent, and had shared some of it with with another individual that was selling code I had to pay for with my work included. The other removed my code after they learned the situation, but the first continues.

They have openly admitted it was my work, and since it was a much older version of my work, I'm letting it go. However, I'll not be collaborating with anyone again in that manner unless they have something of equal value to bring to the table and I certainly will not be working to upgrade my old code. Back then when I collaborated with that individual, I was too trusting and was needing to build a resume/reputation. Neither are the case anymore.

I apologize for the rant/bitter sounding response to that final question, but it struck a nerve.

I'll try to have some progress blogs showing some of what I am working on shortly, but we are in the final stages of a major release at my regular job, that with QA testing, I've been pulling a lot of long hours.

#1
07/25/2013 (10:42 pm)
@Ronald,
This sounds awesome. Can't wait to see some demos!
#2
07/26/2013 (3:18 am)
Ronald, what 3D models are need?
About helping on that, that you can sell your kit including models. I would offer to share the incoming of the kit, and not only give access to the code. Making high quality Models with LOD, textures, animation and everything, plus nice poly count, etc. is a lot of work.
For the MKII boat in my Neptun Pack, i had around one week work to creat this boat (from prototype to the finished model)
#3
07/26/2013 (3:44 am)
This sounds like exactly what T3D needs as far as it's vehicles goes.

I hope some of your fixes etc. filter down to MIT :-)

#4
07/26/2013 (5:08 am)
Great to see you back around here Ronald!
#5
07/26/2013 (9:27 am)
Thanks for sharing your situation
especially since i didnt even knew what really went down with avk
but now i realize what this means along with the future regarding avk

i wish you godspeed
and am lookin forward to seeing some progress
btw (feature request?)
what i would really love to see would be a single wheeled bicycle
and if you need models for those
i would contribute em freely
along with a normal bicycle model
#6
07/26/2013 (9:58 am)
I could pitch in some free models too, if you need them. Best of luck with future development!
#7
07/26/2013 (5:39 pm)
A unicycle huh? That is an interesting idea. I may need to play around with that one a bit...
#8
07/27/2013 (12:22 am)
yep exactly a unicycle
- there is something that popped in my head that i wanted to ask
about first person steering with handview models

i do know more or less how avk achieved that but am not sure if this is realyl the way to go

so do you have a better approach for this - or didnt you tought about that yet?
and wouldnt it be more flexible to use something in the way of the
advanced fps camera?
you could achieve something along the lines of ArmA/OFP
when it comes to the fps view of the vehicles
#9
07/27/2013 (1:17 am)
Actually animations and such in the AVK are mostly done by accessing the stock animation system that is already present in the code the rest is all in the model. I really have no intentions of adding new animation code to my work. My work is dealing with the mechanics of the vehicle physics system.

There are plenty of resources and the AVK that can provide that kind of thing quite well.
#10
07/27/2013 (3:18 am)
unicycle? I can only think of the unicycle chase in NOLF 2 haha.

Excited to see how you get along Ronald.
#11
03/21/2014 (7:55 am)
Hows this been going? Checked and couldn't see any new information?
#12
11/16/2014 (9:40 am)
how is this going? im real interested in the hitches and a trailer class.
#13
11/18/2014 (4:08 pm)
I have to be honest, I haven't touched anything in well over six months. Roughly around the time I wrote this blog, the software company I work for gave me one of those programming projects that can define a career. The downside is that it required massive hours devoted to research and development, even my game playing pretty much died for a while. The upside is that I nailed it and my work has been a massive success.

Since then, I've been training staff how to use the applications I wrote, doing upgrades and fixes, and going on numerous business trips. Then two weeks ago I got married and went on a honeymoon.

I have had almost no time to devote to much of anything, let alone projects I work on as a hobby. I was really close to finishing a solid basic set of vehicles that matched the classes already in Torque. I even had started work on making tread vehicles and early work with hitches.

Since my 3D artist was one of my groomsmen we had a chance to talk about where we wanted to go with the projects we had been developing as he is also my partner in game dev. I am going to be looking at my projects again this week and starting back at things after getting my development environment up to date which includes the current version of Torque 3D, Bullet Physics and PhysX libraries and integrations. There were some serious bugs in the Bullet Physics system that were major problems the last I dealt with it.

However, as I said above, do not plan a project around my work. This is something I do mostly as a hobby. I don't have the kind of time to seriously support a game development project anymore. On the other hand, if you want advice on doing your own implementation, feel free to ask.
#14
11/20/2014 (1:15 am)
Whoah! Sounds like a pretty busy time you've had there! Congratulations and all :).
#15
12/23/2014 (2:22 pm)
Congratulations on getting married and completing your work projects, sounds like you have been way to busy for hobbies lol.

What i am looking for is just how i can have the "hitch" so i can connect a car and trailer and have it move like a trailer. i am very new to C++ (i dont know alot) i have come from VB.NET. so i was just waiting on your class if you get time to do so in physx i am in no big rush as i have said t3d is the engine i want to use so that's that. but if there was a class we could add into the core and have a "is_trailer" in the car cs files with hitch point that would be just brill.

Great to see you post again and if you are in need of a trailer model just give me a shout and i will pass one over to you any time.

Thanks for your time to reply.
Kev