Live data from Hacker News

PyNES: Write NES Games in Python

gutomaia.net

21–30 of 42 posts

Re: PyNES: Write NES Games in Python

#21

Isn'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?

I 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.

Re: PyNES: Write NES Games in Python

#23
post #6
post #5

I 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_i... It is pretty simple but you will need some about how NES works.

I think it uses Python as frontend and compiles 6502 assembler from the code. Generated assembly can be easily edited to overcome problems.

It 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.

Re: PyNES: Write NES Games in Python

#24

I 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 te…

Are you thinking of (a version of) Metaprogramming? As opposed to Transpiling.

Re: PyNES: Write NES Games in Python

#25

Isn'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?

Getting 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.

Re: PyNES: Write NES Games in Python

#26
post #24

I 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 te…

Are you thinking of (a version of) Metaprogramming? As opposed to Transpiling.

Indeed, albeit at compile time and not run time.

Re: PyNES: Write NES Games in Python

#27

Isn'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?

To 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.

Re: PyNES: Write NES Games in Python

#29

I 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 te…

Sometimes it's called code generation but I don't know if there's one official term for it.
Post reply on HN