grossd's Forum Posts

  • Hello,

    After a long while I am restarting C3 coding again.

    I have an object (say a car) with a moveto behavior, and want an instance of the car to move to an instance of another object.

    The car is named, and the first car instance is selected by having in the event a condition that picks the car instance by name.

    This worked, and I managed to get the first car instance selected after an event, based on the instance's name, but i don't know how to use the MoveTo command to let car move to a first target object instance.

    it seems the only way to do so, is to add another condition to the event that picks the first location by name, which is then "handed" to the moveto ...

    For convenience I don't clone object types but have many named instances in the layout of both cars and named locations they can drive to.

    Is there a way to decouple the selection of the target object instance from the event condition -- so,once an event is received (e.g. start game), then via some lookup a first target instance name is retrieved which is then used to pick the target instance to move to?

    Your help is very much appreciated,

    thank you,

    Dan

  • Looks like physics and bullet have overlapping functionality -- i like gravity that it enables creating an impact force ... which bullet doesn't have ...

    But, only bullet has on step ...

    oh well ...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks!

    I will check out the stepping.

    I didn't want to "fall back" onto drawing lines because it would take away from the smoothness of the curve and hence its "real" nature

  • Hello,

    I am shooting a bullet up at -45 angel and let it fly with gravity and am plotting a parabola of its trajectory on a canvas.

    at every tick i am creating 1 pixel line at the location of the bullet -- and it indeed traces the flight path -- however, i notice that the trace is discontinuous -- many disconnected dots in particular as the bullet accelerates further ...

    Is there a way to actually create a smooth path -- looks like the redraw algorithm is more detailed than each tick.

    thanks,

    Dan

  • 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.

  • 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: