New Blog
I don’t post here on tumblr anymore. I’ve moved the blog to www.darwinpek.net.
I don’t post here on tumblr anymore. I’ve moved the blog to www.darwinpek.net.
It blew up. There are more than 2,000 game developers participating in One Game a Month including me, and if you don’t know about it you should probably drop by the site and check it out even if you aren’t a game developer. It will be amazing to see what people will make, and I’m excited to see how this events will turn out in the end.
For my January game I will be participating in Global Game Jam. Since that won’t be happening for a while, I will be working on rewriting my old game project Asterble with the libGDX library since I have some time before I get back to school. This will end up being my game for February. Expect a few blog posts in the future about the rewrite! :D
I’ve also set up a One Game a Month project page that you can find here and you can find my One Game a Month profile page here.
I made a new website! While I have made websites before, this one was particularly interesting because I could not use MySQL. Why? Well, The short story is because I’m cheap.
One of the first things you may want do when you want to host a website on the internet is find a hosting provider. Given the fact that I am cheap (as aforementioned) and that my site will likely not attract loads of traffic, I decided to go with NearlyFreeSpeech, which charges you based on how much bandwidth you use up. As of this blog post, NearlyFreeSpeech also charges you $0.01 a day as a baseline charge for PHP-enabled websites; however, for MySQL-enabled sites, it charges you an additional $0.02 to the baseline cost a day, tripling the cost of running the site. Deciding that adding MySQL service was too expensive for me, especially since my site will have low traffic, I wrote everything in PHP.
This was fine until I remembered that I wanted to incorporate a blog into my website. I fixed this problem by transferring each of my old Tumblr posts into XML files, which were then put into folders organized by date. Using PHP, I can now query the filesystem for posts, extract the information from the XML, and then format it nicely just for you to see. It may not be the most effecient or effective solution, but this is great! Unless you want formatting.
If you know XML, you’ll know that the formatting of XML contains “<” and “>”. The problem here is that HTML also uses the same characters (“<” and “>”) for specifying pieces of code. This means that any HTML I put in the XML file will be recognized as a node, which is not what I want. One way to fix this is to use BBCode instead of HTML for formatting, so, being the programmer that I sometimes am, I wrote a BBCode parser for fun.
The other interesting thing I did while making this site was use JavaScript. I don’t have much experience with Javascript, except for completing a few easy tutorials on CodeAcademy. I remember talking with a friend who once complained about the lack of control over the color scheme of sites or applications he used. Long story short, he wanted white text on black backgrounds instead of black text on white backgrounds. I enjoy switching to the darker theme as well sometimes, so I decided to implement such a theme into my site.
It’s probably mislabeled as “Invert!”, as it is more of a “Switch to Dark Theme” kind of thing, but you’ll find the link in the footer to switch. All it does is sets a cookie that determines which CSS sheets we want to use for the site; just inverting all of the colors on the site might make for an unpleasant experience. The cookie only stays around for 30 days though, and I’m not going to take the time to make a user account system without MySQL just for that.
I also found out that, apparently, things like lists and tables don’t belong in paragraph tags. You also aren’t supposed to put paragraph tags inside paragraph tags either. Oh well.
loading tweets…