Dismiss Notice
Hey Guest,
If you are interested in ghosting, the Ghosting Awards for January 2025 has just been announced:

Click here to check it out!

Code

Discussion in 'Anything and everything Free Rider' started by og_Cork, Mar 14, 2019.

Tags:
?

Should I bother doing further investigation?

  1. Yes

    87.1%
  2. No

    12.9%
  1. og_Cork

    og_Cork Well-Known Member Official Author

    I have been messing around trying to understand the code that the tracks are formatted in. I decided to document the process. I have discovered some things. My main goal was to create a vehicle that has the shortest duration possible (to create spontaneous autos since exiting a vehicle resets movement). If anyone has already done this though, I would love to know. Here is what I have found so far:
    Values (open)
    Value = Code
    1 = 1
    2 = 2
    3 = 3
    4 = 4
    5 = 5
    6 = 6
    7 = 7
    8 = 8
    9 = 9
    10 = a
    11 = b
    12 = c
    13 = d
    14 = e
    15 = f
    16 = g
    17 = h
    18 = i
    19 = j
    20 = k
    21 = l
    22 = m
    23 = n
    24 = o
    25 = p
    26 = q
    27 = r
    28 = s
    29 = t
    30 = u
    31 = v
    32 = 10
    33 = 11
    34 = 12
    35 = 13
    36 = 14
    37 = 15
    38 = 16
    39 = 17
    40 = 18
    41 = 19
    42 = 1a
    43 = 1b
    44 = 1c
    45 = 1d
    46 = 1e
    47 = 1f
    48 = 1g
    49 = 1h
    50 = 1i
    to be continued, I have not been able to understand how the code relates to the number it is associated with, I will continue to document these until I understand how they relate

    Format of the exported code (open)
    Example code: a 0 a -a,k 0 k -a#u 0 u -a#V 21 -g 1 1s
    Screenshot 2019-03-14 at 4.41.49 PM.png
    There are three sections in the exported code: physics lines, non-physics lines, and powerups/vehicles.
    The three sections of the code are divided by # likes this: [section1]#[section2]#[section3]
    Section 1 = Physics lines
    Section 2 = Non-Physics lines
    Section 3 = Powerups/Vehicles
    Within its section, each entity is separated by a comma, with no spaces. This is shown by the two physics lines in section 1 in the example code. The same concept applies to all sections.

    Format of entities (open)
    All entities are placed on an x,y coordinate plane similar to the ones that plagued me in algebra 1. Interestingly enough, they are intriguing now that I care about the application. All lines (physics and non-physics) have a start position and an end position in the coordinate plane, some that require direction (like the boost and gravity), some like the teleport have more values; also, some only have one coordinate, such as the bomb or slowmo.
    Note: The only difference between the physics lines and non-physics lines code-wise is what section the entity is placed in.
    Note: The layout of the coordinate plane is different from the one I am used to. Starting at the origin (0,0), up is represented by a negative y-value, down is represented by a positive y-value, left is represented by a negative x-value, and right is represented by a positive x-value.
    Note: Each value within each entity is separated by a space. Again, between entities there is a comma, no spaces adjacent to the comma.
    Note: In the exported code, the values will come up as code as described in the first spoiler.
    Note: Powerups will have a capital letter in the beginning of each entity. This defines which powerup it will be, and is irrelevant to the position and the code. In addition to the capital letter, vehicles will have an integer within the entity defining which vehicle it is.
    Note: Negative values are represented by a negative (-) symbol in front of the value
    Line:
    [x-value of starting position] [y-value of starting position] [x-value of ending position] [y-value of ending position]
    Brush:
    Similar to the line, but it will chain them. The first two values will indicate the start x,y position, the third and fourth values will indicate the next x,y position, etc, and the last two values will indicate the x,y coordinates of the end point.
    Star:
    T [x-value] [y-value]
    Gravity: (uncertain)
    G [x-value] [y-value] [angle value?]
    Boost: (uncertain)
    B [x-value] [y-value] [angle value?]
    Slowmo:
    S [x-value] [y-value]
    Bomb:
    O [x-value] [y-value]
    Checkpoint:
    C [x-value] [y-value]
    Antigravity:
    A [x-value] [y-value]
    Teleport:
    W [x-value of starting position] [y-value of starting position] [x-value of ending position] [y-value of ending position]
    Vehicle:
    V [x-value] [y-value] [integer between 1-4. 1=helicopter, 2=truck, 3=balloon, 4=blob] [duration]
    Example:
    ##S a -a
    This code would represent a Slowmo powerup at the coordinate (10,10)
    Thus concludes my not-so-thorough investigation of the code behind the system. I still do not understand the relationship between the values and the code. Please DM me ior reply below if you have any insight, I would love to understand it.

    This post will be updated if any further information is found.

    -Cork
     
    Last edited: Mar 14, 2019
    a_drain, Azgr00, Polarized and 6 others like this.
  2. TerribleTanmay

    TerribleTanmay Well-Known Member Official Author

    great!
     
    adsfasfa likes this.
  3. TheHexagon

    TheHexagon Member Official Author

    very interesting (sorry no forum image, too lazy too change)
     
  4. og_Cork

    og_Cork Well-Known Member Official Author

    Rhodium I know you have been toying around with code recently, would you have any tips?
     
  5. Madara

    Madara eesoncanaocee Ghosting Legend Official Author

    Awarded Medals
    Interesting...
     
  6. tetrationiscool

    tetrationiscool Well-Known Member Ghosting Legend Official Author

    Awarded Medals
    It's base-32. There are the digits 0-9 and then letters a-v. After v, there's 10 11 12 ... 18 19 1a 1b ... 1u 1v 20 21 ... 29 2a 2b ... 2v 30 ... 3v 40 ... 4v ......... 90 91 ... 9u 9v a0 a1 a2 ... a9 aa ab ... av b0 .................
    All of this stuff is fairly well-known; there's a thread about it somewhere. I'm too busy to find it right now. I don't think it's possible to make a vehicle shorter than 5 seconds without messing with the code, which is generally frowned upon.
     
    Azgr00, adsfasfa, Calculus and 3 others like this.
  7. og_Cork

    og_Cork Well-Known Member Official Author

    Ah, that makes sense. Thank you
     
  8. og_Cork

    og_Cork Well-Known Member Official Author

    FoxGamingTM likes this.
  9. Exquisite

    Exquisite Member Official Author

    I read an old thread about using Matlab to generate images into code. I think it was called hexadecimal, but I could be wrong.
     
  10. Polygon

    Polygon Forum Legend Official Author

    Awarded Medals
    I've tried to make a vehicle shorter than 5 seconds. Sadly, it doesn't work.

    You seem to have 100% decoded the way track codes work, though. Nice!!
     
    og_Cork likes this.
  11. og_Cork

    og_Cork Well-Known Member Official Author

    Aw thats a shame. I wanted to create a split-second duration vehicle that would essentially be used to reset all movement. It could be used to create spontaneous autos, jump on the vehicle and be spit into the auto.
     
  12. Rhodium

    Rhodium Well-Known Member Official Author

    Yeah exactly what tetrationiscool said, the only thing I've done is change base-32 into base-10 and then generate lines and checkpoints with that. Not sure much about powerups but I don't think it's possible sadly. The powerup length isn't part of the track code
     
    Last edited: Mar 15, 2019
    Logeton likes this.
  13. 0AK

    0AK Casual Member Official Author

    Cork or anyone, how do you end a code? For example, when I type in 1 2 3 4 5 6 7 8 9## to the code, how do I prevent the line that shows up in the center that goes on for seemingly infinity? Thanks, I'm just trying to learn this alongside you all (sorry if I missed it if you said it in your first post Cork)
     
    Last edited: Mar 15, 2019
  14. Pie42

    Pie42 Well-Known Member Team Blob Official Author

    Awarded Medals
    You need to have an even number of numbers in your code. The code 1 2 3 4 5 6 7 8 9## will generate that line because there is no final y value, but the code 1 2 3 4 5 6 7 8## will not generate that line because all of the x and y values are paired up.
     
  15. Pie42

    Pie42 Well-Known Member Team Blob Official Author

    Awarded Medals
    The powerup length is the final number in the code for a vehicle, but that isn't really helpful because if you use a number higher than 60, it defaults down to 60(1s), and with a number lower than 5, it automatically goes down to 5. Non-integer numbers also don't work, and I think with a decimal, everything after the decimal point gets ignored.
     
    Rhodium likes this.
  16. 0AK

    0AK Casual Member Official Author

    Also, ummmmmm how do you make it go into the y-coordinates? (I'm REALLY new and noob to this)
     
  17. Pie42

    Pie42 Well-Known Member Team Blob Official Author

    Awarded Medals
    Like with coordinate pairs, the first number is x and the second one is y. The difference is that there is no comma in between x and y coordinates, just a space. Also, for lines, you need to have 2 sets of coordinates before a comma, because otherwise, it's just a single point, and FRHD doesn't like that.
     
  18. Ninjasparkour

    Ninjasparkour Well-Known Member Official Author

    Awarded Medals
    I've already made a second long vehicle in the editor, unfortunately it only worked in the editor and not when I published, which made the track broken lol
     
    Deleted member 6703 likes this.
  19. og_Cork

    og_Cork Well-Known Member Official Author

  20. 0AK

    0AK Casual Member Official Author

    I'm working on a chart with the code for numbers 1 - (idk a lot). It's going to take a long time, but I'll share it here when I'm done. (would anyone use this other than me cuz otherwise I'm going to stop making it)
     
    Last edited: Mar 19, 2019

Share This Page