randomly's Recent Forum Activity

  • Hey everyone,

    I'm currently working on a submarine game and I'm troubling with blend modes/WebGL effects.

    What I want to do is the following:

    • A submarine in dark water (not black, more blueish)
    • Submarine's light lights up the dark water and a bit of the submarine too
    • Everything else which is not in the torchlight area should be not visible or very dark

    (Let the details be my problem, I just want the general setup)

    Kinda like this: https://goo.gl/UP3cRx

    I figured I'd create a Sprite for the light, being a gradient going from white to transparent.

    I tried every possible combination of blending modes, including the ones in the "effects" property.

    I tried every possible Z order.

    There must be a way, probably a very simple way, a combination of effects I missed.

    Any help is greatly appreciated, thanks.

    [EDIT]

    I maybe found a way to do it. Maybe.

    It just ignores colors of objects on the main layer...

    Link to the capx: https://www.dropbox.com/s/4basmw18nzmcbb6/SubLight.capx?dl=1

  • First question: what is your target platform? Browser (mouse)? Or mobile (touch)?

    Second question: what do you trouble with? Can't be everything. The start? How to keep the ball in the air? How to do the ball's movement?

    For future posts, please provide more information.

  • Well, actually, that depends on what you want to achieve with your website?

    Which look are you pursuing?

    To me, it looks...digital? And flat & simple.

    If that is what you want to achieve, you succeeded.

    The simplicity of the page helps keeping a nice overview. Though the page looks complex, it doesn't "overflow" your senses.

    I don't know what the BG image is, but it looks interesting and I like the fact that it moves.

    Would be awesome if it was interactive.

    More notes:

    • it is a bit irritating (at least with a slow internet connection, such as mine) that there is no loading screen (at least I haven't seen one). There's just a black canvas for some seconds. Probably not an issue for ppl with faster internet.
    • what's the black square next to the menu?

    But to conclude, yeah, I like the style. Suits the title of the page.

    There could be more color though.

  • Sorry I can't open your file since it's saved in a more current version of C2 than mine.

    I'm in a slow-internet location atm that's why I can't update.

    I'll just try to solve your problem without the capx.

    Moving a Sprite/Tile with the bullet behaviour isn't that much of a problem.. (if I understand correctly what you are trying to achieve).

    If you simply want the Sprite to move at a constant speed, you can go with the action "Sprite: Bullet - set speed to [whatever speed you want].

    If you want to accelerate it, set the initial speed to whatever you like and then set the acceleration to a positive value.

    The higher the acceleration, the faster the speed increases.

    Give the Sprite the behaviour "Wrap" and that's it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry, but what are you trying to do?

    Are you trying to put a selectable item in a listbox?

    And if yes, what kind of "wrapping" are you pursuing to make the text fit in there?

    Are you looking for compression? Or any way to parse and shorten the text?

  • Well what you did is actually the simplest option you can go with.

    But it doesn't work if there are more than 20, say for example 40 Red Boxes....but if that's not needed in you project, no problem with your solution.

    What I don't understand though, is:

    1) why does your Redcount variable go up when one instance is destroyed? Didn't you want to create one blue box for every 20 red created?

    2) Why don't you just use RedBox.count? That would make the variable redundant.

    And if you might explain your second issue (with the random stuff) again, more detailed (or create a new thread for it), I'm sure I can help you with that too.

  • Well, you could go with the "Take snapshot of canvas" system action.

    After that, you need to add an event "On canvas snapshot".

    The image is then stored under the URL "CanvasSnapshot" and you can do with it whatever you want.

    (Adapted from the C2 example "Taking Screenshots", located in [C2InstallDirectory]\examples\, you can take a look at that if you don't understand)

  • You could do the following:

    Repeat RedBox.count times
          (if) loopindex % 20 = 0
                 (then) Create object BlueBox[/code:2omopuix]
    
    This procedure would be repeated as many times as there are Red Boxes.
    When the division [i]loopindex / 20[/i] returns a number without any digits behind the point (the loopindex is dividable by 20), a Blue Box is being created.
    
    This is the way without a variable.
    
    There also is a way with a variable, but I guess this one is sufficient for the moment.
  • Well first of all, a .capx would be useful.

    Since every project is unique, I can't tell much from just those information...

    The compilation process is unlikely to be the problem.

    But since the debugging view sometimes is a bit slower compared to the normal preview (at least on my old Laptop), that could be an issue.

    But to tell more, I'd need the .capx of your project.

  • I'll look at how to do it and in case of not being able, subire example. How do I upload a picture so that you can see the example? Thank you

    This is actually quite off-topic, but anyways, let's get this thread solved...

    You can provide a .capx by doing this:

    • Open up your C2 project
    • Go to "file", "save as"
    • Choose "capx" as filetype
    • Save to whereever you like

    Next, you'll have to upload it to somewhere, where you can share it with us.

    Dropbox always works good.

    Then, you provide us with the link to the file.

    Make sure to tick "Do not automatically parse URLs" in the Options below tour topic post since you don't have enough rep points yet to post clickable URLs and the forum will shorten them if they are too long and you don't tick that option.

    ____________________________________

    How to provide an image:

    • Go to imgur.com
    • Upload your photo via "New post"
    • After it is done uploading, hover with the mouse over the image and choose "Share image"
    • Copy the BB Code
    • Paste it in your post without the "img" tags

    Again, make sure to tick the corresponding option under your post.

  • Take a look at this:

    https://www.scirra.com/forum/physics-gravity-direction_t66471

    (They try to simulate gravity with Physics: Apply Force towards [...])

    If that doesn't suit your needs, look at this great tutorial by sqiddster ;

    https://www.scirra.com/tutorials/273/how-to-make-a-gravity-based-platformer

  • Essentially, you have to put any of the system's rounding expressions that suits your needs in front of your value.

    Depending on your needs concerning the rounding, you would use one of the following:

    1) Rounds up

    ceil(value)[/code:29nwr85x]
    2) Rounds down
    [code:29nwr85x]floor(value)[/code:29nwr85x]
    3) Rounds following mathematics rules
    [code:29nwr85x]round(value)[/code:29nwr85x]
    
    Also refer to the manual, system expressions, [i]math[/i] section.
    https://www.scirra.com/manual/126/system-expressions
randomly's avatar

randomly

Member since 26 Sep, 2016

Twitter
randomly has 1 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies