cvp's Forum Posts

  • Just a comment on your question about the difference.

    The difference is that save/load saves the entire state of your game, but webstorage only saves what you tell it to.

  • I would do it along these lines i think:

    on left click on sprite :

        if selected

            Sprite selected = False

        else

            Sprite selected = True

            Sprite xOffset = self.X - Mouse.X

            Sprite yOffset = self.Y - Mouse.Y

    When dragging:

    for each sprite

        if selected :

            set X to Mouse.X+self.xOffset

            set Y to Mouse.Y+self.yOffset

  • Its hard to say what is creating your low FPS without having a example or capx to look at.

    but you can take a look at this tutorial, it might help you.

  • Happy to help. Let us know if you get stuck again. and we will see if we can help you.

  • Hi Pancholo

    Dont see it as you exposing your underwear... see it as an opportunity to learn something <img src="smileys/smiley2.gif" border="0" align="middle">

    You were actually almost there.

    When you run in to something like this, try to run it with the new AWESOME debug mode.

    When I did that, I could see that you actually did spawn all the days, but they were just spawned on top of each other.

    <img src="https://dl.dropboxusercontent.com/u/2560922/mobiledev/forum/calendarUseDebug.png" border="0">

    I messed a bit around with your iteration over the days. Have a look at it.

    .capx

    And.. while we are at the learning a bit part <img src="smileys/smiley1.gif" border="0" align="middle"> I changed your function "MonthNameDays" a bit so it is a bit more simple.

    Hope this helps your.

    /cvp

  • There is a thread on that topic here

    I almost.... almost have mine up and running. Still struggling a bit with a few issues. But will update if I get it working.

  • Rex has created a chat plugin you can look at.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are some examples of multiplayer in the FAQ section.

    Just search for "multiplayer" on that page.

  • You can iterate the object with the "for each" and then use the distance() function to find out which one is closest on the Y axis.

    Edit:

    Scratch that... distance() is also x,y....

    So... iterate over the objects and just compare the Y values.

  • as I said. it wont help you if you do the rounding after the calculation. It can only help you in cases where you use the rounded value alot afterwards.

    E.g.

    This:

    roundedValue = round(12.123132165468798763213654) --> (roundedvalue = 12.12)

    for i = 0 to i = 1000000

    Do calculations on roundedValue

    Would be faster then this:

    for i = 0 to i = 1000000

    Do calculations on 12.123132165468798763213654

    But in your case (as the others mention) you will just add an extra calculation to the cpu cycle (the rounding)

  • round(N * 100) / 100

    for 2 decimals

    1000 for 3 decimals

    etc...

    depends on when you do the rounding though... if you do it after the calculation it wont help :-)

    But if you round and then use the number it should help.

  • I would definitely create a invisible sprite and create the joint to that.

  • You could do something like this.

    .capx

    If you want to avoid dragging over other objects you could use something like this (from another example, but should give you an idea)

    .capx

  • I am not totally sure i understand what it is you are trying to do here. So this might be way off <img src="smileys/smiley1.gif" border="0" align="middle" />

    But if you want to destroy the lava(if it is a sprite or something) you can make an invisible bar where you want it destroyed, and then destroy the lava when a collision with your invisible bar is detected.

    or you can use the fade behavior to fade it out.

    Or use a timer and destroy it after a given time period.

  • Hi

    I think you linked the wrong .capx file

    There is no "pause" group in the event sheet. And there is only 1 layout in the capx you linked, and i cant find any object that is named "menu" or resembles that <img src="smileys/smiley1.gif" border="0" align="middle" />