User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: Link->Jump not as documented.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    The Timelord ZC Developer ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,054
    Mentioned
    96 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,659
    Level
    19
    vBActivity - Bars
    Lv. Percent
    34.33%
    Daily Activity
    0%
    Weekly Activity
    1.75%
    Monthly Activity
    55.65%

    Dead Bug Link->Jump not as documented.

    The documentation for Link->Jump reads as follows:

    Code:
    Link's upward velocity, in pixels. If negative, Link will fall.
    	* The downward acceleration of Gravity (in Init Data) modifies this value every frame.
    Note here, it says, in pixels; and it also briefly mentions that the internal constants modify this. I would not expect that gravity would increase the height in pixels by 16, if over 2...

    I find pixels to be untrue... If the value is considerably low ( 1, or 2 ), then it is indeed in pixels; however, anything much higher than '3' is in tiles.

    Is this intended? Is it a bug? Is the relationship of constants something that must be modified for the value to always be in pixels?

    That meaning, is there some relationship between this, and the internal gravity and velocity constants, to force a strict x = pixels relationship; or is the zscript.txt documentation just wrong here?

    If so, what equation is used, to calculate the effects?

    This isn't a high-priority thing, as I'm not doing any side-scrolling stuff meself, but in advising a few people on the matter, it's come to my attention on more than one occasion.

    P.S. The documentation for Link->Jump on the wiki is also incompatible with that of both zscript.txt, and the behaviour of the variable in use:

    'Link's upward velocity, in 1/20ths of a Roc's Feather jump. Undefined for values outside of -20 <= Jump <= 20. '
    Last edited by Tamamo; 01-20-2016 at 03:14 PM.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  2. #2
    Gel coolgamer012345's Avatar
    Join Date
    Apr 2014
    Location
    USA
    Posts
    5
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    196
    Level
    5
    vBActivity - Bars
    Lv. Percent
    18.05%
    Daily Activity
    0%
    Weekly Activity
    1.75%
    Monthly Activity
    3.17%
    With gravity set to 0.16 and velocity set at 3.20, the defaults, setting Link->Jump to 1 gave about 1 tile, setting it to 2 gave about 26 pixels of jumping, setting it to 3 gave me about a 54 or so pixel jump, setting it to 4 gave me about 6 and a half tiles (about 104 pixels) of jumping, and setting it to 5 gave me 8, possibly more, tiles of jumping. I am using ZQ/Zc 2.50 Build 28. Not sure if I have 2.50.1 or one of the RC's, though.

  3. #3
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    35
    Posts
    3,343
    Mentioned
    165 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,045
    Level
    24
    vBActivity - Bars
    Lv. Percent
    5.41%
    Daily Activity
    0%
    Weekly Activity
    1.75%
    Monthly Activity
    7.13%
    It's supposed to be pixels, but the math's not working out somehow. Probably an issue with underflow in the format conversion. Fixed now.
    [téknolŕiz]

    ffcscript.zh 1.1.1 - Updated 2014-08-19
    ghost.zh 2.8.2 - Updated 2017-09-10
    tango.zh 1.3.1 - Updated 2017-12-27

  4. #4
    Nine-Tailed Goddess Tamamo's Avatar
    Join Date
    May 2011
    Location
    Kobe
    Age
    28
    Posts
    820
    Mentioned
    94 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,100
    Level
    22
    vBActivity - Bars
    Lv. Percent
    34.49%
    Daily Activity
    0%
    Weekly Activity
    1.75%
    Monthly Activity
    3.17%
    IMHO Link->Jump should be a float.

  5. #5
    The Timelord ZC Developer ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,054
    Mentioned
    96 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,659
    Level
    19
    vBActivity - Bars
    Lv. Percent
    34.33%
    Daily Activity
    0%
    Weekly Activity
    1.75%
    Monthly Activity
    55.65%
    Quote Originally Posted by Tamamo View Post
    IMHO Link->Jump should be a float.
    Internally, it is already a float; then it's floored for use with the actual mathematics so that you don;t end up with partial pixel coordinates, or, at least it is supposed to be floored. I suspect that it isn't, because the math for its conversion is extremely wrong, and the returned value is still a float at all times if you Trace it. You may be able to write a floating value to it as-is, given that it Treace()s as a float.

    @Saffith . Thank you. I look forward to testing the updated/fixed versions.

    P.S. Does this affect extant quests, or does it only store an ASM value during compilation? (i.e. Is the new value mechanic internal, or is it calculated during compilation and stored in the ZASM code?)

    If the value is stored in the ZASM code, then it shouldn't affect anything made in the past, but if it's an internal math problem, well, some people may need to update things. I'm not sure how long this has been broken.
    Last edited by ZoriaRPG; 05-29-2015 at 08:11 PM.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  6. #6
    Nine-Tailed Goddess Tamamo's Avatar
    Join Date
    May 2011
    Location
    Kobe
    Age
    28
    Posts
    820
    Mentioned
    94 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,100
    Level
    22
    vBActivity - Bars
    Lv. Percent
    34.49%
    Daily Activity
    0%
    Weekly Activity
    1.75%
    Monthly Activity
    3.17%
    No it ain't it's a fixed point number "it's an allegro thing" but that's neither here here or there. If it whe're a true float it would make things a hell of a lot easier.

  7. #7
    The Timelord ZC Developer ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,054
    Mentioned
    96 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,659
    Level
    19
    vBActivity - Bars
    Lv. Percent
    34.33%
    Daily Activity
    0%
    Weekly Activity
    1.75%
    Monthly Activity
    55.65%
    Quote Originally Posted by Tamamo View Post
    No it ain't it's a fixed point number "it's an allegro thing" but that's neither here here or there. If it whe're a true float it would make things a hell of a lot easier.
    Well, you're a dev, so break it until it obeys. :p


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  8. #8
    The Timelord ZC Developer ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,054
    Mentioned
    96 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,659
    Level
    19
    vBActivity - Bars
    Lv. Percent
    34.33%
    Daily Activity
    0%
    Weekly Activity
    1.75%
    Monthly Activity
    55.65%
    Update: While Link->Jump now returns the correct values, it still does not work as documented, and is inconsistent within its own value ranges. Setting Link->Jump = 10 for one frame, for instance, moves Link far more than 10 pixels.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  9. #9
    Nine-Tailed Goddess Tamamo's Avatar
    Join Date
    May 2011
    Location
    Kobe
    Age
    28
    Posts
    820
    Mentioned
    94 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,100
    Level
    22
    vBActivity - Bars
    Lv. Percent
    34.49%
    Daily Activity
    0%
    Weekly Activity
    1.75%
    Monthly Activity
    3.17%
    @ZoriaRPG
    Do me a favor and set it to -10 as well, it should defunct to terminal velocity. if not @Saffith broke something else trying to fix this.
    But that's a given when it comes to ZC. Change one thing, Break another.

    This is me saffith and gleeok right now. Which one is Picard I have no idea.

  10. #10
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    35
    Posts
    3,343
    Mentioned
    165 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,045
    Level
    24
    vBActivity - Bars
    Lv. Percent
    5.41%
    Daily Activity
    0%
    Weekly Activity
    1.75%
    Monthly Activity
    7.13%
    Jump isn't a single frame thing; it drops gradually as gravity slows him down. Setting Link->Jump to 10 moves Link upward 10 pixels per frame, then 9, then 8...
    [téknolŕiz]

    ffcscript.zh 1.1.1 - Updated 2014-08-19
    ghost.zh 2.8.2 - Updated 2017-09-10
    tango.zh 1.3.1 - Updated 2017-12-27

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social