Download Construct 2 release 36

0 favourites
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • will C2 contain a 3dbox plugin like CClassic or not?

    I guess not in the HTML5 exporter - canvas only supports 2D. In the distant feature, it may come with an OpenGL exporter though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Speaking of which... For the inevitable EXE exporter, are you guys gonna do OpenGL or DirectX? I would think that OpenGL is ideal, as it would make cross-platform EXE export much easier to implement, and the performance is not an issue (in fact, I hear OpenGL has faster draw cells than DirectX), and funnily enough, OpenGL has had features such as tessellation (as an extension in this case) 3 years before DX11, and unlike DX10 and 11, it can work on Windows XP, which is still widely-used.

    Though, I'm no expert on the subject, mind you.

  • Definitely OpenGL: it's the same as the editor so we already have an OpenGL render we can recycle, it's multiplatform, and we can ditch that horrible D3DX update. I'm totally through with DirectX after Classic.

  • And as a bonus, you'd only need to do one set of C++-based plugins for a whole bunch of platforms, since it's all OpenGL!

    Hells yeah! OpenGL all the way, man!

  • Just to toss up ideas, how much power would circular collision take?

  • You can implement circular collision yourself just by checking the distance to an object.

  • Speaking of which, while distance is a good expression to have, I realized that having a "check distance" condition would also be extremely useful, as you won't have to allocate a private/instance variable in order perform a simple distance check.

    Don't know why objects don't already have it, really.

  • They sort of do. Use pick by comparison: distance(.x, .y, otherobject.x, otherobject.y) is less than however many pixels.

  • Ah. I forgot that condition could be used like that. STUPID STUPID DUMB. XD

    Still, it couldn't hurt.

  • Distance is close, but not exact. Using distance alone would only work with a perfect circle (I was also somewhat inquiring about oval shapes), and would only work with other objects that you wanted point collision or perfect circle collision (Compensating with the other objects circle radius). What if you had a ball and a box?. Plus, the formulas would thrown off entirely if the option to change an objects hot spot is added.

  • Okay, I just discovered that you can't access an object's ID through expressions. THAT would a good idea to implement. Unless I'm somehow missing something.

  • Okay, I just discovered that you can't access an object's ID through expressions. THAT would a good idea to implement. Unless I'm somehow missing something.

    Might try instance count ie sprite(index).

  • Oh, crap, I think I discovered a bug with the distance expression - mostly to do with picking.

    Simply put, I tried a little test with placeable turrets, all of which have a range, which is calculated using the distance expression... Unfortunately, when using the "compare two values" condition, I couldn't get the turrets to fire, period. I messed about with the condition, and discovered that it only worked with the "greater or equal" sign, but then I also noticed that, when I tried to debug the output value for the distance expression, the first one to print was a number that was way too big to be possible. And then I realized that I kept the original instance of the turret object outside the layout - I brought it in, and did more tests, and I realised what the problem was.

    Simply put, the "distance" expression plus the "compare two values" condition will ONLY work if the original instances of the two objects are involved - once the TestEnemy gets outside the TestTurret's range, all turrets will cease firing, even if it's in range of the other turrets, or there are other instances of TestEnemy in the original TestTurret's range.

    Example cap (click on the black stuff to spawn turrets)

  • Candescence, that's not a bug, it's by design since Construct Classic.

    The Compare Values condition does not do any picking. It literally works out two numbers and compares them.

    It has no idea what you're trying to do, so when you write TestEnemy.X, it just gets the first instance's X co-ordinate, and only ever the first instance's X co-ordinate. So you are actually telling Construct to only compare the distance between the first two instances. It's not a bug.

    It's really easy to solve: just put a 'For Each TestEnemy' condition above it and it will repeat the distance measurement for each instance!

    If you want to support multiple turrets you should add another for each, i.e.:

    + For Each TestTurret

    + For Each TestEnemy

    + distance(TestTurret.X, TestTurret.Y, TestEnemy.X, TestEnemy.Y) < 300

    -> Shoot...

    This compares the distance between every combination of enemy and turret. However, with lots of objects, this quickly becomes inefficient.

    What you need is the turret behavior, in Construct 2 In Classic, the Turret behavior takes care of all of this for you, and does it very efficiently as well.

  • ... LOL.

    I forgot the Turret Behavior even existed, because I never needed to even use it until now! Looks like I would like to have it now, certainly! XD

    But, yeah, now I feel rather silly. Thanks, Ash!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)