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

    Item Box in Platformer Game

    Scheduled Pinned Locked Moved
    Help and Support
    4
    8
    465
    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.
    • R
      Ricky
      last edited by

      This post is deleted!
      Jack8680J 1 Reply Last reply Reply Quote 0
      • MurtazaM
        Murtaza Admin
        last edited by

        Please don't create a new topic for the same question as your last one.
        If you replied to your previous post it would have been bumped up.

        1 Reply Last reply Reply Quote 0
        • Jack8680J
          Jack8680 @Ricky
          last edited by Jack8680

          @Ricky Some things I've noticed are that you are using huge graphics, some of your graphics have a lot of blank space, and you are using a lot of collision points. You should crop away the blank space and resize the images using an image editor, rather than setting a small scale in hyperpad. You should try and resize the images so they can stay around 100% in hyperpad. That should also help reduce the file size and loading times; 50mb is huge for a hyperPad project.

          I don't know how much collisions affect the performance, but I'd try to use less points. Generally, you can make enemy collisions slightly too small and powerup collisions slightly bigger, so the game doesn't feel unfair. I think real Mario games do this and just use rectangles for their collisions.

          For the "mushrooms" I'd suggest having just one mushroom somewhere off screen, then destroy it from another object's behaviours at the start of the game, then when the player hits the powerup block, use the 'Spawn On Object' behaviour to create a mushroom above it.

          R 1 Reply Last reply Reply Quote 0
          • R
            Ricky @Jack8680
            last edited by

            @Jack8680 thanks for your help. I tried what you said about the mushrooms, and even though I have the mushroom as a physics object, it continues to defy gravity and act as a physics object. I don't know if it's just a bug or something wrong with my code. Thank you for your help. Here's the code if you want to see it: http://bit.ly/2rb3oi6

            Jack8680J 2 Replies Last reply Reply Quote 0
            • Jack8680J
              Jack8680 @Ricky
              last edited by

              @Ricky oh, I don't know whether the patrol behaviour is meant to work with physics. I'd set the friction of the mushroom to 0 and use the set velocity behaviour instead. Also, if you use spawn on object you only need to add the behaviours for one mushroom.

              iTap DevelopmentI 1 Reply Last reply Reply Quote 0
              • iTap DevelopmentI
                iTap Development @Jack8680
                last edited by

                @Jack8680 I think patrol can be affected by physics.....for example, if an object hits the patrolling object it gets pushed and patrols a different spot. Maybe making it a wall object would fix that?

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

                  Patrol and physics are kind of weird.

                  The patrol over rides physics to make the original movement, but if something hits the object moving, it will shift it it's new position and continue to patrol.

                  This can be seen for example if you make an object patrol if it's off the ground. It won't drop with gravity, but if something falls on top of it then it will hit the ground and continue to patrol.

                  1 Reply Last reply Reply Quote 0
                  • Jack8680J
                    Jack8680 @Ricky
                    last edited by

                    Interesting. If you want it to reflect off objects you could set the velocity when it spawns, then put all the objects you want to reflect off in a tag and then use the collided behaviour with the tag selected and either multiply the x velocity by -1 and set to that. Or use collided on left, set velocityX to positive value; collided on right, set velocityX to negative value.

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