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

Radar?

Archive: 17 posts


I'm trying to implement a radar as part of the hud in a story driven top-down shooter. Any ideas on how to scale down positional data for enemy/ally movement and way points?2011-03-09 05:48:00

Author:
DigiOps
Posts: 111


If you can't directly translate enemy and player movement to the map then maybe you could use a grid of magnetic keys in the playing area which lights up pieces of holo at equal intervals on the map?

I can't help but think there must be a better/easier way to do it, though.
2011-03-09 07:32:00

Author:
Ayneh
Posts: 2454


Yeah.. maybe use some magnetic keys if it is LBP or use sequencers in LBP2 that should work.. i think you can test atleast2011-03-09 07:37:00

Author:
Unknown User


Have you read rtm's insightful findings on 'analogue' signal scaling (http://www.lbpcentral.com/forums/entry.php?2325-Analogue-Logic-4-Basics-of-Sampling-amp-Scaling) yet?2011-03-09 08:18:00

Author:
tameturtle
Posts: 150


Reading now. I've been through a handful of the others, but I just can't wrap my mind around how to use it. The answers are there, but I'm having a lot of issues grasping how to implement it in a level to put it to use.2011-03-09 18:22:00

Author:
DigiOps
Posts: 111


I tinkered with a radar in the beta and eventually abandoned it because I was emitting the blips on the screen, but since the screen moved along with my ship, it would leave the blips behind. Even before I realized that, it only worked adequately, not great.

What I did was make a rod of hologram with tag sensors spaced along it and bolted it at its center to my ship. Then I duplicated the rod, replaced the sensors with emitters and shrunk it down to fit over the radar display screen I'd built (I shrunk the emitter rod, not the sensor one). I wired each sensor to the corresponding emitter and set the emitters to spit out tiny leds. Then I set both rods to rotate at the same speed. Whenever one of the sensors would detect an enemy ship's tag, the emitter would spit out an led on the screen and because they were spaced the same and the spinning was synched, the led would be in approximately the right position. Sometimes two sensors would trigger and I'd get two blips side by side, but that wasn't a big deal to me.

As I said though, if your radar screen moves, this idea is really flawed. I asked around for suggestions back then and somebody suggested putting movers on the radar blips set to respond to the same input as my ship so that they would theoretically move along with my ship and radar. I never got around to trying it, but I'm pretty sure it wouldn't have worked all that well: first there's the acceleration time to consider and then there's the differences in how momentum would affect my ship compared to how it would affect the blips. A better solution might be to make a grid of tags on the radar screen and have the blips snap to the nearest grid point with a full speed 100% accel/decel follower. I'm not sure how well that would work, particularly if the radar display is small, but it's an idea.
2011-03-09 19:17:00

Author:
Sehven
Posts: 2188


The tag grid is something I considered, but that made me concerned about thermo cost. I may have to scrap the idea of a radar, but not without trying any option I have available. I've still got enemy and ally AI to fake so it may be a while to get to it.2011-03-09 19:33:00

Author:
DigiOps
Posts: 111


As for making the blips move with the screen, how about this:

1: Tag the center of the radar screen.
2: Create different "blip" objects (holo) - each a circle with a single blip on it, at varying distance. On the center of each, place a follower that follows the radar screen tag (aggressively). You might want to set up a timer on these "blip" objects so that they fade in intensity after they're emitted.
3: Create the radar "sweep" by including a layer that sits on top of the screen and rotates. (Can you do this with holo? I think so...) This "sweep" could also include the sensor itself at its center (tag sensor or whatever, restricted to a certain arc, and set to output proximity readings)
4: Attach the sensor output to a sequencer (positional) with batteries that key emitters that produce the various blips. The emitters have to be on the rotating piece so that they're oriented the right way when they emit.

Followers can fall behind what they're following, of course, so the solution isn't perfect, but it should be pretty good...
2011-03-09 19:45:00

Author:
tetsujin
Posts: 187


I played around with a radar as well, and avoided emitting anything (and avoided Sehven's problem as well). I just used a thin piece of holo with 10 leds down it's length. This was bolted to the center of my radar with a rotator on its center. For detection, I put a tag sensor with a very thin angle on a piece of holo, as well as a rotator on the center. Both the detector and the LED display were rotated at the same rate. I connected the tag sensor to a sequencer, which was set to positional, and placed ten batteries across its length. Each battery was connected to an LED. So if tags are placed on what I wanted to detect, the tag sensor would sweep across them, and light up the appropriate LED. I never finished it, but the proof of concept worked.

The only problem is that if two objects are in line with each other, only the closest one is displayed.

Edit: aww man - sniped by tetsujin.
2011-03-09 19:52:00

Author:
Shanghaidilly
Posts: 153


You can triangulate the location of any tag by using three sensors and comparing the analog closeness signal. Given that you now have three readings of distance, it should be possible to scale that down and place the objects representative blip on a radar screen.

I've been toying with something similar to solve the "best path" problem for ghosts in pac-man
2011-03-09 20:15:00

Author:
tdarb
Posts: 689


I played around with a radar as well, and avoided emitting anything (and avoided Sehven's problem as well). I just used a thin piece of holo with 10 leds down it's length. This was bolted to the center of my radar with a rotator on its center. For detection, I put a tag sensor with a very thin angle on a piece of holo, as well as a rotator on the center. Both the detector and the LED display were rotated at the same rate.

But that way you don't get the persistent image/fade out effect of a phosphor display...

As for only getting the closest item: you could work around that (and detect up to 4 targets at once) by having multiple sensors with different numbers of "tags required", feeding multiple sequencers, and combine their outputs with OR gates...

But I might actually be inclined to leave it detecting "just the closest". Radar's not perfect, after all. If someone's pulling a Jet Stream Attack on you, it's reasonable for them to show up as one target.
2011-03-09 20:19:00

Author:
tetsujin
Posts: 187


At least I'm not trying to recreate sonar... lol.2011-03-09 20:23:00

Author:
DigiOps
Posts: 111


At least I'm not trying to recreate sonar... lol.

No thats my job
2011-03-09 20:35:00

Author:
Kern
Posts: 5078


You a squid?2011-03-09 20:49:00

Author:
DigiOps
Posts: 111


I just had a play with using three sensors and a tag. It is doable that way. It just takes some fine tuning and creative use of analog signal processing. i made one that mostly works, but I haven't fooled with adding in checks for negative values yet. So it is only accurate in one quadrant of the x/y axis, but that is enough to say that it is possible.

I'll probably finish it up at some point tonight/tomorrow just for funzies.
2011-03-09 21:52:00

Author:
tdarb
Posts: 689


You a squid?

Nope, just making Sonar,
2011-03-09 22:11:00

Author:
Kern
Posts: 5078


But that way you don't get the persistent image/fade out effect of a phosphor display...

True. I thought about emitting the "phosphors" with a short fade effect, but then it got complicated if I wanted the radar to move around the level (as Sehven pointed out).
2011-03-10 14:46:00

Author:
Shanghaidilly
Posts: 153


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.