Jump to content

Game seems slow when jumping.


ImprsvIan
 Share

Recommended Posts

Hey,

Still fairly new to game developing. Trying my hand at it. I've got most of a game created and have figured out a bunch of things. There are two glaring issues I can't seem to get past. My player has gravity applied. If he falls from a certain height and the gravity is high, he falls through the floor tiles. If I turn down the gravity so this doesn't happen, the game seems slow. You can check out a working version of the game at http://gf-game.herokuapp.com/ . I looked into switching to P2 Physics but it just seemed way more complicated than I needed it to be for this type of game.

Any help will do.

 

Link to comment
Share on other sites

Quote
42 minutes ago, samme said:

For falling through, you can set a non-zero Arcade.Body#deltaMax or you can increase Physics.Arcade#OVERLAP_BIAS.

 

 

I added the OVERLAP_BIAS and deltaMax... although I'm not sure I did it correctly. The player still falls through the floor when jumping off certain ledges. Is deltaMax supposed to set a maximum rate they can fall? I also reduced the size of the tiles and the game seems to run a little smoother.

Link to comment
Share on other sites

deltaMax is a per-frame velocity, so it could be something like {x: 15, y: 15}. Or you could use body.maxVelocity instead.

The default OVERLAP_BIAS is 4. You could try raising it to 8, 10, 15, etc.

See if you can combine Tilemap layers or hide any empty ones.

Link to comment
Share on other sites

Brilliant. I was not using deltaMax correctly. i was doing deltaMax = 10. now that I've done the object it works great. Making the tiles smaller seems to have helped but now I need to make tweaks to improve it further, like combining Layers.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...