TL;DR there are no questions here, just goals. Written for myself as much as anyone curious.
Heh thanks- but gross, that will not work for me. I need a robust modular class that can accept inputs defined in another class (so the user can change their controls), from another class (so AI can control it), or the network (so someday a server could control it), or a separate local player. Additionally, player statistics will be maintained in an external class instantiated for each instance; and the UI will be an external singleton class that accepts inputs from multiple sources, one being the character controller. I’m big on the local second player at least, being far off from networking multiple camera objects shouldn’t be catastrophically difficult to implement, and PC game need more split-screen support. I intend to just include game elements that are “spray and pray like an idiot badly” and fun to use that a controller can get down on.
I approach this as a hobby but seriously, with the intent to design a reusable controller. It being modular also leaves room for more than one tank choice with each tank handling differently.
My specific outline design goals are:
(for the character controller)
1.) “Throttle” body acceleration and deceleration.
2.) Independent rotating lower body segment.
3.) Camera tracking mouse in a modeled “cockpit”.
4.) Turret view-port tracking camera at set speeds.
?.) Duration-raycast “locking” mechanic, though this may operate from a weapon class.
The camera will be in a (tiny) modeled dome structure with a couple struts and will have slightly more degrees of freedom than the actual turret for the player to look around a (tiny) cockpit with some canned animations that a “little grey man” body shown from first-person view will do with little alien hands in response to certain game events. Modeling this on a .1 scale should allow me to stick it inside a reasonably-scaled scifi-tank since this will probably just be a child not affected by physic.
Yes, there are a lot of potential problems.
(for the player-stats data object or class)
5.) Sectional damage model based on many hit-boxes.
6.) Logic calls to character controller which force fuckuppery upon the character controller based on that.
7.) Variable turret view-port tracking and movement speed based on weapon (and possibly tank) choices.
The game itself will accommodate every-other-level forked, standard-ish scene-per-level design controlled by a game manager and objective triggers in each level; like the layout seen in the classic “Star Fox”. Simple save-states will be level-based.
So, one goal → then the next strategy. I’ll be looking at some of my physics-based character controller examples I have today. I suspect what I am going to do is fake a simple ground-contact point invisibly under the legs, do everything in physics, and have the legs include only rudimentary bounding-box collision constraints (around all of them, rather than each). The advantage of using physics will be the ability to tilt the tank over uneven terrain more easily than I would have achieved with transforms (I was seriously considering a flat-world design strategy); the main disadvantage performance.
That is one thing I don’t know about game design: how truly powerful modern graphics cards and CPU’s are. It’ll be interesting to see at what point I run into performance issues with physics-based characters, but I think it should be doable because the game isn’t large in scope, there will probably be a dozen of these characters at once at maximum, and most collision data should be between them and the ground.