TPT's web site - open source?

  • hydrogen192
    16th Apr 2011 Member 0 Permalink

    Cr15py:

    lmao some of us people that actually know how to program(PHP) should create a deployable Powder Toy server in PHP, just for lulz.

    You're right! I want see code of API, to make my own TPT scenes sharing server! Just for fun.
  • Sylvi
    16th Apr 2011 Moderator 0 Permalink
    @Cr15py (View Post)
    I would except it's so much coding and probably a lot of sockets. If I could, I'd make a server for educational use though...
  • hydrogen192
    16th Apr 2011 Member 0 Permalink
    I think, Simon can just tell us algorithm, and I will code it myself. BTW, I'm PHP coder.
  • Cr15py
    16th Apr 2011 Member 0 Permalink
    @Lockheedmartin (View Post)
    In PHP it wouldn't matter... we don't have to code sockets(if we did I made myself a header file that would drastically simplify the process, but still not necessary in the slightest). I guess someone could make a git for it and we could all just start reverse engineering what we can and just recreating what we can't :P

    EDIT: Also, there is no algorithm for running the entire game, and I've had experience with basic search engines... so I already have an idea of how to recreate search.
  • Xenocide
    16th Apr 2011 Former Staff 0 Permalink
    The source for the site will not be released. If you look inside the TPT source you should be able to figure some things out.
  • Cr15py
    16th Apr 2011 Member 0 Permalink
    @antb (View Post)
    Agreed. Along with some packet sniffing and some experience to inference from we could probably recreate the necessary mechanisms.
  • Sylvi
    16th Apr 2011 Moderator 0 Permalink
    The only thing I can't find through the jungle is the part that sends the save to the server.
  • hydrogen192
    16th Apr 2011 Member 0 Permalink

    Cr15py:

    I guess someone could make a git for it and we could all just start reverse engineering what we can and just recreating what we can't :P

    Good idea!

    I think, we should look deeper in TPT's sources, 'cause we must know, what server should save in database table.
  • Cr15py
    16th Apr 2011 Member 0 Permalink
    @Lockheedmartin (View Post)
    I have the packet data of that transaction here! :D

    EDIT: It was just an old random save I tested :P
    What I got from Simon was that the save, thumbnail, and ids are ignored by the server 0.o
  • hydrogen192
    16th Apr 2011 Member 0 Permalink

    Cr15py:

    @Lockheedmartin!98849
    I have the packet data of that transaction here! :D

    EDIT: It was just an old random save I tested :P
    What I got from Simon was that the save, thumbnail, and ids are ignored by the server 0.o


    When we send request to server: (for ex.: https://powdertoy.co.uk/Get.api?Op=thumb&ID=232716), it returns same thing, as what was sent to it earlier, when we saved it, so i think, it just puts binary data to DB, and that's all.

    So database would be:
    table powderSave_scenes {int sceneId, text sceneBin}
    table powderSave_comments {int sceneId, int userId, int dateStamp, text commentText}
    table powderSave_searchIndex { I don't know, what should be here. }
    table powder_users {int userId, text login, text passMd5, int regDateStamp}

    And filesystem would look like that:
    kernel/keDatabase.php
    thumbCache/ {images with thumbnails for scenes}
    Get.api
    Update.api
    ...
    .htaccess

    Is that ok? Or something is wrong?