Hi all,
The puzzle game I have been working on is now available for free on the App Store.
Here is the link
Thanks to those who helped with my code, and to @omz for the awesome Pythonista Xcode template!
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Hi all,
The puzzle game I have been working on is now available for free on the App Store.
Here is the link
Thanks to those who helped with my code, and to @omz for the awesome Pythonista Xcode template!
I have been working on a simple game to try to learn the Scene module. Feel free to try it. I would welcome feedback of any sort. I am a beginner and so my code will not be particularly tidy!
It consists of a few files (high score saving, configuration etc) and can be downloaded from GitHub here.
@JonB @cook @shaun-h @Webmaster4o @disorientedp @ccc @omz
Version 1.2 is now on the App Store with a host of bug fixes! Thanks for pointing them out.
The high score table now just shows the top score for each player, so the table is simpler and won't be taken up by those who play a lot; not looking at anyone in particular! 😉
By the way, App Store reviews are very much appreciated of course! 😀
@Webmaster4o I'm starting to learn JS now, so hopefully it won't be a problem!
Are the attributes of the scene.Rect
class not x
, y
, width
and height
(without parentheses as they are attributes, not methods)?
This seems to work for me (code within an instance of scene
hence use of self
:
my_path = ui.Path().rounded_rect(0, 0, 20, 20, 4)
my_path.fill()
my_path.close()
self.my_node = ShapeNode(my_path, color = 'white', position = (100, 100), size = (20, 20))
self.add_child(self.my_node)
self.my_node.size = (40, 40) # Changes size
In your method, which uses the path object, the x and y can just be zero I think, and you could set a variable equal to the path object like above to simplify the code. Not sure why the above is not working for you though, sorry! :)
Hi @dat2357
Try making line 4 this:
sender.superview['txtOutput'].text = (str(sum)) #4
The equals sign is all-important. Hope this helps!
I hadn't realised the A.call()
thing existed - loads of possibilities for animations!
Ah I see. Good to know. I tried this and it got me a nice transparent background to my widget, but of course setting alpha to zero would do the same thing!
I was basing this on the Swift iOS colours (UIColor class which has a UIColor.clear) rather than CSS. I’m not sure if this is what is going on behind the scenes of the UI module though.
Regarding the clear background thing: I’ve just started playing with the Today Widget as well and I used this code to load a standard PYUI file (as might be done for a normal script). It also sets a clear background. I hope it’s helpful!
v = ui.load_view()
v.background_color = ui.set_color("clear")
appex.set_widget_view(v)
@edsuom
This is great. Thanks!
The hitbox you created is just a Rect() object, which is simply coordinates and not actually something rendered on the screen. You could make a Shapenode() or SpriteNode() of the same size which would be visible.
I'm not at my computer just now, but can show some code later if you like.
@Webmaster4o I'm starting to learn JS now, so hopefully it won't be a problem!