Daiz's Forum Posts

  • Makes me wonder though if it optimizes it at all, since it has to be tested on all the trees, and calculating square roots isn't exactly all that fast. And surely collision detection starts with bounding box testing, so that if bounding boxes do not overlap, no per-pixel calculation is done. And I'd think bounding box overlaps would be a lot faster to calculate for all trees compared to their distance to player.

    But if you really want to do some sort of distance checking, I think something like this (using Is number between) would be more optimized:

    Is tree.X between player.X-ScreenWidth/2*Zoomlevel and player.X+ScreenWidth/2*Zoomlevel

    Is tree.Y between player.Y-ScreenHeight/2*Zoomlevel and player.Y+ScreenHeight/2*Zoomlevel

    -> Check for overlap

  • Yes, you can do this pretty easily with Python.

    Basically you have a formula like 5+5 in your INI string. Then you just set the value of anything to Python(YourFormulaString).

    With this you could also have formulas like DMG*3 and then run Python(replace(YourFormulaString,"DMG",object('damage')))

    Or if you have multiple variables you'd want to use, you should probably have a list that you loop through that knows where to check for the values or stores the necessary values.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm just chiming in to say that this plugin is absolutely fantastic and makes life a lot easier for everyone.

  • Also, I believe (not really sure though) that the algorithms are not pixel-shader friendly.

    And here I was going to suggest giving that a stab. Oh well. Maybe it could work, though?

  • You know, you guys could always just use functions. Name the function object F, make an on function abscosp and set the return value to:

    lerp(.Param(1),.Param(2),abs(sin(lerp(0,180,.Param(3)))))

    Then you can use it with F.abscosp(a,b,t) anywhere you want.

  • I'd say 0-based. I'm not even testing Construct before either all mathematics and computer software are made 1-based, or Construct is adjusted to how reality actually work.

    4 mod 4 is 0, not 1. Sin, cos and tan centers around zero. A variable defaults to zero (don't tell me variables are also 1 by default in Construct). The value that is returned in place of "aaw, that's unset" is also zero, unless a NULL value is supported. The range of an unsigned byte is 0-255, not 1-256. The top-left position of a screen and object is 0,0, not 1,1. You move an object 0 pixels to not move it anywhere. In every situation when negative numbers are used, it's a pain to have 1 in the middle. I'm just going to be too annoyed over dealing with this that I'd rather stick to what I use now where things are randomly 0 and 1 based (because at least some features are 0-based).

    Basically all those things you mentioned are zero-based in Construct. I think the only things where the 1-base shows are loops and arrays, where the loopindex of the first one is 1, not 0 (though if you run a for loop from 0 to 255, the first loopindex will be 0).

    So yeah, if you don't regularly use arrays, pretty much the only time you need to remember the 1-base is with not-for loops. A minor annoyance, really. But an annoyance none the less.

  • I hope the fact that this poll doesn't have "full unicode support" means that it's already planned and listed as an absolute must feature.

  • I'd say Mac/Linux is the most important thing. Web browser is a bad idea in my opinion, since that'd basically mean Flash or nothing, and that's stupid. You can't play certain Flash games everywhere anyway, so supporting all kinds of PCs would be the best choice - that way'll the game will be playable on all the major PC platforms. I think mobile platforms should be left out of Construct completely, since due to the fact that we're talking about embedded systems getting everything out of the platform tech-wise is a lot more important than with desktops/laptops, thus it'd be a better idea to use stuff specifically meant for those platforms.

    Making Construct capable of exporting to Flash/Java would most likely just make the program less capable overall, even worse in terms of performance than what it offers now. I hope you people voting for web browsers realize this.

  • A simple way to deal with the original problem:

    Always: Add 1000*TimeDelta to 'millisecondcounter'

  • Basically:

    P1 and P2 are shooting (pretty much rapidfire) bullets at each other, and we need to check when one players bullet collides with another players.

    Each bullet DOES have a PV 'Player' that is set from 1 to 4, depending on which player used it.

    That way if two players use the same character with the same attacks, it can still be differentiated.

    Daiz: That method didn't quite work, but I think I have an idea I'd like to try.

    How did it not work? It should work exactly as you want, since I've used the exact technique myself as well. In your case, the events would go something like this:

    Conditions:

    + Bullets1 colldes with Bullets2

    + Bullets1 value 'player' is different to Bullets2 value 'player'

    Actions:

    • Destroy Bullets1
    • Destroy Bullets2

    No matter what the object is, as long as it's in two families differentiating between colliding instances is very easy.

  • Or even easier, add all your bullet objects into two families: Bullets1 and Bullets2. Then just check for collision between Bullets1 and Bullets2, and it becomes a piece of cake to differentiate between the two colliding instances.

  • I know I'm double posting, but this is kinda important so I'm doing it anyway.

    Is there some sort of functionality to duplicate an array index to another array? Basically, I've done private variables for objects with 's', and I'd like to duplicate these objects in a way that copies the private variable values over to the new ones as well, but obviously they should still be their own private variables. As far as I can see, the only way would be to individually save every array I want to copy to disk and load them into the new empty arrays, but writing to and reading from disk is horribly slow compared to doing the same in memory, so...

  • 1920x1200, Intel C2Q Q6600 2.70 GHz, Nvidia GeForce 9600 GT 512 MB

    No canvas: ~1480 FPS

    Canvas: ~900 FPS

  • 50-57 FPS.

    Intel C2Q Q6600 �2.7 GHz

    4GB of DDR2 800MHz RAM

    Nvidia GeForce 9600 GT 512 MB

  • But how do I use the search expression in this case? I have no idea what to put to the searched value.

    S.FO({"selobjs"},????,0)[/code:3seysx7k]
    The hell am I supposed to put there? There's no kind of "picked object" expression to use.
    
    EDIT: Solved on IRC, I just had to use "Blue" (the family) in place of ????.