TPT Snapshots / Betas

  • NoVIcE
    6th Aug 2018 Member 0 Permalink

    There are 2 annyoing bugs. (the latter is more annoying). Cant undo when in blank save (when not saved yet). Also when the writing language is changed to cyrylic, pressing buttons do things, like toggling newtonian gravity etc.

    Thx for reading

    Edited once by NoVIcE. Last: 6th Aug 2018
  • NoVIcE
    20th Aug 2018 Member 0 Permalink

    Saving doesnt update the save.

    Windows 7 64 Bit

    Vanillia TPT

  • jacob1
    20th Aug 2018 Developer 0 Permalink
    @NoVIcE (View Post)
    Can I have more info? I've definitely uploaded saves in the snapshot before, and other people have updated saves using the snapshots
  • NoVIcE
    20th Aug 2018 Member 0 Permalink

    well, happened with this save id:2317266. I updated the save but when i came back to it, it was the same. Did this multiple times. However when i came back now, 2-3 hours after the re-save, it was updated. I dont know how much time it took to actually update though.

  • jacob1
    20th Aug 2018 Developer 0 Permalink
    @NoVIcE (View Post)
    Perhaps your ISP is caching saves. Some ISPs will cache http requests and then resend them, saving them bandwidth. It's very rare, but it has been an issue for a few other players before. Most won't even notice because the saves aren't cached for long.

    This won't be an issue in the future once I put some kind of https library into TPT (they can't cache https requests)
  • jacob1
    25th Aug 2018 Developer 0 Permalink
    Snapshot 145:
    Fix default elements disappearing when loading saves if the identifiers don't match
    Fix "publish" button in save browser


    I should get back into more tpt development ... I did imply the next version could be within 2 months. But that's dependent on me finishing up the development that's been done for 94.0. Still a few remaining issues (mostly with Lua)
  • jacob1
    18th Nov 2018 Developer 0 Permalink
    Snapshot 149:
    Add new event. api, replaces legacy event functions
    Embed a compatibility script to replicate the old api in the new one (this fixes tptmp support)

    Linux bonus, snapshot 150:
    Fix issue where executable couldn't be launched from some file managers

    I'll put documentation on the wiki later, for now, here is the commit with a good explanation of some of the changes: https://github.com/ThePowderToy/The-Powder-Toy/commit/a8489ba6f55879a920e92b58d52044997499f01b

    The following functions were removed:
    tpt.(un)register_step, tpt.(un)register_key(press,event), tpt.(un)register_mouse(click,event), tpt.set_shortcuts

    They are replaced by:
    event.register, event.unregister.

    The basic syntax looks like event.register(event.mousedown, function(...) print(...) end)
    The possible events are:
    event.mousedown - arguments are x, y, button. Note that right click is now properly button 3 instead of 4, and higher leveled buttons are 4, 5, 6, ... (applies to mouseup event also)
    event.mouseup - arguments are x, y, button, reason. Reason replaces the old hack where button would be 4 or 5 in special cases. reason is 0 on normal mouseup events, 1 if it's being sent due to entering another interface, and 2 if it's being sent due to entering/leaving the zoom window. reason = 1 events have no x, y, or button set. Reason = 2 events have no button set. The normal mouseup event will still be sent if the mouse is later released.
    event.mousemove - arguments are x, y, dx, dy
    event.mousewheel - arguments are x, y, d
    event.textinput - argument is str. A string representing a keyboard input event. Could potentially be a foreign character, sdl2 and mniip's string changes finally let us support international keyboards / letters
    event.keypress - arguments are key, scan, repeat, ctrl, shift, alt. key is keycode, scan is scancode. They do not always match the keycodes in the old api. key repeat events are now sent, for keyboard shortcuts you should ignore events where repeat is true. ctrl / shift / alt args are booleans which can be used to detect what modifiers are held down.
    event.keyrelease - arguments are key, scan, repeat, ctrl, shift, alt
    event.tick - no arguments
    event.close - no arguments, called when exiting the game (except via q or ctrl+q shortcuts, this is a bug)

    Another function added is event.getmodifiers(), this can be used to get the keyboard modifier state (ctrl/shift/alt/windows/caps lock/other stuff). Works the same as the "mod" argument in the old keyboard api, which was removed.

    Hmm ... seems like I got carried away and wrote the entire documentation here already. One other note to make, the compatibility script might not be there forever. Once 94.0 comes out, script authors should convert all of their scripts to use the new event api.
    Edited once by jacob1. Last: 18th Nov 2018
  • ssccsscc
    18th Nov 2018 Member 0 Permalink

    Graphics api lagging when user holding mouse button. In snapshot <136 everything is smoothly, but in snapshots >=136 graphics api lagging. I dont know is it visible on video: https://www.youtube.com/watch?v=jafZuNrXMWM&feature=youtu.be 
    Code to reproduce:

    local function test()
    graphics.fillRect(tpt.mousex, tpt.mousey, 200, 200)
    end
    tpt.register_step(test)

  • jacob1
    18th Nov 2018 Developer 0 Permalink
    @ssccsscc (View Post)
    Hmm, it seems the same for me. When I do tpt.setfpscap(5), it makes it a lot easier to see. The box is always drawn where the tpt cursor is.

    Snapshot 136 did upgrade to sdl2 though, which does make it very likely something has changed in the input handling. I just can't see a difference myself. And even if sdl2 is slower at processing mouse move events, the tpt.mousex / tpt.mousey variables are always set to where tpt thinks the mouse is.
  • Drizziie
    7th Dec 2018 Member 0 Permalink

    Have you changed something about the mac version in the snapshot to imporve performance?

     

    I'm asing because when I download the current version from the main download link, I only get 5-10 FPS and tons of lag. However, running the snapshot version I easily get 60- no lag at all. 

     

    I'm wondering if there's just something going wrong on my end, or what's going on.