oosyrag's Recent Forum Activity

  • Would you ever have "foreground" objects affected by light?

    My idea would be to have all foreground objects on an upper layer. A darkness mask object on top of that layer with multiply effect on the object, and source in, with force own texture on the layer.

    This will color all foreground objects with darkness, without affecting any layers below. This layer will not be affected by the light.

    The middle layer below that will contain the white light objects. Set layer to non transparent, the background to the same color as the darkness mask, and apply multiply effect to the layer.

    The bottom layer is your floor. Anything on this layer will be affected by the light layer.

    Edit: Example - dropbox.com/s/8pplu6nkogp6yfc/lightlayersexample.c3p

    You can always use an object for the middle layer too instead of the layer itself being the color.

    Your Z-ordering should all happen on the uppermost layer, so that should be fine, assuming you never z-order below your floor.

    The problem happens when you want something to be lit, but on top of a foreground object that you want not to be lit. If that's a thing that is possible...

    Edit 2:

    I guess never mind, there are tons of issues with this. It won't work if you want your light z-ordered along with the rest of your objects. It will also still look weird even if it is z-ordered along with everything else - for example if the light origin was above/behind the base of the tree, but extended past/below the tree, you would need a shadowed area.

    Night mode is hard ><

  • I just figured somewhere along the way, there would be an option/check-box, short code, etc that changed the format to include commas in numbers that were greater than 3 digits.

    Did you look at AllenR's example?

    Set text to RegexReplace( str(int(num)), "(\d)(?=(\d{3})+(?!\d))", "g", "$&,")
    

    Then add

    -> Text: Append "."
    -> Text: Append int(abs(num)×10)%10
    -> Text: Append round(abs(num)×100)%10
    

    to pad the decimals.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mm... usually best not to mess with it IMO. If you're getting anywhere near the VRAM limits, by default that means you have a lot to load, which could cause freezing when changing layouts. Sprite sheeting is a good thing.

    construct.net/en/forum/construct-3/general-discussion-7/spritesheet-question-123103

  • AFAIK it would be loading into memory on start of layout. Pretty important for people with huge layouts to load, as the "freeze" during loading is not pleasant and often resembles a crashed program.

    I'll be using C2 to fiddle with multiplayer and families when my C3 subscription expires. My situation is similar to R0J0hound. I don't really have any major projects and I have a sub mostly just to support Scirra. For all the little examples I like to make the free version of C3 is more than enough (minus the previously mentioned availability of multiplayer and families).

  • I wonder if its in related to the "player details category of expressions" mentioned in the manual but doesn't seem to exist. C3 documentation is usually so complete too.

    In the editor, it looks like there are MyAvatarURL, MyDisplayName, MyFamilyName, MyGivenName, and MyID expressions. Maybe you could use MyID as a unique identifier.

  • Here's an older example I made.

    dropbox.com/s/sujrkr4imdx6o59/quizanswersexample.c3p

  • Mmm... there are several ways to do this. I would recommend using an array to record the drawn path.

    On path drawing active, every set interval push the mouse coordinates to the back of an array.

    On path drawing finished, have the player object move to each coordinate recorded in the array in sequence.

    If you don't want to use an array, you can try using invisible helper sprites instead. As you draw the path, you can create these "cookie crumb" helper objects at a set interval at the mouse location for the player object to follow.

  • For instance with your mouse example, it feels like checking whether the mouse has moved would be slower to figure out than just setting the object to mouse position? Or barely a difference?

    That was an overly simplified example, and in that case there wouldn't really be a difference that mattered.

    For a more practical example, see this project I put together for another thread: dropbox.com/s/v56jw51ktwd70mj/bfsfloodfillexample.c3p

    If event 2 ran every tick (following the mouse, since its a highlight) with the heavy flood fill algorithm behind it, it would be significantly inferior to only running upon changing tiles.

    Basically I try to avoid running actions at all if not required (they won't actually do anything). If it's just one action, then whatever. But if its more, it can make a massive difference. It's very easy

    normally to overlook this, because of the fact that there's no discernable difference between "Event runs, nothing changes" and "Event doesn't run, nothing changes" (unless you start losing significant framerate, as would be the case in the flood fill example). But in the first scenario, the cpu could be doing x amount of work in the background, even though there are no visible changes.

  • construct.net/en/make-games/manuals/construct-3/plugin-reference/ajax

    construct.net/en/make-games/manuals/construct-3/plugin-reference/binary-data

    The AJAX plugin is actually the key here.

    Binary data

    The AJAX object can receive resources as binary, and also post binary data, using the Binary Data object. This is also useful to fetch local resources like canvas snapshot URLs or video recording URLs, and load them in to a Binary Data object to do something else with them, like save it to storage or upload it to a server.

    Set response binary

    Use this action before a Request action to read the response in to a Binary Data object instead of returning it as a string in the LastData expression. This allows for non-text resources like images to be fetched and processed directly.

  • You may be able to save the image binary into a global variable (to be saved with the built in save/load) or a local storage key. If not, you could at least save the path of the chosen image as a variable/local storage to load again next session.

  • Your OP said you needed to generate a set of nonrepeating numbers. That's what the permutation table does. And you were talking about letters.

    Your second post has nothing to do with either of these things, and is not specific enough to build any particular solution without answering the issues mrcgkh raised.

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 38 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies