Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Over 100% battery output?
Archive: 24 posts
Ok so, I am building a tower defense with various enemy types and tower types. The current problem is getting the enemies health to increase gradually over time (because it would be dumb if the difficulty never increased) Currently I am using a timer as a health bar but it is very limiting. The best solution I see is taking input damage and dividing that by X*Wave# (X being whatever it takes to make it slowly increase) as that would slowly increase the health and it means that I don't have to build 20 million enemies. But that uses multiplication and division, and the only thing I know how to do is addition and subtraction currently. The game is 90 percent done and the only thing I still need to do is this, build a intro menu and get a certain lazy artist to finish his artsy stuff *cough cough*. Heres a sketch of what their health system currently looks like: http://img89.imageshack.us/img89/144/microa.png Video tutorials and or in game help would be greatly appreciated! (depending on how hard the concept is) | 2011-10-24 00:26:00 Author: Turtlelink2 Posts: 73 |
First off: https://lbpcentral.lbp-hub.com/index.php?t=63907-LBP2-math Lol... So if you want something to happen over 100%, then you would add signals together. (EG: Adding 60% + 90% = 150%) Easily accomplished. Just watch this video because I'm too lazy to type out how to do this... xD http://www.youtube.com/watch?v=6TCbjIm5kSo Oh no! This is the second time I've referred somebody to someone else's work! I'm breaking my own rule! | 2011-10-24 01:13:00 Author: Speedynutty68 Posts: 1614 |
No no, I got that, but with a signal combiner you can only add one and subtract one, there is no 60+90, there is only 60-90. I believe subtracting a negative doesn't work either. EDIT: ignore that....I should learn to watch the video before I reply XD | 2011-10-24 03:11:00 Author: Turtlelink2 Posts: 73 |
So I get a 'Thanks!' because I helped...? :o Lol... | 2011-10-24 04:41:00 Author: Speedynutty68 Posts: 1614 |
You get a thanks, I watched the video but I still don't see how to get over 100% seeing as it takes true values..... | 2011-10-24 04:49:00 Author: Turtlelink2 Posts: 73 |
Lol... Wait so that doesn't work!? Hold on... Let me try... Ok... I'm obviously way too tired to do this right now... I can't even remember how to do normal health correctly... D: Whatever... I pass on responsibility of this question to... Aya! Hear that Aya!? I tagged you! | 2011-10-24 04:59:00 Author: Speedynutty68 Posts: 1614 |
I don't believe there's any way to exceed 100 as an absolute value, but you could use the full analogue range if you're just looking to store information. One solution could be to hold each value in a parallel circuit and infer the overall value from them separately. Another would be change the variable operand either by number of iterations or signal strength, i.e. your max health is always 100% in terms of the battery signal strength but all attacks are reduced by a set percentage or number of times they're performed to simulate an increase in health. | 2011-10-24 10:57:00 Author: Ayneh Posts: 2454 |
or you can do away with the timers altogether if you don't need them for display, and use a series of gates that are fed back into themselves. For example, an OR gate fed back on itself has the same analog storage as a timer without the 33% per frame limitation. Take your analog input and run it into the negative input of a direction combiner. Then put a NOT gate on the positive input and another NOT gate on the output. Now connect the NOT gate on the output into the input of the other NOT gate. That's a very basic analog adder with persistent storage. Simply pulsing an analog value into the negative input on the combiner will add that value to whatever is already being stored. Also, you can actually read much finer percentages than one may first think. You can relatively easily go as far as .01 percentage point effectively raising your per component storage to 10000 rather than 100. There is a learning curve involved, and sending the results to a display introduces a whole other set of hurdles, but it can be done. I'm just now experimenting with it more myself. | 2011-10-24 12:23:00 Author: tdarb Posts: 689 |
Reducing damage instead of increasing health may work, but I feel it may run into problems when dealing with AOE damage (damage is greater the closer to the explosion you are) Il see if they play nice a little later. or you can do away with the timers altogether if you don't need them for display, and use a series of gates that are fed back into themselves. For example, an OR gate fed back on itself has the same analog storage as a timer without the 33% per frame limitation. Take your analog input and run it into the negative input of a direction combiner. Then put a NOT gate on the positive input and another NOT gate on the output. Now connect the NOT gate on the output into the input of the other NOT gate. That's a very basic analog adder with persistent storage. Simply pulsing an analog value into the negative input on the combiner will add that value to whatever is already being stored. Also, you can actually read much finer percentages than one may first think. You can relatively easily go as far as .01 percentage point effectively raising your per component storage to 10000 rather than 100. There is a learning curve involved, and sending the results to a display introduces a whole other set of hurdles, but it can be done. I'm just now experimenting with it more myself. I do need it displayed, but because you cant change the starting amount if a timer in play mode this may be a better solution, il try this tonight but I will probably need help XD | 2011-10-24 16:47:00 Author: Turtlelink2 Posts: 73 |
Maybe you could try using a speed sensor to create a signal, then store it in a feedback loop. I heard that the analog signal of a speed sensor is the percentage of (the object's speed) / (the sensor's set speed). So if you had a speed sensor set to 4.0 on an object moving at 3.0, it would return a 75% signal. I'm not sure it'll work, but maybe you could make a speed sensor set to 10, and make it move at a speed of 30, which should theoretically return a 300% signal. But now that I'm thinking about it it probably won't work because I think it returns a digital 100% signal when it reaches the set speed.. perhaps it's worth a shot though If you manage to output that signal, make a node from the wire and loop the node back over to itself to save the 300% signal (it's explained in comphermc's feedback loop tutorial on youtube). | 2011-10-24 22:03:00 Author: RabidJellyfish Posts: 130 |
Im pretty sure that the output will stop at 100%, because they ould allow batteries to go over 100% if that was true but I can give it a shot. EDIT: Added a lot more information to first post | 2011-10-24 23:33:00 Author: Turtlelink2 Posts: 73 |
There's only one way to create an analog signal over 100% (and it might not work any more), which is by using a Score Sensor. For example, if you have a Score Sensor set to 100, and the player has 200 points, you'll get a 200% output. However, there's not much you can do with it. If you need greater signal resolution than can be provided with 1% batteries, you can use Timers to create smaller signals. Check out this thread (https://lbpcentral.lbp-hub.com/index.php?t=58436-Feedback-Looping-Problems). To scale an analog signal by a fixed value, check out this blog entry (http://www.lbpcentral.com/forums/entry.php?2409-Analogue-Logic-5-Division-amp-Multiplication). To scale an analog signal by another analog signal, there's a simple low-thermo way here (https://lbpcentral.lbp-hub.com/index.php?t=62920-Angle-Sensor-Use&p=924381&viewfull=1#post924381), but it does require using physics. | 2011-10-25 18:33:00 Author: Aya042 Posts: 2870 |
I've built in the last years a health meter toolkit (http://lbp.me/v/5e2r2g), which uses comphermc's feedback loop logic. The v2 will be out this week, maybe tomorrow, so you might want to wait for it to come out as the structure will change. Thanks for the tip about speed sensors, that's a nice way to create signals. I'll also try dividing using evret's divide chip, to create 0.1 signals with more precision than using timers. | 2011-10-28 02:32:00 Author: Unknown User |
I've built in the last years a health meter toolkit (http://lbp.me/v/5e2r2g), which uses comphermc's feedback loop logic. The v2 will be out this week, maybe tomorrow, so you might want to wait for it to come out as the structure will change. Thanks for the tip about speed sensors, that's a nice way to create signals. I'll also try dividing using evret's divide chip, to create 0.1 signals with more precision than using timers. that chip uses timers so it still has the inaccuracies, also i didn't come up with that method, it's the same as in rtm's logic blog but i cant remember who first showed me. | 2011-10-28 08:26:00 Author: evret Posts: 612 |
Using the rotation sensor method above, I was able to get a value of .00172. That is where the rotator activates. It is possible that it is lower, but getting below that is proving difficult. By taking 0.00172 and subtracting it from 0.00173, it is possible to store a value of .00001 in a single gate. It may be possible to get even lower than that, but 100,000 is quite a high health. I'll continue playing with it and see how far I can get. | 2011-10-28 13:51:00 Author: tdarb Posts: 689 |
Erm, actually evret you are wrong. My chip uses only timers to produce 0.x batteries. The memory storage uses feedback loops, not timers. You see, I didn't follow comphermc's health meter guide, but his feedback guide. (http://www.youtube.com/watch?v=c4GaCQ1eRVE&feature=channel_video_title) It stores a signal in a combiner/divider loop. The display uses the timer override system, but the timer isn't used in counting. The timer override is made by hooking a combiner to a timer set to time 0.1, variable speed, and hooking the timer to the negative of the combiner. Let's say you connect 23% to the positive and the timer is full. 23-100=-77 so the timer goes down at 77% of it's full speed. Since it is 77% of 0.1 sec/frame, it's fast anyways. When the timer reaches 23, it does 23-23=0 the timer stops moving. Basically, whatever the signal plugged in positive will be shown, but the timer's number actually goes up-down-up-down by 0.something every frame. Not visible unless using a verrrrry long timer. The health meter toolkit used to work with counters since timer's weren't precise enough. Now using feedback loops is 100% precise, except with 0.x batteries as each battery is around 0.000002 off. But really, who uses that much precision. Oh, and the fact that they were made using probes made with timers also changes the precision of .000001 perhaps ? Anyways, I'm very precise allready, but if the speed sensor formula works with more precision than timers, I'll take it ! | 2011-10-29 02:40:00 Author: Unknown User |
I'm running a few simulations now, and I think I am getting close to nailing down the formula for calculating proper timer values. It seems that the part that is off is in the ten thousandths position. @pivott, I still have another couple of hours on the scenario I am running now, but I would be really interested to see how you isolated your signals. I'm getting some strange readings on mine. | 2011-10-29 03:42:00 Author: tdarb Posts: 689 |
Erm, actually evret you are wrong. My chip uses only timers to produce 0.x batteries. The memory storage uses feedback loops, not timers. You see, I didn't follow comphermc's health meter guide, but his feedback guide. (http://www.youtube.com/watch?v=c4GaCQ1eRVE&feature=channel_video_title) Erm, actually pivottt, i was referring to the divide chip i gave you........ | 2011-10-29 06:18:00 Author: evret Posts: 612 |
Erm, actually... yeah, ok. There's no other way to divide then ? Well, too bad. | 2011-10-29 18:18:00 Author: Unknown User |
well as previously stated you can use a rotator and rotation sensor on a bit of holo to do both multiplication and division, but it can be annoying to use as part of a logic system as it cant just be added to a chip | 2011-10-30 04:21:00 Author: evret Posts: 612 |
I FOUND IT ! You can't divide by 10, 20, 30, 40... but it works with 90 !!! So I just multiply back by 9. There you go, precise division by 10. wiki.lbpcentral.com/Talk:Timer for the list of numbers by which you can divide with precision. Thank you wiki ! I also did the mover thing with the speed sensor to do 0.1% signals. It works and with it I'm sure there's no error compared to timer-based ones. The Health Meter toolkit 2 is still in the process (takes longer than I thought cause I have loads ideas) but know I think to only thing left is building the actual level. I have started it, and it will be portal-themed ! YAY portal ! I've realised that since I'm almost always talking about this, searching health meter on the site only leads to random posts in which I posted. I managed to find only one actual tutorial about health meters here, and it was timer-based so I might make a text-based tutorial on the forums. Here's a preview of the toolkit (actually, I changed it a bit since...) http://i9.lbp.me/img/ft/68995bb5ec28e833de0f80e0bf385c1c22abb0d4.jpg | 2011-11-05 04:30:00 Author: Unknown User |
I don't believe there's any way to exceed 100 as an absolute value, but you could use the full analogue range if you're just looking to store information. One solution could be to hold each value in a parallel circuit and infer the overall value from them separately. Another would be change the variable operand either by number of iterations or signal strength, i.e. your max health is always 100% in terms of the battery signal strength but all attacks are reduced by a set percentage or number of times they're performed to simulate an increase in health. If i remember, xFreeze saved a battery that went up to 4,000,000. Ask him about it, but I honestly dont know if he still has it/ or will remember. | 2011-11-05 05:20:00 Author: StaticLinuxpro Posts: 482 |
If i remember, xFreeze saved a battery that went up to 4,000,000. Ask him about it, but I honestly dont know if he still has it/ or will remember. I was able to get around there too, but i can't verify the accuracy of it. I've run simulations using the lowest values I can achieve. There are rounding errors in them. I have yet to get anything even relatively accurate below the 10.000ths place. In fact, strangely enough, it seems that there is a 2/10000 reserve in the circuit. When feeding a signal of 1/10000 into a feedback loop, I get a reading of 3/10000. That could be something in my isolation methods, or something inherent in the circuit. I've yet to figure that out. | 2011-11-05 07:02:00 Author: tdarb Posts: 689 |
If i remember, xFreeze saved a battery that went up to 4,000,000. Ask him about it, but I honestly dont know if he still has it/ or will remember. Oh cool, I haven't heard of a battery that can be set to 4 million. Did they write about it anywhere? | 2011-11-05 16:18:00 Author: Ayneh Posts: 2454 |
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.