Hacker News new | past | comments | ask | show | jobs | submit login
Pyxel: A retro game engine for Python (github.com/kitao)
276 points by nateb2022 65 days ago | hide | past | favorite | 39 comments



A few years back I made some pyxel snippets for students in a class I was teaching, to help get them up to speed on using it: https://github.com/kris-classes/pyxel-snippets

They may be useful to someone here if not too much has changed with pyxel since then.


This is very useful. I tried Pyxel a few years ago, but it wasn't documented well. There were some resources in Japanese, but I don't know it, unfortunately.


These retro game engines are so much fun. Takes me back to the days of mode 13h.

Pyxel is (I think) unique among Python game engines in that it can run on the web.

Some others I’ve played with are PyGame and Arcade, mostly geared toward 2D, but you can see some impressive 3D examples on the youtube channel DaFluffyPotato.

Ursina is another that’s more 3D, fairly expressive, and runs fairly well for being Python.

I do feel like I’m going to be forced to cross over into something more powerful to build a real game though. Either Godot or Unity.


Panda3D [0] (which is what Ursina uses under the hood) and Pygame can both run on the web due to PygBag [1].

Truth be told you can build a game on any tool, obviously the tool you choose will help shape the game you make - but it's more about keeping at it then the underlying technology.

Personally I really like Panda3D and feel like it doesn't get enough attention. It's scene graph [3] is interesting because it splits it into nodes and nodepaths. A node is what gets stored in the graph but you manipulate them using the nodepaths which simplifies programming.

It also has a really amazing aync task manager [2] which makes game programming no problem. You can just pause in a task (or even a event) which sounds simple but you'd be suprised by who many engines won't let you do that.

It also has a multiplayer solution [6] that was battle tested for 2 mmos.

Finally I really like it's interval [4] system which is like Unreal or Unity's timeline but code based.

It's also on pypi [5] so super easy to install.

[0] http://panda3d.org/

[1] https://pypi.org/project/pygbag/

[2] https://docs.panda3d.org/1.10/python/programming/tasks-and-e...

[3] https://docs.panda3d.org/1.10/python/more-resources/cheat-sh...

[4] https://docs.panda3d.org/1.10/python/programming/intervals/i...

[5] https://pypi.org/project/Panda3D/

[6] https://docs.panda3d.org/1.10/python/programming/networking/...


harfang-wasm is a fork of pygbag.

harfang-wasm: https://github.com/harfang3d/harfang-wasm

pygbag: https://github.com/pygame-web/pygbag

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

> FWIU e.g. panda3d does not have a react or rxpy-like API, but probably does have a component tree model?

Is there a react-like api over panda3d, or are there only traditional events?

The redux DevTools extension also works with various non-react+redux JS frameworks.

Manim has a useful API for teaching. Is there a good way to do panda3d with a manim-like interface, for scripting instructional design? https://github.com/ManimCommunity/manim/issues/3362#issuecom...


I haven't used React so I'm not sure but you could check their discourse. Someone may have created one.

I believe using intervals and async tasks/events you could do something similar to Manim.


Stride game engine also exists and seems pretty ok. I've been trying to switch to it from Unity. Its C# based.


I made my first video game with it. A pong game you can play, but it has not been polished. While the menu works, is yet unable to show the selected option. And the IA to play against are either too easy or brutal.

https://blog.rmrubert.eu/miniproyectos/rpong/rpong.html


This is cool, I like the dynamics. Is the source code available? I'm curious how much effort went into this.


Not available, the source code is an absolute mess. It would only be useful as how you should not make a game.


Looks very cool.

I absolutely love that it uses a language I actually know instead of some niche thing or a DSL.

I'll have to check it out when I have some spare time.


Check out https://love2d.org/ if you ever change your mind on that.


I really wish there was a modern "computer console" like the Commodore 64 or Sinclair Spectrum of old, where you could boot straight into a programming environment.

Something comparable to the Nintendo SNES or DS's hardware capabilities, which seemed like the perfect sweet spot between artistic freedom and "helpful" limitations which actually improved creativity by lowering complexity.


One could argue the opposite. There are countless 'computer console' available at various low price ranges.

