the_procrastinator's Forum Posts

  • Trying to make the character object go to either a front or a back layer in relation to the walls/roof in the top down perspective of my game; to give the illusion that the characters are actually "in front of" or "behind" these walls - something pretty necessary for such kind of game.

    However, I don't know if I understood the tiles expressions from the Tilemap object right, but IMO they seem to be rather limited in terms of precision and control of WHICH tiles you're picking in relation to some object's position.

    Here's when the player is behind the wall, working properly:

    However, things change when he's in front of it. His head will get underneath the front wall until he crosses through like half of it (2 32x32 tiles height wall).

    Here's when his head will appear underneath it:

    (AnimationSprites is the family of all character sprites)

    I'd like to know a way to sort it out in a way that this "effect" doesn't happens; as it's (in my knowledge) because the SnapY function will choose only the nearest tile Y avaliable, and not take X into account.

    Already tried dozens of different combinations of the PositionToTileX,Y, TileToPosition expression and so on; so far no good.

    I mean, if there's a way, that is. If there's not then I'd like to request a more precise way to pick tiles based on a X,Y point.

    And here's when it actually gets in front of it (halfway through the wall's height)

    The event block used to sort it out:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Huh, that's actually a pretty interesting way to do it. Thanks a lot!

    And even better, you can put stuff both beneath and underneath the mask, as long it isn't in the same layer below its z order, which is great! (and I didn't know bout that as well).

    With a little tweaks here and there, I can see it working in an in-game pop up menu, so that solves my question. Again, thank you very much

    Also liked the gradient opacity effect, very interesting looking

  • Thanks for the reply!

    Would you know which is the best blend mode setup for masking such a menu? One that does not wastes too much free space (and is suitable for an in-game pop-up menu).

    Best solution I could find so far would be to "cut" the sprites, but sadly, this wouldn't work for an in-game menu, I suppose.

  • So, after lots of search, the best examples are could find are extremely limited. Every single scrolling menu tutorial online I could find for Construct limits the edges of the scrolling menu to the layout itself (or by placing a "frame" 1 layer above it). However, those ways can get pretty clunky when you have, for example, a scrolling bar inside an in-game pop-menu (Enter the Gungeon's pause menu->key biding, for example; or Terraria's bestiary). Already tried messing with blend modes, and so far, I couldn't get anything close to these 2 examples.

    Best solution I could find so far would be to put 2 "frames" upside and below the scrolling objects, and set them invisible once they completely enter those frames (so they keep scrolling above and below and cannot be seen outside of the scrolling menu area). Still pretty limited tho.

    Does anyone knows a better way? To make it work like it does in other games? (without the need of these artificial frames, or without having to "cut" the menu sprites a hole to include the scrolling elements inside them)

  • Update: Oh my god, that's it, it worked

    Thanks a lot lol, couldn't find this anywhere else.

    When my game launches, I'll give it to you for free if you want it; cause srsly, lost almost a whole week of progress to this issue.

  • Hmmm interesting, never thought of using it that way.

    Thanks, gonna try it out later

  • My current workaround is to keep increasing the line's width until it overlaps the crosshair. But it's not quite as fast nor performance friendly as it could be.

  • I'm struggling to figure out how to measure the distance in between 2 points (the first on a layer with 100%x100% parallax, the second on a layer with 0%x0% parallax).

    The second point represents the gamepad's crosshair for my game, while the first one represents the gun (for setting the width of lasers, scopes and such).

    Obviously, simply setting the width to distance(point1x,point1y,point2x,point2y) doesn't works

    Already tried several ways, including making a function that returns numbers; with equations including scrollx and scrolly (and dividing both positions by the viewport's height/width) - came kinda close to it, but couldn't find why it doesn't works sometimes.

    Help would be greatly appreciated

  • You don't need to use that "for each" statement inside of the player collision w/ ore block tho.

    It's redundant a may drop performance a little bit.

    Another tip is to set the "update" block to trigger at every 0.1 seconds. It'll help to alleviate the cpu load whenever there are many objects present.

    You might wanna start to use families for the minimap icons and objects as well, since it may start to get a bit messy the larger your project grows.

  • To make the camera shake (via scroll without any addons needed) anytime - even when against the layout borders - and still always have the viewport completely inside of the layout, do this.

    set the layout to unbounded scrolling;

    add the following event block:

    every tick

    Camera:

    set x: clamp(Player.X,ViewportWidth("Game")/2,LayoutWidth-ViewportWidth("Game")/2)

    set y: clamp(Player.Y,ViewportHeight("Game")/2,LayoutHeight-ViewportHeight("Game")/2)

    "Game" being the layer the player is in.

    Now, anytime you want to shake it, just add the "shake" action to the camera object (which has the scroll behavior), like you'd normally.

    If you wanna get fancier, instead of "setting" the camera's position, tween it over a small amount of time (eg.: 0.15 seconds).

  • Topdown bullet hell shooter that takes place inside of an military training simulacrum

    Test your different tactical and reflexive abilities against a plethora of different thematic enemies for each arena you're fighting on. The first one (that will be shipped with the future free demo) being space-time themed; with enemies utilizing temporal and vacuum skills and guns. Every single gun in the game is not only utilizable but customizable as well; with 5 mod slots for each one (one of them being exclusive to such weapon). You can grab from the ground after being lucky enough for an enemy to drop it, along with some ammo boxes.

    So far there are 11 guns implemented in the game (with tons of mods; but currently not accessible in this public build), 12 different foes and many crazy interactions of effects and mods (weapon mods - minus the special slot - are all interchangeable and interact with each other; such as the Split Barrel, that multiplies the current weapons Multishot attribute per 3, and so on).

    Graphics are placeholders as I am yet to hire a freelance pixel art animator, and the scenario (and items) are being made by a friend of mine in the team.

    Feel free to test it and give your feedback, as it's being constantly (every single day) updated!

    Controls and instructions are in the "Instructions" section of the itch.io page:

    robertonascimento.itch.io/project-cybergladiator

    Made in Construct 3, of course