eli0s's Recent Forum Activity

  • Parallaxing layers can be very frustrating with the current workflow. Since there isn't a "look trough camera" option and no 2.5 z depth, the only thing you can do in order to set up your scene is the following;

    1) In the editor, make sure that the zoom level is at 100% (this option can be found on the view tab).

    2) Then, click on the layers in order to access their properties and on the editor properties field set "Parallax in editor" to Yes.

    After that you should be able to align your sprites in the editor and their relative positions should be the same upon run-time.

  • You can also use clamp to restrict a value "x" between two other values "a" and "b". The expression would be:

    clamp(x, a, b,)

    In your case:

    clamp(self.X , 0+ Sprite.Width/2, 480-Sprite.Width/2)

    Check the attached example.

  • I am not sure how to follow your 1,2,3,4 steps but what I did is to load the page on Firefox, Chrome and IE11 and I got the following results:

    -On Firefox the game doesn't load, unless I hit reload page. After that everything works ok. BUT, if I reload again, I get a black screen. The music plays and if I click inside the black screen, the music stops but nothing else happen.

    -On Chrome everything works fine.

    -On IE I get exactly the thing as with Firefox...

    I hope that helps in anyway.

  • Works great when previewing on a Samsung S2 with the Chrome app. Nice game idea by the way!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • allanblopes , what is it that you are trying to do? What do you want to make? Perhaps there is a simple way to achieve it, if you tell us what you're after maybe we can help with a practical example.

  • Hello Allan,

    This is probably happening because the Platform Object moves too fast and some times, between two ticks, it travels more than the width of the solid objects, so it never collides and it looks like it passes trough.

    This is most likely to happen on Firefox, because it has some terrible performance spikes lately, that seems to affect collision detection (among other things). Try previewing the layout in Chrome or NW.js, I believe that you'll get different, more as expected, results there.

    You could also try to slow down the platform speed a bit, or use the clamp expression to limit the Sprite's position on the X axis. The event for doing this should look like this:

    System|Every tick-----> s1 | Set X to clamp(self.X, "lowX", "highX")

    where "lowX" and "highX" should be the number values that define the furthest to the left/right that you want your Sprite to be able to move.

  • nabster023 , you are most welcome, I'm glad I could help!

  • I am attaching an example based on what I interpreted from your post and the Subway Surfer game I saw on Youtube...

    In order to open the capx, download and install the moveto and LiteTween Behaviors. These are very useful to have anyway.

  • Nice art 05brenninhowz ! Well done!

  • That would be very useful!

    +1

  • Asked so many times already... Perhaps it's an IDE restriction... Very basic and useful.

eli0s's avatar

eli0s

Member since 24 Apr, 2013

None one is following eli0s yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers

Progress

13/44
How to earn trophies