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

Custom grid movement using selectors [update]

Archive: 16 posts


[update]: I have added a movement repeater in the tutorial level, along with a diagonal direction blocking system.

Hi, here's a way to do grid movement using selectors that I'd like to share with you:
http://www.youtube.com/watch?v=3NZXegvXHaE

To summarize, I use two coloumns filled with tags, activated by selectors. By making the vertical coloumn follow the horizontally activated tags, I create a grid, based on tag placement.

The technique is suitable for small grid based games, and grid menus. For big playgrounds, more connections must be made, but the number of connections do not increase exponantially, only linearly. The advantage of the technique is being able to scale the whole grid, employ custom grid sizes by uneven placement of tags, and the impossibility of falling out of the grid with fast movement, which is a problem inherent with grids using advanced movers. The disadvantage is having to make 1 connection for each unit (not the whole area, tho, only 1 for each horizontal and vertical size), and the need to have overlayed elements for each object that will follow the grid, thus making this technique suitable for menu systems or small grid based games with limited amount of characters on screen. It can be mixed and matched with other grid techniques, e.g. this may be used for vital objects that shouldn't fall out of grid.

If you can't bear with me slowly talking in the video tutorial, the level / objects can be found at:
http://lbp.me/v/0k6k8s

It's a copyable and shareable level, and contains object from the tutorial.

Cheers!
2011-05-27 13:50:00

Author:
hesido
Posts: 166


I also did a tutorial about grid movement. No wait...I did two

I think my way is a bit easier.
Take a look at it:

Grid Movement:
http://www.youtube.com/watch?v=ncZn9tXwVbI&feature=channel_video_title

Grid Rotation:
http://www.youtube.com/watch?v=oUIn9_rvDjQ&feature=relmfu
2011-05-28 22:29:00

Author:
ScorpSkull
Posts: 92


@ScorpSkull

Your way is probably easier, but when I tried it out it would go very slightly off grid. I messed around with a lot of grid movement stuff when making the Random Maze Generator and found that followers give the most accurate grid movement.

@hesido

Good tutorial. I like how you simplified it by having only one vertical collum.
2011-05-29 02:58:00

Author:
anthman852
Posts: 66


When I did my way it never goes off the grid.

I tested it of course properly!
2011-05-29 04:25:00

Author:
ScorpSkull
Posts: 92


hmm...I think I still have the level I used to test it. I'll double check that I set it up right and let you know what I find out.2011-05-29 06:41:00

Author:
anthman852
Posts: 66


@anthman852:
Thanks, I hope this method is helpful in some situations I'm making an infinite motion version without any size restrictions that uses a few tags. Then the only limitation would be having to name the tags differently for each object, but as I mention, this technique may be used for critical objects on the level.

@scorpskull:

I think most people know about your tutorials. This is another method, one that has advantages and disadvantages over the advanced mover method, but the methods can co-exist peacefully.

Actually, I use advanced movers for my boulder dash level, and I've done countless hours of testing. Advanced movers tend to make you fall out of grid if you have a lot of high-frequency input (problems begin at around 0.1 seconds): waggle the controller for a while, and you'll see. Advanced movers sometimes, although infrequently, do not honour the grid when the temperature gets very high. This as I speak as I have dozens of moving objects in the boulder dash level, and I can do a lot of testing for different situations. For the high frequency input, I use signal blockers if the next signal is less than 0.2 seconds apart, otherwise, sometimes you fall out of grid.

As I also mentioned (if you watched the entirety of the tutorial) the technique allows for arbitrary grid sizes, you never know when you may need it
2011-05-29 07:26:00

Author:
hesido
Posts: 166


Nice tutorial2011-05-29 13:09:00

Author:
Unknown User


@ScorpSkull

I remember now why the method you used doesn't work as well. The problem is that the advanced mover requires a certain amount of time to decelerate properly so if you use a basic pulse and have fast inputs the mover can't come to a complete stop, thus moving the object off the grid. Take a look at Shiwayari's tutorial to get a better explanation.

While his tutorial fixes the problems, it has a required delay in between movement. If you want to have faster grid movement than hesido's method is the way to go.
2011-05-29 18:46:00

Author:
anthman852
Posts: 66


If you set the Deceleration to 100% then you don't have a problem.2011-05-29 21:09:00

Author:
ScorpSkull
Posts: 92


No...even with 100% Deceleration you can move too fast. Looks like I forgot the link in my last post...here is Shiwayari's tutorial for grid movement with movers.

https://lbpcentral.lbp-hub.com/index.php?t=46236-Super-accurate-fast-and-simple-grid-movement

That tutorial can probably explain it better than I can.
2011-05-29 22:01:00

Author:
anthman852
Posts: 66


I know this tutorial but it's more complicated than it needs to be.2011-05-30 00:05:00

Author:
ScorpSkull
Posts: 92


Wow what a great tutorial. I tried to do something like this, but it didn't come close to yours. I can think of so many ways this can be used... This is gonna be the foundation for so many of my logic systems in the future, thanks man. 2011-05-31 03:25:00

Author:
Unknown User


Thanks for posting this, it's so simple and ingenious.2011-06-01 16:25:00

Author:
Ayneh
Posts: 2454


I just tried your method scorpskull and it's not exactly what I wanted.


I'm trying to make a topdown pogo stick level where the player only moves when the in/out mover has the player "in the air" basically.

With your method, you have to continuously tap directions in order to move. How do you make it so you KEEP moving no matter what? and stop only when the object is in layer #1 and moves in layer #2?

Note: the player MUST stay in the grid and can not go diagonal.
2011-06-15 06:16:00

Author:
Nick930930
Posts: 878


This is not Scorpskull's thread, this is a different method, but repeating the signals would be the same in principle.

There are quite a number of ways to keep repeating the movement, and not allow diagonal movement. The easiest way is to use a selector with at least 5 inputs after splitting the analogue signal. You'll leave the last selector inputs for blocking the signal briefly, connected to a timer and the "not" signals of the stick for blocking the signal when the timer is off or when the user is not moving the stick. Using selectors, you can have any number of blocking conditions, such as being up / down, without using convoluted and's or's or xors, simply by connecting these conditions to higher selector inputs, the outputs of which do not need to be connected to anything.
2011-06-16 08:10:00

Author:
hesido
Posts: 166


Ok, I have updated the grid tutorial level with a signal repeater and diagonal direction blocker, that is compatible also with advanced mover grid systems (provided you add 1 shot counters after the selector, you'll see notes inside the chip.)

You can copy the level to your moon and inspect the chips.
2011-06-16 13:57:00

Author:
hesido
Posts: 166


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.