BG1, PRELOAD BG2, PRELOAD

Page 1 of 2 1 2 LastLast
Results 1 to 20 of 22
  1. #1

    Arrow Analog Signal Display



    PRETTY PICTURES BELOW!

    This level gives a brief introduction to analog signals in LBP2 and shows off a ton of uses for my device.

    If you've ever done anything with analog signal computation in LBP2, you've had this problem: You want to see what the value of an analog signal is before and after you perform some simple computation, but it's too difficult to actually verify that it's working or figure out what is wrong.

    Now there's an easy-to-use device that you can plug into any signal and read the decimal component!

    My signal display is extremely accurate. A timer set to max = 1000 seconds with a current time = 123.4 seconds will read +.1234 on the display.

    It's so accurate that I have found many occasions where the math in LBP2 is fairly imprecise! For instance, a timer with a max time set to 10 seconds and current time set to 5 seconds will not read exactly .5000. It is off by a few thousandths.





    F4F: Cave Story: First Cave — Newly recreated LBP2 style!

    Old but good LBP1 level: Jetpack Jettison


  2. #2
    Render monkey Chazprime's Avatar
    Points: 32,346, Level: 55
    Level completed: 36%, Points required for next Level: 704
    Overall activity: 0%
    7 days registered 1000 Experience Points 500 Experience Points 250 Experience Points 100 Experience Points
    PSN
    Chazprime
    Join Date
    Nov 2008
    Location
    Toronto / Los Angeles
    Posts
    1,229

    Default

    Awesome...this will be a huge help debugging

    Question: the positive analog output of either of the thumbsticks is always .9922, whereas negative is -1. Is that an anomaly in the game engine or is my controller at fault?

  3. #3
    Patch of Cloth phort's Avatar
    Points: 9,420, Level: 29
    Level completed: 12%, Points required for next Level: 530
    Overall activity: 0%
    7 days registered 1000 Experience Points 500 Experience Points 250 Experience Points 100 Experience Points
    PSN
    phort
    Join Date
    Jan 2009
    Location
    Colorado Springs, CO
    Posts
    85

    Default

    Quote Originally Posted by chazprime View Post
    Awesome...this will be a huge help debugging

    Question: the positive analog output of either of the thumbsticks is always .9922, whereas negative is -1. Is that an anomaly in the game engine or is my controller at fault?
    I had the same problem so it must be the game engine's doing. Not like that extra 0.0078 moving one direction versus the other will make any practical difference in most levels.
    F4F: Cave Story: First Cave — Newly recreated LBP2 style!

    Old but good LBP1 level: Jetpack Jettison

  4. #4

    Default

    Quote Originally Posted by chazprime View Post
    Question: the positive analog output of either of the thumbsticks is always .9922, whereas negative is -1. Is that an anomaly in the game engine or is my controller at fault?
    I'd guess it's mostly the result of a bad signed integer translation. If the analog stick gives an output of 256 possible values, they'd typically be mapped as a range between -128, and +127. If MM determine the analog value by simply dividing that by 128, then you'd get a floating point value in the range -1.0 and +0.9921875.

    There is potentially more error with the iterative design used in this system, however. Other probes tend to use a single sequencer to do the translation, but this design is doing several multiplication and subtraction stages, each of which makes the next digit less precise due to the nature of floating point math. However, since it never displays more than five digits of the mantissa, it's probably negligable.

  5. Thanks!


  6. #5

    Default

    Quote Originally Posted by phort View Post
    My signal display is extremely accurate. A timer set to max = 1000 seconds with a current time = 123.4 seconds will read +.1234 on the display.

    It's so accurate that I have found many occasions where the math in LBP2 is fairly imprecise! For instance, a timer with a max time set to 10 seconds and current time set to 5 seconds will not read exactly .5000. It is off by a few thousandths.
    How do you know it is the timer, and not your device, which is introducing the error? I mean, one timer-based test gives you the answer you expect, and another doesn't...

    I look forward to trying this thing out. But I have to wonder how you can have four digits worth of faith in its accuracy.

  7. #6
    Patch of Cloth phort's Avatar
    Points: 9,420, Level: 29
    Level completed: 12%, Points required for next Level: 530
    Overall activity: 0%
    7 days registered 1000 Experience Points 500 Experience Points 250 Experience Points 100 Experience Points
    PSN
    phort
    Join Date
    Jan 2009
    Location
    Colorado Springs, CO
    Posts
    85

    Default

    Quote Originally Posted by tetsujin View Post
    How do you know it is the timer, and not your device, which is introducing the error? I mean, one timer-based test gives you the answer you expect, and another doesn't...

    I look forward to trying this thing out. But I have to wonder how you can have four digits worth of faith in its accuracy.
    I know because counters, score sensors, projectile sensors, and batteries are always exactly right, and timers are right for small values such as 0.1s / 0.3s.

    You can see in the third screenshot I have a -.4200 coming from the battery which is set to -42%. I have projectile sensors, counters, and score sensor examples in the level as well.
    Last edited by phort; 02-11-2011 at 01:27 AM.
    F4F: Cave Story: First Cave — Newly recreated LBP2 style!

    Old but good LBP1 level: Jetpack Jettison

  8. #7
    Fuzz Ball DesignedJ's Avatar
    Points: 3,764, Level: 17
    Level completed: 79%, Points required for next Level: 86
    Overall activity: 0%
    100 Experience Points Created Blog entry 7 days registered 250 Experience Points 30 days registered
    PSN
    DesignedJ
    Join Date
    Jan 2011
    Location
    Littlebigplanet
    Posts
    63
    Blog Entries
    1

    Default

    So many numbers!

  9. #8
    EnergyRay
    Guest

    Default

    Okay, I found what broke my (designed by rtm) sine wave producer. At least I think I found it...

    Your display gave me some interesting readings with different timer values and here's some things I found out:

    • All the values up to 1.0s and their halves will produce the correct reading of .5000 on phort's display.
    • At 1.0s and 0.5s it will give a false reading of .4827.
    • 1.2s and 0.6s gives a correct reading.
    • Some values (going to give only the target time) that give false readings are:


    • 1.0s
    • 1.4s
    • 2.0s
    • 2.8s
    • 3.0s
    • 3.8s

    Going back to the sine wave... As it uses two timers, there are two components that will give a false value (as I set them both to 1.0s) which caused a little problem with the mover it was connected to. The object started to sink because of this weird little problem.

    Now, I need to do some testing with some little thingamajigs...
    Last edited by Aya042; 02-11-2011 at 08:32 PM.

  10. #9

    Default

    Quote Originally Posted by EnergyRay View Post
    Your display gave me some interesting readings with different timer values and here's some things I found out...
    Note that there seem to be some (speculatively deliberate) inaccuracies with timers which may account for these results. See this post.

  11. Thanks!


  12. #10
    EnergyRay
    Guest

    Default

    Thank you for this information Aya. Well, have to redo some of my logic. Shouldn't be too hard now that I know what's causing problems...

  13. #11

    Default

    Just have to say this is absolutely brilliant. Thought of some other uses, like range-finding for distances to target.

    Is it okay if I use a slightly modified version of your model to make a minimap with accurate distances displayed. Main change would be to reduce size. Full credit will be given (it's for my top-down space rpg, so perhaps a star system or empire named in your honour)
    Playing LBP Vita. Making a 'FF Tactics - esque' game.

  14. #12
    Patch of Cloth phort's Avatar
    Points: 9,420, Level: 29
    Level completed: 12%, Points required for next Level: 530
    Overall activity: 0%
    7 days registered 1000 Experience Points 500 Experience Points 250 Experience Points 100 Experience Points
    PSN
    phort
    Join Date
    Jan 2009
    Location
    Colorado Springs, CO
    Posts
    85

    Default

    Quote Originally Posted by SSTAGG1 View Post
    Just have to say this is absolutely brilliant. Thought of some other uses, like range-finding for distances to target.

    Is it okay if I use a slightly modified version of your model to make a minimap with accurate distances displayed. Main change would be to reduce size. Full credit will be given (it's for my top-down space rpg, so perhaps a star system or empire named in your honour)
    Yeah, feel free to use it/change it any way LBP allows. If you need to change its look, you can convert the metal pieces on the back to invisible holograms and then glue it to something else.

    You might not necessarily get perfectly accurate distances if you use tags and a tag sensor in distance mode, because, as you can see with the player sensor in the level, there's a certain range where if you're close enough it always outputs the max value. I only tested it with the player sensor but I assume it's the same for the tag sensor. You might be able to calibrate for that using some analog math, but it might not be too important if it's just going to be displayed for the user.

    Send me a message on PSN or on my LBP profile when you publish the level and I'll check it out.
    Last edited by phort; 02-19-2011 at 08:35 AM.
    F4F: Cave Story: First Cave — Newly recreated LBP2 style!

    Old but good LBP1 level: Jetpack Jettison

  15. #13

    Default

    Quote Originally Posted by phort View Post
    ...there's a certain range where if you're close enough it always outputs the max value. I only tested it with the player sensor but I assume it's the same for the tag sensor.
    It is, but tweaking the minimum distance to 0.1 fixes it (in both cases). No-one seems to be able to explain this rather odd behaviour.

  16. Thanks!


  17. #14

    Default

    Hi, I'm working on a level with a 4 digit number display health bar.(it uses selectors wired up to a hologram number, much like your numbers are, minus the selector) When I saw this, I grew ecstatic because I felt like I could finally implement some accurate damage to it by using simple addition and math. I walked into the level and saw you had a math example, but since I have no idea what's going on in your + symbol microchip, I have no idea how you did this. You think you could help me understand this and implement it to my health bar? All I really need to know is how to use this "analog" signal for math purposes.
    Check out my Prius Level


    Check out my Chrono Chaos L.H.
    I am currently working on an action/rpg series that is a sequel to my LBP1 series. Keep an eye out for it! =)

  18. #15
    infectedspawn1
    Guest

    Default

    this is very interesting stuff how did you get the idea or the know how to do it?

  19. #16

    Default

    Quote Originally Posted by Aya042 View Post
    I'd guess it's mostly the result of a bad signed integer translation. If the analog stick gives an output of 256 possible values, they'd typically be mapped as a range between -128, and +127. If MM determine the analog value by simply dividing that by 128, then you'd get a floating point value in the range -1.0 and +0.9921875.

    There is potentially more error with the iterative design used in this system, however. Other probes tend to use a single sequencer to do the translation, but this design is doing several multiplication and subtraction stages, each of which makes the next digit less precise due to the nature of floating point math. However, since it never displays more than five digits of the mantissa, it's probably negligable.
    I love your arguments! Just like rtm223, your comments always tend to make me say "wtf?" in an awesome way!

    Possibly best smartphone game ever. Now on LBP2.
    MORE INFO

    Yeah, I know what you mean by what you said that I know what you mean when you said that it's what you think that is.

    Silverleon




  20. #17
    Patch of Cloth phort's Avatar
    Points: 9,420, Level: 29
    Level completed: 12%, Points required for next Level: 530
    Overall activity: 0%
    7 days registered 1000 Experience Points 500 Experience Points 250 Experience Points 100 Experience Points
    PSN
    phort
    Join Date
    Jan 2009
    Location
    Colorado Springs, CO
    Posts
    85

    Default

    Quote Originally Posted by Firemac View Post
    All I really need to know is how to use this "analog" signal for math purposes.
    rtm223 published a series of tutorials on analog logic which you can read here:

    http://www.lbpcentral.com/forums/ent...1-Fundamentals (There is a link to the next post at the end of each one)

    That's where I learned it.

    I might later publish a level with my + - χ microchips and maybe some tutorials on analog logic.
    F4F: Cave Story: First Cave — Newly recreated LBP2 style!

    Old but good LBP1 level: Jetpack Jettison

  21. #18

    Default

    The signal display is awesome to quickly test out set ups as well as have them ingame during debugging sessions! AWE-waiiiit for it---SOME!

  22. Thanks!


  23. #19

    Default

    Quote Originally Posted by phort View Post
    rtm223 published a series of tutorials on analog logic which you can read here:

    http://www.lbpcentral.com/forums/ent...1-Fundamentals (There is a link to the next post at the end of each one)

    That's where I learned it.

    I might later publish a level with my + - χ microchips and maybe some tutorials on analog logic.

    I read up on it, it was quite interesting, but I have no idea how any of these sine waves or whatever can be used for anything in LBP2. I've taken my fair share of math, trig, calculus, so it's not like it's all foreign to me. (although I have pretty much forgotten how to do any of the math in those subjects) The one thing that caught my eye was using directional combiner as a simple subtraction device, that's not what your addition chip really is, is it? Because I was reading that you'll get an incorrect reading for negative values and so on.

    But if you actually have a +, -, and a division math microchip, i'd be more than glad if you shared them. I seriously have no idea how I would be able to hook up my own to do the math.

    I also couldn't help but notice that "blog" didn't go over sequencers, when I saw that you in fact did use them for your analog display, so it'd be nice if I could understand their use as well.


    Edit: Oh, I did not notice that there were more blog posts. Please ignore most of what I said here. (except the sharing the chips =P) I'll be reading more.


    Edit#2: Okay, i've learned a lot more since I last made this post. I may not need your chips anymore, but I would still gladly take some if you're offering just to compare what you have versus what I came up with. =P
    Last edited by Firemac; 02-26-2011 at 12:58 AM. Reason: noticed something extra
    Check out my Prius Level


    Check out my Chrono Chaos L.H.
    I am currently working on an action/rpg series that is a sequel to my LBP1 series. Keep an eye out for it! =)

  24. #20
    hillie
    Guest

    Default

    Quote Originally Posted by chazprime View Post
    Awesome...this will be a huge help debugging

    Question: the positive analog output of either of the thumbsticks is always .9922, whereas negative is -1. Is that an anomaly in the game engine or is my controller at fault?
    I've hooked up analog control sticks to my computer before back in the days when you had to calibrate them (I think N64?) and one side was always a perfect 1 while the other (+ or -) was slightly lower, and if calibrated incorrectly it could read a +1 (full throttle) when in the center position. Might just be the way it was calibrated at the factory?

  25. Thanks!


Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •