Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Better way of displaying incredibly small fraction values?
Archive: 7 posts
Does anyone know of a way to represent a fraction like 0.7/86400.0 in an accurate readable display (well, accurate meaning a timer or a numeral display)? This is related to my damage system (link in sig). I need a way of showing progress to 0 from the value (in this case 0.7). The only way I have thought of is to make several comparisons for preset values, so when 0.6/86400.0, activates one signal, then 0.5/..., and 0.4/..., until I reach 0.0/... My plan was to make up to 10 indications of health, so for 10000.0/86400.0, I'd just make a comparison to every 1000.0. Does anyone have a better way to do this? The solution needs to be entirely logic based as well.......fun. | 2011-03-25 01:28:00 Author: SSTAGG1 Posts: 1136 |
Could you divide max health by ten and multiply it by 1, 2, 3, 4, 5, 6, 7, 8, 9 and compare if its smaller than current health? | 2011-03-25 06:11:00 Author: waD_Delma Posts: 282 |
The comparison system works, it just doesn't produce an accurate readable value. All it can do is activate some visual indicating the health. (and sorry, in the OP I meant to say progress TO zero, and measure in decreasing values, since I am measuring health, not damage.......although this really doesn't matter either way) I may in fact add some more components to my design, where instead of a timer for the health, just add / subtract health from the stored health value to set max health, and then deal damage by using this value and modifying it again. I think the comparisons to preset visuals is the method I'm going to use, but I'll have another go at it later. I'd like to implement a negative feedback loop (not sure if I used the right term here), and use this to adjust a timer. Damage would factor in how much health the unit has 'somehow'. Damage would then go into a combiner, which would go into a directional timer. The timer would loop back into the negative, thus producing a timer display based on the damage to the unit. I know the last part would work, but accounting for how much health the unit has...hmm. Not sure how I'd do it, but if my previous work is any indication, I'll stumble onto a solution eventually. Is this making sense? What I need to do is factor the health of the unit in with the damage value. Adjusting the feedback timer would do nothing since its an analogue % signal. Before the damage goes into the timer, I need to modify it to account for health......... I think I'm onto something. I'll post my results soon. I need to finish some homework and sleep first though. | 2011-03-25 06:39:00 Author: SSTAGG1 Posts: 1136 |
Only way I know how to do that would be dividing current health by max health. The problem with that is that if you want change max health you need to have different divider for each different max values and that isn't practical. | 2011-03-25 06:46:00 Author: waD_Delma Posts: 282 |
Well, if it means I can make a timer display, I think losing the adjustable max health is an acceptable result. and yes, that's exactly what I was trying to think of. Just make it a percentage. Why didn't I think of that sooner. Anyway, I was actually going to use preset timers for the different healths, so this would work. Still, if someone knows of a way to divide by a variable value, help would be great. EDIT: The only other drawback with this is that I'd be limited to 1/3rd of the previous max value, since the divider would need to use the speed scale timers constantly resetting (or is there another method?) That's still 288000.....so unless you're making an even more ridiculous level than my rpg, this shouldn't cause an issue. | 2011-03-25 06:56:00 Author: SSTAGG1 Posts: 1136 |
Hmm, I've managed to make the display work for a max health unit (864000 health), but anything else just produces a less than 100% timer. I know why, but how to solve it, I dunno. I think this means that the only possible way to get the timer to actually show the amount of health the unit has is to adjust the entire damage system to use the units max health as the global max health (not going to happen), else the damages from the projectiles would not deal the correct amount of damage.......which is exactly what the speed scale timer method is. Oh well. The original system works, just without the display, which I don't really need. Back to the comparisons then. | 2011-03-26 03:24:00 Author: SSTAGG1 Posts: 1136 |
It's not perfect, but what if you ran your health into a positional sequencer as a percentage? Then have 10 stages of damage so when they hit 90% it drops off a chunk, at 80% it drops off another. it's not a completely fluid choice, but it is visual and would give some feedback to the player. | 2011-03-26 05:37:00 Author: tdarb Posts: 689 |
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.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.