grossd's Forum Posts

  • thank you.

    Yes, i started to suspect that dropbox is the culpit after installing remote image plugin and noticed it works fine unless i put in the dropbox url.

    What is odd is that dropbox allows sharing the link and everyone with the link can view it -- so it views in my browser but doesnt in the opened runtime browser of C3.

    too bad dropbox is more convenient than say google drive or one drive.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • thanks.

    I now tried two approaches and neither worked:

    1. use the load image method for sprite, to load a URL of the image in the dropbox.

    2. use nw.js to load binary data from a URL -- such a method exists, and its loaded into a binary data object --

    and then, upon read event completed load the sprite with a URL of the binary data generated by the binary data object's method get URL ...

    Also, this didn't work.

    The sprite remains unchanged, upon loading the layout ...

    Not sure what the problem is ... the URL works in the browser to retrieve the image from the dropbox.

    I am missing something ...

    Dan

  • Thanks.

    My apologies, I wasn't clear.

    I want to load the image into a sprite and i don't want to save it for loading again.

    Instead, when i (somehow) sense that the image was replaced in the folder with a new image, then i want to load the new image into the sprite.

    And, as mentioned, the simplest case i am looking at right now is that there always only exists one image in the folder which is displayed on screen.

  • Hello,

    I'd like to create a simplest app running locally on an android tablet that does exactly one thing.

    It reads from a local folder (which happens to be a dropbox folder) and displays in full screen the one picture stored in the folder.

    When the picture in the folder changes, then the new picture is displayed in full screen.

    I can see that the nw.js plugin allows me to read a binary file -- which would be the picture file (in some picture format) -- but i am unsure how to get the picture displayed e.g. in a sprite or elsewhere.

    Edit: looks like sprite can load from a URL -- but, can it also load from a local folder?

    Any thoughts on this are much appreciated,

    Dan

  • Hi Ashely,

    It would be great if you could write a blog post about WASM use in Construct 3.

    thanks,

    Dan

    Tagged:

  • Thank you.

    Can you explain a bit the "mechanics" of streaming.

    i guess C3 has in its engine an "audio streamer" on the server which is received by stream/read in the browser and then played as it streams.

    Can every audio format be streamed ... or only specific ones?

  • Hello,

    Is there a way to introduce audio streaming into a game -- i.e. not have a fully downloaded audio file but have it streamed on demand.

    thanks,

    Dan

  • Hello,

    Have there been attempts to using C3 to communicate with an Arduino or Micrbit microcontroller .. such as writing or reading pins and the like.

  • Hi,

    Yes you are right.

    I think what caused this behavior was an incorrect animation frame setting I had used after creation, which caused a different image to display with slightly different dimension.

    Also, another issue that occurred, unrelated to above, was that setting a animation frame after setting width and height distorted the image -- changing the sequence, first setting the animation frame and then setting width and height, created the right image.

  • Hello,

    I am trying to create a sprite instance using create object sprite_name at (x,y), instead of creating the sprite "manually" in the layout.

    Oddly, although i am using exactly the same coordinates the sprite is placed in a shifted location. Only when i update the x,y coordinates in debug to different numbers do i get the sprite to be in the same location.

    Here are two a screen shorts from the debug windows -- showing the same sprite -- now aligned -- because i had to change the coordinates of the one created with create object.

    Its as if, create object uses a different origin coordinate system.

    Any thoughts why this is are much appreciated.

    (top is the programmatically created, and bottom is the manually created -- both at exactly the same location, but their X and Y are different -- which is odd)

    This is not an unsolveable problem -- a consistent transformation would take care of this -- but, i wonder if its a bug.

  • Hello,

    I noticed the following code in the documentation, which shows how one can access instance variables of a sprite instance.

    Is there a way to access built in properties of a sprite object as well or of behaviors added -- such as postion.x and position.y.

    If yes, how is it done?

    thank you,

    Dan

    runtime.sortZOrder(runtime.objects.Sprite.instances(),

    (a, b) => a.instVars.myZOrder - b.instVars.myZOrder);

    Tagged:

  • I am now wondering if this can be achieved by adding a one line script that calls a function that uses the scripting interface to set the object properties and object instances.

    If this is the way to go, would be great if someone could show an examples how this could be done.

    Edit:

    I think i am getting closer :-)

    construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/iruntime

    runtime.objects.Sprite

    although I need to do this in a parameterized way -- somehow.

  • Thank you for giving this a try.

    I am seeking a more general solution.

    Your code sets, for example, the sprite instance variable by referring to the instance variable name "red" -- which is selected from the dropdown list.

    I seek to use the key in the dictionary as the name of the property to set, so something like this

    Function createObjectFlexibtly(Object_Type_Name, aDictionary)

    Current_Object = System.Create ObjectByName(Object_Type_Name)

    for each aKey in aDictionary

    set Current_Object.aKey = aDictionary.current_value

    In the pseudo code above, the name of the object property is the key in the dictionary -- and the name of the object created is a parameter: Object_Type_Name of a function call.

    This makes this code very general -- and I don't have to write code for each object type that can be created and set.

    Clearly, whoever calls this will know what properties and instance variables the named object (in Param1) has, so that the code doens't try to set something that doesn't exist.

    Although, in javascript -- setting an object property that doesn't exist might actually create it -- although, this might not be aligned with how C3 manages instance variables of sprites.

    i hope i explained that understandably,

    Dan

  • Hello,

    Just noticed that in C3 generating json from a dictionary includes c2dictionary in the string.

    Its no big deal but perhaps you want to update it to c3 -- although, who knows, whose compatibility will then break ...

    Dan

    Tagged:

  • Hello,

    I'd like to set a sprite property by name. Is there an easy way to do this without resorting to javascript?

    E.g.

    Suppose I have a two text input fields where i can write into the name of a property, including instance variable names, and the value and upon pressing some button an action retrieves the name of the property from the field and sets its value.

    Can this easily be done?

    thank you,

    Dan