Home    LBP Showcase / Reviews / Recommendations    Object Showcase
#1

Monster Truck(Built in HUD with support for wheelie, flip,and big air detection))

Archive: 4 posts


http://i2.lbp.me/img/ft/6621af763a7c46ead0e140f0654dd4bb365505e1.jpg

So for my level Super Monster Truck Mayhem - Score/Time Attack (http://lbp.me/v/x77j9-) I put together a monster truck with built in scoring and a HUD to tell the driver when they will score points for wheelies, big airs and flips. It actually took quite a bit of time to get working and I am fairly happy with how it turned out. This is probably the 10th iteration of this vehicle.

http://i52.tinypic.com/2gvpndh.jpg
http://i55.tinypic.com/2e68uc7.jpg
http://i52.tinypic.com/2ebg02w.jpg
Note: above pictures have and old non working flip detector.

Features
-Left analog stick allows rotation of vehicle while moving on the ground or in the air. Helps for getting over ramps and doing wheelies.
-Quadrature encoder based flip detection. I replicated a quadrature encoder http://en.wikipedia.org/wiki/Rotary_encoder in game. The advantage of a quadrature encoder is its accurate detection of rotation in either direction. When a person begins a jump it knows relatively what position it was in at this time. My quadrature encoder only has 4 sensors(90 degrees of view each, think a pie cut into 4 slices) but it can and probably will be expanded to have more accurate measurements.

1|2
- -
3|4

http://i52.tinypic.com/2wqtmx5.jpg

The one issue is the mechanism takes up four layers. This is due to needing to have four tag sensors in the exact location. Since they cannot be overlayed I needed to have them all on different layers. The 5th layer contains a tag attached to a board bolted to the other layers. The board is attached to a gyroscope so it always points up. When the vehicle rotates, the tag is always in the view of one of the four tag sensors. Each sensor has a specific bit pattern 01 11 10 00 . I then used a simple algorithm that can easily determine which direction the object had rotated http://www.didel.com/mot/RomEnco.pdf ( sommers algorithm). This algorithm needs knowledge of the previous bit pattern so I implemented data storage in the form of D type flip flops (http://en.wikipedia.org/wiki/Flip-flop_(electronics) )A full 360 degree rotation involves 4 rotations of 90 degrees.

http://i56.tinypic.com/2i24q6r.jpg



-Wheelie detection is implemented using impact sensors on the wheels and body. When the back wheel is the only item touching the ground a counter starts. When the counter reaches a given time 100 points is given to the driver of the vehicle for each second afterwards. The counter only resets when the body or the front wheel touches. Meaning if you are going over bumps and your back wheel comes off the ground you can still get bonus points if you land on your back wheel and keep driving

-Big air detection is implemented and detects when no part of the truck is on the ground

-Tag based score limiter. My level uses time gates however there is no way to prevent points from accruing when the time runs out. This would leave the person able to continue storing and abusing the points from wheelies, jumps and flips. To prevent this all scoring is based on both a timer and a tag. Each truck detects a tag that signifies it should start scoring and tag that signifies if it should stop scoring. Also there is a timer that ticks down at the same rate as the gated race.

-HUD Floating in the bed of the truck are counter signifying to the driver if they have wheelied or been in the air enough to gain bonus points.

Current bugs
----------------
One thing i need help on is having a usable suspension that can also support the stress that occurs from flipping in the air. When you rotate quickly in the air the heavy wheels pull on the suspension forcing the springs and pistons out of alignment. They will return but if you do too many flips at once. the vehicle will break.
2011-01-31 19:31:00

Author:
mthanded
Posts: 15


This looks freaking awesome, I do wish the truck had a little more detail but gameplay is the real thing for me anyway. No LBP.me link?2011-01-31 20:21:00

Author:
Krondelo
Posts: 136


http://lbp.me/v/x77j9-

I Do need to work on the truck's visual quality.

By placing all the sensors on the same microchip I was able to come up with a 2 layer solution for the quadrature encoder. Tommorow I will have a level up that tracks flips, big airs and wheelies for 3 players at the same time . :-) :-) yes!!!!
2011-01-31 21:38:00

Author:
mthanded
Posts: 15


http://ie.lbp.me/img/bl/7deaf541b5b52858ecfe10cbcca4f0e043179372.png



I got the single layer quadrature encoder working and now I have a level that tracks flips, wheelies and jumps for 3 players simultaneously.

Super Monster Truck Revenge - 4 Course Race
(http://lbp.me/v/xdwp8e)http://lbp.me/v/xdwp8e

The ultimate monster truck racing level. Challenge your friends to a race. Get bonus points for doing wheelies, big airs and flips. Come back for more!!!!!!!!!!! V1.0

http://i3.lbp.me/img/ft/6c3e16a7c4f5ffb1e16978ad425704cf00205ef0.jpg

http://i2.lbp.me/img/ft/312e83c6eb7cfadd48cc61368a05f3c634334fc9.jpg

http://i9.lbp.me/img/ft/6f9fc17b61208d51538f2a39f3578a9833b2da5f.jpg

http://i0.lbp.me/img/ft/6a0d47cd84d4f0df3d3a66cf4bc7347d742abf3b.jpg
2011-02-04 18:02:00

Author:
mthanded
Posts: 15


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.