Proving NP-Completeness by Restriction

Proving NP-Completeness is a core topic in the studies of algorithms. For most of the algorithms textbooks, they show some complicated tricks which reduce a known NP-Complete problem to another problem, say Q, to prove that Q is NP-Complete. This works because if problem A reduces to problem B, then B is at least as difficult as A. And since A is NP-Complete, B is also NP-Complete. However, many problem reduction methods are extremely subtle and often require some “devine instincts” to come up with in the first place.
Read more

Music in Film Terminology

Just took an interesting gen-eds course Music in Film last semester. Though I publish mostly technical or game dev articles on this blog, I really enjoyed the materials in the course and I’d love to share the basics (that is, the terminology) of the course here. (Note we refer “music in film” as the score music of films rather than the sound effects.) Tonality vs. Atonality Tonality is a principle which the music is composed to center around a tonic central.
Read more

Andrew Ng Machine Learning Course Review and Brief Notes

Just completed the renowned Andrew Ng’s Machine Learning course (on Coursera) these couple of days. Since many people are curious about this course, I will do a quick write up on how I think about this course and what I actually learned. About the Instructor Andrew Ng is the co-founder of Google Brain and Coursera, and an adjunct professor at Stanford University. He was also a former vice president and chief scientist at Baidu working on large scale artificial intelligence projects.
Read more

Trying out Medium

Haven’t been writing articles for almost half a year because I got back to school this spring. It’s really diffult to handle both the course works and side projects (such as maintaining a blog) at the same time, and I’m starting to worry that I’ll have even less time writing after I graduate. The “harsh” reality and “tough” life often change our hobbies into more “entertainment” ones unlike writing or other creative activities.
Read more

Knights Rubbish Released

My second game project Knights Rubbish has released! Originally I was just doing some experiments with Godot Engine and trying to implement the barebones of a platformer, but then the project grew larger and larger as I combined it with other mechanics I was testing. After a year and couple of months, Knights Rubbish was born! Real Photos as Game Graphics One of the coolest features in Knights Rubbish is that most of its graphics are made with processed photos.
Read more

Self-Publish a Graphic Novel With Amazon KDP

I just self-published my very first graphic novel Inter-dimensional Time recently, using Amazon’s KDP (Kindle Direct Publish) platform. In this article, I am going to share my experience with Amazon KDP, and briefly go through the process of self-publishing. Introduction Amazon KDP is arguably the cheapest and most convenient self-publishing service out there. It requires no service fee and lets you publish your book in both eBook and paperback formats.
Read more

iOS Tuner App Using Audiokit

I made an iOS Tuner & Metronome App last couple of months due to boredom. Suffering from boredom again this month, I decided to write an article on how I implement it. In this article, I will show: How to sample audio from the microphone using AudioKit. How to calculate the notes from raw frequencies (of the sampled audio). I will not delve into how I implement the views since the code is quite bulky and tedious.
Read more

Stirling's Formula - Approximation of n!

I.Introduction: The Coin Tossing Problem Whenever you have difficulty deciding something, for example, whether to attend the lectures of a course or not, the most common thing to do in this scenario is to toss a coin and see whether the heads or tails of the coin is facing up when they land. Assume that the coin you toss is uniform, meaning that the chance of the heads to land facing up is equal to the chance of the tails to land facing up.
Read more

Shineright Studio starts...again and again!

Hello world, again! Well, I’ve been moving my blog around different platforms quite a bit this year. Within only 8 months I’ve switched from Google’s Blogger to a self hosted Ghost blog on an AWS server, and now, I moved all my articles on my AWS server to this new blog, using Hugo static page generator, hosted on GitHub. The reason why I switched to Hugo on GitHub is quite simple.
Read more

Customized 2D Following Camera in Godot

Two weeks ago, I wrote an article about some camera moving schemes used in Metal Slug 3. In this article, I will show you how to actually implement such a camera. I will be using the open source Godot Engine with GDScript since I believe any programmer with could understand GDScript quite easily, so let’s get started. First, let’s define some variables we’ll use later. 12345678910 # Scroll the screen (aka.
Read more