games50 / mario Goto Github PK
View Code? Open in Web Editor NEWLecture examples for Lecture 4: Super Mario Bros.
Lecture examples for Lecture 4: Super Mario Bros.
The GenerateTileSets function in src/Util.lua wrongly splits the quads.
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
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
mario/mario/src/states/entity/PlayerFallingState.lua
Lines 25 to 26 in c1733f3
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.