justifun's Forum Posts

  • Here's part 1 of 4 for a tower defense tutorial

    youtube.com/watch

    its basically what you are asking, but then all you would need to do is add control to the player and the ability to shoot back i guess.

  • Not sure if these numbers correlated directly with C2's velocity numbers etc, but i thought it was neat so i'm posting it here.

    piratehearts.com/jumptuner

    Its a HTML5 based interactive jump calculator, which allows you to tweak the height/speed/distance of a character's jumping ability.

    It lets you know the various speeds etc down below

    eg:

    // Values are in pixels per second (velocity)

    // and pixels per second squared (acceleration).

    const MOVEMENT_SPEED = 586.00;

    const INITIAL_VELOCITY = 2201.61;

    const GRAVITY_RISING = -12057.40;

    const GRAVITY_FALLING = -5070.53;

    Are the numbers for the platform behavior based in pixels per second in C2?

    Haven't tested it myself yet....

  • You do not have permission to view this post

  • Its probably better to make it dynamically generated if you are going for a "endless" mode. But you can do it as on long layout as well if you want specific placement.

    If you are going dynamic....

    Create a set of obstacles (or one sprite with different frames of animation (each frame is a different obstacle))

    then generate them off screen and various different intervals and heights. Then match their translation speed the same as your background so that they appear planted.

  • Have you double checked that their collision boxes are set to rectangles? Sometimes it will try and guess the shape and make it some kind of polygon.

    Right click one of the collision box points and choose "set to bounding box"

    If that doesn't, depending on how your game works, you might need to overwrite its vertical movement to force it to do only what you want.

    Sounds like its colliding into the other objects and when two solid objects are inside one another one of them will jump as you've described it.

    can you post a .capx for us to take a look at?

  • that would be really easy if they were all on the same computer, but now your getting into internet multiplayer which is a lot more complicated.

  • I've used this before and it works well.

    On keyboard *NOT* pressed Left Arrow

    AND

    On keyboard *NOT* pressed Right Arrow

    AND

    On keyboard *NOT* pressed Up Arrow

    AND

    On keyboard *NOT* pressed Down Arrow

    -> Play Idle animation

  • give the sprite object an instance variable called coliddedUID

    Sprite On collision with other object

    ->pick nearest (enemy)

    -sub event->system compare 2 values

    sprite.imagewidth*sprite.imageheight <= enemy.imagewidth*enemy.imageheight

    -> do whatever ever action should happen if the sprite is smaller than the enemy it hit

  • They are called plugins or behaviors.

    Here's a list of all of them

    scirra.com/forum/topic47002.html

  • you need another event that specifies what the keyboard should do.

    eg: on keyboard pressed "right arrow" -> move player right

    it sounds like you might have also attached a 8 direction or platform behavior to your arrow sprites instead of the player.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I second tobye suggestion. check for "greater than or equal to" and then snap it back to exactly where you want it right afterwards with a "set position" action, visually you shouldn't see that pop.

  • The enemies might be overlapping because their collision boxes are not boxes.

    Open the collision box for the sprite and see what it looks like, its probably using the default "auto guess" shape. Try making it a box. Right click one of the points and chooose "Set to bounding box"

  • Check out this youtube channel full of construct tutorials

    youtube.com/user/ConstructDude

  • I've been trying to wrap my head around how to simulate jumping in a 2.5D isometric environment for a while now. So I put together this little prototype with the hopes that the community will be able to build upon this concept and help everyone else learn as well.

    I'm hoping there's an easier way to achieve what i'm trying to do here, and I think as a group we can figure it out.

    Demo

    CAPX

    The idea is basically that when you jump in a 2.5D isometric environment, all you are technically doing is offsetting the players Y position higher than normal from their ground position to appear visually in the air. This works fine if there's no higher platform for them to hop onto. But as you can see its a bit more complicated once that fake 3rd dimension is introduced.

    Arrow Keys to Move + Space to Jump (there are no walk/jump animations)

    How it works:

    The Player Sprite has a Platform Behavior that is pinned to a shadow object which is controlled by 8-Direction movement.

    When the jump key is pressed the player sprite is unpinned from the shadow and jumps into the air.

    The collision on the shadow is turned off while the player is in the air so that the shadow can travel through the crate object. (when its on the ground its used to collide with the crate to make the prop impassable.

    The crate object consists of a front panel, a top panel and a side panel. The front panel sets the height of the box's highest point to set the fake "height" of the crate object.

    The top panel is used to determine when the player has collided with the top of the crate and to create a copy of the shadow sprite to follow the player around simulating the appearance that they are walking on top.

    The full crate sprite is used to determine how the player collides with it while walking around on the ground, as well as used in the Zsorting for when the player walks behind it.

    Once the player has walked off the top panel of the crate, they fall to the ground and re pin to the original shadow once again

    Zsorting is achieved by comparing the X/Y position of the player to 3 different image points on the full crate object and setting its order depending on which condition is true.

    Things that need improvement:

    -Currently you can't jump a second time off the top of the crate.

    -There's a few z sorting issues that cause the player to become invisible

    -When walking off the top of the crate towards the back, the player stats visible until the hit the ground, (should move to back visually sooner)

    -The whole idea is really messy and not easily packaged to be resuable in game in multiple locations.

    Any feedback/ideas/tweaks etc welcome.

    Thanks for the help!

  • Yeah, up on collision with another object matching a "goal" object

    test to see if the type of object is the same as the appropriate goal.

    eg: if the game piece is "red" and the goal is "red" then set a "check" variable to 1 lets say. Then if they get a second one correct in a row. then set the variable 2 , and whenever that variable equals 2, add a point to their score, and reset the variable to 0

    also set it to 0 anytime they screw up and match them incorrectly.