Psychokiller1888's Forum Posts

  • I know, but that's the answer we got here about a 99.9% reproductible bug (0.1% being Ashley) for which we provided a capx and informations. Turning off effect rendering does correct the bug for us, but still, we get the same answer: your drivers have a problem since a year (in a year I have changed my GPU twice already, always nVidia though)

  • Version 1.4.5 available on my fork https://github.com/Psychokiller1888/air ... construct2

    Adding NavigateHome : Requests all devices to open AirConsole store

    Adding NavigateTo: Requests all devices to load a game by url

  • Check your drivers......................................

  • Thanks for the answer. I posted just above yours, the solution. It is wrong to guide people telling them C2 makes a copy of the very first instance placed in C2 as we can see here. It copies the first instance it loads, so nothing to do with the UID of that element. It is taking the first instance placed from the first layout it loads.

  • You tha masta!

    Well, all together, to fix this mess I did:

    Manually, in the xml project file, made sure that my problematic sprite has UID 1 (by swapping its UID with the one that had the UID 1)

    Opened C2

    Created a new subfolder in my "layouts" folder, named it AAA (you can't place layouts before subfolders)

    Place my placeholder layout into that AAA subfolders. That placed it on top of the list

    Well, let's not sing victory quite yet, I was already sure to have fixed this a couple of times, but it always fell down at some point

  • I do have a placeholder layout, containing the InterfaceElements sprite with UID 1 that is set to defaults

    What defines the layouts order then? Cause technically, that layout is never displayed/used and the start layout is my "MainMenu" layout

  • IID is a runtime generated IndexID that is not referenced in the xml files, while UID is a UniqueIDentifier used and referenced in the save xml files

    IID indexes the object according to its runtime creation timestamp, by type, and UID ensures a possibility to reference the object by being sure to never return more than one result. IID is not unique and volatile where UID is unique and by definition should never change (which is not the case in C2, strange, but well, definitions....)

    I'm still asking what defines, for C2, the first placed instance of a sprite

  • I'm asking a simple thing: What defines, in the files, the veryy first instance of a sprite you placed. If you say its UID, then it's bugged

  • That's why I ask, what defines "the first one created".

    As you can see in my screenshot above, the sprite InterfaceElement with UID 1 (uid 0 is something else, we don't care, it's another sprite) is set with positive width and scaled 1:1, placed on a placeholder layout. The layout that loads first also uses this sprite, for the interface, manually placed in layout. Some are normal, others are reversed. Then comes the code, that creates also a few InterfaceElements, but they are reversed and squeezed... So, my point is: What defines "first created element", because obviously it's not the one with the lowest UID

    I am not going to delete all InterfaceElements sprites from my roughly 40 layouts, all together what, 500 InterfaceElements manually placed, and recreate everything. I will rather manually fix that in the xml files

    I talk about local testing, no chaing issues (and browser has caching disabled for testing)

  • No, I'm saying that even if the very first created sprite in my project has the default width set positively and is scaled 1:1, the code generated ones spawn reverted. The code generated ones even take the instance variable values from another sprite placed somewhere else, dunno which, but not the very first one. So it's not taking the very first created sprite, but some random others

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • And how exactly is the first instance defined? Is it the one with the lowest UID? Because after a couple of tries, this is not the case...

    I added one of the sprite on a placeholder layout, I manually opened the layouts xml file, made sure this new element gets the UID 0 by swapping with another one in another layout. Still, the problem persists. Even instance variables are copied over, that's totally not ok, they are not to be called instance variables in that case

  • What I did to overcome this now is:

    Add to those sprites an instance variable called "layoutPlaced" with default to false.

    When manually creating a layout and placing one of these sprites, we set it to true

    In a super sheet, I do "onCreated / if not layoutPlace setScale 1 setMirrored false setFlipped false"

    This way, all the code generated sprites do fall into that condition and get defaulted where all the manually placed ones stay as we did place them

  • But but but, I do get that... But the instance vars aren't copied over either, so why aren't the width and Co non static also? Placing one sprite in a fallback layout is what we do too, but the ones created/manually placed in other layouts took over...

  • Hi!

    Not posting this in bugs, as it surely ain't one, but maybe more a weird behavior....

    Let's make things simple. Open a new project, create one sprite, draw an arrow left looking, place it on your layout.

    Add an event in your sheet to create one more arrow

    The result is, without doubt:

    Now, mirror the manually placed arrow by using a negative width. (Ban negative width? Give me another way to do it without doubling my frames and being able to see the result on the editor, meaning not having to preview the layout to see the end result)

    Without changin anything in the event sheet, just preview. Weirdly, the result is:

    Now, I say weirdly, why? Maybe it's wanted, but you have to explain it to me then. Programmatically thinking, this looks to me like a static variable conflict. Why? On the right side, we have our Project tree, with our layouts, sheets, and objects. When dragging an object in the layout, we instanciate it, create an instance of it. Thus, all it's attributes are set to the object's default. When we create through code, we do instanciate it too. If it's not that, then the whole idea is really looking like that and so are the guides talking about instances, the functions referencing to the "instance" word etc etc and that really needs semantic fix then

    So, by looking how Instance Variables and Common work, to me it looks like "Layer", "Angle", "Opacity", "Position", "Size" are declared as static in the object (where instance variables are what they are called, non static instance properties), explaining why, after setting one object's width to negative, it spreads and infects the original object. I know the category for those is called "Common", that's a sign.

    It is also easily understandable by looking at the .caproj file:

    Nothing references the base width, height etc etc

    So, anyone has a solution for me to not have my sprites flipped by default when code created if I manually placed one of them and reversed it?. Sorry, the project is very wide, and I won't add setMirrored = false, setFlipped = false and setScale 1 after every sprite creation throughout the many event sheets and sprite creations....

    Cheers!

  • Sure it is. Send a message from your game, capture that message on the controller, within onMessage, then use jQuery to set a div's background color per exemple, based on the message received