larrynachos's Forum Posts

  • R0J0hound winstreak

    Thanks so much! As far as I can tell, this equation is working! You guys rock <3

  • Oof, it's been a while since I've asked for help twice in one day xD

    So I'm working on a treasure hunt game, it's sort of a reverse minesweeper where you have limited shovels to dig and find treasure with. The grid of tiles is made using sprites. I have some special items to dig up, but otherwise the tile just spawns text that says how many squares away the chest is, and also it changes to red if it's adjacent to a kill tile.

    The issue is, sometimes it's not entirely accurate? The numbers will be off by 1 or 2, and sometimes I'll have a full 3x3 grid of red tiles but no skulls around.

    So I'm assuming it has something to do with my distance formula. Currently I'm using:

    str((floor(distance(Tile.X,Tile.Y,Treasure.X,Treasure.Y)/32)))

    I had the floor set to int before, but either one has slightly inaccurate results.

    Thanks so much!

    Tagged:

  • Regardless of multiplayer, when working with picking for collisions between multiple instances of the same object, the general way to proceed is to put the object in a family and use on object collides with family rather than on object collides with object. Then you can differentiate between the two instances colliding by using the object.y and family.y expressions.

    This sounds promising, I'll give it a try :D Thanks!

  • Howdy, I'm working on a multiplayer game, where I need a goomba behavior where players can stomp on each other to stun their opponent.

    I'm calling this action via On peer collision with peer, but I need to check to find the peer with the lower Y value and make sure they're falling and not just running into them. Then I need to get the peerid variables for the attacker and victim so I can then call a function that makes the attacker change Y vector and the victim flash and stop moving for a moment, etc.

    This is also going to be 4 player, so I can't just peer(0).y and peer(1).y this.

    Help pls and thank you in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't have any experience with 3D yet, but normally to convert coordinates between two layers you need these two expressions:

    Set X to CanvasToLayerX("UI", LayerToCanvasX("Game",Animals.X,Animals.Y), LayerToCanvasY("Game",Animals.X,Animals.Y))

    Set Y to CanvasToLayerY("UI", LayerToCanvasX("Game",Animals.X,Animals.Y), LayerToCanvasY("Game",Animals.X,Animals.Y))

    Ahhh thank you! This worked perfectly <3

  • I'm experimenting with a 3D game using the 3d shape and 3d object tool, but one issue I've run into is displaying relevant text matching the perspective of the camera. I'm working around this by having a UI layer that displays the text.

    I have 2 different types, text for when you mouse over an object, and text that pops up next to a player when they speak. The first one was easy, I just set the position to Mouse.X/Y("UI"). The second one I'm having trouble with.

    For the second one, I'm using LayerToCanvasX/Y("Game",Animals.X,Animals.Y), and sometimes it works if the window is just the right size, but as soon as I resize the window or go fullscreen the text is severely offset. I'm assuming this is because canvas coordinates change because there are technically more pixels in the window, but is there a formula I can use to keep this text consistent? Thanks!

    Tagged:

  • If you open the 3d FPS example, you'll notice that rubbing against walls/solids makes the player just zoom down the wall. I've been playing with rot.js and making 3d procedural mazes/dungeons, but moving through the corridors is tricky with the player speed jumping up every time they touch the walls. Is there any way to keep the player from sliding like that? Thanks!

    Bonus question: I use the car behavior to move forward/backward/turn, but have to use custom movement to strafe left/right. This has the unintended effect of making diagonal movement 2x speed, any way to negate this?

    Tagged:

  • No takers? I've been trial and error-ing, trying different effects just to test and I guess I'm just doing something wrong but can't find the proper documentation to get me on the right track. I just want a crt filter maaan

  • I noticed there still hasn't been a CRT effect plugin for Construct 3, and instead of begging someone for it I decided to try making the effect myself. I have C3IDE downloaded and I've been trying to port crt-lottes.glsl, but when I test it in C3 I get a crash and a bunch of errors.

    Here are the errors I'm getting:

    main.js:1933 Failed to compile shader program: Error: Error compiling fragment shader: WARNING: 0:15: 'parameter' : unrecognized pragma

    WARNING: 0:16: 'parameter' : unrecognized pragma

    WARNING: 0:17: 'parameter' : unrecognized pragma

    WARNING: 0:18: 'parameter' : unrecognized pragma

    WARNING: 0:19: 'parameter' : unrecognized pragma

    WARNING: 0:20: 'parameter' : unrecognized pragma

    WARNING: 0:21: 'parameter' : unrecognized pragma

    WARNING: 0:22: 'parameter' : unrecognized pragma

    WARNING: 0:23: 'parameter' : unrecognized pragma

    WARNING: 0:24: 'parameter' : unrecognized pragma

    WARNING: 0:25: 'parameter' : unrecognized pragma

    WARNING: 0:26: 'parameter' : unrecognized pragma

    WARNING: 0:27: 'parameter' : unrecognized pragma

    WARNING: 0:425: '' : unexpected end of file found in directive

    ERROR: 1:1: '' : syntax error

    Here is the code I'm using:

    github.com/libretro/glsl-shaders/blob/master/crt/shaders/crt-lottes.glsl

    If I had to guess, I'd say that it's because I didn't add any parameters in the parameters section of c3ide, but I wasn't sure whether they were float values or not, what the default values are, etc.

    Can someone smarter than me please help? xD

    Tagged:

  • 1. Remove the fog effect from the layout.

    2. Apply the fog effect to the enemy billboard.

    3. Put the billboard layer on top of the game layer.

    This worked, thanks! It was driving me crazy xD

  • I'm hoping it's an easy fix, but I've been trying different things, blend modes, trying the fog effect on different layers, but I can't seem to find the right combo. I've been looking at the foggy zombie shooter example, but I don't see what it's doing differently. Help pls!

  • Howdy, been working on a maze horror game and I'm having an issue where the empty space in billboard sprites are cutting through the fog effect, resulting in an ugly box surrounding the sprites. How do I fix this? I have the billboards on their own layer with camera distance sorting, the fog effect is on the layout as a whole.

    Thanks!

    Tagged:

  • Howdy everyone! I've been chipping away at my new game, and I've run into a few hurdles while working on the lighting system.

    I've managed to get my tiles to ALMOST look like terraria, with the tiles fading away as they get further away from the surface. However, as you can see in the screenshot below I have some weird issues with it. Some layers don't have any shadows, and weirdly won't get darker until I break more blocks into it.

    The light object is in the middle of the layout, -224000 pixels up to try and emulate the sun (I had been experimenting with having it rotate around the world, but that resulted in a bunch of shadows being cast upwards, blocking the screen).

    Is there any way for me to make this lighting system work with the shadowcaster behavior, or am I trying too hard in the wrong direction? I already know that I could be using a black "light" layer and have sprites that punch holes through it, but I don't know how to do that on a large, dynamic scale. How would I make light bleed into a cave after breaking blocks, stuff like that.

    Any tips or links to resources would be greatly appreciated!

  • You do not have permission to view this post

  • I've been finally dipping my toes into the multiplayer front, and I'm running into a small issue with my turn based tank combat game. I can provide my capx if necessary, but it's a little big and I have tons of custom plugins so I want to avoid that if possible

    The system I have in place is as follows:

    Depending on TankGameState (hostturn or peerturn), the host or peer can click once to shoot a single shell in the direction of the tankbarrel (setting TankGameState to either HostShooting or PeerShooting). If the tank shell collides with the opponent tank, ground, or layout border, it destroys itself and sets TankGameState to either hostturn or peerturn depending on who just played.

    The system works on peerturn for both the peer and host, with the peer's shell showing up and responding on both sides. However, on the host's turn, the host shell appears on the peer's window but not the host window, and the GameState doesn't change to HostShooting like it's supposed to, so the host can shoot as many times as they want and the missiles won't detect the collision with the peer tank (because that even only triggers if the state is HostShooting).

    Here is the relevant code:

    I'd appreciate any help! If you want to peek at the capx, let me know and I'll upload it.