tunepunk's Forum Posts

  • dl.dropboxusercontent.com/u/666516/picklinosight.capx

    Ahhhh. that seemed to work. I need to try it out, in my project. Thanks.

    I was using has line of sight to, x, y position.

  • You can use line of sight with a very small cone of view, and change the angle to the bullet angle.

    And also, LOS, seems to be based on collisions, so not detecting obstacles with collisions off. I need a way to pick objects in a straight line from the player, without the use of collisions.

  • You can use line of sight with a very small cone of view, and change the angle to the bullet angle.

    Even if it returns true or false, it's not picking the obstacle, or maybe I'm doing something wrong?

  • I have a character aiming in any direction. I want to pick all objects intersecting a straight line from the character.

    I could use colission detection and raycaster, but the problem is that for optimization purposes I only want to turn on collision detection for objects in the bullet trajectory, just before the bullet is fired.

    Or could I pick within an angle or small cone from the player?

  • I've had similar issues but on windows phone Game is running smoothly at 60 fps 40% cpu, but the touch input is laggy, or not registering at all. Not sure if device is faulty as this seem to happen for other html5 games on this device, even intels own xdk demos in the app preview.

    I think if Construct 3 would include half the 3rd Party Plugins and Behaviours that are available today, it would already be twice as powerful of an Editor Would be great actually, if Scirra would consider including some as a Standard and "officialized" Extension to C3 one day especially by users like Rex.

    If not it would be great if they were more easily accessible and browsable like the scirra store. A lot of good plugins are not listed in the shop and are hard to find unless you dig in some forum threads. Plugins are a great additions to C2 and should be getting some more spotlight at least.

  • looks interesting... I agree with taistelusopuli replace letter o with the skull and pierce the arrow through the whole word. About your logo try to isometric the word tune and make the word punk its shadow. Try adding female variants to the roster, instead of one huntress that looks like robin hood. That will increase no. of players to 8, instead of 4. You can also give each variant a unique skill. looking forward to your game. All the best.

    Yeah I'm going to polish up some of the stuff later. But for the characters Maybe I will add both female and male versions of them all later but for now I need to keep it simple. Making a game for mobile i need to keep an eye on the memory budget and performance, so I keep adding more stuff slowly as I go. Don't wanna release a laggy/crashing game.

  • So basically you want to copy a sol from one family to the other. Typically there is better logic than doing that but if you must i can think of a few ways:

    https://dl.dropboxusercontent.com/u/542 ... _copy.capx

    If only one object is picked of group1 then "group2: pick by uid group1.uid"

    If multiple objects are picked in group1 copying it over will take two events. One to mark the instances so that group2 can pick then and a second to make group2 pick them.

    Great example, thanks R0j0. The visibility solution was genius, as I've stumbled across similar problems before where instance variables don't work. The other solution I will study further as it's a bit above my level, as i didn't even knew you could do that.

  • Did you even open my example ?

    I did. It worked in a similar fashion. But I'm going to have lots of objects that are going moving around randomly on the screen. And when they get close to eachother they change direction.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In your last post, that should set each sprite that is less then 50px away from each other opaque.

    That works if the sprites in the layout are far away from each other, creating the illusion that those that are close to the one that is locked to the mouse are picked.

    That works if that was what you intended to do.

    Yeah... Last test does what I intended it to do. but is a bit heavy on resources (for each) as it goes through every single family1 object every tick and checks if there is any object in family 2 within the specified distance. If I have a lot of objects that's gonna be super heavy, so it's not optimal.

    Now I'm looking for a smarter (more performance friendly) way to do the same thing with events. I know i could use collisions to do something similar, but I'm trying to do sort of a customized collision detection based on distance between objects or within a radius in a family, and not a collision polygon.

    Maybe the most efficient way would be to add some steps or increment? First i can start by checking every 0.5 seconds if somethinng is within a slightly larger radius. I could create a variable (check rate) that is based on the distance between objects, that gets smaller as the distance shrinks.

  • Finally solved it. Had to create a second family with identical objects in it.

    Sharing if anyone finds it useful.

    But if anyone has a smarter solution that doesn't involve 2 families with same objects, please let me know.

  • Another test that didn't work. What am I doing wrong?

    capX

    https://dl.dropboxusercontent.com/u/20560446/Scirra/distancepicking.capx

  • This didn't seem to work either as expected. Is there no way to compare and pick the way I'm trying?

  • Let's say I have a Family with 100 Sprites randomly placed on the screen.

    I want to pick all of objects in that family that is closer than 100px to another one in the same family, if there is any?

    In my mind this would work but it doesn't really.

    Pick by evaluate. distance(family1.X, family1.Y, family1.X, family1.Y) < 100

    It seems like it's always true, since itself is always closer than 100px to itself.

    So what is the smartest way to filter out itself in the evaluation?

    Expected: If any objects in a family is closer than 100px to eachother = True (Picked)

  • R0J0hound So what's the best way if I want to use Group1 for picking UID's and Applying them To Changes by those picked UID's to Group 2? I have to load all the UID's to an array? use for each X of the array to pick UID's in Group2 and apply to group2?

    I thought I could be smart to Pick objects by UID in one family, then make changes to objects in another family based on the UID's picked from the first family.