11 ms·
PyNES: Write NES Games in Python
- carlesfe 11y agoThanks! I've always wanted to write a NES game and I guess it's easier to begin once you have some code written. This is a nice first step for beginners.
- shrikant 11y agoIs the name a deliberate attempt to sound like "penis"? I'm asking because it reminds me of the first NES emulator I ever used, which went by the name of NESticle! https://en.wikipedia.org/wiki/NESticle https://en.wikipedia.org/wiki/NESticle
- rexignis 11y agoDo you pronounce Py as 'pee'? If so that's interesting. Py is pronounced 'pie' in my head and when I occasionally say it aloud.
- ConnorG 11y agoThe name of that emulator coinciding with the word testicle was on purpose right? I'm just glad I wasn't the only one who thought this back then.
- cobralibre 11y agoA Google Images search for "nesticle icon" should clear up any doubt.
- tdicola 11y agoI doubt it, lots of python projects stick 'Py' on the front. PyGame, Pyglet, PyQT, etc.
- catshirt 11y agoyes, and "Pyglet" shows that the Py preface does not always follow the hard Y sound of Python. so we can get pretty close, we might be able to pronounce it "pinnis".
- mod 11y agoYeah, you can pronounce it that way if you want, and you could say "pie-glet," too--it doesn't mean it was a 'deliberate attempt.'
- gutomaia 11y agoIf it does pronounce that way in your language, it was just coincidence. By the way, NESticle was a great emulator back then. Wroted in assembly and used to run flawless on my 486!
- pjonesdotca 11y agoObligatory Ruby cousin https://github.com/remore/burn https://github.com/remore/burn
- deleted 11y ago[deleted]
- acidx 11y agoThe presentation gutomaia did on PyNES at PythonBrasil had a slide deck written using this tool.
- curiousjorge 11y agowish I could do this for the original Sony Playstation 1
- m_eiman 11y agoI think is an amazingly absurd project, in a good way :)
- ionforce 11y agoWhat is absurd about it?
- monitron 11y agoWell, to start with, it targets a long-dead platform. It also skips multiple steps, allowing a system that was always programmed in an extremely low level language (assembler) to be programmed in one of the highest-level languages in common use (Python). For the record I love the idea.
- chongli 11y agoPython may be high level in terms of relative distance to the hardware but it's not particularly high level in terms of the abstractions available. If you watch the video on the site linked you'll see that the programming style is not all that different from what you'd see if you were programming the NES in C.
- gluelogic 11y agoThe idea of programming the NES in C is still a little out there. People have made plenty of efforts in that area but it never seems to "stick." Seems to me like it makes the most sense to just go with 6502 if one is serious about fooling around with the NES.
- trymas 11y agohttps://github.com/gutomaia/pyNES/wiki https://github.com/gutomaia/pyNES/wiki Non existant docs. IMHO one of the first steps of starting a project is to write a README. Though, at least there are few examples: https://github.com/gutomaia/pyNES/tree/0.1.x/pynes/examples https://github.com/gutomaia/pyNES/tree/0.1.x/pynes/examples
- PostOnce 11y agoYes, lamentable, but we all know the fun part is writing the code, not the docs, and obviously this was a for-fun project. Maybe someone else can document it if the creator doesn't have time. At any rate, I'm happy it exists, getting a toy game running on actual hardware will be hilariously fun for me, if it works. I don't mind using the code as the documentation for something this obscure if docs aren't available. Better than having to spend time learning 6502 assembly just for screwing around with NES games (or NES demoscene, hmm... it's probably cheating but it'll be fun.)
- gutomaia 11y agoThanks. Sorry for the lack of documentation. The first version (Branch 0.1.x) was more focused as a proof of concept. Despite the examples, after some time I found several limitations. That lead to a branch (kill_the_baby), witch i've restarted the project. Well, lack of documentation first started due the constant changes over the time. pyNES 0.2.x will have a more mature API and a DOC.
- shultays 11y agoI semicompleted a game in NES in C, and even I was hitting walls constantly when it comes program size or performance. I have my doubts for python. Here is the library I used. http://shiru.untergrund.net/articles/programming_nes_games_in_c.htm http://shiru.untergrund.net/articles/programming_nes_games_i... It is pretty simple but you will need some about how NES works.
- bbayer 11y agoI think it uses Python as frontend and compiles 6502 assembler from the code. Generated assembly can be easily edited to overcome problems.
- gered 11y agoIt could be edited yes, but I'd assume once you change some Python code and recompile you'd lose your assembly tweaks. Not the end of the world I guess, but annoying if you're really trying to tweak things for maximum performance. All part of the trade off when using a high-level language for an extremely resource limited system such as the NES I suppose.
- DarkTree 11y agoI would love this so much if I could figure it out. I'm a javascript programmer, but haven't done much with Python. I'd like to write a small, arcade-style game with python though. Does anyone know anything else like this? Is PyGame fun to work with?
- eru 11y agoI used PyGame ten years ago. Was fun back then.
- gluelogic 11y agoPygame is very fun to work with and it's so easy. I stopped using it for game development (switched to web-based HTML5 stuff) but it is still an amazing wrapper over SDL. I recently used it to write a quick version of an image evolver. (an example of what I'm talking about: http://alteredqualia.com/visualization/evolve/ http://alteredqualia.com/visualization/evolve/) If I ever want to bust out a quick graphical/audio application I use Pygame.
- aninteger 11y agoThere's also javagrinder https://www.mikekohn.net/micro/java_grinder.php https://www.mikekohn.net/micro/java_grinder.php which can run some java code on the TI-99/4a, C64, and Sega Genesis by translation of java class files to equivalent platform machine code.
- Keyframe 11y agoI forgot what is the name of using one language like that to emit other (DSL like). For example writing Lisp (or Python) to actually write C programs or asm. I think GOAL was used like that? Any resources (existing projects) about that? I'm not talking about 'compiling' from one language to another where you get to handle the baggage of the originating language as well through extra code, but more like fancy macro text processing.
- emodendroket 11y agoIsn't the fun of writing NES software basically doing it like guys would have done in the 80s? If you want to do something modern why even target a platform that hasn't been manufactured for decades?
- dethstar 11y agoYou could argue that you want to play your games on this http://www.analogueinteractive.com/products/analogue-nt-information http://www.analogueinteractive.com/products/analogue-nt-info...
- xhrpost 11y agoI haven't looked over the project extensively but I'm thinking it may bridge the gap for programmers or newcomers who are not familiar with assembly. You could of course just program a modern game in Python but then you're probably looking at a tech stack. I think this type of game design could be a great starting point as all you need exists in the given environment. I've recently been mulling the idea of an NES programming environment in the browser.
- gdulli 11y agoGetting stuff working in a low-level environment is one kind of fun and working in a high-level language where you only have to think about the logic is another kind of fun. Every programmer should get to experience both kinds of fun in their career. And they can decide which one they like better and want to focus on.
- krelian 11y agoTo me the most fun thing about this project is that it looks like a terrific tool for learning and understanding how to write (this particular) assembly language.
- bhz 11y agoI was hoping this was an update to this project; bugfixes, or more examples, or docs. Very cool that this exists though. @emodendroket "Isn't the fun of writing NES software basically doing it like guys would have done in the 80s?" - I did stuff in the 80s, there was nothing fun about having to leave comments out of your code for the lack of memory, or using a clumsy compiler and/or editor. Cross-compiling is the way to go! Just making these old systems do things is the point, and keeping them alive.
- stuaxo 11y agoAwesome, does it work in shedskin ? I remember them using a C64 emulator as one of the examples.
- deleted 11y ago[deleted]
- salexkidd 11y agoIt's so nice project!!