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

Added image property to Scene #39

Closed
wants to merge 1 commit into from

Conversation

liam-middlebrook
Copy link

This should fix issue #31 on platipy/spyral that way no decision "needs" to be made because both options should work fine.

This should fix issue platipy#31 on platipy/spyral
@acbart
Copy link
Member

acbart commented Feb 19, 2014

Hi Liam, thanks for your interest! I've considered this particular solution before, and gone back and forth on it. Here are my thoughts:

Pros:

  • Ensures that you cannot accidentally do Scene.image instead of Scene.background

Cons:

  • Violates the "One and only one way to do things" rule
  • Doesn't teach students that a Scene's background is inherently different than a Sprite's image

Would you mind sharing your thoughts?

Also, very interested to know: how did you come across Spyral?

@liam-middlebrook
Copy link
Author

HI acbart, I'm going to answer your questions in reverse order.

I discovered Spyral after the first week of my Humanitarian Free and Open Source Software class http://hfoss-fossrit.rhcloud.com source: ( https://github.com/decause/hflossk ) I was browsing GitHub for any Game Development related libraries that I would be able to potentially contribute to. When I saw Spyral I immediately starred it knowing that our project at the end of this term would be to create an educational game for the OLPC XO. With the permission of @decause and my future group members, I will use Spyral as a base for my game.

As far as the change I proposed goes:

  • I feel that the "One and only one way to do things" rule refers more to implementations of libraries rather than libraries themselves. In the past I have found it convenient when I was able to do things in different ways, although while keeping consistency in mind I would choose one of the ways. I think that having both would give your students a stylistic choice for which term they prefer.
  • Although on an level of display a scene's background and a Sprite's image are different. I may be mistaken but at a fundamental graphics programming level I see a Scene's background as just an image that is a solid color that takes up the entire view-port.

@acbart
Copy link
Member

acbart commented Feb 20, 2014

Well that class sounds awesome! I hope that your professor(?) and future team members will allow you to use Spyral. We've put a lot of work into it, and we want to make it an excellent resource, especially for XO developers.

I'm not sure how familiar you are with our Platipy group, but Spyral grew out of a class at the University of Delaware where students make educational XO games. In addition to Spyral, we've also been authoring a text (Platipy) and a skeleton for creating XO games (Example.Activity). If you haven't already, I really recommend reading over the introduction sections and the rest of Platipy (http://platipy.org/). It sounds like you can already skip the Pythonista section :) I should warn you, some of the advanced sections (Actors, Styles, Layering) don't have content yet; I'm hoping to get to them soon, but my own classwork and dissertation might keep me away for a while (I'm a PhD student at Virginia Tech, and @rdeaton is a full-time software engineer at Quizlet).

We've worked very hard the past few weeks to make sure that spyral is ready for making games, since the UD class is about to start developing their games using this newest version of Spyral. We're very excited, but there's sure to be some bugs along the way. Please, feel free to bring any errors or problems to our attention. I'm sure there'll be many opportunities throughout this semester for you to use and contribute to Spyral!

Anyway, getting back to the topic at hand:

  • Scene Backgrounds are critically different from Sprite Images in that the background is highly optimized - when it is partially unobscured, only the unobscured parts will be redrawn. This is different from Sprites, which would be entirely redrawn. This difference is very important for full-screen graphics on the XO - drawing on the screen is the most time-intensive task, and you shouldn't underestimate how long that takes! It would be disastrous if the entire screen needed to be redrawn everytime a sprite moves.
  • Also, just to be clear, any image can be used for a background - not just a solid image! You might consider using a fancy title screen, for instance.

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

Successfully merging this pull request may close these issues.

None yet

2 participants