dpmontes's Forum Posts

  • keepee

    Here's a quick .capx so you can see the problem. The way I have it set up, I would expect another good 5 or 6 bounces at least. But it only bounces twice.

    I'm thinking the problem could be my low world gravity? The thing is that I want the ship to have, well, a low world gravity! I don't want it moving around too fast!

    Yes, I see that if I increase the world gravity to 10, then the ship will bounce many more times, but the ship moves too quickly then.

    And yes I could adjust the time scale...doesn't seem like the best way to go about it though.

  • I know what you're thinking "increase the elasticity!" but that's not enough.

    I have a physics object that is bouncing off an immoveable physics object. Both physics objects have:

    Density: 1

    Friction: 0

    Elasticity: 1

    The object will bounce well as long as it is falling from a height that is at least twice as high as the object is tall. And it will continue to bounce back to its original height indefinitely unless I act upon it.

    But if the object falls a distance that's less than about two times it's height, it just sticks to the floor. I want the object to continue to bounce in smaller increments! Any suggestions? Thanks

  • Ashley

    Yes you are right of course! After upgrading to r155, my original program still didn't work right which I guess is because it was created in r152 so I remade it in r155 and it works! Thanks

  • LittleStain

    Appreciate the thought LittleStain but that Astroids game is missing half of what I am wanting to do. In that game, when the ship collides with an astroid, it just plows through the astroid. There is no rebounding whatsoever. And the astroids are individual sprites and not a stationary object like my mountain.

    The movement of the ship is too easy to recreate. The difficulty comes with having realistic ricocheting off stationary objects that are comprised of a tilemap.

  • RamPackWobble

    Thanks for the reply! That second example looks pretty close to what I need. Unfortunately, I already stated that the bullet property doesn't work for the ship because it doesn't provide for a realistic looking motion. The ship should be able to look like it is floating out in space. Then accelerate in one direction, turn around 180 degrees and continue to float in the same direction. Then start to accelerate until it comes to a stop and then start moving forwards.

    With the bullet property, the ship is always moving at a speed in the direction it is facing.

    I can make the illusion that the ship is able to rotate freely while not changing direction but superimposing another sprite on top of the real ship and rotating that around. But when I want to move the real sprite underneathe, the movement looks unreleasitic when it instantly changes direction without any 'drifting' or 'sliding'.

  • The gameplay I am wanting to recreate is that of Solar Jetman on the NES. Here is a

    Subscribe to Construct videos now

    I'm wanting to have realistic collision with a tilemap object.

    I have a spaceship flying around and a tilemap object that shows a mountain.

    I've tried giving the tilemap a solid behavior and my ship a bullet behavior. This gave me a good bouncing collision effect. However, the bullet behavior wasn't good for my ship because when the ship changed direction, the ship would instantly start moving in the new direction rather than continue to drift in the original direction and gradually accelerate to the new direction.

    I've also tried giving the ship a physics behavior 'moveable' and the tilemap a physics behavior 'immovable'. However, my ship collides with the very outer rectangular bounds of the entire tile map rather than just colliding with the mountain. I'm not sure why the ship would collide with the entire tilemap because i've deleted all the tiles that are not a part of the mountain. But the ship still sees the empty tile space as part of the tilemap.

    Are there any other ways of going about doing this? Thanks and Happy New Years!

  • puntodamar

    One way would be to use the rpg engine you develop and have the game play on its own to tell a story. The graphics will look exactly like the game will except that you aren't controlling anything, just watching.

    Another option would be to have still frames. You can make them a bit more interesting by having appropriate panning of the otherwise still frames. Or use fading ins and outs and flashes to show action. This artwork will tend to be more stylized and not look like the actual gameplay.

  • Bugasebi

    Lastly, you'll notice that the blocks are not appearing cleanly from the right hand side. They aren't smoothly coming onto the screen.

    Fix this by changing the spawn point from x=630 to x=730. Since we changed the image points, the objects need to be pushed to an earlier starting point.

    But if you do this, they won't appear on the screen at all. Cause the layout is only 630 wide so they are destroyed instantly.

    Change the layout width to 730 minimum.

  • Bugasebi

    When you apply that behavior to the blocks, you'll see that they are still dissappearing too soon before they have completely exited the screen. Slow down the speed if you need to so you can clearly see the point at which they disappear. The program is using the "image point" to determine when the object has left the screen and the image points are set for the middle of the blocks.

    To fix this, change the "image point" from the current location which is the center of the block and change it to the far right edge.

  • Bugasebi

    To fix the destruction of blocks outside the layout, use the built in behavior for that. For the blocks, assign the "DestroyOutsideLayout" behavior.

  • Actually that won't work. The parameters for the TileAt method requires tile coordinates arguments. So you must convert the mouse coordinates to tile coordinates first using the positionToTileX and positionToTileY methods. My program is working now using those methods.

  • I created a minimal .capx and it worked so I rebuilt my original game and it works now too. Not sure how I fixed cause my original game was very minimal as well but it works...

  • Did you ever figure out the problem? I'm getting the same number output as you "536870911".

    scirra.com/forum/how-to-use-tileattilex-tiley_topic82726.html

  • I have a large tilemap output on my game with a variety of tiles and I'm wanting to get the tile ID at the Mouse's location on the map.

    When my mouse clicks, I'm have a textbox set the text to "map.TileAt(map.PositionToTileX(mouse.X), map.PositionToTileY(mouse.Y))"

    But the textbox just outputs constantly "526870911"

    I tried simplifying my output to "map.TileAt(1,5)" and various locations but I still get the exact same output "526870911"

    Any ideas?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One way could be to have a sprite rotate "every tick" to track the movements of the mouse. So the rotating sprite is the arm and gun. The angle will be determined by comparing the x and y coordinates of the mouse to the x and y coordinates of the body of the character.