A 14 year old boy, with the goal to one day release 2d pixel games, created in Python.
-
Kamozo
That's useful, but what if I wanted to animate a gif using the scene module only, with my own images? Would that be possible?
-
Kamozo
Oh, okay. It'd be cool if they were. Perhaps maybe in a future version.
I've tried splitting them, but I don't know how to make it continuously repeat. -
Kamozo
Hi, I was wondering if the scene module supported gifs. I've tried using them in my own project but they are just a still image.
Here's some example code so you can see what I'm trying to do:from scene import * class MyScene (Scene): def setup(self): self.background_color = 'midnightblue' self.ship = SpriteNode('ship.GIF') #Why won't it play? self.ship.position = self.size / 2 self.add_child(self.ship) run(MyScene())
Help would be appreciated, thanks.
-
-
Kamozo
Oh yeah, I'm not sure how I didn't notice that.
Where does the code you've provided fit into mine? -
-
Kamozo
Ahh, I understand that, thanks.
I'll have to do some more reading now, because the call function confuses me, it doesn't take much code does it? Could you give an example of how I would do it, if that isn't too much to ask?
But anyway, thanks, I'll look into it. -
Kamozo
Hello, why won't "repmo" repeat itself?
I would like the action to continuously run after "phase_1", yet it only runs once. How do I fix this? Thank you.up = A.move_to(self.size.w/2, 350, 9,TIMING_EASE_BACK_OUT) mo = A.move_to(random.randrange(100,924),random.randrange(300,700), 2, TIMING_EASE_BACK_IN_OUT) repmo = A.repeat(mo, -1) phase_1 = A.sequence(stationary, up) #stationary appears earlier self.boss.run_action(A.sequence(phase_1, repmo))
This is only a snippet of code, I'm just highlighting the bits that need looking at. For example, although the code doesn't specify, A = Action.