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

Efficient grid mode?

Archive: 5 posts


I've wondered how a simplistic SRPG engine resembling a game like Fire Emblem might go over in LBP2, but the first thing that gets me is the selection grid. I know how to make a basic grid-selector using two selectors for coordinates and a series of microchips with selectors inside of them, but this is way too inefficient when you consider how much logic would be required simply to command object at position x,y to interact with object at position x,(y+1) and stuff like that. With only two objects and a cursor on a mere 10x10 grid, the best way to display them I can think of requires 300 tags for the possible coordinates of each object to follow. That's just the graphical side of things mind you.

So, I'm thinking a more object-oriented approach that doesn't rely on actual coordinates but still keeps itself in grid formation is needed. My current idea is to have one tag on each grid square, and when a direction is pressed the cursor checks if there's a tag in that direction using pointed tag sensors and snaps to that tag if true.

If an allied unit's tag is detected within the cursor while X is pressed it would bring up a simple command menu. If "move" is chosen, a blocky diamond-shaped hologram would appear over the unit showing you its movement range, and the cursor will switch to a mode where it only moves onto tags for each square on the hologram instead of the entire map, still making sure the square is a valid map square. Then you have the choice to either confirm with X, causing the unit to snap to the cursor, or cancel with O bringing you back to the unit. Attacking would work essentially the same, only allowing you to perform the action if an enemy tag is on that space. After moving and/or attacking the allied tag on your unit would become inactive until a turn reset is initiated.

Obviously this would be a Tag Hell of sorts but it's seeming like a fairly doable concept in my head at this point. Anyone have any input on this? I know the RPG elements are an entirely different story but I think the basics are what's important for now.
2011-02-16 00:06:00

Author:
Unknown User


I just finished making a cursor that follows a grid movement. It's actually easier than you may think.

Get a piece of flat holo material and put a controllinator on it. To that add an advanced mover, anti grav tweaker (for the dampening), a direction splitter, a direction combiner, a gyroscope, and two counters set to count to 1.

Hook the outputs you want to use on the controllinator to your direction splitter. Now take one of your counters and feed its output into its own reset. Connect the positive output of your splitter to this. Run another output from the counter into the positive input for the direction combiner. Run the combiner into your left/right input of the advanced mover. Repeat the process with the negative output/input.

Now do it all over again for up/down.

Settings
Advanced mover should be set to 100% deceleration/acceleration.
A speed of 30 will make it move one large LBP grid square with this setup, so adjust accordingly.

Anti Grav tweaker should be set with a fairly high dampening (I used 90%)
Gyroscope should be set to max values.

that will make a basic cursor and allow you to move it.
There's a lot of other things that need to be done, like making it recognize the bounds of the playfield, and auto repeat with long button presses.

You can probably use the same basic idea for troop movement.
2011-02-16 00:29:00

Author:
tdarb
Posts: 689


Check this out:

https://lbpcentral.lbp-hub.com/index.php?t=46236-Super-accurate-fast-and-simple-grid-movement
2011-02-16 01:09:00

Author:
Yofig
Posts: 288


@tdarb: That seemed to work perfectly at first, but something causes the grid to desync when two perpendicular directions are pressed in quick succession. I'll try later to see if some prevention logic fixes that.

@Yofig: Looks promising, will give it a try if the simpler alternative doesn't end up working.
2011-02-16 02:04:00

Author:
Unknown User


yeah I noticed that too. I had actually edited mine to use an OR gate feeding from the each of the four splitter outputs then ran that into a single pulser. Then placed AND gates behind it where the original 4 pulsers were, and fed the pulser into each of those along with the signal from the splitter. That seemed to help stop the second press from activating the other direction.

Mine ended up looking a good deal like the one in the Shiwayari posted (even had the same layout), except I didn't use any timers. It's weird how that worked out.

One thing to add, you will probably need a third input on the AND gates, and an XOR with your up/down and left/right controllinator inputs fed into it attached to them. This prevents diagonal movement.

I've also added a repeater with a delay to allow the direction to auto repeat after a small delay if you hold the button down, and a system for recognizing level boundaries.

I'll be working on this level a good bit over the next couple of days. If you want to check out what I have, just send me a message.
2011-02-16 03:51: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.