
A recreation of the first level of Super Mario Bros. in Python - cacois
https://github.com/justinmeister/Mario-Level-1
======
justinmeister
So I created this project (I just found out this morning someone posted it
here).

To answer a few questions:

1) DMCA/Copyright: I have no idea the legal grounds for this sort of project.
There is an Javascript/HTML5 version of Mario that is much better and more
complete than mine and it still exists on Github. If I get a takedown notice,
I suppose the only people who lose out are people other than me who want to
check it out. I'm not too concerned either way, to be honest.

2) Memory / CPU issues: Anyone concerned about these issues wouldn't make a
game in Python and Pygame. I'm just a hobbyist who enjoys the language and the
particular library I used.

3) Audio Latency: That is purely from the screen recording. There is no
latency when you play it on your machine (to my knowledge).

4) Purpose of this project: I have been programming for 7 months, 2 of which I
spent on this project. I never expected this project to get this much
attention, but I suppose the cross-over appeal of Python and Mario is quite
high. Fundamentally this was a learning activity to create something I thought
was cool. Like I explained here:
[http://www.youtube.com/watch?v=HBbzYKMfx5Y](http://www.youtube.com/watch?v=HBbzYKMfx5Y)
, I knew basically nothing about making a platformer before this project. I
still have a lot to learn.

~~~
doorhammer
So my two cents. Awesome job. I wouldn't have been able to approach anything
like this five months after I started teaching myself to code.

I don't know how anyone could watch the vid and be so cynical about the choice
of game, language or library. It's a clear example of autodidactic
exploration.

Have you seen the portal gun mario? [1] (I hadn't until five minutes ago; link
stolen from a comment down the page here:
[https://news.ycombinator.com/item?id=7284719](https://news.ycombinator.com/item?id=7284719)
)

Might be interesting to think of different and/or bizarre ways you could
potentially alter the game mechanics as you go along to create a new
experience. I like those kinds of exercises because they help me think about
structuring things in a decoupled way so I can arbitrarily modify part of the
mechanics without having to rewrite everything. Might be a cool/informative
exercise if you keep playing with the game.

Either, cool project.

[1] [http://stabyourself.net/mari0/](http://stabyourself.net/mari0/)

------
fekberg
I'm impressed! The code is well structured and you're using Python and PyGame,
which is awesome! Well done!

For anyone wanting to learn Python and PyGame I'll just leave this here:
[http://pluralsight.com/training/Courses/TableOfContents/game...](http://pluralsight.com/training/Courses/TableOfContents/game-
programming-python-pygame)

------
userbinator
So you took a game that used to take a few dozen KB of memory and an 8-bit CPU
running at less than 2MHz, and turned it into one requiring many orders of
magnitude more memory and CPU speed? I'm impressively disturbed.

~~~
Pacabel
It's a shame that you're getting voted down for making a very valid and
truthful comment.

It really isn't impressive when we see 1980s-era games recreated in
JavaScript, for example, and the same should be true when dealing with Python.

That's not to say that this effort lacks value. The author likely enjoyed
working on it, and maybe learned something while working on it, too. It could
be a useful reference work for those getting started with Python or PyGame, as
well. But we surely should not be impressed by it in any way.

------
pikachu_is_cool
Personally, I prefer mari0. It's mario with a portal gun.

It's written in Lua using LÖVE, it's really cool.

[http://stabyourself.net/mari0/](http://stabyourself.net/mari0/)

[https://love2d.org/](https://love2d.org/)

~~~
doorhammer
Whoa. Glad I came in here if for no other reason than to see this. I always
get a kick out of people copying quirky new mechanics onto other games to see
what happens.

------
huskyr
For anyone having trouble to run this on OS X Mavericks, you need this pygame
binary:

[http://www.pygame.org/ftp/pygame-1.9.2pre-
py2.7-macosx10.7.m...](http://www.pygame.org/ftp/pygame-1.9.2pre-
py2.7-macosx10.7.mpkg.zip)

~~~
emehrkay
thank you. I was on the way to making a virtual environment and pip installing
it

------
Spittie
DMCA takedown in 3, 2, 1...

Still a cool project anyway.

~~~
sheetjs
[https://github.com/Diogenesthecynic/FullScreenMario](https://github.com/Diogenesthecynic/FullScreenMario)
is still there, even after a legal complaint from Nintendo.

~~~
Spittie
But they did have to close the site. And I guess that Nintendo could easily
bring them to court and win (not that they will, it's a small non-profit
target).

My comment was meant as a "funny" way to say that Nintendo is usually very
unforgiven with clones of their games.

~~~
dsirijus
You're not very funny.

------
baddox
I would have liked to see all the sound and music done with FM synthesis (or
whatever the Nintendo used) in Python as well, instead of .ogg files.

~~~
baddox
Also the palette shifting that they used to get different colors out of the
same assets.

~~~
pekk
Why do you want to see these things? These are adaptations to the platform
that the original game was developed on (and its limitations). What would be
the purpose of reproducing those limitations in a new implementation for a
completely different platform?

~~~
undershirt
I spent a year remaking Pac-Man and many of its peculiarities. (Namco shut it
down on github, while a thousand other pacman remakes there remain.)

Games will be considered a form of art someday. And it is the whole form of an
art piece that is important (i.e. the medium, inner workings, presentation).
In the future, the innards of classic games may become increasingly important,
perhaps from an anthropological perspective. When video games become centuries
old, I feel they will be artifacts of an emergent art form.

------
pekk
Would providing alternative art/music and not using the Mario trademark make
this legally safe? If the project is serious about continuing, I am sure any
number of people would be willing to help out with legally acceptable
replacements.

~~~
PhasmaFelis
Nintendo seems to be pretty lenient about non-profit fangames, actually. Mari0
([http://stabyourself.net/mari0/](http://stabyourself.net/mari0/)) and Super
Mario Bros. Crossover ([http://www.explodingrabbit.com/games/super-mario-bros-
crosso...](http://www.explodingrabbit.com/games/super-mario-bros-crossover))
have both gotten a lot of media attention without any legal issues I'm aware
of.

------
atanasb
[https://github.com/justinmeister/Mario-
Level-1/blob/master/d...](https://github.com/justinmeister/Mario-
Level-1/blob/master/data/tools.py) Line 134 & 135\. Lol?

~~~
kbar13
You can highlight multiple lines: [https://github.com/justinmeister/Mario-
Level-1/blob/master/d...](https://github.com/justinmeister/Mario-
Level-1/blob/master/data/tools.py#L134-L135)

~~~
sitkack
Code is still clean, just has the wrong name.

------
Daiz
[https://github.com/justinmeister/Mario-
Level-1/blob/master/d...](https://github.com/justinmeister/Mario-
Level-1/blob/master/data/states/level1.py)

Why on Earth would you create the level like this instead of using something
like Tiled[1]? Pretty much everything you can make a game with has support for
TMX tilemaps, and if not making basic support yourself shouldn't be too hard
either, and ultimately way less effort.

[1] [http://www.mapeditor.org/](http://www.mapeditor.org/)

~~~
gahahaha
He talks about it extensively in the video on the site, and I think he agrees
with you that tilemaps would be preferable.

------
hernamesbarbara
No way. This is awesome. Any plans to do other Mario levels or other classic
games?

------
austinstorm
Neat project! You should to tutorials - it's a great learning example

~~~
justinmeister
I feel like I'm not knowledgeable or experienced enough to write tutorials,
but I wrote a list of resources people might use if they want to get into
pygame on reddit:
[http://www.reddit.com/r/Python/comments/1ymn1w/i_recreated_t...](http://www.reddit.com/r/Python/comments/1ymn1w/i_recreated_the_first_level_of_super_mario_bros/)

------
rjzzleep
does that huge lag bother anyone?

it might just be an out of sync screen recording, but it seems to me like
there is an input lag.

~~~
chongli
The real Super Mario Bros. feels that way as well. This is due to Mario's very
shallow acceleration curve. It's one of the main reasons the game is so
challenging to play!

Edit: After having watched the video, it appears to be out of sync and
dropping frames.

------
stefan_kendall
Maybe spend an afternoon learning up on copyright and trademark law.

Why would you spend so much time on something that clearly violates the
intellectual property of Nintendo?

~~~
sebastianavina
for the sake of learning?

EDIT: Also, if you check the commit history, I'm quite sure he didn't spend
way much time.

~~~
stefan_kendall
133 commits? And you have to violate copyright or trademark to learn? Please.

~~~
notsrg
I'm pretty sure you care more about this than Nintendo ever will. Get off your
high horse. As someone who has never used PyGame, this is really cool to look
into and learn from.

