Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you add the pygame.mask Submodule #15

Closed
dominoxp opened this issue Aug 17, 2015 · 7 comments
Closed

Can you add the pygame.mask Submodule #15

dominoxp opened this issue Aug 17, 2015 · 7 comments

Comments

@dominoxp
Copy link

I'm trying to convert my game written in pygame into an android Aplication using your libraries and Project. The problem is, that i need the pygame.mask, which doesn't seems to be implemented yet.
I would be very pleased if you can add it to your Project.
Thank you

@renpytom
Copy link
Member

Will do.

@mclaughlinconnor
Copy link

mclaughlinconnor commented Dec 24, 2016

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

@renpytom
Copy link
Member

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

@mclaughlinconnor
Copy link

mclaughlinconnor commented Dec 26, 2016

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

@mclaughlinconnor
Copy link

@renpytom

Any news?

@DaveMcGr
Copy link

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

@bitcraft
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants