Unity Go Kart Demo - Web Playable

Started by
15 comments, last by fatboxsoftware 11 years, 9 months ago
[sup]DELETED[/sup]
Advertisement
DELETED - due to glitch in posting didn't show my posts in the thread so I kept retrying.
Kart_Build-6-23-12.png

I have AI vehicles working in the build now! There are a few things to note. They both share the same Waypoint spline, so they follow the exact same path. That will be fixed later on as they all get unique paths. Their art wheels are not turning with the wheelcolliders, so no wheel movement (will be fixed as well in the future). Turning is not as mathematically smoothed out as it could be yet, so they will jerk the steering wheel each time they seek that next waypoint. Also I do have the variables scripted in to rubber band them..basically adjust their speed and aggression at specific points. These attributes are not honed in yet in this build, so you won't notice huge drops in speed (it's there though). Finally you'll noticed I implemented a neat little standard startup countdown. A script simply disables player and AI control, hides GUI textures and sound, until a yield WaitForSeconds function says they are enabled. Practical and simple.

The build can be tested at: www.fatboxsoftware.com
@Eigen - You are awesome. You're giving some of the best feedback I've gotten all along. Okay, well these issues are apparent to me as well. I noticed the Unity loader screen wips by, and it's a 24MB executable, so I think that's way too fast. I will have to track down that issue. If you have any insights into this by all means shoot me a response. Second about the collision glitches, yes those were to be expected as I'm constantly tweaking physics materials for the walls and car rigidbody. I'm still working each day on tweaking the sliding, the physics, etc. Some days wierd issues might end up in the build like that. I'm working every day to improve it and wipe out these issues and bugs though. The loading screen one...well it feels like when you click on the Go Race button it doesn't load the level properly or it hangs. The code is so simple. Once you click the "Go Race" button in the main menu it's an application.LoadLevel to the keyboard controls GUI scene. The keyboard controls scene has a yieldWaitForSeconds in it and then application.LoadLevel for the main racing level. So simple. Only thing I can think is maybe the level doesn't get loaded all of the way so it locks up?
I seemed to have completely fixed it by turning off "streamed" in the build settings. Now it all preloads up front. That was the issue...he world wasn't loaded in yet and because of the streaming you were able to get ahead of where it was actually loaded up to.
[color=#333333]So I created the Kart Driver model, and today am in the process of rigging him in Maya. You’ll notice some odd deformations around the legs.
That’s because I’m right smack in the middle of adjusting the default weighting on the model. Looking forward to animating this guy to ride around in the Karts!

Driver.png
Kart_Build_7-06-12.png

Okay so I've been busy working on another iPad project for myself, so the Kart Demo got neglected for a few days. I came back with a vengeance and smoothed out the physics on the player vehicle and the AI now path smoother (they also have turning wheels now!). Still need a new set of Waypoints for the blue AI. I've also implemented a new driver model (completed modeling, normal mapping, rigging and animations, etc.)...the same model has been applied to the AI. It was a bit tricky getting the AI models to play their animations without having any keyboard control input to trigger them.

I ended up hooking into the existing script for Waypoints that controls turning of the AI wheels/car ( I used it's wheelAngle variable to to set an "if-else"). This would readout a numeric degree of that variable, which I could read from and say, well if the degree number is +15 or greater play the "TurnRight" animation... else if the degree number is -15 or less play the "TurnRight" animation, else play the "Idle" animation (which is a static animation right now.)

I've also got the mini-map working in the build too. It's actually pretty solid right now. I may polish the little blip texture a bit, but it's pretty much completed. I used a second GUI camera in scene, set its viewport clipping so it only appears in a section of my game window. I set the camera depth for the mini-map to always render on top of the game camera, placed in a GUITexture for the map of the track, placed (3) 16x16 blip textures for AI and the player and created simple code that makes them follow their assigned transforms (i.e. player or AI vehicles).

I feel it's really coming along now, starting to look like something finally!

Check the latest build out at : http://www.fatboxsoftware.com/#/kart-demo/4565740225

This topic is closed to new replies.

Advertisement