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

100% verticle movement?

Archive: 9 posts


I have been finishing up my "bit perfect" version of classic Mario 1-1. Everything is working well except for one thing. For some reason when Mario jumps straight up, without pressing the d-pad at all, he travels just slightly to the direction he is facing near the top of his jump, but lands in the exact starting position. So when you jump straight up right beside a green pipe for example, Mario will collide with the top corner of the pipe sending him flying backwards. There are no other movers active when you jump straight up and the horizontal movement is barely noticeable but definitely there. Not to give away too many secrets but Mario's jump plays a sequencer of 3x %100 acceleration and 100 up speed movers at the same time. All movers are set for not local space and strictly upwards movement. There is also a gyroscope on Mario that keeps him upright after unwanted collisions but this is set to align Mario perfectly vertical to the ground and other objects and was all done in grid so there should be no funny angles. So basically in short, Mario jumps straight up, moves over a couple pixels during jump and then lands perfectly in the same spot that he took off from, unless of course he collides with a solid object which he shouldn't if truly traveling straight up. Anyone had a problem like this before? I will publish a beta test later today with what I have since it's easier to see what's going on than try to explain it. Thanks!2012-01-24 18:47:00

Author:
Death_with_an_H
Posts: 72


My first thought is there's a mass interfering with the trajectory of the jump towards the top. Unless the mass was rotating however you shouldn't land in the same spot.

One thing to try is placing the gyroscope outside the microchip as it has been mentioned before that it can be slightly inaccurate when placed inside one.

There's something a little odd about movers I've noticed when trying to sync their movement with each other, but I never got to the bottom of it. When you activate different movers in sequence they can behave oddly. Since the sequence I was trying to make was a loop my theory at the time was they weren't being activated or their settings weren't set up in a way that was wholly divisible by 30 so there was a frame of lag or a rounding problem or something like that.


I have been finishing up my "bit perfect" version of classic Mario 1-1.

(...)

Not to give away too many secrets but Mario's jump plays a sequencer of 3x %100 acceleration and 100 up speed movers at the same time.
How many pixels high does Mario jump in how many frames and what was the formula you used to determine 3x 100% movers matched, pixel for pixel, that from the original game? It would be useful to know for anyone looking to recreate sprite based games.
2012-01-24 19:56:00

Author:
Ayneh
Posts: 2454


Mario does have a solid mass but it is perfectly geometric and straight edges, unless something got messed up slightly during re-sizing. The problem is when Mario is shrunk from small grid size to game size, the solid frame becomes invisible and hard to edit or see because it is behind some 20 layers of glued sticker panel. Maybe the overall complexity of Mario has something to do with it? The gyroscope is placed on the base of Mario's solid mass and aligned while Mario is standing straight on the grid level ground. I think the problem may be as you suggested in the multiple movers firing at the same time. A single mover with %100 acceleration gives Mario a floaty jump that is too slow at first and gains speed later in the jump whereas in the real game Mario has a very quick leap that slows down towards the top of the jump. The movers all start at the same position and end at different lengths to allow for different jump heights depending on how long the button is pressed. The deceleration of the movers controls how quick Mario moves upwards compared to his lateral speed. The length of the movers on the sequencer allows for fine tuning of the jump height which is basically 4x mario's height(5x for speed run jump) . I went though a dozen re-designs to get the jump right including a few using pistons which almost worked but gave me too many headaches. This way works great and feels very authentic but this collision thing doesn't make any sense to me. I will try playing with the movers more and see what is actually causing the unwanted movement. I'm still working to get a playable test out tonight and would love some feedback from some experienced sackfolk.. Thanks!2012-01-24 20:11:00

Author:
Death_with_an_H
Posts: 72


Well, if it is the complexity causing it or something else is happening you could try capturing Mario and placing him in a blank level and rip stuff off until it starts working properly. If it doesn't work properly after that then at least you know it's a problem systemic to the movers themselves and nothing else.

If all else fails another way you could do it is to use just 1 mover but adjust the gravity of Mario using a tweaker to get the same effect you have now, although I haven't tried it myself.

Hopefully someone else knows more.
2012-01-24 20:33:00

Author:
Ayneh
Posts: 2454


After much testing I have determined that there must be some sort of random element in the physics of LBP2. To see what I'm talking about, do a little test that takes a couple minutes to set up. First make a cardboard box about 10 by 10 small grid squares and copy it five times. With grid on, glue 4 of the boxes in a stack perfectly straight and glue to the ground. Now put a controlinator on the fifth box with a simple advanced mover attached to the left stick so you can get around a bit. Next hook up a mover to the x button of the controllinator and set to a high acceleration and vertical speed. I tested with %100 accl. and 100 up speed. Now the test. Get your box up close touching the cardboard box stack. Without pressing the movement stick at all, press your "jump" button and you will launch straight in the air. Now logic dictates that if there are no other forces at play here such as other movers, rotators, collisions etc, you should return to the ground in the exact place that you launched. Chances are you will, however jump a few times (try short jumps, long jumps, even jumping again in the air) you will find that randomly the box sometimes changes orientation slightly in the air and comes down colliding with the corner of the box stack. Now try changing just the box stack material to any glass material and see what happens. I could not duplicate the same thing no matter how many times I jumped beside glass. Ok so glass has little or no friction so maybe friction is affecting the movement of the block? But change the blocks back to cardboard or any material with friction, put a material tweaker set to 0% friction on all 5 boxes and see what happens. If your test results are like mine you will find some jumps get messed up but far better than with full friction materials, but not as good as with glass blocks. So friction must be a factor but 1 object gliding smoothly up another object both with zero friction should at the very least yield consistent results, but that is not the case.

