fisholith's Recent Forum Activity

  • No problem.

  • Hey there Exion,

    This is usually because the edge of the sprite image is touching the edges of the image area.

    If you double-click the sprite to open the image editor, and click the Crop button (just right of the rotate buttons), it will add a margin of transparent pixels so that the sprite doesn't touch the edges.

  • Thanks oosyrag for the suggestions.

    I agree, though, I think "trigger once" is also checked every tick, it's just that it makes a much simpler boolean check, to see if it can reset. If you code your own equivalent trigger-once-style functionality I think it should perform about as well.

    The "trigger once" condition is especially good for cases where you know the True/False frequency of the rest of that event's conditions will always be slower than 2 ticks. The event sheet's Nyquist frequency, so to speak.

    So the case of on-hover is a bit tricky in that respect. If your buttons are really far apart you're probably safe. However, if you have a row of buttons close to each other, you can roll off one button and onto another button, without an intermediate tick where no button was hovered. And that can confuse a "trigger once" based system. It wouldn't if "trigger once" really was a trigger-type condition, but I don't think it is.

    I might be mistaken, but I think adding "trigger once" to an event does not actually make it a triggered event. Relatedly, C2 has both True Triggers and Fake Triggers. In the C2 event sheet they appear identical, including both using the little green arrow icon. The "Fake Triggers" are literally tagged as Fake Triggers in the Javascript of the plugins that employ them. I think the purpose of them is to interact with other conditions in the same way true triggers do (e.g. no stacking) but under the hood, they are still per-tick events.

    As far as I know, true "Triggered events" are implemented as message-subscriber style function calls internally, or something similar. The "On function call" is an example of a true triggered event, as it really doesn't check every tick. In fact, I think "On function call" may be an even more specialized version as the function name may be hashed or something to make it even faster than a normal true "Triggered event".

  • Interesting. Thanks for the info

  • Thanks oosyrag,

    That's the workaround I've been using.

    I started looking into the possibility of a hover selector, because setting the colors back to the non-hover state with actions seems to be a little finicky sometimes. There's always the brute force method of every tick set to normal, followed by if hovering set to hover colors. I may try storing the UID of the hovered button and explicitly checking for the end of a hover on the current UID button.

  • Hey rafaelsorgato,

    One way to do this is to store the Antenna's UID (Unique ID) at the moment it is being pinned to the Ship.

    For the Ship, create a private variable called "antenna_uid".

    In the event sheet, just below the action that pins the Antenna to the Ship, add the action,

    Set the Ship's private variable "antenna_uid" to contain the Antenna's UID.

    Now each ship will store the UID of it's personal Antenna.

    To pick the Antenna, use the condition,

    Antenna: Pick by UID: And use the Ship's "antenna_uid" as the value.

  • Hi hychoi,

    This is just my impression, from having worked with C2 for a while.

    If you only use the standard plugins in C2, it would be quite hard to make a simple DAW.

    The built-in features of C2 work very well for games and even a lot of applications, but many of the core features of a DAW are not natively supported by C2, and might be pretty hard to implement.

    C2 is very flexible though. Using the SDK, you can build custom plugins to handle just about anything.

    So, it's theoretically possible to build a DAW in C2, but you would probably have to do a huge amount of the work in the JavaScript SDK.

    Just about everything involving audio, midi, and VST style modules would need to be implemented as custom plugins. The built-in Audio plugin, is pretty nice, and solves a lot of tricky web audio problems, but it's focus is fundamentally not tailored to DAW tasks. I think you'd only be able to use it for UI sounds in this case.

    So, I would probably not recommend building a DAW as your first major project in C2.

  • I think you may be right zenox98, though I've been hesitant to bump it again, as I know Ashley's probably got quite a bit going on with C3 and all. Maybe I should though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For HTML objects like buttons, you can set their normal CSS properties with actions.

    Is there a way to set CSS hover properties with actions?

    e.g. Set a button to have a red boarder when hovering over it.

    It looks to me like it may not be doable with actions, but I wanted to ask. The runtime JavaScript for the button object uses a JQuery function that does not look like it's set up to be able to select the "hover" version of the button.

  • Hey there Syazanie Amirin,

    Below is a bit of overview, and my thoughts on the two methods, in case it helps.

    Local storage

    Local storage lets you save and load specific data, and importantly, when you load data, you can use it whenever an however you want.

    Save system

    The save system saves a complete snapshot of the entire game state. Loading a state is kind of like time-traveling back to exactly how things were when the state was saved.

    Save system exemption

    There are lots of situations where you may not want the entire game restored that way, because some information about progress you may want to keep. (e.g. Unlockable items.) To avoid losing that information, you can exempt certain objects from being captured by the save system using the "No Save" behavior.

    Hybrid

    But if this information is saved by the save system, then how do you avoid losing it when you close the game? Well, this is another situation where local storage can help. Anything data that should persist between play sessions, that isn't getting saved by the native save system can be manually saved to local storage.

    Save system quirks

    Finally, the native save system is quite good, but there's one quirk that can cause problems. It may not save absolutely everything exactly as it was, and this can cause some problems when restoring. The only example of this I've found is that you can selectively disable collisions between different Physics objects, but when restoring from a save state, that disabled-collision-state information is not restored.

    I wrote up a bug report for this issue at the link below.

    The game I'm working on uses Physics objects with some disabled collisions, as a result I don't use the save system at all, and rely exclusively on local storage.

    This is just my experience with the two methods though. Hope this helps.

  • Hey there WieBrei,

    I'm not sure, but if reinstalling C2 didn't fix it, then it seems like the problem may lie in some external resource that C2 tries to invoke when loading certain projects.

    Even so, it may still be triggered by some aspect or content of a project. For instance, if C2 is trying to load something specific to a certain object, and some part of that process prompts C2 to do something that results in a crash.

    Questions

    Are there any projects that will sometimes work and sometimes crash, or is it that specific projects consistently always work or always crash?

    Can you post a list of the projects that do open and the ones that don't?

    Multiplayer Chat - example capx

    You mentioned that the Multiplayer Chat example capx crashes.

    I made a list of all the plugins it uses:

    [Plugin: Name]

    Browser : Browser

    TextBox: ChatLog

    TextBox: ChatTextBox

    Function: Function

    Button: JoinButton

    Keyboard: Keyboard

    Text: Label

    Multiplayer: Multiplayer

    TextBox: NameTextBox

    List: PeerList

    Button: SendButton

    Text: Title

    Button: ViewTutorial

    The plugins:

    Browser

    Button (Form control)

    Function

    Keyboard

    List (Form control)

    Multiplayer

    Text

    TextBox (Form control)

    IT may be that "form controls" are somehow causing a problem. They are not HTML canvas elements, unlike most other graphical pluggins.

    Other aspects of this example:

    • It doesn't use families.
    • It does use groups, and nested groups, and nested events.
    • In properties, it's physics engine is set to "Box2D web" (the other project you said sucessfully openened used "Box2D asm.js" instead). Perhapse C2 does something involving the selected physics library, when it loads a project.

    Web GL - example capx

    [Plugin: Name]

    Sprite: BackgroundSprite

    Sprite: CogSprite

    Mouse: Mouse

    Text: Text

    The plugins:

    Mouse

    Sprite

    Text

  • I just discovered something pretty weird about C2's Particles object.

    In some strangely specific circumstances, the particle images actually will rotate.

    Expected behavior:

    The native C2 Particles object, for rendering optimization reasons, doesn't provide rotation options for the particle image.

    So, if you rotate a layer, say 45 degrees, (e.g. to simulate camera rotation), with a Particles object on it, the particle images will not rotate with the layer, and will instead stay oriented upright to the monitor.

    Weird behavior:

    However, there is a weird case where they will rotate with the layer.

    If the Particles image dimensions are 256 x 256, and the Particles Size property is 256, and the layout is scaled up by any factor greater than 4 (e.g. 4.001), then the particle images will rotate with the layer, as if they were inheriting their orientation from it.

    This is the only case I've ever seen that causes Particle images to rotate.

    I suspect it may have something to do with the particle sprites being large enough that they can't entirely fit in the renderable canvas area. e.g. Using 512 x 512 images and a layout scale of 2.01 will also cause the layer-inherited rotation.

    Example Capx:

    https://www.dropbox.com/s/72r6sibcytwem ... .capx?dl=1

    In case anyone is interested. :)

    Steps to reproduce:

    Objects:

    Create a native C2 Particle object.

    Set it's image dimensions to 256 x 256.

    Draw a vertical bar for the image.

    Set the Particles "Size" property to 256.

    Create a simple tiles grid backdrop. (So it will be easier to see the layer's rotated orientation.)

    Add Mouse object. (Just need to use the buttons for interaction.)

    Events:

    At start of layout, Set layer angle to 45 degrees.

    On Click Left, Set layout scale to 4.1

    On Click Right, Set layout scale to 3.9

    Now preview the game, and click the left and right mouse buttons to see the particles alternate between un-rotated, and rotated.

    Any idea what's going on here?

fisholith's avatar

fisholith

Member since 8 Aug, 2009

Twitter
fisholith has 1 followers

Connect with fisholith

Trophy Case

  • 15-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies