Posts by xyzzy

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.

    using NPOT textures is asking for problems with older hardware (and in some cases probably even newer)

    for your second problem it may well be lack of support for certain graphics card operations... unfortunately i don't think mmf exposes any way of getting the card's supported features

    this specific opengl extension runs in its own window afaik, so you can't display anything above it

    you'd either have to have your hud around the gl window but not overlapping it, or draw the hud yourself through opengl (which would require you to write your own bitmap font code)

    yes, but it would be nice for a game/app to accept images from the end-user or from other sources where they can't be guaranteed to already be in power-of-two format; the latter case because you can't do much about it, and the former case where the scaling is basically transparent to the user as they don't know it's happening but the application can correctly handle it

    i didn't think of it when i made that post but there would probably also need to be "original width/height" expressions that are set before padding so it would be possible to generate scaling factors for texture coordinates

    maybe as part of the loading action there could be a couple of parameters for adding transparent padding pixels to the x and/or y of the texture (probably with the texture 'pinned' to the upper left)

    they could probably take the values:
    -1: pad to nearest power-of-two larger than or equal to current size
    0: don't pad (current behavior)
    >0: pad to this size if larger than current size (doesn't necessarily have to be POT)

    assuming it's possible to modify the incoming image data though

    if you really wanted to limit syntax usage you would have to dig into provided scripts with lpeg or something, which would involve implementing some or all of lua's grammar, then throw an error if it finds a match... this might not even catch everything, though

    it's fairly easy to sandbox user scripts in lua (but the way you do it will change in 5.2), but this still means you have to pay attention so you don't accidentally expose the global environment through a library function or something

    but yes, as already mentioned, a fair amount of "security holes" when it comes to sandboxing are in the form of functions which you can either nil out, or if you are using a sandbox, not provide

    i believe line-by-line debugging would be possible through the debug.sethook() function (and other debug.* ones)... but last i tried using that function in xlua it didn't work

    Quote from Pixelthief

    Ahh thanks! Yeah thats exactly what I was expecting the best method to be. I didn't realize HLSL already had lerp- I've been struggling with computing colors for my CSci courses all last semester in OpenGL, wish that had something like this (bet it does -.-)

    I'll update that link and example


    mix() i think

    same directory the script will be in

    to load it, there's a load C module action, or you could use require("mmfi") at the top of your script

    EDIT: you could also put it into a subdirectory, but you'll have to provide that directory to lua... i never use the load C module action though so i don't know if it will work in this case, but if using 'require', you could use the following line as the first line in your script (or at least before your 'require' calls):

    package.cpath = package.cpath .. [[;.\your_subdir\?.dll]]

    even then you'd still use require("mmfi") to load it

    if you're going as far as adding gamepad support you'd probably want to look into one of the joystick extensions (such as joystick 2)

    however you'd want to have a "profiles" system set up as well since something as simple as which button is "3" is likely not going to be the same across all devices

    if you kept the syntax extremely simple it wouldn't be too hard to do this with the list object, string tokenizer, and a few other things

    mmf does have a few scripting/language extensions but they may be too heavy if the scope of the language you're wanting is pretty limited

    you should just be able to use find. if it finds it it'll return 0 or higher; if not it will return -1:

    [Button pressed or whatever]
    + find(edittext$("Edit Box"), "poop", 0) >= 0
    --> [trigger event]

    [Button pressed or whatever]
    + find(edittext$("Edit Box"), "poop", 0) < 0
    --> [trigger other event]

    EDIT: it probably wouldn't be a bad idea to store the result of the find operation in a variable since you have to use the result twice

    Quote from zellix

    Loving it so far! Good to have that functionality working. And I like how the parameters are true to the OpenGL spec, less confusion. And any steps to eliminate Lua tables is great. The fixed array is so much faster/memory efficient. Will be great when VBO's are able to take the fixed arrays. Great work so far Retriever!


    well i can't say completely eliminating tables from these types of functions is the best idea, since they can be more convenient to handle the data in some cases

    but yes, in the general cases of where both the memory and "packing/unpacking" overhead of a table isn't really wanted, it's good to be using a datatype that opengl can use pretty much effortlessly

    Quote from Tuna

    Won't this simply drop the value's RIGHT of the decimal point?

    well unless i screwed something up:

    1.23456 -> 123.456 -> 123 -> 1.23

    so yes it technically does get rid of them but i don't think mmf has a printf/sprintf-like function