My mario sprite seems to have a much more dramatic random lateral movement even though all solid materials in the game are tweaked to have 0% friction. The lateral movement is visible even when jumping not beside anything. Its like he is taking off crooked and the gyroscope is correcting in the air but the correcting causes a temporary and barely noticeable shift to the right, although he lands in the exact same spot if there is no contact with other objects in the jump. I thought there was a problem with the physical design but I stripped it down, checked and rechecked and it is 100% balanced and symmetric according to grid. I've tried changing materials, shapes, changing the movers, gyroscope and everything but the collisions keep happening sometimes worse, sometimes better and sometimes not at all but change one little thing and its back to square one. So what is going on with the physics in this game? Mario will be published tonight in a test level for anyone interested in helping me figure this out.
2012-01-26 20:26:00

Author:
Death_with_an_H
Posts: 72


Why does the sprite get launched away from the edge? Is it because it falls over then shoots upright? Try adding several more gyros to the sprite and increase their strength. This should help prevent the sprite from falling over if a corner of it hits.
Try replacing collisions with logic. This might be a bit complicated depending on how experienced you are with using logic.

My guess is that there is a slight imbalance due to the shape of the sprite. No matter how many tweakers you use, everything still has mass and other factors which influences the physics. This shouldn't be an issue by just using logic.
You could also make a combined material logic collision design. Prevent movement directly up to something. Then the movement while jumping won't collide with the thing you're next to.
2012-01-27 13:54:00

Author:
SSTAGG1
Posts: 1136


Those are all helpful options, I have tried options 2 and 3 to some degree but not 1. It is definitely the shape of the solid frame combined with friction of the solid object beside it that causes some problems. When I beveled the bottom corners of my test box similar to how Mario's physical frame is shaped, the rotation effect from friction got 1000% worse. I also noticed that the random friction rotation of the perfect box seemed to mostly occur when there is no active mover and gravity takes over. As for option 2, I originally tried using all non-physical objects and only logic, but was not able to get Mario to stop exactly in the same vertical position when jumping, using impact sensors or tag sensors and 100% dampening etc. It was just too unpredictable. Nothing seemed to work as good as the combination of solid material physics and holo or sticker panel logic to assist. I'm sure I was doing something wrong but the physical solution was an easy fix at the time so I stopped trying to make it work with strictly logic. Which brings us to option 3 which I have already employed but need to tweak further. Basically mario has a sticker panel frame extending past his physical frame which senses if there is an object directly to either side of mario and prevents movement to that direction before the physical frame actually touches the physical object. My only problem is Mario's unexplained lateral movement even when not physically touching anything was still causing unwanted collisions. I will tweak that so Mario stops further from the object, as well as option 1 (more gyros) and see what happens and try to publish something this weekend.. Thanks!2012-01-27 20:21:00

Author:
Death_with_an_H
Posts: 72


After much testing I have determined that there must be some sort of random element in the physics of LBP2. To see what I'm talking about, do a little test that takes a couple minutes to set up. First make a cardboard box about 10 by 10 small grid squares and copy it five times. With grid on, glue 4 of the boxes in a stack perfectly straight and glue to the ground. Now put a controlinator on the fifth box with a simple advanced mover attached to the left stick so you can get around a bit. Next hook up a mover to the x button of the controllinator and set to a high acceleration and vertical speed. I tested with %100 accl. and 100 up speed. Now the test. Get your box up close touching the cardboard box stack. Without pressing the movement stick at all, press your "jump" button and you will launch straight in the air.
I followed your test in order to replicate the problem. I could noticeably see that the box wasn't landing in the same spot, however I could also see that it wasn't landing entirely flush with the ground or was catching on the side of the wall.

When I placed a gyroscope with max settings inside the controlinator it solved this. I jumped in different ways for around 10 minutes and fiddled with the settings on the two movers (while leaving 100 speed upwards and 100% acceleration on the basic mover) and I always landed in the same spot.

Does placing a gyroscope on your test rig have the same effect?
2012-01-27 21:14:00

Author:
Ayneh
Posts: 2454


there's definitely something very very very slightly off about movers.
I had a set up of square monsters floating up and down / jumping up and down/ moving side to side with movers set to different timing methods. with all methods, the sync or whatever the heck is wrong makes the objects (square monsters) move slightly off in one direction, even though theoretically they should return to their exact starting point.
the jumping monster (a little bunny), hops a little (around over a small block height) every few seconds. i had set up 5 or 6 of them and all of them veered off to the side. but the error movements were so minute it took an hour for me to notice anything.
the others just moved back and forth on the ground or mid air, and even though their movers are set to polar oppose each-other, their movements favor one mover, but again the error is slight, but very noticeable over time. (theses erred quicker)

MM should fix movers and load of other tiny annoying/ sometimes negligible stuff.
it's not half as bad as skyrim though. bugs galore

EDIT: my bunnies had gyros attached in their chips and still went off track
2012-01-30 10:42:00

Author:
MegaBlob
Posts: 291


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.