Friday, October 19, 2012

Paddle War! My First Scratch Game

So I finished my first project for the CS50x course. The task is to create a game or animation using scratch, it's a graphic animation programming tool created by MIT.


Based on the lessons of Prof. David, it looked easy to use. I even liked the part where you can have a Sprite (that is any screen object) or a character in the screen move and then bounce when it hits the edge of the screen. It looked cool.

Right after I finished the second lecture video, I then downloaded scratch (http://info.scratch.mit.edu/Scratch_1.4_Download) -- and then installed it. It looked easy to use but when I actually started using it, I realized I don't have any idea on how to start. So I looked for video tutorials on youtube and luckily I found a set of videos (10 actually) giving a walk through on how to use Scratch. Here's the first one of the videos:


Although I created my own game in under 4 hours, I actually spent more time considering I watched these videos, thought of the game concept and then initially learned the some of the functions I needed in the game. I finally ended up with Paddle War listed below:
http://scratch.mit.edu/projects/rapidscc/2843406

It's very elementary, I was thinking of a classic arcade game when I conceptualized the idea for the game and that's what I was able to produce.

What I think about Scratch

Scratch is a nice programming tool to create fast animation and simple games. It even comes with graphics and sound effects. I think beginners will enjoy using it and learning game programming with the tool. However, it lacked productivity functions. If you want to line up objects on the stage, you'll have to manually do it one by one. A simple align functionality would have been nice. You can't also copy the script of one sprite to another. You'll have to export the sprite with the script and then add it back to the game. That's how you get to copy the script. A simple copy and paste would be very nice.

The code editor (or puzzle box) is also a bit tedious to use for those who are fast. You see to add a functionality, logic, variable, control or any code you'll have to drag and drop the equivalent puzzle piece and stack them all up. This is nice, a graphical representation of how things work but you can't drag a puzzle piece in between to puzzle pieces. When you do, it will drag all of the puzzle pieces below the piece you are trying to drag out. Of course you can just hit right click on the puzzle piece and delete it but what if you don't want it deleted and just want to remove it from that particular section?

Anyway, scratch is still excellent. I can see that beginners and those who don't understand programming much will appreciate the tool since you can easily layout the steps of your codes one by one in a puzzle type environment. But for advanced programmers who optimize their codes, it will be slightly irritating.

I guess this is the reason why the Harvard CS50x course offers two problem editions, one standard and the other the hacker edition where a more advanced tool is presented. I assume the standard tool is for those who are really really fresh in programming while the more advanced hacker edition are for those with more advanced programming prowess..The only catch is you don't get credit if you don't do the standard edition.

In all of this experience, I can say that I enjoyed using scratch aside from the minor disappointments and I was able to create a game in under 4 hours, it's a very basic game but considering the time spent I can say that it's just right.

As of the moment I'm waiting for the week 1 lecture which will probably be posted by next week, in the meantime I'll just try a few more things in scratch and maybe try the more advanced problem edition.

Wednesday, October 17, 2012

My First Day Learning CS50x

Here's the Homepage of edX
I felt so lucky yesterday. A facebook friend posted a link of top universities giving free online courses. I visited the link and got interested in one particular piece of information on the page. I saw Harvard giving an online course (CS50) and what's more interesting is that the course/program is starting the very same day.

So I immediately signed up and a few hours later, I was already exchanging messages with participants. There's a lot of participants from all over the world. I talked with a guy from Italy, US, Egypt, India and even some from here (Philippines). After a few chit-chats I started viewing the videos on the courseware page. It took me some time to view the videos and it frequently stopped though I was already using a 2 Mbps connection. However, one guy from Egypt said he was able to download the first video in 10 minutes.

So back to the course, the instructor is Prof. David J. Malan and he was really cool in the introductory video. It's a recording of the actual Harvard CS50 Class. They recorded the actual class and it's what we will study/watch in the coming weeks. Though I was only watching the video, it pretty much felt like I was a part of the class, the introduction was excellent and the initial topic that included binary math was refreshing.

I already learned it before 15 years ago when I took up an associate degree in Computer Science here in Manila but I've already forgotten it. It had no actual use in my work as Accounting Systems Developer where I dealt with a database programming language (Clipper and Visual Foxpro).

The introduction was very lively, with a musical skit presented by Harvard seniors. I kinda felt my passion for programming rekindled. I guess it's the spirit of Harvard being shared with me through online learning.

I also liked the open mindset that Prof. David is instilling in students. He discussed the topics that we will be covering that includes cryptography, forensic, C, PHP and SQL. He mentioned that in the weeks to come we will learn about password decryption, deleted files recovery, and web programming. He presented it in a way that it felt like doing all these is actually a challenge. There are even two sets of problems for students, one is the standard level and the other is the hackers level for those who want to satisfy their cravings to do some deep level programming. It's excellent. With this kind of open acceptance to learning and imparting knowledge I can easily see why Harvard produces some of the best people in every industry.

In a few minutes I'll be working on my first course activity, game programming using scratch. Wish me luck.