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

Changing Diagonal Input Size.

Archive: 5 posts


Hello, everyone. So there's this one game I play on my computer that I use a gamepad with. That's not relevant to this topic, but the program that I use to configure that gamepad with is. This particular program allows you to change the settings of analog sticks so that the size of the area that is recognized as diagonal input instead of up/down/left/right becomes smaller or larger. Here are a couple images that should give you an idea of what I'm talking about:
http://img21.imageshack.us/img21/4874/diagonalsize1.png
http://img30.imageshack.us/img30/7992/diagonalsize2.pngSo my question is, does anyone know how to replicate this effect in this game?
2011-05-24 19:52:00

Author:
Unknown User


I don't see any responses to your question yet, so in an effort to give you something, I'll tell you what I know of the LBP system.
Maybe that will be enough to help you come up with your own answer.

A typical control-pair which would concern itself with diagonal movement is:
- Controllinator (either joystick, with up/down, left/right outputs)
- Advanced Mover (with up/down, left/right inputs)

The Advanced Mover has a max speed that is applied to both up/down and left/right. You set this as its first option.
The inputs are stated in terms of percentages. As you rotate the joystick, the percentages range from 0% to 100%.
If I'm not mistaken, the range is ruled by "sine" and "cosine" mathematics, so if you held a joystick at a perfect diagonal, you get percentages of 70.7% along both up/down and left/right ( 70.7% = 1/sqr(2) ).

I'm not sure how the program you've illustrated for us treats diagonals, but it seems to me that it is distinctly different from what I just described.
I suspect your program translates a fully ranged up/down, left/right measurement into one of 8 possible results ( left, right, up, down, and 4 diagonals ).

So, coming to a sort of conclusion here, if what you want to do is change LBP's innate, ranged left/right up/down measurement system into a discrete, polar direction/diagonal system, you're going to have to do some rounding of percentages.

It may help to know that:
- AND gates, given two percentage-based inputs, output the lower-valued input ( And(X,Y) = {X if X<Y; Y if Y<X} ).
- Percentages can be added or subtracted using Positive/Negative Combiners. See Robbit10's Creator's Toolkit for more info.

---

I note also that your illustrated program also seems to care about dead zones.
If dead zones are a concern of yours, good news: this seems to be a much easier, much more customizable, task than creating diagonal zones.

Pay a visit to https://lbpcentral.lbp-hub.com/index.php?t=53871-Super-Space-Marble-ULTRA&p=817826&viewfull=1#post817826 .
LeastCreative already proposed this kind of control, and we bandied about a few ideas as to how it might be done.
2011-05-24 22:30:00

Author:
The Manx Turtle
Posts: 50


This can be achieved, I'd suggest introducing an intermediate step between the analog stick's movement and the output you desire.

Ok, so here's my idea you'll want to setup a rectangular hologram block in one layer and a circular block on the layer in front (thin layer would work best). Bolt this circle to the rectangle in the centre and attach a joystick rotator to it - having its input as the controlinator's stick. By putting an anti-gravity tweaker with 100% dampening on the rectangle this should cause the circle to rotate and point in which ever way you hold the stick. Now attach a tag to the 12 O'clock position of the circle and from there you just need to attach 4 tag sensors to the centre of the rectangle, each one pointing in one of the 4 diagonals - adjust the detection angle to increase or decrease your dead zones. The tag will activate which ever tag sensor zone it's in and you can then hook up the tag sensor outputs to whatever it is you need - probably through use of directional combiners if you want to reproduce the effects an analogue stick would have.
2011-05-24 23:37:00

Author:
Xaif
Posts: 365


I personally would use positional sequencers with batteries on them. Eliminate the advanced mover all together and use regular movers. This would probably be a simple way to do it.

You could have the signals from the stick split into their four components using directional splitters. Then take each of those signals and wire it to a positional sequencer with a battery a certain percentage of the way up (let's say at 50%). By taking any two of those signals and putting them through an AND gate, then activating two movers, you could get that kind of effect.

So you'd have to be pushing at least 50% up and 50% right in order to move diagonally up/right. You can play with the percentages to close the size of the area that will cause diagonal movement. In theory the farther down the sequencer you start your battery, the tighter the 'cone' where you can move diagonally will become. Outside of the diagonal movement, you can use OR gates hooked to the four regular movers that will activate from the regular pushing of the stick. If you're not pushing the stick far enough UP (48%), then you won't move diagonally, just to the right.

I hope that makes sense. I haven't tried it yet, but in my brain it is all working correctly. I'll try to get to it tomorrow and post some pictures.

edit: just thought about it, and you would need some way to disable the UP movement as you are moving RIGHT until you cross that threshold. I think this will still work, just may need a few more pieces of logic to perfect it.
2011-05-25 05:17:00

Author:
shane_danger
Posts: 283


Sorry for waiting so long to post; I wasn't able to play for a couple of days.


If I'm not mistaken, the range is ruled by "sine" and "cosine" mathematics, so if you held a joystick at a perfect diagonal, you get percentages of 70.7% along both up/down and left/right ( 70.7% = 1/sqr(2) ).

Using the logic probe that came with Robbit10's toolkit (thanks for directing me to that, by the way; it's awesome), I tried this. The lowest valued signal holding the stick diagonally could produce was +/- 87. Either the signal is calculated using different mathematics than those you described, or the joystick is extremely sensitive, and thus would have to be held at an absolutely perfect 45% angle to output the signal you described.

I don't know how much that'll help, but something's better than nothing.
2011-05-28 03:46: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.