News for hackers. Stuff that matters.
Re:A recreation of the first level of Super Mario Bros. in P... by justinmeister on Sunday February 23, 2014 @12:09PM (#7286537)
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 , I knew basically nothing about making a platformer before this project. I still have a lot to learn.

Re:A recreation of the first level of Super Mario Bros. in P... by doorhammer on Sunday February 23, 2014 @02:34PM (#7287207)
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 )

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/

Re:A recreation of the first level of Super Mario Bros. in P... by fekberg on Saturday February 22, 2014 @07:38PM (#7284398)
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...

Re:A recreation of the first level of Super Mario Bros. in P... by userbinator on Saturday February 22, 2014 @07:20PM (#7284329)
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.
Re:A recreation of the first level of Super Mario Bros. in P... by Pacabel on Saturday February 22, 2014 @11:42PM (#7284953)
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.

Re:A recreation of the first level of Super Mario Bros. in P... by moccajoghurt on Saturday February 22, 2014 @07:58PM (#7284458)
>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?

That's what I thought too.

Not sure why it's getting as much attention. Maybe because it's the combination of Python and Super Mario. A very popular language combined with a very popular game and a breeze of nostalgia.

However it's a fun little project but being on the HN frontpage is a little too much attention for something like that.

Re:A recreation of the first level of Super Mario Bros. in P... by userbinator on Saturday February 22, 2014 @08:14PM (#7284510)
Going the opposite direction would be much more deserving IMHO; e.g. trying to fit a Flappy Birds clone in a few hundred bytes or something like that.
Re:A recreation of the first level of Super Mario Bros. in P... by _random_ on Sunday February 23, 2014 @07:29AM (#7285727)
That would require skills. Also it's not "fun". It's not "fun" to be caring about optimizations or type-safety or general correctness and elegance.
Re:A recreation of the first level of Super Mario Bros. in P... by TeMPOraL on Sunday February 23, 2014 @01:08PM (#7286772)
> Also it's not "fun".

But it is fun. It's called "working for hack value"!

Re:A recreation of the first level of Super Mario Bros. in P... by greggman on Sunday February 23, 2014 @09:00AM (#7285900)
Not sure about python but there's plenty of those in JavaScript. Here's one

http://js1k.com/2014-dragons/demo/1659

I'm defining a few as 10 :P

Re:A recreation of the first level of Super Mario Bros. in P... by peterkelly on Sunday February 23, 2014 @12:26AM (#7285040)
I think it was just something the guy did for fun. It wasn't meant to be a super-optimised piece of code.

Also man hours are now a lot more valuable than CPU time. This is why people use things like python instead of coding in assembler, as would have been done for the original.

Re:A recreation of the first level of Super Mario Bros. in P... by pikachu_is_cool on Saturday February 22, 2014 @09:52PM (#7284719)
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/

https://love2d.org/

Re:A recreation of the first level of Super Mario Bros. in P... by doorhammer on Sunday February 23, 2014 @02:18PM (#7287137)
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.
Re:A recreation of the first level of Super Mario Bros. in P... by huskyr on Saturday February 22, 2014 @08:13PM (#7284504)
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...

Re:A recreation of the first level of Super Mario Bros. in P... by emehrkay on Saturday February 22, 2014 @08:30PM (#7284550)
thank you. I was on the way to making a virtual environment and pip installing it
Re:A recreation of the first level of Super Mario Bros. in P... by paines on Sunday February 23, 2014 @03:14AM (#7285307)
Thanks mate
Re:A recreation of the first level of Super Mario Bros. in P... by Spittie on Saturday February 22, 2014 @06:56PM (#7284222)
DMCA takedown in 3, 2, 1...

Still a cool project anyway.

Re:A recreation of the first level of Super Mario Bros. in P... by sheetjs on Saturday February 22, 2014 @07:15PM (#7284309)
https://github.com/Diogenesthecynic/FullScreenMario is still there, even after a legal complaint from Nintendo.
Re:A recreation of the first level of Super Mario Bros. in P... by Spittie on Saturday February 22, 2014 @07:20PM (#7284330)
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.

Re:A recreation of the first level of Super Mario Bros. in P... by dsirijus on Sunday February 23, 2014 @01:33AM (#7285147)
You're not very funny.
Re:A recreation of the first level of Super Mario Bros. in P... by guidedlight on Sunday February 23, 2014 @06:12AM (#7285569)
The only thing that infringes copyright are the images and music... And those can be sourced very easily. So if he removes those, he should be fine. Those images could easily be replaced with placeholders too.
Re:A recreation of the first level of Super Mario Bros. in P... by baddox on Saturday February 22, 2014 @07:11PM (#7284286)
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.
Re:A recreation of the first level of Super Mario Bros. in P... by baddox on Saturday February 22, 2014 @07:12PM (#7284291)
Also the palette shifting that they used to get different colors out of the same assets.
Re:A recreation of the first level of Super Mario Bros. in P... by pekk on Saturday February 22, 2014 @08:55PM (#7284598)
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?
Re:A recreation of the first level of Super Mario Bros. in P... by undershirt on Sunday February 23, 2014 @12:09AM (#7285013)
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.

Re:A recreation of the first level of Super Mario Bros. in P... by baddox on Sunday February 23, 2014 @06:53PM (#7288296)
I'd like to see it because it would be cool. Why implement the game at all in another language? Why not just play the game on the Nintendo, or distribute a ROM for use with an emulator?
Re:A recreation of the first level of Super Mario Bros. in P... by defen on Saturday February 22, 2014 @09:41PM (#7284693)
Textbook skeuomorphism.
Re:A recreation of the first level of Super Mario Bros. in P... by pekk on Saturday February 22, 2014 @08:53PM (#7284593)
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.
Re:A recreation of the first level of Super Mario Bros. in P... by PhasmaFelis on Saturday February 22, 2014 @09:22PM (#7284647)
Nintendo seems to be pretty lenient about non-profit fangames, actually. Mari0 (http://stabyourself.net/mari0/) and Super Mario Bros. Crossover (http://www.explodingrabbit.com/games/super-mario-bros-crosso...) have both gotten a lot of media attention without any legal issues I'm aware of.
Re:A recreation of the first level of Super Mario Bros. in P... by atanasb on Saturday February 22, 2014 @08:13PM (#7284505)
Re:A recreation of the first level of Super Mario Bros. in P... by kbar13 on Saturday February 22, 2014 @08:24PM (#7284542)
Re:A recreation of the first level of Super Mario Bros. in P... by sitkack on Sunday February 23, 2014 @02:17PM (#7287131)
Code is still clean, just has the wrong name.
Re:A recreation of the first level of Super Mario Bros. in P... by Daiz on Sunday February 23, 2014 @04:33AM (#7285397)
https://github.com/justinmeister/Mario-Level-1/blob/master/d...

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/

Re:A recreation of the first level of Super Mario Bros. in P... by gahahaha on Sunday February 23, 2014 @04:39AM (#7285407)
He talks about it extensively in the video on the site, and I think he agrees with you that tilemaps would be preferable.
Re:A recreation of the first level of Super Mario Bros. in P... by hernamesbarbara on Saturday February 22, 2014 @07:19PM (#7284326)
No way. This is awesome. Any plans to do other Mario levels or other classic games?
Re:A recreation of the first level of Super Mario Bros. in P... by austinstorm on Sunday February 23, 2014 @12:51AM (#7285076)
Neat project! You should to tutorials - it's a great learning example
Re:A recreation of the first level of Super Mario Bros. in P... by justinmeister on Sunday February 23, 2014 @12:12PM (#7286548)
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...
Re:A recreation of the first level of Super Mario Bros. in P... by rjzzleep on Sunday February 23, 2014 @10:11AM (#7286085)
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.

Re:A recreation of the first level of Super Mario Bros. in P... by chongli on Sunday February 23, 2014 @10:18AM (#7286102)
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.

Re:A recreation of the first level of Super Mario Bros. in P... by stefan_kendall on Saturday February 22, 2014 @06:57PM (#7284226)
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?

Re:A recreation of the first level of Super Mario Bros. in P... by pnewman2 on Saturday February 22, 2014 @07:08PM (#7284272)
This may qualify as fair use, and in any case it's not like this is going to jeopardize sales of the 29 year-old Super Mario Bros or any of it's derivatives.
Re:A recreation of the first level of Super Mario Bros. in P... by stefan_kendall on Saturday February 22, 2014 @07:12PM (#7284293)
If your position is "may", you're on shaky legal ground at best. Regardless, he would be forced to shutter his side project with a CnD, since I doubt he's willing to go to court.
Re:A recreation of the first level of Super Mario Bros. in P... by jwdunne on Saturday February 22, 2014 @07:41PM (#7284414)
Who gives a shit about shaky legal ground? How will a CnD shutter his side project? Could just take it offline and continue to build it. I doubt Nintendo are going to go through the lengths to force him to destroy a .py file or two...

It's as if every line of code written needs to be useful. I'm seeing this more and more. Many cool projects are criticised based on how useful they are rather than how cool they are. Maybe if a project was positioned as useful/sellable, then perhaps such criticism is justified, but when something is obviously not meant for sell and has obviously been built for all except seriousness, it just comes across as daft.

Just the other day I saw a comment about an embedded PHP interpreter. "How will this EVER be useful?" Who gives a shit? It looks fun to write, so it was written.

I personally enjoy programming. Most code I have written has made me 0 money, has been seen by 0 eyes and has provided me hours of fun and pleasure in writing it. I'm sure many programmers are the same.

Re:A recreation of the first level of Super Mario Bros. in P... by sitkack on Sunday February 23, 2014 @02:20PM (#7287147)
His homebrew version, for self education does way less harm than the millions of ROMs out there running on MAME. It is a single level, not a full clone that gets sold for profit at Target.
Re:A recreation of the first level of Super Mario Bros. in P... by gojomo on Saturday February 22, 2014 @10:28PM (#7284798)
A Derek Sivers post that appeared here recently goes over some of the rationale for copying-as-learning, and imperfect-copying as an essential part of creative work:

http://sivers.org/mirror

HN discussion (with more personal & famous historical examples):

https://news.ycombinator.com/item?id=7168467

Re:A recreation of the first level of Super Mario Bros. in P... by AJ007 on Saturday February 22, 2014 @07:14PM (#7284303)
Have you heard the story of how Commander Keen came about?
Re:A recreation of the first level of Super Mario Bros. in P... by samstave on Saturday February 22, 2014 @09:25PM (#7284654)
No, please educate me; this sounds interesting
Re:A recreation of the first level of Super Mario Bros. in P... by peterkelly on Sunday February 23, 2014 @12:19AM (#7285028)
http://en.wikipedia.org/wiki/Commander_Keen#Creation_and_dev...

John Carmack and John Romero developed a clone of Super Mario 3 for the PC using a smooth-scrolling technique that had never been achieved on the platform before.

They went and showed Nintendo, who weren't interested. So they changed the name, artwork, and levels and went off to start id software and all the money went to them instead.

Re:A recreation of the first level of Super Mario Bros. in P... by sebastianavina on Saturday February 22, 2014 @07:02PM (#7284246)
for the sake of learning?

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

Re:A recreation of the first level of Super Mario Bros. in P... by Patrick_Devine on Saturday February 22, 2014 @07:35PM (#7284392)
Exactly. You do it for the same reason why people try to paint famous works of art. You get to really see many of the pain points that the original artist went through and connect with something on a different level unlike any casual observer.

In this case, the medium that is being used for the implementation is different, but you still get to solve many of the same problems.

Re:A recreation of the first level of Super Mario Bros. in P... by stefan_kendall on Saturday February 22, 2014 @07:11PM (#7284288)
133 commits? And you have to violate copyright or trademark to learn? Please.
Re:A recreation of the first level of Super Mario Bros. in P... by notsrg on Saturday February 22, 2014 @07:28PM (#7284365)
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.
Re:A recreation of the first level of Super Mario Bros. in P... by sebastianavina on Saturday February 22, 2014 @07:28PM (#7284367)
most of the commits are done on the last days... some of them are just some line changes... (https://github.com/justinmeister/Mario-Level-1/commit/586b96...) I code on my free time too, On the night I turn on my laptop and code for a couple hours, I am a bussiness owner, most of my day is related with other activities, and I just want to think in another thing and relax. Coding it's the perfect choice, but you need a project to feel motivated, something not related with your day work and something easy enough to be accomplished in a couple days (so you can fell your progress and feel proud). I see he completed level 1, my intuition says he won't go more far away to another level, because he just got the satisfaction he needed. Probably now he will choose another project and develop it.
Re:A recreation of the first level of Super Mario Bros. in P... by krisdol on Saturday February 22, 2014 @07:19PM (#7284324)
Because he can? I know the word "hack" is meant very lightly on this site but creating for the sake of creating falls under that nomer