GithubHelp home page GithubHelp logo

mario's People

Contributors

coltonoscopy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mario's Issues

Player can't jump over columns in higher FPS settings

Hello,

This is a recurring issue, as already discussed within fifty-bird: games50/fifty-bird#2
As I explained there, the physics of the gravity calculation is wrong, and causes the gravity to be "too strong" for machines that run with FPS higher than 60

In this repo the mistake happens here

self.player.dy = self.player.dy + self.gravity
self.player.y = self.player.y + (self.player.dy * dt)

when adding the gravity to the player's dy it is not multiplied by dt, and the dy is decreased by gravity every frame, when the frame rate is higher, the gravity is stronger and at my machine (144 fps) the player simply can't jump over columns

as with fifty-bird, I prefer to suggest a solution and not just complain, see my Pull Request: #4

Wrong tile quad split

The GenerateTileSets function in src/Util.lua wrongly splits the quads.

Screenshot from 2020-09-29 21-35-32

This is the picture of all quads in gFrames['tilesets'][1].

It can be easily fixed by changing line number 54 and 55 in src/Util.lua
from this
for y = sizeY * (tilesetY - 1) + 1, sizeY * (tilesetY - 1) + 1 + sizeY do
for x = sizeX * (tilesetX - 1) + 1, sizeX * (tilesetX - 1) + 1 + sizeX do

to this
for y = sizeY * (tilesetY - 1) + 1, sizeY * (tilesetY - 1) + sizeY do
for x = sizeX * (tilesetX - 1) + 1, sizeX * (tilesetX - 1) + sizeX do

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.