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!

Improved track format/editor

Discussion in 'Anything and everything Free Rider' started by phi16, Aug 3, 2021.

  1. Azgr00

    Azgr00 Well-Known Member Team Helicopter Official Author

    hi, this program sounds very interesting! :)
    but i have a question: i'm a coder of js and html, but i'm not that good at it. but, is it hard to program a program that converts a image to a 16x16, or 32x32 pixel art, to a frhd track (a 5$ paid service)? also, if you meant about "guis in about any language", i can help you translate the gui from english to portuguese, but i'm horrible at css, but you can find some free css templates on codepen, etc. so i would actually copy+paste the gui, then translate it to portuguese, but i'm not sure. also, i couldn't find the css part (only in the frhd-inprov ements website), and idk how to program rust... so i probably wouldn't help, sorry.
    thanks.
    i just don't know how to program rust, but this is a nice program! :)
     
  2. phi16

    phi16 Member

    Hey, so I have a few answers to your few questions (as well as a few comments).

    1. Stick with HTML/JS! (and stick some CSS in there as well) It can be really hard to get good at something but keep at it
    2. It is not hard to create an image gen script (I created one in a weekend with a friend) and there are tons in different languages. That being said, I will not share my gen, and most people who have created their own probably won't either. If you make money off of it (or don't, like most of us), you have to put in some work first. The only thing that I can point you towards is find a FRHD library for the language you are working in (since you know JS, someone I know made frhd.js, check it out), and learn image manipulation. It is pretty simple once you understand basic image manipulation and how to use the FRHD encoding. As for how hard it would be to make a service, it would be fairly complicated. At your skill level you would probably need to use something like wix to create your website and allow it to accept payments. If you just put the JS on the website, people can rip it without paying, so it would need to be on the server. To accept payments you would also need a PayPal account or something similar. All in all, I think that the cost is greater than the interest would be for such a website, but if you really want to, knock yourself out.
    3. Just google-translating doesn't work that well. I have helped out a few projects translate to Spanish, and Google Translate gets you 60% there but it is not perfect.
    4. Don't worry about not knowing rust! Unless you have a very specific reason for wanting to learn Rust (For example: I want to write a super performant FRHD library without using JavaScript or C), don't worry about it! That goes for all other languages. If you want to for fun, than go ahead, but don't feel pressured to use a different programming language just because someone else uses it or says that it is better. Almost every language has its own niche. I wouldn't use Rust to write a web app, and I wouldn't use JS to write my FRHD library (because I am not writing it for the web).

    Happy programming! Keep up with it and practice!
     
    pawflix and Azgr00 like this.
  3. Azgr00

    Azgr00 Well-Known Member Team Helicopter Official Author

    i actually meant, the pixel art one in your website, also, i'm brazilian so obviously i wouldn't use google translate :rofl:
    but still, thank you so much! i will try to practice. :)
     
    Last edited: Jun 22, 2022
    phi16 likes this.
  4. phi16

    phi16 Member

    I have looked at the offending code about a hundred times, and I have never thought that the bug that I just fixed might be the problem. Basically, I wrote a 1 instead of an i, and that was what was causing all the weird issues in the generated code. Here is what the generated code looks like now that I have fixed it:
    [​IMG]

    Perfectly smooth, not of that weird stuff that was happening before.

    This doesn't really constitute a real status update, so sorry if you got a notification, but I'm really angry at myself for missing that bug and I want to show y'all what the last post would look like with good code gen.
     
  5. mbcool

    mbcool Well-Known Member Official Author

    Think you’re gonna make more progress soon then?
     
  6. phi16

    phi16 Member

    Absolutely. Now that I have fixed all the bugs (that I have come across) in the rust library, I can continue work on the actual editor. That being said, software development is a long and slow process. Don't expect a release in the next week or even month. If I keep up my current pace, I will add about one new (small) feature each day. Then it is always best to add another day (or two) for bug finding and killing. And once the whole thing is done, I have to make everything look pretty and clean up my code. I already have a couple of week's worth of planned features and they don't even consist of all of all that is inside the web editor.

    If you are interested, stay tuned! I'll try to put updates here fairly often.
     
    G-raffe, pawflix and mbcool like this.
  7. phi16

    phi16 Member

    Hello! I actually managed to get a few things done today! So I cleaned up the code on the backend (something I will probably do a lot), added scenery lines, and implemented copy on export. Here's what the editor looks like with the new physical/scenery lines (excuse my trackpad writing):

    [​IMG]
    I can't really show the copy-on-export thing without a YT video (which I might start doing at some point), but it's there.

    Tons more work to do, but that's all for today and I wanted to show y'all that I am doing something.

    EDIT:

    Which would you prefer: A button with a label saying which kind of line, or a button with a color (similar to the current setup in the web editor)
    And would it be a toggle (click the same switch for it to switch to the other kind of line) or two separate buttons?
     
    pawflix likes this.
  8. phi16

    phi16 Member

    Keybindings are certainly something I want in the editor. Currently I am trying to figure out what keybinds are intuitive and reasonable to reach for everything in the editor.
     
    pawflix and Azgr00 like this.
  9. phi16

    phi16 Member

    Hi everyone! I just want to pop back in here with an update. I have been unable to access my computer since Thursday night, so unfortunately I haven't got much work done since then. The only that I have done is to add straight lines as well as brush lines, as well as a mechanic to toggle between the two. Sorry for the long radio silence, I expect to do more soon.
     
    mbcool, zachypacso and pawflix like this.
  10. phi16

    phi16 Member

    Hello there.
    ("Kenobi!!!!")

    Anyways, I am working on something that I think is pretty massive. Unfortunately I don't want to share it quite yet, but I can show you some of the results:
    In editor:
    [​IMG]
    In FRHD:
    [​IMG]
    as you can see, I am having some issues getting the track output to work right (still), but I should be able to fix those in the future. I probably won't be posting much here since I am trying to not say too much about what exactly I am doing. Stay tuned!
     
  11. MatthewMatthew58

    MatthewMatthew58 Active Member Official Author

    phi16 When/will this be available to the general public as an easy install and it works?
     
    pawflix likes this.
  12. totem

    totem Member

    How is it that this whole project is literally the exact same thing that I was thinking of making?
     
    MatthewMatthew58 and pawflix like this.
  13. phi16

    phi16 Member

    Hey! It's been a while. I have not made much progress on the editor since the last screenshot that I showed, but I definitely would like to keep working on it. I am just about to graduate, so hopefully once I do that I should have more time to focus on this. In the meantime, I am currently working on a YouTube video that explains how FreeRider's encoding works, which should give people who already know how to program a leg up into creating content for FRHD. I am hoping that it should be ready in the next two weeks or so, and I will post a link here once it is live.

    As always, if you know how to program—specifically in python, rust, or go (since those are the languages I am using here)—and are willing to help, send me a message and I will see what I can do!
     
    loge_0, pawflix, mbcool and 3 others like this.
  14. phi16

    phi16 Member

    Hi everyone! I guess that my time estimates are awful—I will try to stop making those, and if I do, please throw them out the window.

    I finally finished the video that I was working on. You can go and find it here:

    I think the video is a great introduction for a high-level understanding of what is happening, but it is not complicated enough to explain how every little detail works. If you have any questions, please let me know in a reply (or in a DM, if you would rather), and I will try to help you understand!
     
    totem, Fluoride, Volund and 3 others like this.
  15. MyrraWolf

    MyrraWolf Well-Known Member Official Author

    Awarded Medals
    cool bro
     
    MatthewMatthew58 likes this.
  16. mbcool

    mbcool Well-Known Member Official Author

    That video was top notch man! Keep up the good work!
     
    phi16 and MatthewMatthew58 like this.
  17. xdeadgrim

    xdeadgrim Member Official Author

    Amazing video, great work. I only have one question, I'm not too sure how teleports work - I have a Image gen and have been meaning to expand on it so that I can convert videos to track code however im not sure how exactly I can code teleports into python. Have you got any ideas?
     
    Azgr00 and MatthewMatthew58 like this.
  18. phi16

    phi16 Member

    Yeah of course.

    So the general format for a teleport is "W x1 y1 x2 y2," (where the x and y's are of course encoded in base32).
     
    MatthewMatthew58 and Azgr00 like this.
  19. phi16

    phi16 Member

    And by the way, here is a (completely untested) function that should encode a number to base32 in python.

    Code:
    def base32(number_prime):
        alphabet = '0123456789abcdefghijklmnopqrstuv'
        number = abs(number_prime)
        base32 = ''
        while number:
            number, i = divmod(number, 32)
            base32 = alphabet[i] + base32
        if number_prime < 0:
            base32 = '-'+base32
        return base32 or alphabet[0]
     
  20. Calculus

    Calculus Community Developer Staff Member Administrator Ghost Moderator

    Awarded Medals
    https://replit.com/@Calculamatrise/Base32-Conversion-cpp - C++
    https://replit.com/@Calculamatrise/Base32-Conversion - C#
    https://codepen.io/Calculamatrise/pen/XWapzOv - JavaScript
     
    phi16, Azgr00 and pawflix like this.

Share This Page