6 ms·
If someone were to make something like this a step-by-step tutorial/template appropriate for a classroom setting it would be huge. Imagine a class at High Schoo
by rodly 14y ago
If someone were to make something like this a step-by-step tutorial/template appropriate for a classroom setting it would be huge. Imagine a class at High School where you start off learning the basics of Python for the first few weeks and the rest of the semester is spent writing the chunks of code into a template that has lots of notes for guidance.
I'd image something like :
def setDefaultBlockColor(color):
# recall that this is a function that takes in a variable called 'color' as its argument, write the code that will set the current game files configuration file to either 'red', 'blue' or 'green' (p.s. DONT FORGET TO INDENT YOUR CODE!)
Just writing this function and seeing it work once you load up the game is enough to hook almost anyone that has the potential to enjoy programming but just doesn't know it yet.
- brooksbp 14y agoThere's an awful LOT happening behind those 580 lines. I'm not sure whether it is a good thing to start at such an unrealistically high level of abstraction for a 3d game.
- deleted 14y ago[deleted]
- csmatt 14y agoDon't worry, it is a good thing. The ones who want to take it further will naturally start digging into what's going on behind the scenes. Where would games be if we didn't have abstraction?
- jessedhillon 14y agoAs something for beginners, this would be great. When you start learning a new skill, it's important to have that feeling of tangible achievement to keep students motivated. Anyone interested enough to pursue a career in game dev will dig into pyglet to understand what's happening, as they start to push the limits of the knowledge gained from this kind of exercise. And then here's the other nice lesson: students can learn that they don't need to know everything before they start making cool and useful stuff. The confidence that comes from knowing that is just as important (more so?) as being able to implement pyglet from scratch if necessary. The former is a skill used daily, whereas the latter -- well, consider how often in your engineering career you casually rely on the work of others to power your creation. Has anyone ever required you to write a WSGI implementation, or a framework? That's been my experience, at least.
- lessnonymous 14y agoTotally agree. I remember writing this: 10 PRINT "LESSNONYMOUS" 20 GOTO 10 Seeing actual things happen was awesome. Now we have 3D games, seeing your name over and over wont enthrall, so being able to mod and extend a basic Minecraft world would be an incredible gateway. The way to hook people is exactly like you say. Make a small change, see a huge difference. Suddenly ... YOU HAVE THE POWER!!! 10 PRINT "LESSNONYMOUS"; 20 GOTO 10
- eric_bullington 14y agoWow, that just brought back a massive flash from the past. I actually remembered how I felt then I wrote those lines (or something very similar) for the first time. It's a powerful feeling. Thanks for that.
- failrate 14y agoI remember typing something similar (but probably more seditious) on the computers at every store I came across and watching the staff not know how to turn it off. Probably a jerk move in retrospect, but how can you work in a computer store and not play around with the computers?!
- jameswburke 14y agoI definitely agree, I graduated with BS in Computer Science but never touched 3D (only 2D game design). Although if I had, I probably would be a lot further than I am now. High expectations, but the results could be amazing.
- lessnonymous 14y ago10 PRINT "LESSNONYMOUS"; 20 GOTO 10 There was an awful lot happening behind my very first program too. And that was the available level of abstraction. Why start kids coding something so simple when they can mess with something so powerful?
- njharman 14y agoAs a country the USA needs much more top down (you can do this now! don't you wanna learn how?) rather than bottom up (learn all this math, all these concepts, all this stuff over here, then do it all again for in college, then gradschool and maybe you'll make more money in 20years) education.
- tripzilch 14y ago> If someone were to make something like this a step-by-step tutorial/template appropriate for a classroom setting it would be HUGE. (emphasis mine :-)) That's the first thing I thought. I teach kids to do creative/interesting things with computers. It's hard to get them writing code[0] (it's not a classroom--they come voluntarily and explore what technology topics they like), one of the older (14) kids started out doing that, however, because he wanted to write Minecraft mods. Those are written in Java, in an Eclipse environment working on a decompiled (and only partially annotated) version of the Minecraft .jar. That was not how I envisioned a gentle introduction to computer-programming :) But he was persistent, and got it to work. This only goes to show what's really important: not if the language is simple, complex, elegant, whether the subject matter is easy to grasp, no. It's just a matter of whether the thing they need to learn is on the path towards a goal they really really want to achieve[1]. But yes, Minecraft is a huge thing among these kids. Others are cobbling together multi-player servers from scrap computers. While in a sense, brooksbp (sibling comment) is right, there's a LOT going on in these 580 lines of code (I haven't looked at it yet, but I can imagine), 580 lines is not that much either. And if it's something they can run, edit, run, mess around with, see why it broke, edit, run, etc, that's enough to get started. They don't need to understand the whole thing right away. In fact even something as simple (and hardly programming) as changing the colour or textures is awesome because it teaches them that whatever's going on behind those graphics is yours and yours to control (unlike, say, the TV or their aunt's iPhone). That 14 year-old kid is currently experimenting with Unity, trying to make an actual game. Unfortunately, I haven't had time to get acquainted with that environment myself, so I can only give him general advice. I'm way more comfortable with Python (especially a mere 580 lines of it :P) so who knows. [0] Which still mystifies me, I was writing my first lines of BASIC at the age of 9, without help from my parents or anyone except library books and magazines. That probably makes me an outlier, but enough children pass through here that I'd expect to see at least maybe one or two. I guess it's different because back then that machine (an Amstrad PCW) wouldn't do anything interesting except word-processing unless I coded it myself. [1] That was actually a big lesson for me :) I kind of knew it to be the case, but witnessing the process really nailed it down for me.
- robomartin 14y agoI've been teaching my oldest kid (14) programming. By far the toughest problem is finding or developing motivation. Kids have too many interesting things pulling at them these days. Programming can be very dull and confusing until you have a good arsenal of tools and patterns in your head. That also works against developing motivation. It's simply not interesting. Thankfully we do other things. I was able to use the example of when he learned to fly model airplanes to show why he had to push through the stuff that's just not fun to be able to reach for the good stuff. I reminded him of the work we had to do for him to be able to fly and land solo before he could start on fun aerobatics. This is why I would suggest simply converting something like this to a tutorial might not guarantee engagement. You need to really think through the "fun and interesting" factor both during and after the course. Not easy.