Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
TNT Virtual PAD 2019? - Gideros Forum

TNT Virtual PAD 2019?

hello there,

Is TNT Virtual PAD still available? has it been open sourced or is it for purchase?
I have been looking for it but only comments on how great it is but no download links (neither paid nor free).

Thank you for any hint.
Tagged:

Comments

  • SinisterSoftSinisterSoft Maintainer
    It's supposed to be open sourced into the gideros github. Not sure if that happened though. I can look into making it a 'lua plugin'.
  • MoKaLuxMoKaLux Member
    edited April 2
    hello sinistersoft, thank you for your answer. Please do that would be awesome. The original website seems to be down (dead?).

    I had a look at the page curl sample too and it still works like a charm in gideros 2019.2.1, that's great!

    Likes: SinisterSoft

    +1 -1 (+1 / -0 ) Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    Accepted Answer
    If you add this plugin to your user plugins - I think it will be a built in plugin on the next version of Gideros (so remove it then).

    https://www.dropbox.com/s/a4h0zl449mabnnz/virtualpad.zip?dl=0

    Basically put the virtualpad folder within the zip to the place that opens when you click the 'User plugins' button in the gideros plugins section.

    then in your code do

    require "tntvirtualpad"

    Then follow the normal tnt virtual pad docs. It's v1.41 with a more accurate pi than in the original v1.41

    I'll add the docs to the wiki as soon as I can.

    Likes: MoKaLux

    +1 -1 (+1 / -0 ) Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    edited April 2
  • MoKaLuxMoKaLux Member
    thank you a lot sinistersoft, I will have a look at this. I didn"t find the doc but I'll try to make something out of it from this forum.
  • MoKaLuxMoKaLux Member
    tnt virtual pad plug in was very simple to add thanks to @hgy29 and thanks to the forum I found some bit of information too.
    -- setup Virtual Pad
    vPad = CTNTVirtualPad.new(stage, "images/Minigames/CEO/M1/Controle/tntskinpad",  PAD.STICK_SINGLE, PAD.BUTTONS_ONE, 20,2)
    I have a question please. I don't know what is "images/Minigames/CEO/M1/Controle/tntskinpad", it has no extension!

    When I looked at the tntvirtualpad lua file I understand that it needs a texture region?
    --init...
        self.spriteA = Bitmap.new(self.skin:getTextureRegion(PAD.SPRITE_BUTTONUP))

    So what I tried in main.lua:
    setDefaultButtonSprites("tntvpad_base.png", "tntvpad_buttondown.png")
    setDefaultJoySprites("tntvpad_base.png", "tntvpad_buttondown.png")
    local mypacktextureregion = TextureRegion.new("gfx/tilesheets/tp01.png", 0, 0, 50, 50)
     
     
    vPad = CTNTVirtualPad.new(stage, mypacktextureregion,  PAD.STICK_SINGLE, PAD.BUTTONS_ONE, 20,2)


    But I have this error: "(TextureBase expected, got string)" at the line "mypacktextureregion = TextureRegion.new("gfx/tilesheets/tp01.png", 0, 0, 50, 50)"

    Can somebody tell me what I have to pass in the tnt init function?

    Thank you for your help.
  • MoKaLuxMoKaLux Member
    and from the creator himself:
    -- setup Virutal Pad
    local vPad = CTNTVirtualPad.new(stage, "tntskinpad",  PAD.STICK_SINGLE, PAD.BUTTONS_TWO, 20,1)

    What is this thing: "tntskinpad"?, I don't get it =(

  • SinisterSoftSinisterSoft Maintainer
    That will be the filename of a packed image file with these images in it:
    https://www.dropbox.com/s/u4sedv1eplgu1ym/tntpadgfx.zip?dl=0

    eg tntskinpad.png & tntskinpad.txt generated from the gideros texturepacker.
  • MoKaLuxMoKaLux Member
    thank you so much sinistersoft, I will try to implement it. You are a savior!

    Likes: SinisterSoft

    +1 -1 (+1 / -0 ) Share on Facebook
  • MoKaLuxMoKaLux Member
    edited April 3
    I don't want to be a burden but I have the same error: LuaPlugins_\tntvirtualpad.lua:532: attempt to call method 'getTextureRegion' (a nil value)

    Let me tell you what I did:
    1- used texturepacker from gideros to create the texturepack, the TNTVirtualPad256.txt (I tried both power of 2 and non power of 2 pngs):
    tntvpad_analogpad.png, 0, 0, 64, 64, 0, 0, 0, 0
    tntvpad_base.png, 0, 64, 94, 94, 0, 0, 0, 0
    tntvpad_buttondown.png, 64, 0, 64, 64, 0, 0, 0, 0
    tntvpad_buttonup.png, 0, 158, 64, 64, 0, 0, 0, 0

    2- so I have those 2 files: TNTVirtualPad256.txt with TNTVirtualPad256.png.

    3- then the init code (after require "tntvirtualpad"):
    vPad = CTNTVirtualPad.new(self, "gfx/UI/TNTVirtualPad256", PAD.STICK_SINGLE, PAD.BUTTONS_NONE, 20, 1)

    I don't think I messed up the process but what bothers me is that there is no extension in the example but that doesn't work for me. I tried "gfx/UI/TNTVirtualPad256.png", "gfx/UI/TNTVirtualPad256.txt" and "gfx/UI/TNTVirtualPad256" to no avail.

    So why isn't there an extension .png or .txt?

  • SinisterSoftSinisterSoft Maintainer
    Ahh, I remember I fixed it so you preload the texture (so you don't waste a whole texture on one thing) - the docs will need updating for that.

    do this:
    texture=TexturePack.new("gfx/UI/TNTVirtualPad256.txt","gfx/UI/TNTVirtualPad256.png",true)
     
    vPad = CTNTVirtualPad.new(self,texture, PAD.STICK_SINGLE, PAD.BUTTONS_NONE, 20, 1)
    I also use stage rather than self for CTNTVirtualPad.new(

    Likes: MoKaLux

    +1 -1 (+1 / -0 ) Share on Facebook
  • MoKaLuxMoKaLux Member
    edited April 3
    IT WORKS!!!!

    Your my hero of the day (night?), thank you very much sinistersoft.

    Likes: SinisterSoft

    +1 -1 (+1 / -0 ) Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    yes, sorry about that mixup. I thought it was best to have the texture so it could be used for other things as well as the virtual joypad, etc...

    Likes: MoKaLux

    +1 -1 (+1 / -0 ) Share on Facebook
  • MoKaLuxMoKaLux Member
    no worries sinistersoft, I am glad you could help regarding this issue.

    @hgy29 has already added the plugin into the next gideros release, people will be amazed.

    Now, I need to work a little bit more on gideros and this plugin then God willing I will make some yt tutorials + help with the wiki... I need to be good at it, I don't want to disappoint you guys.

    Have fun!
    +1 -1 (+4 / -0 ) Share on Facebook
Sign In or Register to comment.