Any interest in a Python shell for SDL 2.0?

I’ve just begun to develop a Python shell for SDL 2.0, with intended compatibility with Pygame:

https://bitbucket.org/pcraven/pysdl/wiki/Home

Interesting indeed, thanks for sharing it :slight_smile:

Yup, looks good! Are you working on texture support? It seems like SDL
2.0 is a better fit for Python in terms of how it handles textures vs
surfaces.On Fri, Feb 22, 2013 at 1:49 PM, pvc wrote:

**
I’ve just begun to develop a Python shell for SDL 2.0, with intended
compatibility with Pygame:

https://bitbucket.org/pcraven/pysdl/wiki/Home


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I hope to get texture support soon. I’m working slow now because my laptop is happy with SDL, but my desktop complains it can’t find “D3Dx9_44.dll”

So I can either develop slowly on my laptop or waste time trying to figure out why my desktop won’t load DirectX9. (The most recent DLL I can find for that is D3dx9_43.dll, not sure why my laptop works and not my desktop.)

I don’t know why it crash if the DLL is not present but I had the same
issue. To solve it I had to modify the dll search loop to make it begin at
43 instead of 50.

In SDL_render_d3d.c line 475:
for (d3dxVersion=43;d3dxVersion>0;d3dxVersion–)
instead of
for (d3dxVersion=50;d3dxVersion>0;d3dxVersion–)

The compile and SDL don’t crash anymore trying to load D3Dx9_44.dll. I
don’t know why this bug appens but for the moment it solves the issue.

Regards,On Sat, Feb 23, 2013 at 10:17 PM, pvc wrote:

**
I hope to get texture support soon. I’m working slow now because my laptop
is happy with SDL, but my desktop complains it can’t find “D3Dx9_44.dll”

So I can either develop slowly on my laptop or waste time trying to figure
out why my desktop won’t load DirectX9. (The most recent DLL I can find for
that is D3dx9_43.dll, not sure why my laptop works and not my desktop.)


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Jonathan Muller
http://www.pukogames.com

Thanks for the tip. I tried that and it got rid of my error, but my window still won’t draw anything. I’m not sure what is wrong with the setup on this machine.

Out of curiosity, what is wrong with Pygame2? In your comparison (on the
linked page), it is unclear which pygame you used (even though you mention
both).On Fri, Feb 22, 2013 at 10:49 PM, pvc wrote:

**
I’ve just begun to develop a Python shell for SDL 2.0, with intended
compatibility with Pygame:

https://bitbucket.org/pcraven/pysdl/wiki/Home


Ga?tan de Menten

I think he aims at source-level compatability with the original pygame.

Though using pgreloaded instead of hand-written cpp wrappers would’ve
sped up development.

http://code.google.com/p/pgreloaded/On Tue, Feb 26, 2013 at 2:39 PM, Ga?tan de Menten wrote:

Out of curiosity, what is wrong with Pygame2? In your comparison (on the
linked page), it is unclear which pygame you used (even though you mention
both).

./lxnt

Ga?tan de Menten wrote:

Out of curiosity, what is wrong with Pygame2? In your comparison (on the linked page), it is unclear which pygame you used (even though you mention both).

Good question. Reinventing the wheel is a classic mistake in software development.

I’d like an accelerated, drop-in replacement for pygame. Pygamereloaded does not offer this. I started by looking at the line algorithm for pygame reloaded, and got scared away after looking at it. It did not seem accelerated at all, and only supported a specification of line width if the line was horizontal or vertical.

I think a lot of classic pygame can be ported across. The drawing primitives and handling of surfaces and textures needs the most work. I’m hoping a lot of the rest won’t need much in the way of changes.

For people that really want the full SDL library experience I’ve started wrapping the SDL commands, just adding a thin layer for python compatibility. I think this could be handy for the more advanced developer.

pvc :

Ga?tan de Menten wrote:

Out of curiosity, what is wrong with Pygame2? In your comparison
(on the linked page), it is unclear which pygame you used (even
though you mention both).

Good question. Reinventing the wheel is a classic mistake in
software development.

I’d like an accelerated, drop-in replacement for pygame.
Pygamereloaded does not offer this. I started by looking at the line
algorithm for pygame reloaded, and got scared away after looking at
it. It did not seem accelerated at all, and only supported a
specification of line width if the line was horizontal or vertical.

There are only basic line clipping algorithms, but not line drawing, so you
probably looked at the old SDL 1.2 code of pgreloaded.

I think a lot of classic pygame can be ported across. The drawing
primitives and handling of surfaces and textures needs the most
work. I’m hoping a lot of the rest won’t need much in the way of
changes.

For people that really want the full SDL library experience I’ve
started wrapping the SDL commands, just adding a thin layer for
python compatibility. I think this could be handy for the more
advanced developer.

pgreloaded has this already. Feel free to copy whatever suits you, in case
you did not complete it already.

Cheers
Marcus