LUA Script requests in here ...

  • #20, by afrlmeFriday, 18. January 2013, 23:10 13 years ago
    http://www.willpearson.co.uk/virtual-tour/gigapixel-view-fro... 360 view thing that Nige linked me as an example ...

    it's comprised of loads and loads of photos to keep everything in the correct aspect ratio / proportion while rotating ... you could technically make it so you have 4 walls & switch from one to the other if you used a long single image but you wouldn't be able to rotate it smoothly.

    I was hoping that contrast, saturation for the window could be altered seeing as we can control the window brightness.

    sound will have to wait until next release of VS & see what can be done with the new sound engine (if all goes well)

    Imperator

    7286 Posts


  • #21, by marvelSunday, 20. January 2013, 01:02 13 years ago
    I think about some kind of 360 degree sprite rotation for the wheels of a windmill. Would this be possible with lua script? smile

    Key Killer

    603 Posts

  • #22, by afrlmeSunday, 20. January 2013, 02:51 13 years ago
    the link I added in the thread for the open source love2D game framework for making 2D games allows rotating of images quite simply amongst many other useful functions.

    as I said ... maybe Alex could implement some of the functions from it? wouldn't hurt to take a look - especially considering it's free! wink

    or @divo would it be possible to include it into VS using your include method? (link for love2D lua framework)

    Imperator

    7286 Posts

  • #23, by marvelMonday, 21. January 2013, 17:10 13 years ago
    Hopefully divo finds a way! smile

    Key Killer

    603 Posts

  • #24, by NigecWednesday, 23. January 2013, 12:34 13 years ago
    Would a text input field be possible? ie a field you could type a user name kinda thing

    Key Killer

    640 Posts

  • #25, by afrlmeWednesday, 23. January 2013, 15:12 13 years ago
    technically, yes!

    but you would have to save the player name to an external file as it doesn't store object/character name changes (apparently)

    on game start or on load from x save you would have to make it read the file to retrieve the name.

    basic code would be same as your key input lock sequence script more or less with a few modifications wink

    Imperator

    7286 Posts

  • #26, by NigecWednesday, 23. January 2013, 17:12 13 years ago
    I can think of ways to do it but it would be very long winded

    I'd imagine LUA has open, read/write close commands?

    Key Killer

    640 Posts

  • #27, by afrlmeWednesday, 23. January 2013, 18:13 13 years ago
    yeah simple enough:

    local file = io.open(location/file.type, 'r')

    if file ~= nil then for line in io.lines(file) do setValue(VCharacterName, line) end file:close() print('Character something has been renamed to ' .. file .. '!') end

    for the read part - well something along those lines from the top of my head.

    you can find the reading/writing to files in the config.ini scripts in the wiki but we could use another method - than my writing to a temp file first - which is to overwrite the current file using io.open(file, 'w+') instead of w.

    creating the string value of the new name is somewhat more complicated as we can't use the editor as it lacks actions to add or edit a value into a string value (for some reason) so apart from creating a string value when the value was first created we need to set it using lua.

    examples ... local val = getObject('Values[value_name]') -- default location to retrieve value local getName = val:getStr(VValueString) -- get the current name for printing to the log file?

    function setName(CharName) if val:setValue(VValueString, CharName) then print('Character name of ' .. getName .. ' has been renamed to ' .. CharName .. '!') else print('Renaming of ' .. getName .. ' to ' .. CharName .. ' was not successful!') end end

    obviously we have to do it differently to this as we have to include the reading & writing to file & then check if it's all working correctly ... but it's just a few quick examples wink

    P.S ignore the bloody winking faces they should be right hand brackets! ) ) ) )

    Imperator

    7286 Posts

  • #28, by LexaurThursday, 07. February 2013, 07:41 13 years ago
    Hey,

    Does anyone have any experience with working on services like mixpanel.com which gives analytical tools. That service supports HTTP requests sent from backend. I was thinking about doing a HTTP POST inside the game on certain places to get analytics on how far the player can get and so on.

    Found this http://w3.impa.br/~diego/software/luasocket/http.html#request

    and this https://mixpanel.com/docs/api-documentation/http-specificati...

    So I think it should be possible, do you agree?

    Newbie

    0 Posts

  • #29, by afrlmeThursday, 07. February 2013, 13:55 13 years ago
    hmm ...

    I've not heard of mixpanel.

    We've had a little discussion about luasocket, but that's about as far as it went.

    I understand what you want though ... something similar to the ttg walking dead game in which it compares your game statistics; what actions you chose, playing time etc & other peoples action choices & playing time to create a summary or percentage.

    it's an interesting idea wink does Steam do anything similar? (I don't use steam but I know they log user achievements & so on)

    Imperator

    7286 Posts

  • #30, by LexaurThursday, 07. February 2013, 14:38 13 years ago
    Steam probably have it's own libraries but you get access to those if you are in Steam, so that is not an option.

    What I want is more centered towards following up on how many of the people who download the game even start it, or how many of the ones who start it even play more than 10 minutes. Do you get my point?

    I have gathered that you could send a HTTP POST from inside the game to for example mixpanel.com servers but you need to encode it with base64 first and this is what I am having problems with. The thing as a whole is quite complex to get working. Good thing is that mixpanel is free for small amount of traffic.

    Newbie

    0 Posts