Aphrodite's Recent Forum Activity

  • Disclaimer:I'm not sure I know enough about this subject to express myself so maybe I am wrong this time.

    First of all, the problem with big backgrounds is that they take memory, even with transparency, reason?

    a stored picture is a group of informations about color (and alpha too), by using such an image you are telling the memory to store it entirely, even the informations that says "there are nothing here", I am not sure if all material will act like that in that case, some may filter first.

    And then there is the concept of drawing, I'm pretty confident that the graphical rendering part of actual devices is set to skip drawing an alpha of 0 the same way other devices did with a referenced color.

    I think the only difference is that rather than choose yourself one color (like for exemple Worms Armageddon, plain Black was transparent at rendering), here the color is already choose (everything that has 0 opacity color wise)

    Then there is also the fact that a sprite set to a transparency of 0 will still be drawn at screen some will say, but I think this is for other reasons

    As I said I could be wrong.

  • Event 22 and 26, add an Else (it is a system condition that will be true only if the precedent event was false during the same tick, which will work in that case, since you want to have only one of them to be true in the same tick)

    Edit:ninja d

  • Basically I have this numeber that when adding 0.001 one will go into a thousand decimals.

    I don't want to round the number itself, rather, how do I make some text I set out only show to the 0.# decimal instead of 0.########### ?

    I did set text (floor(boatStatus)) which works only it will only show whole numbers, I want the first decimal to be shown too, How would I achieve this?

    I personnally use:

    Floor(boatstatus*10)/10, if you want 2 decimals, replace 10 with 100

  • jayderyu

    [quote:358b8ey6]CocoonJS and Ejecta do not support the advanced memory management of JS. However full browsers do, so Crosswalk is a go.

    I was actually seeing the same loading delay with our app between CJS and Crosswalk, so I assumed Crosswalk wasn't actually handling layout by layout memory management. Is it working for you? Right now it's the only thing holding me back from releasing an Android version of our app. Thanks!

    I can suggest you to set a (text or spritefont) to the system value renderer, if the result is canvas2d, that would explain It.

    (WebGL gives 3 things in C2 games: Faster rendering speed, Effects, and Layout by Layout if Memory management is supported, if your app falls back to canvas2d, then that is the cause I think)

    PS: I suggest that since I've seen complains about effects not working too in crosswalks

  • Load from url will replace the corresponding frame for all instances, it is how it works.

  • Would it be possible to add functionality to delete unused resources easily? Sometimes it can get a bit messy and you need to go through every sprite etc to see if they are in use. If there was some kind of check for this which allowed you to delete this with one click that could save some time. Or am I missing something?

    I could be wrong, but by clicking the sprite in the project window (in the object type folder), if it does not show all the proprities of it (line if the size or position proprieties are not showed at all), then it isn t used in any layout

    However I could be wrong so verify first

  • As far as I know, classic games on classic consoles were a combination of different pixel with color related to the palette, so it wasn t "magenta as background" in the end, however, magenta I think is a color that is rarely used directly, and I think some program cannot use direct transparency (bitmap with no transparancy only allowed by default, png with no transparency is fine too for them too sometimes), so it is more conventionnal to use this least used color as transparency, maybe it is also easier to extract sprite with this color too

  • Yes, I now the Array, but I dont know how load and save to disk, can you help me?

    since you have a lot of datas, I think webstorage is not the way to go (I could be wrong), but I don't know of a way to save and load file from disk (except if you are planning on using Node webkit of course)

    Maybe there is a plugin that can help, but I am not sure.

  • Just to thank Ashley for the very noticable performance boost with r166.

    I test my game on 3 computers on a regular basis, and one of them was unable to run the game smoothly (20fps with input lag).

    Now, same weak computer, nearly 50fps and no more input lag... What is this magic?

    I don't know what happened, but, wow, a huge THANKS! for this < 3

    I also saw this while testing on my phone (with chrome for android), before it was ~10 fps for 6 seconds then around 20-30, with small pauses (yet still fine for my phone, it is not a great phone, FAR from it) with the stable, and now it is 20 fps at the beginning, then a solid 33 fps with only occasionnal pauses with the r166

    I think the r166 changed the way trigger events works (changelog..), but pretty sure other optimisations were done to the engine

  • Everything that has been said is good, I'll add one thing though, try to decompose what you want into simple statements, before trying to get them on C2, simple things are the most reliable ones, an exemple:

    -"When I press W I want the player to shoot"

    -"When I press W" => is it right when you press "W", or it has also other conditions?=>When I press W, no other requirement

    -What does "Player to shoot" means?=>I want the player to change his animation, then I want it to spawn an object at a point I defined in the image editor

    -What is this object, where should it goes?=>It is a "Bullet" (using the bullet behavior), and it should go in front of the player

    -In front? so the angle should be changed if the sprite isn't at a good orientation?=>indeed, if the player is mirrored I'll also change it

    It seems like stupid in that case(and maybe not needed), but in more complex events, it can be a real life saver to simplify everything at first, when you know what you want to do in a low level logic, it is easier to write it in conditions/actions.

    having events easy to read, and to write, is really good, the readeability part is an important one, but mostly experience will give it to you.

  • You could use an Array for this:

    https://www.scirra.com/manual/108/array

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The PickedCount expression is the way to go I think

    [quote:318mdkta]PickedCount

    The number of instances meeting the event's conditions. For example, if the event has the condition "Mouse is over Sprite", Sprite.PickedCount will return the number of Sprite instances that the mouse is over.

    https://www.scirra.com/manual/133/common-expressions

Aphrodite's avatar

Aphrodite

Member since 20 Dec, 2011

Twitter
Aphrodite has 2 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies