Pandy's Forum Posts

  • Hello,

    I was wondering if it was performance intensive to continuously read values from an array?

    I have a lot of functions that sets a sprite's position, angle, opacity to different values for different if conditions. This fills up the even sheets with a lot of actions.

    I was wondering why not I just save the position angle opacity values in an array, and call another function to read the values from the array and set it into the function that changes the sprite's various attributes.

    Would this method be slower than just directly setting the values and would it be a burden on performance?

    thanks

  • R0J0hound

    Is there any way to also erase parts of the Paster? Like with a eraser tool in a normal photo editing program. So far I don't think you can in the Paster plugin.

    Maybe if you save every paste action in an array including the brush size opacity color etc, and then when you erase, you just clear the whole paster, loop through the array and re do all the paste actions but also check which of the saved paste actions overlap with the position of the erase tool and just not carry out those paste actions. Of course this would probably be very hard to implement with complex brushes.

  • Hello all.

    I was wondering if a larger sprite with the physics behavior would use more resources for calculations than a smaller sprite with the physics behavior.

    I have multiple sprites with the physics behavior and felt that the scale was a tad small for the screen and decided to scale them up by a factor.

    I can't find any noticeable difference at the moment but I haven't tested with a large number of sprites, I am yet to test that setup. Is there anything I should know when it comes to Physics behavior and sprite size?

  • JeyDotC

    I have a small request. Is it possible to have an action that sets the 'shoot key' by keycode during gameplay? At the moment you can only set the shoot key via key keycode in the C2 editor. I need an option to set the shoot key during gameplay via keycode which can't be done at the moment.

  • JeyDotC

    Thanks, will use that. Looking forward to the changes.

  • JeyDotC

    Awesome. Really useful change.

    Another thought I had, it is not something I need but I think the ability to set the number of bullets that would be shot on the 'on shoot' action would be a neat addition. As in, 'on shoot' > shoot X bullets. As it is you can't do a shotgun type weapon that shoots a set number of rounds at once.

    This might be a bigger task to implement I think.

  • JeyDotC looking forward to it. Thanks

  • JeyDotC

    Is it possible to not set a bullet instance? I mean, let the gun shoot but no object is created yet the number of bullets in clip reduces. As it is now, if you don't set a sprite as the bullet, and you fire the weapon, it results in a javascript error.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • brunopalermo

    Sorry I just put this up in haste.

    These are 2 static sprites that don't move in the layout. The smaller one is supposed to be lying on the bigger one without any gap. But if I scroll through the layout, like for example if the player has a scroll to behavior, this gap appears as the layout is scrolled through. Same for other static sprites, they seem to be skipping rows and columns of pixels as they are drawn. I hope you got it.

  • https://i.imgur.com/yl2Rktf.png

    https://i.imgur.com/CTLEfWK.png

    Note :

    Window size = 1920 : 1080

    Scale Outer

    Use High DPI = Yes

    Sampling = Linear

    Downscaling = low quality

    Pixel rounding = On

    Changing all of this does not see to make any difference. The size of the sprites are a factor of 2.

  • dop2000

    Thanks, will check it out.

  • R0J0hound Can you update the links please. I want to see the formulas. I can use collision polygons to detect overlapping, but I'm wondering if it'll be faster to just use formulas instead of using sprites and checking collision polygons.

  • R0J0hound

    Thanks.

  • Hey R0J0hound Can you please update the capx link. Thanks

  • Hello all,

    So I found this tutorial ( https://www.scirra.com/tutorials/9432/h ... ova/page-1 ) Note that this does not use Intel XDK.

    It shows how to build crosswalk apks on your local system which you can directly test on your phone. It works and I built a project which I tested on my phone which runs on Android 5.1.1 . The first couple of builds the game ran smoothly, definitely near 60fps, as it was same as when tested on my laptop. Then I started forking around to get Admob and appodeal working, and built again. I got the ads to work, but the game ran much slower. I thought it must be the appodeal or admob plugins as I haven't changed anything in the game itself, so I removed them. But the game remained slow. So I completely deleted everything and redid the tutorial. But again, the game was slow.

    But then I realized that the game was NOT inconsistent in its fps. It was not lagging or stuttering in input or sprite movements, it was just at a steady low fps. So I rebuilt with an fps counter, and found that the fps was at a steady 30 fps. Throughout the game it just stayed at 30fps no matter if object count increased or decreased. What's even stranger is that when I build the project in portrait mode and run the game, it runs at a steady 40fps!

    This is so weird. Does some setting limit fps in crosswalk? I'm certain I can get ~60fps as it was in the first couple of builds. I don't know how to proceed. Can anyone give an idea on what could be the problem?