Setting Up SDL2 using XCode 6 in OSX

My first semester in DigiPen has just ended and I get to make tutorials again! One of my classes was Game Engine Fundamentals and I used SDL2 to create my game engine. SDL2 is a cross-platform C library to create games on. My favorite tutorial to learn SDL is Lazy Foo. He gives a detailed tutorial in multiple aspects of the library. However, setting up on Mac is not yet done. Hence, I have created this post.

Continue reading


Mandala Design by Programming

Last school year, I can confidently say that many of my students enjoyed this one lab exercise we did in class. The exercise was to create circular designs using lines with C++. It may sound weird to find students enjoying a combination of programming and trigonometry to create digital math art but it did happen. When I uploaded their submissions in Facebook, I got a couple of private messages from former students complaining why they didn’t have those. And there were a few who even got curious enough to ask me to teach them. Unfortunately, the exercise was a cumulative effort from different activities and I couldn’t teach it in just one sitting. Since then, I put “Mandala Design by Programming” as one of my to-do video lectures.

And here it is…

The CPNG header and source files can be downloaded here. The PNG encoder could be acquired here. Make sure to get the lodepng.cpp and lodepng.h.

In the video, I used XCode to compile. In case you’re compiling by terminal, include the following flags: -ansi -pedantic -Wall -Wextra -O3. For example, if your source code is main.cpp and you wish the executable to be called main.exe, you can compile by

Ideally, this video is for fellow programming teachers to inculcate the value of loops. It can also be a side exercise where students would manipulate lines and colors instead of the usual text or number processing. I think, this can also be valuable for Math teachers teaching trigonometry and help the students appreciate sine and cosine.

If you encountered issues while creating your own Mandala Design, e-mail me at francis dot serina at gmail dot com. Also, I’d like to see your own mandala designs so please post in the comments below the results of your own artwork 😀


ScreenChamp Awards 2013

I recently joined the ScreenChamp Awards 2013, a contest on screen casting sponsored by TechSmith.

I’m testing my video lecture making powers and see if I can grab that People’s Choice award. I’m very happy to have been selected as a finalist! I still consider myself new to screen casting and video lecture making.

I actually submitted two videos. The first one, Lecture on Structs and Pointers in C++, did not make the finals but the second one did.  As for the topic, well, it’s about… Love 😀 Ahaha! Yes I know, the SSB (single-since-birth) programmer talks about love. Now before you think about romance, I want to clarify that my talk is about the 5 Love Languages written by… you know what… go watch the video here. Don’t forget to up vote and share it 😀

I originally wanted to give my whole 1-hour talk about the 5 Love Languages into this video lecture but I had little time to complete it. Sadly, I had to settle with just the Introduction, which is a teaser to give my audience reasons to stay and listen. I can actually give this talk without the need for normal presentation equipment like projectors and laptops. In fact, I have given this talk multiple times to some of my former students or friends over dinner at home, during lunch in the mall, and in the living area during sleepovers.

The challenge in making this video was that I had to make it interesting without knowing who I am. I think the reason why people listen to my talks is because they know me. But what if I gave this talk to complete strangers, people I’ve never conversed with before, how would they react? Also, since I’m targeting older teens, I need to make it appealing other than just showing myself. Thus, I decided to make use of drawings and hand writings. I enlisted the help of a former student who is great with art, Quina Baterna. I told her my concept and she gave me drawings of the wife, husband, logos for each love language, etc. We  recorded her, drawing these icons on a white board using colored pens.


Quina’s Drawings

Unfortunately, I encountered problems when I started editing the videos. It turns out, I need a LOT more art to convey my interpretations. I’m no artist, hence, I searched for free vector art online. I found some but I lacked a lot more. Being pressed for time, I resorted to the unthinkable – draw them myself. Yes, that’s right. I drew. I couldn’t create a video of me drawing since I make so many mistakes and it takes me forever to make one. Instead, I used Inkscape to create my black and white, stick figures.

I tried combining Quina’s drawings with the vector art but they don’t seem to work out well. I made a decision to redraw all of Quina’s art using Inkscape. Using this technique prevented me from presenting the art being drawn on screen. Instead, I had the drawings animated by flying them in, scaling them, translating them, and changing their opacity.


My Vector Drawings

It took me a while to complete the video but I made it a couple of hours before the deadline. My friends commented that the video is such a cliff hanger or bitin. I will continue the video and include my whole talk which includes what the 5 Love Languages are and how to find out yours as well as other people’s Primary Love Language. For now, up vote my video and help me win 😀

Again, the video can be found here!

CREDITS to the following:

Free Vector Icons from http://www.endlessicons.com and http://www.clipartsfree.net

“Easy Lemon”, “Deliberate Thought” Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0

I am not nor am I related to Dr Gary Chapman, Northfield Publishing or Moody Publishers.

Camtasia and SnagIt from TechSmith