Coder Social home page Coder Social logo

Comments (7)

renpytom avatar renpytom commented on May 22, 2024

Will do.

from pygame_sdl2.

mclaughlinconnor avatar mclaughlinconnor commented on May 22, 2024

@renpytom

This is a problem I am having: pygame.mask is needed. I am using the modules PyTMX & PyScroll by bitcraft (https://github.com/bitcraft) which need the mask submodule to do some very basic functions.

As far as I can tell everything else works good.

from pygame_sdl2.

renpytom avatar renpytom commented on May 22, 2024

Which functions do you need? I looked at it this morning, and there is a lot of stuff there.

from pygame_sdl2.

mclaughlinconnor avatar mclaughlinconnor commented on May 22, 2024

@renpytom

I apologise if this is a bad reply but my knowledge of Python isn't great. I think I need pygame.sprite.LayeredUpdates. The error pygame_sdl2 spits out is NotImplementedError: Could not import pygame_sdl2.sprite: No module named mask

If this isn't good enough here is my logcat:

Android bootstrap done. __name__ is __main__
Run user program, change dir and execute main.py
Opening APK '/data/app/com.connor.gtc-1/base.apk'
jpeg_decoder mode 0, colorType 4, w 3648, h 5472, sample 1, bsLength 0!!
jpeg_decoder mode 1, colorType 4, w 3648, h 5472, sample 2, bsLength 0!!
Traceback (most recent call last):
File "main.py", line 40, in <module>
import pyscroll
File "lib/pyscroll/__init__.py", line 26, in <module>
from .group import *
File "lib/pyscroll/group.py", line 14, in <module>
class PyscrollGroup(pygame.sprite.LayeredUpdates):
File "/data/user/0/com.connor.gtc/files/lib/python2.7/site-packages/pygame_sdl2/__init__.py", line 32, in __getattr__
raise NotImplementedError(self.reason)
NotImplementedError: Could not import pygame_sdl2.sprite: No module named mask
Python for android ended.

If this still isn't good enough just tell me what you need.

Thanks a lot. -Connor

Edit: Upon further inspection I realise pygame.sprite.LayeredUpdates is included.

Edit2: After furtherer inspection I can't even find the mask submodule anywhere in Pygame. This could just be me being silly or there's something funny going on.

Edit3: After furthererer inspection using cat */*.py | grep mask I found that pygame.mask.Mask + pygame.mask.from_surface are being used.

from pygame_sdl2.

mclaughlinconnor avatar mclaughlinconnor commented on May 22, 2024

@renpytom

Any news?

from pygame_sdl2.

DaveMcGr avatar DaveMcGr commented on May 22, 2024

@renpytom

Is this still on-going? Or has development on the module stopped? Because I too am trying to use bitcraft's PyTMX module. I have tried to port the pygame.mask.from_surface, to no avail.

from pygame_sdl2.

bitcraft avatar bitcraft commented on May 22, 2024

Hello~~. I'm the author of pytmx and pyscroll. I'll investigate if I could possibly not require the mask module, or optimize it for pygame_sdl2.

bitcraft/pytmx#78

from pygame_sdl2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.