Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Tutorials
#1

Holographic HUD in depth

Archive: 3 posts


This will be multi part, but in this tutorial, I will explain how to do a holographic HUD.

We will start with health bars.

Now to do this, I will need an assistant. An already built HUD< perhaps? SOunds like I will be using one of my feisty femme fatales from Last of the WIlds.
http://i51.tinypic.com/2ebe143.jpg
Well OK, this isn't the feisty one. The other three were busy. Likely off being feisty somewhere.

Anyway! We will be disassembling the HUD logic, taking it apart to see how it works! How does that sound? SOund like fun?
http://i53.tinypic.com/2gua7nb.jpg

Oh come now, how would the other girls react if they saw you acting like this?
http://i52.tinypic.com/2lm2v88.jpg

Thats the spirit! Moving on.

Here we see the actual HUD. In the first part of the two part segment, we will cover everything on the right side- Hit points, skill points, and item amounts. They are all governed by the same type of logic.
http://i55.tinypic.com/25gbiu9.jpg

Obviously the first thing you want to di is actually make all the holograms for the HUD. They can be in any shape you want- Just make sure each point you want to be rpresented on the HUD has its own hologram. FOr instance, each of the hearts you see above is a separate hit point. Same for the stars being separate skill points. I find that it is best, rather than to use shaped holograms, to use squares with stickers on them. Invisible portions of hte hologram are black stickers, with a sticker of the shape over top. When holograms start getting that small, their edges act funny. I'll have another tutorial up showing what I am talking about later.

An overview of all the logic:
http://i55.tinypic.com/m7yp14.jpg

There are two portions to the logic. We will cover this, the bottom half, first:
http://i51.tinypic.com/jz6xwh.jpg

The first thing you will notice is that there are no counters or timers. This system uses a selector system- This is how you can display your hitpoints in the form of holograms. You will need a selector with as many inputs/outputs as your sackbot or vehicle or etcetera has hit points, plus 1 (If your sackbot has five hitpoints, like here, you will have a selector with six outputs). Then you will need a direction combiner. This will allow you to decrease or increase the number of hitpoints your sackbot has. Hook said direction combiner to the "cycle" input on the selector.

http://i51.tinypic.com/jz6xwh.jpg
Selection 1 will be max hitpoints, and the highest selection will be destruction. You will need an AND gate and a NOT gate. Hook the NOT gate to one input of the AND gate, and the max hitpoints selection to the input of the NOT gate, as shown. Then hook the AND gate to the MINUS input of the direction combiner. Anything that you wish to heal, or increase hitpoints, will hook to the other input of the AND gate. There is a good reason for this! If you are at full hit points, and you pick up a healing item, it will not cycle the selector- Doing so would take you to 0 hitpoints, and death. With this NOT gate/AND gate setup, if you are at full health, the AND gate turns off, and you cannot be healed any further. Anything that causes damage, or decreases hitpoints, can simply be hooked straight to the PLUS input of the direction combiner, to decrease hitpoints.

It goes without saying that the highest selection will be hooked to whatever causes the destruction of the host device, as it represents zero hitpoints.

You may have noticed some or gates below the selector. These are not necessary elements, but they can allow you to instantly take something to zero hitpoints for instant kills, or all the way to max hitpoints for full healing instantly.

Now we will discuss the slightly less complex upper half:
http://i56.tinypic.com/280lab4.jpg

The chained OR gates are what let your hitpoints display read how many hitpoints you have.

The maximum hitpoints selection hooks into the corresponding hologram, as well as the first OR gate. The second selection hooks into the first OR gate. The OR gate then hooks to the second hit point. The third selection hooks into the second OR gate, as well as the output from the first OR gate. To summarize, each OR gate is hooked to the next hit point, and the inputs are the corresponding selector and the OR gate for the next highest hit point. The purpose for this is so that while you are at full hit points, all the other holograms remain lit. If you fall in hit points, the higher ones go out, but not the lower ones. It sounds more confusing than its, and if you look at the picture, you will understand, but to help you are two more images showing how the hitpoints OR gate chian works.

Full hit points:
http://i51.tinypic.com/vo7ktx.jpg

2/5 hit points:
http://i52.tinypic.com/3467vcl.jpg

As you can see, the chain is off above the 2 hit point gate.

Now all you need to do is wire the remaining OR gates to the correct holograms. The sounds are there to make a noise when the player is at low health, like the often hated beeping in the old-school Zelda games.

There! That wasn't so bad, was it?
http://i51.tinypic.com/ei351l.jpg

Now how about a demonstration on how to lose hit points, shall we?
http://i56.tinypic.com/xpu2l0.jpg

Thats the spirit!
http://i51.tinypic.com/f3yt78.jpg

Next section: Item selection and point usage!
2011-04-26 06:56:00

Author:
the Ion Pulsar
Posts: 172


that was a fun read, thnks will you be making a tutorial on how to use this sytem for different strength attacks, or how they affect the life system?2011-04-26 14:35:00

Author:
Skalio-
Posts: 920


Hmm, I suppose I could do something like that. its really simple, so I can get it in with next segment.2011-04-26 15:44:00

Author:
the Ion Pulsar
Posts: 172


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.