oosyrag's Recent Forum Activity

  • If there isn't an effect for it, duplicate the sprite, offset it and then use a blending mode on a layer with force own texture on to fill it with a solid color. Optionally pin to the original sprite as well.

  • You probably want to use a tilemap. construct.net/en/make-games/manuals/construct-3/plugin-reference/tilemap

    On trigger, for example if you click a block, change it into another block (or an empty square, in the case of digging).

    To refer to the correct tile to change, for example the one under the mouse, you'll use the tilemap expressions described in the manual linked above PositionToTileX(), and PositionToTileY().

    So in your set tile action, the tile x location would be Tilemap.PositionToTileX(Mouse.X) and the tile y location would be Tilemap.PositionToTileY(Mouse.Y). The tile would be whatever you want to change it to.

    If the above is confusing and you're not sure how to use an expression or what an expression is, you should probably start with the first two beginner tutorials and reading the manual.

    construct.net/en/tutorials/construct-3

  • If you're talking about the preset for making a new project, 1080p portrait or landscape is a good place to start for most current devices.

    If you're talking about an example or premade game template, then you'd best find one that is similar to the game you want to make.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • They work fine for me, Android 12 oxygenos on chrome.

  • I did it - clean too, pure css with the default button-checkbox.

    dropbox.com/scl/fi/iiqc0sxnox003ghok3vyd/csstogglebuttonexample.c3p

    Not quite complete, it's a fixed size and doesn't scale with layout/fullscreen scaling yet. I'll update the same file when I get that figured out.

  • Okay I experimented a bit and found that you can use it as is, copy and paste, if you use an html element object instead of a button/checkbox object.

    Example here - dropbox.com/scl/fi/bxzdcams8yok369489fss/csstoggleexample.c3p

    The way they have it set up is that they use a <span> element nested in the <input type="checkbox"> element, which is used as a flexible empty element for the visual shape and animation. You unfortunately can't do this with the built in button object, since you can only put text in that and not other html elements, and the css wizardry involved in making the animation don't work on the checkbox element itself (afaik anyways, might be worth experimenting with later). That's why in the linked example they just hide the checkbox, and use a visible <span> as a toggle switch.

    That said, it does work as an HTML element. The problem is that you lose the button conditions - namely "Compare text" and "Is checked", and the actions "Set text" "Set checked" and "Toggle checked". I'd say this is mostly manageable, as you can use/compare a boolean instance variable on the html element as a condition, and similarly another instance variable to compare text. The HTML element has the "On clicked" and "On CSS animation ended" conditions, which should be sufficient for most use cases (use those to set the boolean instance variable to true or false).

    I'll try some more things to see what I can do with the button object. I just learned that for checkbox type buttons in particular, the "Set CSS style" action applies the css to the <label> parent element, while the class property in the layout editor is applied actual <input type="checkbox"> element. However, you can also use the "Set attribute" action to give the <label> a class as well. The normal button doesn't have this quirk at all, since it doesn't generate nested elements and is just an <input type="button"> by itself.

    Ps - Thanks again to the Construct team for implementing css and html support, it really opens up a lot of possibility for some slick UI implementations, which a lot of users ask for. Too bad it's not particularly accessible for those not really familiar with CSS, and also the minor issue of not having control of the structure of element nesting (mostly solved by having the HTML object now, but then we don't get the ACEs for the form elements as above).

  • What version of Android? Go to any settings tab, those toggles are not draggable in Android 12 at least. If you're talking about a particular app, then it was manually implemented in that app by the developer.

    Edit: Just tried implementing it myself, might not be quite so simple. Looks like C3 either doesn't support css positioning or overwrites it or something. I'll fiddle around with it some more to see if I can get something working.

  • The distance expression always gives a positive number.

    The analog trigger is just another button. You'll have to figure out the button index by experimenting.

    To align something with the angle of the stick, use the angle expression instead of distance, from 0,0 for the origin and the x and y values for the relevant gamepad axises.

    Again, you'll need to figure out the axises yourself. Each stick has two, and the shoulder buttons might be axises as well.

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

    Axis(Gamepad, Index)

    Retrieve the current position of an analog joystick on a specific gamepad. Index specifies left analog X and Y or right analog X and Y axes, subject to Key mapping. Axes range from -100 to 100. Axis values within the Analog deadzone are returned as 0.

    If you use distance(0,0,gamepad.axis(x),gamepad.axis(y)) where x and y are the correct gamepad and stick indexes, you'll get how far a stick is pushed.

    Button(Gamepad, Index)

    Retrieve the current button press value of a button on a specific gamepad. Index specifies the zero-based index of a button from the dropdown list in the Is button down condition (e.g. 0 returns the value for the A button). The returned value depends on the features of the button: if the button is pressure sensitive, it can return any value from 0 to 100 depending on the pressure; otherwise it returns 0 for not pressed and 100 for pressed. Buttons which are not pressure sensitive are easier to detect using the Is button down condition.

  • On Android at least, sliding these toggles is not a thing. It may be simpler to treat them as separate functions.

    For tap toggles, there is copy and pastable css that should work in C3. w3schools.com/howto/howto_css_switch.asp

    I'd use slider bars for a slide switch rather than a button.

  • Send it to the host with a tag identifying the target peer the host should forward it to.

  • Probably a fill rate limitation. C3 isn't a 3d engine so it's probably not great at efficient occlusion culling (or it doesn't exist at all). Fill rate is a common performance limitation even with 2d games, so I'm guessing your lag doesn't have anything to do with polygon resolution, just simply how many pixels it has to fill and refill.

    Just speculation though. You can test by using a more or less powerful device with remote preview to see if there is a noticeable difference. If you know better then feel free to make a bug report following the guidelines. That's the most direct way to get a fast response from the dev.

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 39 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