return to table of content

Pyxel: A retro game engine for Python

Razengan
12 replies
1d13h

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.

keyle
1 replies
1d12h

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+! :)

asyx
0 replies
1d11h

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.

Gormo
0 replies
1d6h

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

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

pindab0ter
0 replies
1d5h

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.

exitb
0 replies
1d9h

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.

b800h
0 replies
1d3h

The ZX Spectrum Next is exactly this.

extrabajs
5 replies
1d10h

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.

whywhywhywhy
2 replies
1d2h

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

extrabajs
1 replies
1d2h

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

Gormo
0 replies
1d6h

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

Aeolun
0 replies
1d9h

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

halfcat
4 replies
1d16h

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.

raytopia
2 replies
1d3h

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

westurner
1 replies
21h58m

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

raytopia
0 replies
19h19m

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.

kaibee
0 replies
1d5h

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

krp
1 replies
1d5h

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.

dr_kiszonka
0 replies
1d

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.

erremerre
1 replies
1d11h

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

grigy
0 replies
23h1m

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

VagabundoP
1 replies
1d6h

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

grugagag
0 replies
1d4h

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

LarsDu88
1 replies
1d11h

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

vgalin
0 replies
1d10h

Python library with Rust backend*

999900000999
1 replies
1d15h

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.

sgt
0 replies
1d

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

marksbrown
0 replies
1d6h

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

ilikehurdles
0 replies
1d12h

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

dinozarw
0 replies
1d12h

pico-8: Python Edition

AinoSpring
0 replies
1d9h

Someone needs to make a python game engine counter