ujvl's Forum Posts

  • 12 posts
  • I am making a coloring game and i want to promote the player to next sketch as soon as the player leaves no white color on the canvas (drawing canvas).

    P.S. I have already filled the drawing canvas white before player starts coloring it.

    Tagged:

  • Reuploaded again in case I didn't remember to do it.

    Hi R0J0hound, for some reason, the .c3p file that you sent is not compatible with the full-screen scaling = letterbox Scale.

    Is there any way around it where i can play this on full screen mode?

    P.S. letterbox Integer Scale works but it leaves a lot of white space all around.

    in case giphy command not works: giphy.com/gifs/construct3-forum-doubt-vnLEkAim9WBz5wcFvU

  • I am trying to pin an object to a line (much like y = mx +c). I rendered two objects (A and B) on the layout and by using pathfinding Behavior i will draw a line between them. Is there any way so that:

    1. Either, i can bound an object (DragDrop Behaviour) to this line that i am gonna draw by pathfinding.
    2. Or, I can restrict an object's movement to that line (pathfinding from A to B) only.
  • This might be helpful:

    https://www.dropbox.com/s/cks26i10hnm7em8/alphabet-c.c3p?dl=0 dropbox.com/s/cks26i10hnm7em8/alphabet-c.c3p

  • Working on a very similar game, though i am not able to figure what exactly your problem is? Can you elaborate.

  • Ok, fiddled with it more and got it to work. The link is updated

    Found that fixed resolution canvas' scale the image when loading pixel data, so left it at automatic. Also changed the line detection to use a tolerance.

    Found that pasting repeatedly blurs the lines so I combined the pixel data directly with some javascript.

    The only issue now is that the delay from making the mask is noticeable.

    Hi R0J0hound, The link doesn't seem to be updated for some reason.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here's one possible solution of the flood filling and masking.

    https://www.dropbox.com/s/z7afhehma5py976/draw_within_lines.c3p?dl=1

    The flood fill basically just makes a hole that you then can draw into on the mask canvas. Didn't get it working with any full screen scaling though.

    R0J0hound Thank you for providing the code. It was very helpful. I do have a little doubt, how do I make it work for viewport-fit = Auto and Full screen mode = Letterbox Scale.

  • Construct has a system in place that updates the game if there's a new version. You circumvent this system by editing the exported project rather than exporting a new one.

    It's a shot in the wild and I haven't tested it but I do think it's possible to trigger this update system by simply editing offline.json (along with whatever other changes you made) and increasing the version number by one, then reloading twice. (First reload triggers the update that happens in the background, second reload then applies it)

    The functionality for this is a little bit hidden inside the Browser plugin.

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/browser#internalH1Link1

    https://www.construct.net/en/tutorials/offline-games-construct-8

    You can refer to this.

    https://www.construct.net/en/forum/construct-3/how-do-i-8/clear-cache-startup-168542

  • I am trying to make a drawing game. And I want that when player click a sprite that he wants to paint, a drawing canvas of that same shape appear there. That sprite (and hence the shape of drawing canvas) might be a circle or a leaf or anything for that matter. I know it might somehow be solved with mesh points property but I don't Know how.

  • R0J0hound I don't know why, but your demo constantly crashes Chrome:

    Aw, Snap!

    Error code: STATUS_BREAKPOINT

    dop2000 This might be because R0J0hound is using r334 , i.e. beta version https://editor.construct.net/r334/.

    Clear the cache and run this on beta version. The program will not crash.

  • Thank you dop2000 for your reply.

    The solution provided appears to be highly dependent on specific images and the player's brush will fill everything that's opacity is set to 0 in one continuous skroke, therefore does not meet the requirements of the problem at hand.

    It is my understanding that a more suitable approach may involve the use of a flood-fill algorithm, which I believe may provide a more appropriate solution to the problem.

  • https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExY2RiNjlhNTI2ZmM2ZTg5ZmJmNjYxYzY1YWEzNjI4NDZiNDRiNmIxMiZjdD1n/UJJ0wRtsxQNjXmkpjh/giphy.gif

    I am trying to make a sketching game where the color will only be filled where the player touches first and keep on drawing in 'that specific area only (enclosed by black boundaries)' and then as soon as player touch end, the next portion of the image that it will touch will behave the same.

    To make this Gif, i pasted it on a drawing canvas and flood filled it with (0,0,0,0) i.e. with 0 opacity. So that's just a hard-coded way of doing just one portion.

    p.s. I am looking for maybe some kind of script that will work on 'ANY' image with specific black portions to fill.

  • 12 posts