Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Need a greater then symbol for pathfinding algorithm
Archive: 10 posts
Hi guys! Thanks for the help last time I asked. I found a good way for basic unit pathfinding via a lookat rotator and wall avoidance logic. But it goes to hell when I add multiple units. So I am looking to reproduce dijecks algorithm ingame. I have the basics down but what i need is a greater then statement. I think the answer lies in a sequencer but haven't been able to get the math right. If this has already been done sorry for the redundant question. Personally I would not like to see the finished product as my knowlage doubles as I stumble my way through a new problem. And yes it is for a rts well actually a action/rts Thanks in advance, Beansly jones | 2011-07-03 03:25:00 Author: Unknown User |
You can compare 2 values using a combiner and divider. A for positive, B for negative. If A>B then positive end, if A=B then no end, if A<B then negative end. Just use a sequencer + battery to detect if any value exists for each the positive and negative (analog to digital conversion), and you should be able to detect which is greater/less than. Use multiple comparisons for more values. Not sure if this helps, I didn't really understand what you were trying to do. | 2011-07-03 03:47:00 Author: SSTAGG1 Posts: 1136 |
Would the normal math formula apply before I do this? For example subtract each value from a 100% battery twice via usual lbp2 math logic? Or do I just take the value from the source directly? When you say use multiple comparisons for more values, would it be like this for four values? A>b A<c A<d B<a B<c B<d C<a Etc… ... D<a ... ... Or is their a easier way? I am using this as part of Dijkstra's pathfinding system to guide units more efficiently then my current system. http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm What I am using the greater then logic for is I have a grid of nodes laid out on the map. each node has 2 sensors, one for the destination distance, one for detecting the distance of the closest node relaying the destination distance.Using tag strength to rebroadcast the destination distance to all touching nodes and adding +1 to form a sequential nodemap. When complete I can tell my units to move to the lowest number node they detect in their range. More specifically, the (greater then) logic will determine (and isolate) the strongest tag signal from 4 seperate tag sensors one facing up,down, left and right. I then add +1 to that signal strength and rebroadcast it etc... Thanks again! Beansly Jones | 2011-07-03 05:27:00 Author: Unknown User |
to find which is greater of 2 signals, just connect straight from the source to the combiner, combiner to a splitter then a positional sequencer on each output with a battery filling each sequencer. to check which is greater of more than 2 signals, imo the best way would be to wire all signals into an OR gate (OR will output the highest signal) then compare each signal to the output of the OR to see which matches. to see if 2 signals match you wire them to a combiner, then a positional sequencer with a battery filling the whole thing, then wire the battery into a NOT gate. | 2011-07-03 12:11:00 Author: evret Posts: 612 |
I know this doesn't really have anything to do with the post, so sorry for this. BUT, why is it that there has been such a massive influx recently of people on the internet writing 'than' as 'then'? It's beginning to really wig me out, so many people are doing it I'm almost worried I've actually been reading it wrong my whole life and have only just noticed. For the record people, "Greater than" indicates quanta A is larger in magnitude than quanta N; "Greater then" is nonsensical. Then is a common adverb in English, indicating the apodosis of a conditional sentence. It is never equivalent to or synonymous with the conjunction than Sorry to be a prune, i really had to get this off my chest. | 2011-07-03 14:18:00 Author: Epicurean Dreamer Posts: 224 |
I played a level a while ago that had a bunch of very similar things to what you're after. http://lbp.me/v/zjrzp3 This doesn't have a greater than function but maybe some of the logic will be illustrative. | 2011-07-03 14:49:00 Author: Ayneh Posts: 2454 |
An AND gate will take the lowest of two values. The only catch is that both values must be >1. | 2011-07-03 15:50:00 Author: piggabling Posts: 2979 |
to find which is greater of 2 signals, just connect straight from the source to the combiner, combiner to a splitter then a positional sequencer on each output with a battery filling each sequencer. to check which is greater of more than 2 signals, imo the best way would be to wire all signals into an OR gate (OR will output the highest signal) then compare each signal to the output of the OR to see which matches. to see if 2 signals match you wire them to a combiner, then a positional sequencer with a battery filling the whole thing, then wire the battery into a NOT gate. Cool,this clarifies things greatly. So the or gate will naturally select the highest signal to convey, good to know. Is there an avanced guide to programming that examines the logic symbols in depth? Thanks for the help Beansly Jones | 2011-07-03 15:52:00 Author: Unknown User |
Advanced guide? I think you're looking at it right here. The tutorials and help section are your best bet for getting exactly what you need to know afaik. You can also look at the wiki, which lists most if not all the subtleties of the logic, though not exactly how to use them for your own uses. | 2011-07-03 15:59:00 Author: SSTAGG1 Posts: 1136 |
I know this doesn't really have anything to do with the post, so sorry for this. BUT, why is it that there has been such a massive influx recently of people on the internet writing 'than' as 'then'? It's beginning to really wig me out, so many people are doing it I'm almost worried I've actually been reading it wrong my whole life and have only just noticed. For the record people, "Greater than" indicates quanta A is larger in magnitude than quanta N; "Greater then" is nonsensical. Then is a common adverb in English, indicating the apodosis of a conditional sentence. It is never equivalent to or synonymous with the conjunction than Sorry to be a prune, i really had to get this off my chest. Busted by the grammar police! First time for me, I feel compared to most internet users my grammar and sentince structure is above par ( excluding spelling) Beansly Jones | 2011-07-03 15:59:00 Author: Unknown User |
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.