The closest thing today is RaspberryPI, and boot to a linux in text mode, you're basically there.

What is more difficult to find is the combo hardware/software, but the Pi 400 includes keyboard and a mouse comes with as a kit.

Just like in the old days, find a (~TV) cheap LCD monitor and plug and play.

And you have hundreds of games for free, thousands possibly with emulators etc. And you can program in virtually every languages on the planet.

If anything, what you have now paralysis by choice. There is just too much you can do with a basic computers, so you wind up on youtube and social medias instead of being bored with 1 compiler and 1 book.

ref: I grew up on ZX Spectrum+! :)


And you have the option to branch off into any other kind of development. A C64 Style clone is mostly nostalgia. A raspberry pi is presenting you (or your children) with dozens of ways to learn employable skills project based and in a fun way.


You might like the Commander X16. [1]

[1]: https://www.commanderx16.com/


Also the Foenix C256: https://c256foenix.com/

These kinds of projects are becoming more and more common in retrocomputing circles.


This might be a bit more complex. We like to remember that we were creative in C64 BASIC, but it is really too slow for any sprite-based game development. What's different between then and now is that changing the frame color used to be an event you told all friends about.

An intersection of simple and impressive - I feel like Raspberry Pi Pico and the likes embody this spirit nowadays.


You might enjoy the Pimoroni PicoSystem, or its HDMI bro, the PicoVision:

https://shop.pimoroni.com/products/picosystem?variant=323695...

https://shop.pimoroni.com/products/picovision?variant=410489...

(Not affiliated nor trying to sell it, the shop is just the best link for information.)

EDIT: Also it's not quite boot into IDE, but the vibe of both is similar in every other way.


Picotron [0] is looking like that. I am watching that project closely right now.

[0] https://www.lexaloffle.com/picotron.php


There are other fantasy computers, too. Check out https://github.com/paladin-t/fantasy.

An open issue [1] makes a point that MMIXX [2], which adds graphics to Knuth's MMIX, is a fantasy computer.

[1] https://github.com/paladin-t/fantasy/issues/109

[2] https://www.malgil.com/mmix/graphics/


Not quite what you meant, but close enough for a mention: The Playdate.

It's a platform specifically made for games (as opposed to a Raspberry Pi for example), has a library of great games and is ostensibly easy to develop for.


The ZX Spectrum Next is exactly this.


Also take a look at Circuit Playground Express. https://learn.adafruit.com/circuitpython-made-easy-on-circui...

It's a "computer" that boots straight to your program. MicroPython (I even did it with TinyGo), and you can make lights blink! But seriously... there's some very interesting stuff with it, and you can also add on another chip that lets you rock and roll with motors, speakers, etc. https://www.adafruit.com/product/3093


check out the Mega65: https://www.mega65.org


An absolutely fantastic engine in my experience. I've used it with students (rather than pygame) due to its bare bones nature. I love how with a simple class structure of update and draw, students can gain a tangible grasp of oop concepts as well as implementing their own ideas. 10/10


pico-8: Python Edition


This is a thing of beauty. Might try and make a little game with my teen kid.


Also give Pico-8 and Tic-80 a chance.


I feel like there’s way too much color for this to be ‘retro’. It seems you are limited to using 16 colors at once, but those colors are drawn from a 24-bit palette unless I’m missing something.


The palette is very reminiscent of the C64 default palette to me, though not exactly the same.

EGA also used 16 colors out of a possible 64 (although the the 16 colors from CGA were most often used), and the colors here also approximate a selection from the EGA palette: https://en.wikipedia.org/wiki/Enhanced_Graphics_Adapter#/med...


I think 16 colors is plenty retro enough. No need to make it artificially ugly.


No need for it to be ugly like CGA or EGA was ugly, plenty of retro computers had nice colors.


Can you name one that had a 24-bit palette?


Amiga AGA:

https://en.wikipedia.org/wiki/Amiga_Advanced_Graphics_Archit...

As contemporary of 8-bit arch's it seems retro enough to count.


Finally, a python game engine capable of running at 60fps ;)


Someone needs to make a python game engine counter


Python AND Rust so it doesn't run like total shiite


Python library with Rust backend*




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: