@Gravitation The GitHub page is here: https://github.com/Technoboy10/easyaspy
Offline
@technoboy10 I get a 404.
Offline
Gravitation wrote:
@technoboy10 I get a 404.
Hmm... I'll try to get it working today. I've been having some problems with GitHub.
Done. It seems that I didn't actually make the repo. It works now.
Last edited by technoboy10 (2012-12-12 10:14:48)
Offline
technoboy10 wrote:
Gravitation wrote:
@technoboy10 I get a 404.
Hmm... I'll try to get it working today. I've been having some problems with GitHub.
Done. It seems that I didn't actually make the repo. It works now.
Ah.
I'm totally new to version controllers... how do I modify the repo? xD
Offline
Gravitation wrote:
technoboy10 wrote:
Gravitation wrote:
@technoboy10 I get a 404.
Hmm... I'll try to get it working today. I've been having some problems with GitHub.
Done. It seems that I didn't actually make the repo. It works now.Ah.
I'm totally new to version controllers... how do I modify the repo? xD
Do you have a GH account? I think you need one. (I'm totally new to this as well. )
Offline
technoboy10 wrote:
Gravitation wrote:
technoboy10 wrote:
Hmm... I'll try to get it working today. I've been having some problems with GitHub.
Done. It seems that I didn't actually make the repo. It works now.Ah.
I'm totally new to version controllers... how do I modify the repo? xDDo you have a GH account? I think you need one. (I'm totally new to this as well. )
Yeah, and have the GitHub widows client and the Git Shell, so, uh... yeah, it's GraviPy.
Offline
Okay!
We aren't going to use scratch.py, since that allows communication with an open Scratch window, for example, to change a variable in a game from an external Python program.
Offline
Gravitation wrote:
Okay!
We aren't going to use scratch.py, since that allows communication with an open Scratch window, for example, to change a variable in a game from an external Python program.
I'm not sure what you mean. Why aren't we using scratch.py?
Offline
technoboy10 wrote:
Gravitation wrote:
Okay!
We aren't going to use scratch.py, since that allows communication with an open Scratch window, for example, to change a variable in a game from an external Python program.I'm not sure what you mean. Why aren't we using scratch.py?
Scratch.py communicates directly with Scratch, for instance:
Open a Scratch project in the Scratch window.
Open a Python application that uses Scratch.py.
The Python program can trigger broadcasts and set variables in the open Scratch window.
Offline
I love the idea behind this project and what you're doing with it.
I just joined GH yesterday, so now I'm playing around with all the cool features...
That being said, your repo now has a star, and I may fork it sometime in the future.
Offline
ohaiderstudios wrote:
I love the idea behind this project and what you're doing with it.
I just joined GH yesterday, so now I'm playing around with all the cool features...
That being said, your repo now has a star, and I may fork it sometime in the future.
Thanks! I'm also quite new to GH, it's pretty cool from what I've seen.
Offline
technoboy10 wrote:
@Gravitation How do I use your code?
For each sprite, append a Sprite class object to the Sprites variable
For each script, append a Script class object to the Scripts variable
For each block, append a Block class object to the Scripts variable
Make sure to set the class instance variables correctly
Do the run() method for each script for every frame
That's how it will work, hat blocks and broadcasting remain unimplemented.
Offline
Gravitation wrote:
For each script, append a Script class object to the Scripts variable
Shouldn't each Script belong to a Sprite?
Offline
blob8108 wrote:
Gravitation wrote:
For each script, append a Script class object to the Scripts variable
Shouldn't each Script belong to a Sprite?
Hence the "owner" variable in each Script instance.
Offline
Gravitation wrote:
blob8108 wrote:
Gravitation wrote:
For each script, append a Script class object to the Scripts variable
Shouldn't each Script belong to a Sprite?
Hence the "owner" variable in each Script instance.
Then why the Scripts variable?
Offline
blob8108 wrote:
Gravitation wrote:
blob8108 wrote:
Shouldn't each Script belong to a Sprite?Hence the "owner" variable in each Script instance.
Then why the Scripts variable?
So that Scripts can modify their parent Sprite; the "owner" variable stores the index of the script's owner, and the Sprites variable is made global.
It's actually the Blocks that modify the sprite, now that I think about it. But still, programming outside of classes seems a bit less confusing to me
Offline
technoboy10 wrote:
So we need to implement Pygame now?
yeah.
Offline
Gravitation wrote:
technoboy10 wrote:
So we need to implement Pygame now?
yeah.
Awesome. Where do we start?
Offline
technoboy10 wrote:
Gravitation wrote:
technoboy10 wrote:
So we need to implement Pygame now?
yeah.
Awesome. Where do we start?
Try following something like the chimp example for setting up your main loop and such, particularly if you're not familiar with Pygame
Offline
Well, since the eapdef file already contains Pygame and all it's necessities, all we need to do is write a rendering script. Here's my 2 cents:
from eapdef import * FPS = 30 //max frame rate pygame.init() FPSCLOCK = pygame.time.Clock() DISPLAYSURF = pygame.display.set_mode((480, 360)) pygame.display.set_caption('Project Name Goes Here') while True: DISPLAYSURF.fill((0, 0, 0)) DISPLAYSURF.blit(stage.costumes[stage.ccos], (0, 0)) for i in Sprites: DISPLAYSURF.blit(pygame.transform.rotate(i.costumes[i.ccos], 90+i.dir), (i.x+240, i.y+180)) //Because Scratch's coords are from center, and pygame's is from top left. Pygame's rotate function rotates counter-clockwise for i in Scripts: i.run() pygame.display.update() FPSCLOCK.tick(FPS)
Just some pseudocode, might work but it's just of the top of my head
Offline
@Gravitation Thanks for making sure that the coord systems match up with Scratch.
Offline