cs50 / mario-demo Goto Github PK
View Code? Open in Web Editor NEWBasic Mario clone in LÖVE 2D
Basic Mario clone in LÖVE 2D
In the file Map.lua we can find the following comments :
-- 5% chance to generate a pipe
if math.random(20) == 1 then
-- 10% chance to generate bush, being sure to generate away from edge
elseif math.random(10) == 1 and x < this.mapWidth - 3 then
-- 10% chance to not generate anything, creating a gap
elseif math.random(10) ~= 1 then
Clearly, if an event occurs, the following ones can't occur. Using such statements lead to the following probabilities for the indicated events 5%, 9.5% and 8.55%.
I guess this is not much of a problem but it could mislead some people wanting to add related events.
anybody have this running the github lovedemo ? :
Error
push.lua:101: attempt to call field 'getPixelScale' (a nil value)
Traceback
push.lua:101: in function 'initValues'
push.lua:48: in function 'setupScreen'
main.lua:26: in function 'load'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
Mario-11 is outdated
hello i've this issue where i keep getting this
Error
main.lua:29: attempt to index global 'push' (a boolean value)
Traceback
main.lua:29: in function 'load'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
I don't understand what the problem is.
this is my render function:
function GameObject:render()
love.graphics.draw(gTextures[self.texture], gFrames[self.texture][self.frame], self.x, self.y)
end
your answer will be kindly appreciated
When I try to run my code written in lua, in sublime text, I see the follow error.
Error
main.lua:16: module 'class' not found:
no field package.preload['class']
no 'class' in LOVE game directories.
no file 'class' in LOVE paths.
no file '.\class.lua'
no file 'C:\Program Files\Love\lua\class.lua'
no file 'C:\Program Files\Love\lua\class\init.lua'
no file '.\class.dll'
no file 'C:\Program Files\Love\class.dll'
no file 'C:\Program Files\Love\loadall.dll'
Traceback
[C]: in function 'require'
main.lua:16: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
I am stuck here and cannot go ahead. I have googled the problem a lot but can't find a solution. Please help
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.