Live data from Hacker News

Pyxel: A retro game development environment in Python

github.com

31–40 of 65 posts

Re: Pyxel: A retro game development environment in Python

#31
post #13

Cool for learning to program games. Development environments in the 80's and 90's were so simple that you had to program down to every pixel shown on the screen (well, maybe calling some line and sprite primitives for speed), so you only needed to learn a small mental model for programming, and everything above it was designed by you. Also, the primitive hardware and no expectations of portability meant that you only…

Actually, programming homebrew for the NES and SNES, I was surprised by how similar my experience was to learning OpenGL. You can't plot individual pixels on hardware like that, you have to fill CHR memory (like textures) and create arrays of sprite data (like triangles) to upload to the hardware accelerated unit of the console. While it's totally true that you had to be very "close to the metal" in everything you do…

Modern hardware still works much the same, writing bytes to hardware that handles graphics generation, albeit today's are vastly more complex and SIMD-oriented. The key difference is these consoles lacked a framebuffer; RAM at the time was very expensive.

Re: Pyxel: A retro game development environment in Python

#34

Awesome stuff. Just spent 20 minutes with my 4 year old tweaking settings in the platformer example to see what the results would be. He loved it. Way more fun (for him) than the other day when he asked what the modulo operator was. It bums me out that the economics of indie games are so awful. The kid in me wants, so badly, to make a gigantic, sprawling version of Zelda or a dungeon crawler. But there's no way I can…

> But there's no way I can justify the time investment.

It's fun. People build gigantic, sprawling model train sets in their attics over the course of years, not to sell them or to have many people play with them, but just for the fun of building something.

Re: Pyxel: A retro game development environment in Python

#35
post #9

Cool for learning to program games. Development environments in the 80's and 90's were so simple that you had to program down to every pixel shown on the screen (well, maybe calling some line and sprite primitives for speed), so you only needed to learn a small mental model for programming, and everything above it was designed by you. Also, the primitive hardware and no expectations of portability meant that you only…

Sure, flat bitmap modes existed, but no game I ever worked on used them. Plus they weren't conceptually simple, either. On PC there was Mode X, which was so convoluted that I'm grateful to have forgotten how it works. Before that, on C64, you'd generally build the game background out of a redefined character set, but some of the color bits would be read from a different part of memory. Setting a pixel in bitmap mode…

And on a ZX Spectrum display, the horizontal lines were not contiguous in memory - you would get the 1st line, then the 9th, then the 17th.. then after you got one third down the screen it would jump to the 2nd, then the 10th.. a right pain to program! Explains the weird loading screen effect, when the data would be loaded so slowly you could see it drawing in that odd pattern.

Example: http://whatnotandgobbleaduke.blogspot.com/2011/07/zx-spectru...

And the icing on the cake being the colour information was stored sequentially at the end on an 8x8 pixel block basis!

Re: Pyxel: A retro game development environment in Python

#36

Having had a quick look through, I think I'm going to spend some time playing around with this... I think that simple game engines are really important to getting young people into programming. I have two step-sons (11 and 17), both of who are into gaming, but the elder one showed a bit of interest in programming when he was 11-12, but the problem (I think) is that the games they are playing are light-years away from…

I was in the generation between you and your kids. We had amazing games like Quake and Half-Life but we also had the awesome Qbasic games community.

There used to be entire sites hosting Qbasic games, many of which were often simple puzzles that had a very unique artistic style and charm to them that was worthy in its own right. They also often came with the source, which let you dig right in, try to modify it for more lives, etc. Qbasic games weren't much to look at compared to the budding photorealism of commercial games, but the constraints imposed upon them by the already-aging Qbasic platform forced developers to come up with some truly cool stuff that maxed out what it was capable of doing. Wetspot 2 and Ghini Run come to mind, as well as countless raycaster tests I built entire worlds within.

There hasn't been anything like it since, with the unique intersection of constrained tooling that creates a distinctive style, a strong community, and an easy to learn programming language. Pico 8, love, and this may come close to recapturing that magic.

Re: Pyxel: A retro game development environment in Python

#38
post #25

Since it seems that many people here are unaware, so let me introduce Pico-8, the "Fantasy Video Game console" that is referenced in Pyxel's README as an inspiration: https://www.lexaloffle.com/pico-8.php Pico-8 is (AFAIK) the program that kicked off a trend of simple game engines, and it is by far the most popular. A popular game that came out this year, Celeste, was originally a Pico-8 game that proved popular enou…

Building on your reply, I have found that Processing (Java) and P5 (JavaScript) have a similar easy-to-use design and the documentation is decent. (It's not opinionated on the color palette though.) I've been using P5 to write retro video games to learn JavaScript, and it's been a lot of fun using that to learn JS. (Vanilla JS sucks, but the learning process is at least fun). https://processing.org https://p5js.org

oh man, processing. i did a weeklong video game programming "camp" back when i was in middle school and processing was the language we used. definitely easy to pick up and use.

Re: Pyxel: A retro game development environment in Python

#39
post #25

Since it seems that many people here are unaware, so let me introduce Pico-8, the "Fantasy Video Game console" that is referenced in Pyxel's README as an inspiration: https://www.lexaloffle.com/pico-8.php Pico-8 is (AFAIK) the program that kicked off a trend of simple game engines, and it is by far the most popular. A popular game that came out this year, Celeste, was originally a Pico-8 game that proved popular enou…

I wanted to play around with LUA so I used pico-8 as an excuse to dabble. I made this after a few days: https://www.lexaloffle.com/bbs/?tid=28402

At launch screen, use arrow keys for level up/down, lives up/down (q to enable "rapid fire" cheat) ... start game with either "z" or "x" key.

Pico-8 uses 2 buttons primarily -- keys are mapped to "z" and "x" ... when playing, z will do fastest-sampling fire and x will do regular firing (this is most noticeable after using the q cheat.)

If you use the q cheat -- the score will not count toward the high score.

I stopped developing for pico-8 as I get it that some of the constraints are artificial, but I feel some are just too restrictive (like volume level on sounds). It's a fun little system with everything you need to use it built in. Some people have done some incredible things within the limitations of the system.

Re: Pyxel: A retro game development environment in Python

#40

Earlier quoted context omitted.

Is PyGame flaky these days? I haven't much played with it in quite some time; it used to be pretty solid, although as I recall it wasn't much more than a wrapper for SDL 1.2 at the time.

It's never been really solid in my experience; it crashes when it fails and its difficult to build due to the heavy use of cython. See, for example how kivy has moved away from using it as a backend https://github.com/kivy/kivy/issues/5590

Pygame is mostly C. Cython is not used.
Post reply on HN