Open nickedens opened 7 years ago
Thank you! I'll look over your library later today and probably we'll add it to the libraries in the next release.
About help files, we really have those only for primitive blocks. (The ones for the tools are a special case kludge in the code.) For custom blocks, we have the feature of using a comment attached to the hat block as the help text. (Someday we'll be able to put pictures in comments...)
These games are awesome!
@brianharvey bummer on the help files. That would have been awesome. I'll be on the lookout for one day being able to do that.
@bromagosa thanks! this year is shaping up to be awesome for our kids!
About help files, we really have those only for primitive blocks. (The ones for the tools are a special case kludge in the code.) For custom blocks, we have the feature of using a comment attached to the hat block as the help text. (Someday we'll be able to put pictures in comments...)
Are you sure? I thought they were just looking up the [spec].png in the help folder, and displaying nothing if the file doesn't exist.
@cycomachead I actually thought that as well but the filenames were kind of all across the board. I couldn't correlate those with anything from the tools.xml file
It's not strictly the spec, I guess just the "text" in the spec (including symbols like $arrowRight).
@cycomachead that was totally it. I'll go through in the next do or two and create the help screens. I will have to update the tools.xml file as it doesn't seem to work when the text contains spaces. Other than that it works like a champ. Don't know how I missed that.
Oh, great! I must have misunderstood what Jens told me.
@brianharvey I'll just update this ticket with the new tools.xml file and the png help images by the weekend (assuming all goes well).
I think the spaces just get removed from the file name, there is a way to make them work though I forget off hand. :)
-- Michael Ball From my iPhone michaelball.co
On Jan 17, 2017, at 12:48 PM, nickedens notifications@github.com wrote:
@cycomachead that was totally it. I'll go through in the next do or two and create the help screens. I will have to update the tools.xml file as it doesn't seem to work when the text contains spaces. Other than that it works like a champ. Don't know how I missed that.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Actually, it might be better to create a library that doesn't include the tools library, except for the ones you actually use. (You can import tools and then select File>Unused blocks to get rid of ones you don't need.) We're going to be working on tools independently of you, so things will change; your library will be a Library, not a replacement for tools, which we want to keep really small. Thanks!
@brianharvey I can do that. I'll work on getting it sorted this week and then just put it back here in the new form.
@cycomachead it does appear I just have to remove the spaces for the file name. that will make it easier.
Wanted to update that I ran this library through our first class. Found a couple of bugs and updated it. I have not forgotten about you all (been super busy with our classes). I am hoping to remove the unused blocks and get everything into a real working isolated library in the next couple of weeks. Thank you all for being patient ;)
No problem.
Some parts of this seem really specific to a certain way of doing things, especially the part about scoring. Why not just use a watcher in Large mode?
Also I think this needs some documentation and/or sample projects. As a non-game-programmer I'm having trouble seeing why just these features are what a game programmer needs. Why WRAP SCREEN for example? It doesn't do what I'd expect, namely making it so that any sprite that moves offstage reappears in the point-symmetric position.
Finally, I think the preferred way of doing some of these things will change when 4.1 with true OOP sprites comes out.
That is completely true about them being very specific to a way of doing things. And I totally get if this won't work for anyone else. The wrap screen takes the guess work for kids of having to do the manual code (which is different based on your screen resolution) of getting a sprite to move to the opposite edge of the screen as soon as it moves off screen. But that block belongs in a forever loop. There were a couple of use instances I remember thinking you wouldn't want it to wrap the screen forever so I made it that way. But off the top of my head I can't remember what those use cases were. This example I uploaded shows how that block is supposed to function.
The score is different. When we teach the kids game design and programming part of that is design. With the score blocks (there are two one to setup the sprites and one to update the sprites to reflect the correct value based on the score variable) the students get to use their own fonts to match the game style for the game they are making. We teach them that not only is the code important but the full cohesive package of sprites/sound/and game play. When I was teaching last year using scratch that is exactly what we did was just use the watcher in Large Mode. But then every students game the displayed variable (whether a countdown timer, number of lives, or score) looked exactly the same and different from their title screen sprites. If we could upload fonts and have those fonts be used for different large watchers that would solve 100% of quite a bit of work we do. But I also understand the complications of doing that within Snap.
I had thought that some of the way of doing these things would change with 4.1. Do you guys have an estimated time for that or any documentation on the changes I could take a look at?
If you don't think this beneficial to anyone I totally get that, no hard feelings at all :). I totally agree it needs documentation. But if you don't think its worth doing I would prefer to not spend the time on the documentation part as I don't have much time in general. Its hard to tell just from messages but I totally don't have my feathers ruffled or anything over this. So please don't take it that way.
The infinite scrolling blocks are a mess and pretty prone to glitches. It would be awesome if Snap had real layers we could work with. Looking through the archives here it looks like at one point you may have attempted it but it got dropped. Layering in a canvas system is a mess anyway so that could be why you haven't done it. I work a bit in Stency with the older kids so we are trying to get some of those features into Snap by making some custom blocks.
So either way let me know if you think I should pursue this to get it up to you all with documentation (and the fixes that I put in over the past two months) or not.
I have no idea if this would be of any interest to the project or not. As I have mentioned we teach programming to kids ages 8-18 through the use of video game making. I have absolutely fallen in love with Snap. We taught on scratch for a year and it was pretty rough. Snap allows so many things Scratch didn't/doesn't. Not to mention how helpful everyone has been with the couple of issues I have had (like svg support). To make things easier on our younger kids I created some custom blocks that do some of the more complicated programming so they can still make cool games and learn the basics of programming but without the complexity of some of the more advanced concepts. I wanted to offer those blocks to be included in the core product if you have any interest.
Custom blocks include graphical score (using svg graphics) in a simple setup and then update block screen wrap for sprites (like asteroids) so when an object exits the screen it wraps to the appropriate side thrust movement (again like in asteroids) a ton of custom blocks relating to clones. making things like using bullets and one sprite spawning multiple sprites super simple. to fix the collision issues (where hidden sprites still detect collision) I created some enable and disable blocks that can be applied to sprites. disable moves the sprite off screen and enable moves it back to the stage. there is also a boolean block for checking if a sprite is enabled. new blocks for going to random locations on the stage. these blocks dynamically check the stage size so you don't have to figure out the stage size each time. random float block causes the sprite its applied to to float through the stage at a specified rotation speed and velocity infinite scroll block with ability to specify layer and scroll speed. This is used for parallax scrolling for games like flappy bird and endless runners. reporter blocks for stage scale, stage width, stage height, sprite width, sprite height some animation blocks for growing in, fading in, fading out, pixelating in and pixelating out over a specified number of seconds. Useful for game text clone reporter blocks that will create a new clone of a sprite and return that sprite instance. useful with some of the other blocks (with sprites shooting etc) new sensing block for when a sprite is off screen. normally a sprite off screen would flag as true becuase its based off the rotation point of the sprite being off screen. This block checks to make sure the whole sprite is off the screen before reporting true new "colliding with" sensing block. This makes collision detection way easier to understand for new students. Block takes a list of sprite names and will check to see if the current sprite is touching any of the sprites in the list. if it is touching any of them it reports true. Useful for multiple enemies that would kill the player
You can see most of these blocks in place in the following demo videos. Please note that my screen recording software is terrible and the demo videos show quite a bit of lag. That lag is caused by my screen recording software.
Asteroids
Flappy Dragon
I had just taken my custom blocks and merged them in with the tools.xml file which I included below. tools.zip
Lastly I would love to make the help images for these blocks but I can't seem to find how to link the help.png file to the specific block. I am probably just missing something basic here but if you could direct me to that I would appreciate it.
I firmly believe in open source software and giving back. Hopefully these blocks will help make teaching programming in a fun and engaging way to younger students a bit easier should you decide to include them.