Saturday, December 3, 2011

Kart Racer Progress- September + October 2011

The first thing I tried was to create Racing AI [Artificial Intelligence].

The AI would not only have to follow the track correctly, but also had to pick up weapons/items and use them appropriately. Obviously, the first thing I started off with was basic movement.

Luckily for me, the newest version of Blender was released [2.60], and it featured integrated path-finding and a brand new steering actuator. The problem was integrating this new feature with the Vehicle Wrapper [abbreviated as VW].

[Warning: Technical stuff.]

This gets pretty complex, but I'll try to make it simple. The steering actuator tracks to a target object while staying within the bounds of a separate navigation mesh. However, this actuator would move and rotate the object directly. My idea was to send the velocity/steering functions of the actuator to command the gas/steering functions in the VW. This way the AI kart would steer realistically, and would be subject to the same movement/constraints as the player kart.

For the time, I simply set the gas to always be on. Easy enough. The steering, however, was much more difficult. The steering actuator generates the values to turn in the form of a vector- I wanted to take this vector and relay it to the VW. Basically, I set it up so a positive vector would make it steer left, negative would steer right, and a value of zero would keep it going straight. However, this simply didn't work. The kart just drove in circles. 

[/Technical Stuff]

Semi-frustrated with this, I decided to move to the art side and start modeling levels. The first one I started will actually be the second track in the final game. Welcome to SawShark Beach.

































This is a basic beach/island themed level. It features a cave area, a few palm trees, and four waterfalls. The screenshots don't show much, but it's there.

On another note, I happened to discover [well, invent, really] the unnatural phenomenon of perpendicular gravity. Basically, I implemented a UV scroll script to move the waterfall texture down to look like- well, a waterfall. Amazingly, it went sideways. XD

















I also sketched out and modeled the third track, a winter themed track [name pending.] Not much detail in this one yet, just basic walls and a road. The shape is interesting in that the track loops over itself to form a figure eight.

















As you can also see, I created some textures for the kart itself. Most of the work I did during this period was aesthetic, so not much logic/programing was accomplished.

No comments:

Post a Comment