Real position problem

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • In the HTML5 version of my game the character (PMO) and enemies (Static Movement) position is off by one pixel, this has happened to me before with other html exports of my games and it only occurs on the html export (picture on the right), the exe export (picture on the left) doesn't present this problem, any solutions?

    Please login to see this attachment.Please login to see this picture.

  • May be the collision detection used to position the sprite on the ground, works differently on html5.

    If my memory serves, there is an option in the frame property pane ( or was the application one ? ) to treat the collision as standard windows collision - not sure about the name, something similar.

    You may look if that setting makes a difference, and try also the "pixel perfect collision" check box somewhere in the same property panel.

    If it still does not solves the problem, you may check the way how you position the sprite on the ground. Sometime putting an event before o after another one can make a difference between runtimes.

    Hope it helps.

  • I appreciate the response, i suppose you mean the "Windows like collisions" checkbox in the application menu, i've tried it but sadly nothing changes, also searched for the "pixel perfect collision" checkbox but haven't found it yet and is also weird since i have objects that have no code or any logic that requires collision detections, for example in the picture, the character here only has events that change its animation, nothing else like the PMO, and this problem can also ocur with backdrops and quick backdrops... I don't know what to do...Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.

  • Update on my situation: Seems that what's causing this is the "Resize display to fill window size" option, but this is also kinda weird because i found that i had an old html export of the project and didn't had this problem at all, even when resizing to fill the whole explorer window, i tried copying the same config a new app has but it hasn't fixed it, stll don't know what to do, any other help would be appreciated

    Please login to see this attachment. Please login to see this attachment.

  • You may perform the following test:
    insert on the frame a new active object. Give this object no animation (default) and position it in the frame editor on the ground.
    Run the application as windows app and check if the position is correct. Now run the application as html5 and check if the active object is correctly positioned.
    If it is, then the reason of the offset you are experiencing may reside in the animation of your sprite. Perhaps in the last animation frame the object's hot spot is not at the right place ?

    A further question, I see you have an event to set the X position of "player", do you have also an event that sets the Y position too ?

    By the way, the property I mean ( "using fine detection" ) is an active object property ( highlighted):
    Please login to see this attachment.

  • Ok, so i added an active object and surprisingly did the same result when exporting to html5, when using run application this doesn't happen, and as i said the Player in this frame has events that only alter the animation and position in X, not YPlease login to see this attachment.
    Please login to see this attachment.Please login to see this attachment.

  • which event sets the y position of the diamond ?

    Is the diamond also "moved" by a pmo object ?

    Or did you put the diamond at that position in the frame editor ? Is snap to grid activated ?

    Is the green floor height scaled in some way ?

    It could be that the scaling on html5 produces this behaviour.

    In this case you may add a workarounf like:

    Always: if diamond overlaps ground: set diamondY = diamondY - 1

    Same for the player sprite. This should solve the overlapping problem.

    Furthermore, in your search "player" you do set manually the y position to 297. Because of html5 scaling, this position may cause that overlap.

    That's why you should "correct" the y position by using the pseudo-code I wrote above, or something similar.

    You know, what you see in windows runtime is NOT ALWAYS what you get in html5.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!