andykenobi's Forum Posts

  • What is better to use: firebase api or firebase api3?

  • How do i set "São Paulo" (South America) in the plugin?

  • Hey thank you for this plugin! i was looking for any plugin like this one!

    I tested the plugin and it is working perfectly! Thanks again!

  • Add two LiteTweens to have separate settings; one for X, one for Y.

    Thank you! I got it!

    It works!

  • Hello there!

    I really love this plugin! But i have one question. Can i set a x tween and a y tween. Becouse i want to combinate some tweens.

    Exemple:

    http://gizma.com/easing/

    Thanks!

  • Why would you want to do it without angle() or atan()? Internally angle() uses atan anyway.

    You could use an infinite power series to calculate atan() in radians without using atan.

    Or another method is to use an array to lookup angles from tangent ratios, and using interpolation for the in between values. However this is only as precise as how many values are in the array, not to mention you'd need to populate the array beforehand.

    I got it! I just want to understand how to get the angle... I use and i like to use atan(x) and angle(x), but i wanted to what it does. Anyway thanks!

  • I'm try to understante how do i know the angle of two objects... I know about trigonometry.

    I got the oppositive and the adjacent.

    I got the the sine, consine and tanget.

    But, i don't know how know the angle at the first point to second point.

    Some one can help me?

  • Each instance has it's own texture, whereas sprites share the same texture. It just depends on what you want to do.

    I got it. Thank you!

  • The animation frames of a sprite are shared between all the instances, so if you replace one they all change. You could just use paster instances instead of sprites i guess.

    Hum, i got it! Thanks. But. Can i use Pasters than Sprites? Pasters script is more heavy?

  • Look at the paster object, it can probably do what you want, or you can see how it does it.

    It's roughly based on how C2's runtime uses effects, because unfortunately I couldn't find a way to use it directly.

    Cool but i have 50 instance at the same sprite, everyone with different color effect enabled. When i use the paster and change the last instance, all the instance will have the same sprite. What do i do?

  • Just use the printscreen button and then paste the clipboard image into a blank project of your favourite image editor?

    I want to get the image at runtime to do a new plugin.

  • Hey guys!

    I modify a sprite with a shader effect on construct 2. I want to get the image with shader effect, but i don't know how.

    I get the image without shader using a function

    DrawImage()[/code:350ilux6] and print in a new buffered canvas... But i want to get the sprite with WebGL.
    
    But why do i want to do this?
    1. I want to download the sprite with the shader with browser plugin;
    2. I want to change the current sprite with the new sprite with shader and disable the sprite plugin shader. Becouse if i still using shader at run time, the game will be slow.
    
    Thanks for any help.
  • Answer your own performance questions with measurements

    although I will add:

    - there's no official behavior that can change the color of an object, I guess you're looking at a third-party addon?

    - if you have a lot of objects and many overlap, applying the effect to the whole layer can be faster, since it only processes everything once. Otherwise overlapping areas are processed more than once. On the other hand if you only have one or two small objects, it would be a waste to apply the effect to the whole layer, since it will have to process a larger area than necessary.

    Hum, i got it! But, i don't know one thing... The WebGL shade effects like "setHLB" will run one time (will run the script one time to change the sprite color) or will run everytick (every step)?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You probably won't notice any major performance impact unless you have a LOT of stuff going on already.

    You will need to create a miniature "stress-test" perhaps... so make like 1000 of your sprite objects at runtime using a loop (just for testing) and try the different effects to see which one works faster/slower.

    You can make an FPS and CPU counter on your project as well to help see visually the difference. Just make a text box object and every tick set the text to;

    "FPS: "&fps&"CPU LOAD: "&round(cpuutilisation * 100)

    This will give you a nice FPS counter and a rough approximation of CPU load.

    ~Sol

    Hey, thanks, i'm making some tests!

  • Although I think option 3 you will get much better fps, but the game will use a bit more memory, and load a little bit slower. That's just my experience from working for mobile. I'm using option 3 at the moment, because the other solutions i lost too much FPS.

    EDIT: but the best way is of course to try it. What's best for your game. Test and see how it performs.

    Try all options and decide the one that you think get you better performance.

    Hum. Do you know if i use effect and behaviours to change color, the construct 2 still change color at run time in 60 fps?