logo hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Optimizing objects

    Scheduled Pinned Locked Moved
    Help and Support
    4
    18
    551
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • StanicaS
      Stanica @SplitMindGaming
      last edited by

      @SplitMindGaming Unfortunately, the course is procedurally generated so I can't do anything fancy like render only the part of the course that's currently visible. If I could set a seed for the random number generator then I might be able to....

      1 Reply Last reply Reply Quote 0
      • MurtazaM
        Murtaza Admin
        last edited by

        How large are your graphics? and how much transparent space is there? Transparency really kills performance. You should try to crop as tightly around your objects as possible.

        StanicaS 1 Reply Last reply Reply Quote 1
        • Aidan_FireA
          Aidan_Fire
          last edited by

          You should be able to have more than 60 objects out without having lots of lag. If you want to you could upload your project for me/anyone else to look at and see if they can help find causes of lag (my iPad is expert at this cause it's already laggy 😛)

          1 Reply Last reply Reply Quote 1
          • StanicaS
            Stanica @Murtaza
            last edited by

            @Murtaza said in Optimizing objects:

            How large are your graphics? and how much transparent space is there? Transparency really kills performance. You should try to crop as tightly around your objects as possible.

            Each sprite is 2048x2048, scaled down to 10% with no transparency.

            @Aidan-Oxley said in Optimizing objects:

            You should be able to have more than 60 objects out without having lots of lag. If you want to you could upload your project for me/anyone else to look at and see if they can help find causes of lag (my iPad is expert at this cause it's already laggy 😛)

            I might take you up on that if I can't find a suitable fix.

            Aidan_FireA 1 Reply Last reply Reply Quote 0
            • Aidan_FireA
              Aidan_Fire @Stanica
              last edited by

              @Stanica That's massive. If you can, scale down the actual image size so that your objects can exist at 100%. You should get the same quality images but way less lag.

              StanicaS 1 Reply Last reply Reply Quote 0
              • StanicaS
                Stanica @Aidan_Fire
                last edited by

                @Aidan-Oxley I'll try that or increasing their size to 20% so there are fewer objects on screen at once.

                Aidan_FireA 1 Reply Last reply Reply Quote 0
                • Aidan_FireA
                  Aidan_Fire @Stanica
                  last edited by Aidan_Fire

                  @Stanica If your image editor allows it, scale your sprites down to 205 × 205 pixels, and then replace your objects with those and scale them to 100%. They should look exactly the same, I think. Yeah having fewer objects can help a bit, like if you can combine some tiles that don't do much from 2 or more separate objects into one, especially if they are background objects that don't move.

                  StanicaS 1 Reply Last reply Reply Quote 0
                  • StanicaS
                    Stanica @Aidan_Fire
                    last edited by

                    @Aidan-Oxley 👍

                    SplitMindGamingS 1 Reply Last reply Reply Quote 0
                    • SplitMindGamingS
                      SplitMindGaming @Stanica
                      last edited by

                      @Stanica that has to be the problem right there. 2048 x 2048 for each sprite. Yeah I always try to make each of my object the exact size it needs to be without having hyperPad constantly tell the code to resize the image. The less instructions you can have hyperPad make. The better. Scaling it down to the actual size. Removing all the empty space borders. If you have photoshop the best way to really crop it perfect is to to go to file. Then export to layers. This will crop each image perfectly.

                      1 Reply Last reply Reply Quote 1
                      • MurtazaM
                        Murtaza Admin
                        last edited by

                        Yeah the image size is definitely affecting your performance.

                        As the rest have suggested, try making it the actual size you need. For something like this that will be used to create a procedurally generated level I would avoid going beyond 256x256 pixels.

                        1 Reply Last reply Reply Quote 1
                        • StanicaS
                          Stanica
                          last edited by

                          Thanks for the tips everyone. Managed to fix all performance issues by decreasing the size of my assets!

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post