omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. Karina
    3. Best

    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.


    • Profile
    • Following 0
    • Followers 1
    • Topics 3
    • Posts 122
    • Best 4
    • Controversial 0
    • Groups 0

    Best posts made by Karina

    • RE: [SPACE ESCAPE]-Game example to help with Game dev

      @cvp with enumerate doesn’t work cause with this for i, icon in enumerate(icons) you get keys of icons and nums 0, 1, 2. So i is the number and icon picture
      I did the same but without enumerate

      self.arrows = [Arrow(i, position=icons[i], parent=self) for i in icons] 
      

      Looks better than it was before👍

      posted in Pythonista
      Karina
      Karina
    • RE: [SPACE ESCAPE]-Game example to help with Game dev

      ShapeNode is a subclass of SpriteNode!

      Yeah, they say it in docs, I just forgot🤦‍♀️. Then it's more clever to make ShapeNode base class

      posted in Pythonista
      Karina
      Karina
    • RE: Flappy bird
      from scene import *
      import random
      
      
      class Column(SpriteNode):
      	def __init__(self, **kwargs):
      		SpriteNode.__init__(self, 'plf:Tile_BoxCrate_double', **kwargs)
      		
      		
      class Game(Scene):
      	def setup(self):
      		self.background_color = '#99d7ff'
      		x = 0
      		ground = Node(parent=self)
      		while x < self.size.w:
      			lower_tile = SpriteNode('plf:Ground_Stone', (x, 30))
      			higher_tile = SpriteNode('plf:Ground_Stone', (x, 738))
      
      			x += 60
      			ground.add_child(lower_tile)
      			ground.add_child(higher_tile)
      			self.add_column()
      			
      			
      	def add_column(self):
      		lower = random.randint(0, 360) // 64
      		higher = random.randint(0, 360) // 64
      		y = 45
      		for i in range(lower):
      			column = Column(parent=self)
      			column.anchor_point = (0.5, 0)
      			column.position = (self.size.w, y)
      			y += 64
      		y = 738
      		for i in range(higher):
      			column = Column(parent=self)
      			column.anchor_point = (0.5, column.size.h)
      			column.position = (self.size.w, y)
      			y -= 64
      
      
      run(Game())
      

      This only makes ground and two columns at the end of the screen. The problem is that whenever I run this, the columns always at the same size. But I use random here, so they should get different each time. I can't get why is it so

      posted in Pythonista
      Karina
      Karina
    • Flappy bird

      Hello everyone! I'm writing the game and at the beginning now

      posted in Pythonista
      Karina
      Karina