Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Ideas and Projects
#1
A New Damage System!? Advantage in variability, but hard to display *Now with pic*
Archive: 6 posts
This was an idea of mine that I didn't think would work, so I posted it here. Turns out I got it to work. I'm going to try editing this post to reflect how this idea for the health/damage system works, though we could probably just discuss that in the tutorial itself. Speaking of which.... There is now a tutorial: Link (https://lbpcentral.lbp-hub.com/index.php?t=53194-How-To-Create-A-Highly-Variable-Damage-And-Health-System) I just thought of something that might be useful. I've been trying to make a very simple health and damage system, since my level requires several of these systems to exist at the same time, and they tend to be quite complicated. I've managed to produce a fairly simple damage detection system (will have the tutorial up soon, just have to iron out some bugs), but I've recently run into the problem of giving units the correct amount of health. ______ What I've thought of is that instead of using just a timer to measure health, why not compare 2 timers, one which records how much damage is dealt, and one which has a static value for the amount of health. You put the health timer into the positive terminal of a combiner, and the damage into the negative. When the value becomes zero or negative (detected by using a divider), the unit is destroyed. The issue with this method is that you can not accurately display how much health a unit has. You could use a sequencer set to positional to give a rough estimate of the amount of health, but it will not display exactly how much health is left. If you really need to display the health, you could put the combiner output into an analog display system, but those are incredibly complicated, and for a range of values of 1-30000, entirely unfeasible. The benefit if using this system is that you can easily scale damage, and deal any amount of damage to any unit. _____ Example: You use timers to adjust how much damage a projectile does. This allows for a range of 1-10000 damage (timer max at 1000, current time at 0.1). In the commonly used timer method, if you want to kill the weakest unit in 3 hits from the weakest gun, you'd need to give that gun a value of 1000/1000 on the timer.......... .....but wait! That's not right, now the damage dealt by the weakest gun is the highest possible damage possible, not the weakest. It does 10000 damage instead of 1! In order to make the damage from the weakest gun still do 1, you would need to use the method I described. Give the unit a health of 0.3/3000, and make the damage dealt by the gun 0.1/1000. Now, when 3 shots are detected, the damage timer would output 0.3/3000, or 3 damage. Thus, the health, 0.3/3000, minus the damage, 0.3/3000, is now zero, and the unit is killed. ______ This method also allows for any value for health, instead of the multiples of thirds. Before, the only available healths were 300, 600, 900, etc (or 30, 60, 90, or 3, 6, 9, or.... and so on, depending on how you scaled your damage). Now, you can just set the health timer to 0.1/3000, and thus a 1 damage projectile (0.1/1000) would destroy the unit in one hit. ______ Here's a picture, since they are much easier to understand. http://ic.lbp.me/img/ft/98cd75ade813e3cabef217f3e727511d301d37a7.jpg The green MC (Microchip) is for healing. The red MC is for damage. The yellow MC is for resetting health back to max (by removing damage). The dark blue MC is just the base for holding the logic. The light blue MC is the projectile logic. I'm going to make a tutorial for this, so I will explain how to make it and how it works there. I will explain why I put random coloured dots as well. ______ Hope this is useful to someone, since it is a major breakthrough for me, even though it might seem obvious. Hint: You can always just display damage through visual effects. In my level, I am displaying damage through smoke and fire. As units get hurt, they begin to smoke more, and fires begin to appear (this is using a sequencer attached to the combiner). It is annoying that the exact health cannot be displayed, but for me, the benefits far outweigh this drawback. ______ Any thoughts? See any issues? Does it make sense? | 2011-03-18 03:10:00 Author: SSTAGG1 Posts: 1136 |
You may find this of interest http://www.youtube.com/watch?v=JXJzQrsGxpc | 2011-03-18 03:22:00 Author: Ayneh Posts: 2454 |
No, see, that method is the method I described as being the less useful version, as long as you don't need to display the health. You can't kill a unit in one hit, nor can you adjust health to any value you want. Nor can you use any value to deal a set amount of damage to different units. The setup comphermc used is much simpler, but not as useful. I've made several damage systems, ranging from a 17 bit binary setup to impact and tag based systems. The method I describe above is something new (afaik). ____ EDIT: NVM, just tested it again and ran into a small issue, will look into fix. Ignore my post until I find out what's wrong (this is what I get for posting an idea before testing it, lol). | 2011-03-18 03:30:00 Author: SSTAGG1 Posts: 1136 |
Okay, so I fixed it. I'll have a pic of it soon. It works the same, only differences are that the health timer is max 3000, each 0.1 gives one health. So max value is 3000 = 30000 health, while min. value is 0.1 = 1 health. Damage timer is max 0.1 Projectile timer is max 1000, each 0.1 gives one damage. So max damage is 10000, while min. damage is 1. It can't be displayed properly, yet, but I should have a method soon. Also, the only things that can't be destroyed in one ht are the units with more than 10000 health. This could be done though by making a sensor which is only for destroying the unit in one hit, attaching it to an OR gates and putting into the destroyers (with the other OR input as the signal from have no or negative health). I edited the main post to reflect these changes. | 2011-03-18 06:47:00 Author: SSTAGG1 Posts: 1136 |
I have been fiddling with this kind of health system myself. Its nearly same but I am using AND gate loop to save the current damage value. If you want to take look at it I have put it as prize to this level (http://lbp.me/v/yc3h7-) | 2011-03-18 07:37:00 Author: waD_Delma Posts: 282 |
I couldn't log into LBP.me for some reason, but I'll have a look when I can. Also, updated original post with a picture of the logic. It really is quite simple for something so presumable complex. EDIT: Saw your level, it's a little different, but I see what you did. EDIT 2: There is now a tutorial: Link (https://lbpcentral.lbp-hub.com/index.php?t=53194-How-To-Create-A-Highly-Variable-Damage-And-Health-System) | 2011-03-18 07:56:00 Author: SSTAGG1 Posts: 1136 |
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.