cvp's Recent Forum Activity

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

cvp's avatar

cvp

Member since 23 Sep, 2012

None one is following cvp yet!

Connect with cvp

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies