I told you I wanted to try stb oversampling in my last post, and I did! Here is the result (stb 2×2 oversampling on top, nanovg in middle (which is based on stb anyway, but no oversampling), and NV path rendering on bottom, screen size then 5x zoom):
So stb oversampling definitely looks the best, although it is still pretty fuzzy. And moving it around by subpixels looks very decent; it doesn’t get very much of the “shimmer” effect. (Still a bit, but not much to be bothersome.)
Here’s stb oversampling (top) vs NV path rendering (bottom) with a bigger font size (screen size then 2x zoom):
Here, I think NV path rendering looks better; it’s definitely less fuzzy. (The trade-off is that it does suffer from more “shimmer” when translated by subpixels, but it doesn’t bother me too much.)
You can also see that NV path rendering is able to utilize proper kerning: the ‘e’ is slightly below the capital ‘T’, as it should be. Each letter isn’t being drawn on a textured quad, so overlapping is trivial. (Well, for the end library user, at least.)
So, I think that completes my foray into font rendering for now. I’m too lazy to make bitmap fonts at the moment; stb oversampling will work for smaller fonts for now. Time to continue on to other GUI elements. I will try to design the GUI system in such a way that it will be able to utilize any font rendering system should I wish to create bitmap font support in the future.
Haven’t done so much programming in the past week, but I did try rendering fonts with NanoVG (in lwjgl). Unfortunately it’s really not much better than just using OpenGL’s NV path rendering extension. Small fonts look slightly better, but not really good enough for me to want to use them. See the example below, a zoom-in of an 8-pixel high rendering of the font “Verdana”, NanoVG rendering it on top, NV path rendering below. NanoVG is better, but it’s still way too fuzzy to look any good.
So I might just use bitmap fonts for small text; I can’t see any alternative. (Bitmap fonts basically means loading in each letter as a pre-rendered picture and plopping it on the screen. The disadvantage is that they don’t look very good when resized or positioned between pixels, but they’ll at least be guaranteed to render small fonts clearly and crisply.) I’ll continue to use NV path rendering for larger fonts or fonts that need to be animated more dynamically or rendered with 3D perspective. I do want to try using oversampling with stb for small fonts before I move on from font rendering and further develop a GUI system; the demo doesn’t look too bad.
Kanopy film streaming service
I just realized our local library offers free access to the film streaming service Kanopy, and they’ve actually got a decent selection. Not the latest blockbusters, but some good foreign and classic cinema. (They’ve even got The Red Pill, the controversial anti-radical-feminist documentary which Netflix refuses to stream. (Though they did just recently finally add the DVD to their catalog.)) Since it’s free (for library card holders of participating library systems), we’re limited to 10 streams per month, but the streaming quality is decent. It’s not full HD (at least not on my PC), but it’s better than DVD quality. Interestingly they also allow you to embed videos. Here’s “Kumiko the Treasure Hunter”, which I really enjoyed (which I guess you won’t be able to see without an account, haha):
Some metal music
Finally, I recently discovered the band Elvenking. I couldn’t quite get in to some of their older work, but their last album, released last year, is quite catchy. Disregarding the bizarre sense of fashion metal band members tend to share, this song is some power metal awesomeness:
I also came across the latest album from the symphonic metal band Leaves’ Eyes, and found it to be quite catchy as well. Love the use of choirs, the female lead’s operatic voice, and the cheesy fantasy lyrics. (I’m not a big fan of the growl singing, it sounds so gross and ugly and demonic, why is it so popular? It sounds so awful, so unmusical. Bah!)
So I’ve started working on GUI elements for my little engine that could. My quick list of things I’d like to include in a GUI system:
ability to create a menu bar
ability to create windows / panels with drop shadows
ability to create scroll bars for window content
ability to create buttons and button animations (hover, click)
ability to create text boxes and text fields
I started working on text today, i.e., font rendering. The NV path rendering extension actually does a pretty good job with larger text:
It’s not so good with smaller text:
Look at that ugly subpixel rendering:
Bleh! So I’ll have to figure out something else for smaller fonts. I’ll probably look into the Java AWT package, or perhaps look into NanoVG, especially since it looks like lwjgl already has bindings for it. (Maybe it already has everything I want?)
As I blogged a couple months ago, one of my goals for 2018 is to program a very simple 3D engine. I’ve been wanting to program a simple adventure game for a few years now, but the 3D and 2D engines I’ve played around with just don’t have quite the features I want, so I’m attempting to create my own little game engine with the Lightweight Java Game Library (lwjgl).
Here’s what I’ve got so far: I can render a textured box and some resolution independent vector graphics including true-type fonts, which can intersect with the box!
OK, so nothing special yet.
Anyway, another thing I’d like to create with lwjgl is a new version of my MIDI animator, using vector graphics (instead of custom shaders) to represent the MIDI notes. (On a side note, I’m using the OpenGL “NV path rendering” extension for vector graphics support, which was created by Nvidia. Does that mean it’ll only work on their GPUs? I don’t know.) This should easily allow many more possible note shapes to be created.
Here’s my current wishlist for “MIDI animator 2.0” (I should also come up with a more interesting name):
Should be able to run standalone (that is, users shouldn’t have to download and compile the code to use it)
A graphical user interface (GUI) that makes it easy to:
load MIDI files
change note styles / shapes / colors / animations
a scroll bar to make it easier to scroll through the MIDI
Ability to add title / text animations (instead of having to do this in post)
Ability to change / animate background
Ability to load in an MP3 to sync with the visualization
Ability to add an MP3 visualization, such as one of those pulsing frequency bars or something
Ability to export a movie file automatically (if I can figure out how; I’ll save this for last)
Anything else I should include or look into?
So, yeah, this is probably what I’ll be working on in my free time for now. I’ll probably start working on a GUI system next as I’d need to do this for a future game anyway.
Hopefully I’ll get back to actually writing some new music afterwards.
Happy 2018! In 2017, I watched a total of of 180 movies. That’s 54 less than last year’s count, but who’s counting? Here’s my annual collage (full list here):
My two favorite live-action films from 2016 would definitely be Guardians of the Galaxy 2 and A Monster Calls. Guardians of the Galaxy 2 was a bit of a surprise. I enjoyed the first film, but it didn’t feel overly special to me. I enjoyed this sequel a lot more. It was funnier, the story seemed tighter, and the main conflict felt more meaningful. Baby Groot was hilarious; I fear the next installment won’t be able to compete with him being an adult again. A Monster Calls was a more serious film, and I loved the way it merged fantasy with the real world. Beautiful cinematography and music as well.
Animation-wise, no film came close to Pixar’s Coco. It was a beautiful story with super-catchy music. And I loved how its main theme song, “Remember Me”, actually played a very important role in the plot; it wasn’t just some arbitrary addition. Not only is this movie my favorite animated film of the year, I’d have to say it has become my favorite Pixar film of all, taking the place from Finding Nemo. (It’s also Pixar’s highest-rated film on IMDb at the time of this writing. Yay!)
Other enjoyable films of the year include Dunkirk, King Arthur: Legend of the Sword, The Dark Tower, Blade Runner 2049, and It: Chapter One. The two fantasy films were a bit cheesy and had some flaws, but I still enjoyed them.
I really enjoyed the 3D re-release of Terminator 2: Judgment Day. I don’t think it did very well at the box office, which is too bad. I love 3D movies and I love older films being 3D-ized. Considering how much the process of 3D-izing a film costs, T2’s box office results will only discourage the practice. Tragedy, I say!
I saw Terrence Malick’s 2011 film The Tree of Life and loved it. Long and contemplative and somewhat weird, but overall very thought-provoking. I also really enjoyed the 2014 foreign film A Hard Day, an action thriller with a lot of great twists, both humorous and suspenseful, almost Hitchcockian.
Older films I saw for the first time in 2017 and highly enjoyed include Excalibur (great fantasy with a classic 80’s feel to it), Stand By Me, Man of La Mancha (Peter O’Toole is not so great in this, but I just love the musical), Lone Wolf and Cub: Baby Cart to Hades (love this series), and High Noon with Gary Cooper, a classic.
So that’s my 2017 in movies.
And guess what I got for Christmas this year? A year-long MoviePass subscription! Remember “MoviePass”? I blogged about it way back in 2013 here. Their service was a bit too expensive then; I’m glad costs have gone down. My card hasn’t arrived in the mail yet, but I’m really looking forward to it! So I’m hoping to see a lot more new releases in theaters this year.
I haven’t blogged in months! I think that might be the longest I’ve gone without blogging in 10 years. 2017 was a quiet year for this blog; I only managed to write 11 posts, including this one. How terrible! The world needs more of my blather!
I would do a “year in review” sort of thing, but I really didn’t do much worth mentioning. Definitely not much creatively. I’ve stayed busy with other sorts of work, and have not been on my computer nearly as much as usual.
Anyway, here are some hopes and dreams for 2018:
Compose some more music. I’ve got lots of melodies and ideas to flesh out, and it’d be nice to finish my third full-length album.
Program some synth instruments. I started doing some sound programming in Java earlier this year. So far all I’ve got is a program that plays a sine wave with varying levels of vibrato. I’m really just playing around, not really going for anything serious, but I think it’d be neat to see if I can create some interesting sounds and use them in a piece.
Program a video game. This has been a pipe dream for a long time now, but I still want to do it. I still want to create that little mystery adventure game. I’ve still gotta figure out a way to make it visually appealing without needing artistic skills.
Program a 3D engine? Just for fun, and to better understand how they work, I’d really like to try programming my own very basic 3D engine. Nothing advanced; I would just like to play around with the basics of rendering and break stuff on purpose for fun!
Finish writing at least one more novel. I started writing a handful of novels this year. I’d like to actually finish one and publish it.
Write a non-fiction book? If I can think of an interesting subject, might be fun to try writing a non-fiction book.
Play video games, watch movies, and read more books! Because this will help me build character….
Pay off debts. If I can be financially disciplined enough, it’d be nice to pay off some debt. But I still need to buy a PSVR, so, you know… priorities.
That’s all I can think of for now. I’ll probably try to blog a bit more often too. It helps me think.
Happy New Year to all! Hope everyone has a great 2018!
Pros: The puzzles were a little less arbitrary and fit into the story a bit more naturally. The final puzzle made you search through all the material you had used throughout the game, which was a nice finale. Also, this one allows you repack all the material so that someone else could play through it again. (Whereas players destroy the gaming material in the pharaoh’s tomb game during the process of playing, so no one can replay with the same set.)
Cons: Like the pharaoh’s tomb game, the game mainly depended on finding the right symbols in the right order and using a sliding decoder disc to check your code. If your code is correct, you advance to the next puzzle (or set of puzzles). I wish they’d come up with something a little more creative, though I’m not sure what. Symbols just get boring very quickly, and seem so arbitrary. However, the main “con” of this game was that it was just too easy. It might be great for 10-13 year olds, but it feels way too childish for 30 year olds. The puzzles here are just way too easy, and the game is over too quickly.
Therein lies the challenge of designing a good puzzle. If it’s too easy, it’s not interesting, but making it more challenging by making more confusing or enigmatic doesn’t make it more enjoyable.
What makes a good puzzle?
I suppose a good puzzle has three (or four) attributes:
Problem to solve is easy to understand.
Problem is challenging to solve.
Solution is simple.
For story-based games like these “escape the room” games, I’d also add this: Problem relates well to the game’s overall story.
Of course whether or not those conditions are met by a certain puzzle is subjective. What’s simple to someone may be confusing to someone else. But everyone is different and special in their own way, so that’s OK.
Anyway, I think the pharaoh’s tomb game design had problems with attribute 1. They tried to make puzzles more difficult by simply making the instructions more enigmatic. This stargazer’s manor game, on the other hand, had problems with attribute 2, at least for adult players. The challenges were too easy for adults.
Both games had trouble with attribute 4. The puzzles are just sort of shoe-horned into the story and the setting. Perhaps most players are more interested in the puzzles than the surrounding story or scenario… but then why not just go print out some puzzles from the web for free? If you’re going to buy an “escape the room” board game, isn’t for the “escape” scenario? So I wish these games had spent more effort writing compelling scenarios, rather than just taking it a bit for granted. Both scenarios were just forgettable and dumb.
It’s been over two months since I blogged anything, so here are a few random things I have to say.
I’ll admit I haven’t been terribly productive these last couple months. One sister is back from college and got a new kitten, another is on summer break from her job on the other side of the world. I spent a week at the end of last month visiting relatives in Tennessee and doing a little genealogy. I mentioned the Tennessee Archive of Moving Images and Sound in an earlier blog post about my 3x great uncle Bert Hodgson, the song writer, and we were finally able to visit the archive and listen to some of his old recordings. They actually had audio recordings he had made featuring himself playing the piano and singing. They were in rough shape sound-wise, but it was very cool to hear his voice! I can’t say he was that great of a singer though. Still, very cool artifacts!
I’ve been trying to get back to some fiction writing, but I’m having a good deal of trouble. (Maybe blogging more will get my mind thinking in words again?) I just can’t seem to get into the flow of it. Over the past couple months, I’ve started perhaps seven or eight different stories, some of them from complete outlines, some of them with no outlines at all. It seems like no matter what, I get bored with the premise too quickly and want to start another. What writing illness is this called? Trouble with commitment? Commitment-phobia? Oh well. I’ll keep trying. I still get very excited by story ideas and plotting out possibilities, so I really want to get my ideas into book form. I just get bored with them too quickly and am too excited to try something new.
Music-wise, I know I still owe my Patreon supporters four pieces for the two months I delivered nothing. I’ll probably be on hiatus again this month. I can’t believe how quickly this month has flown by. But I still have a good number of melodies I look forward to forming into pieces, and I’m looking forward to finishing another album before the year is out, so those pieces are definitely on their way.
Speaking of music, I really enjoy this guy’s videos about music theory featuring video game music:
Definitely makes me want to try some of the techniques mentioned. He’s good at explaining things too.
A board game
Finally, tonight one of my brothers brought the family this game:
It’s a game you can only play once, and you all play it together as a team. You basically imagine that you’re stuck in a pharaoh’s tomb, and you use cards and a little book to solve puzzles and riddles to escape. The solution to one riddle leads to the next. It’s a bit like a computer game that you pay more for to play on paper.
Honestly, I like the idea of it, but the execution of this particular one was a bit… underwhelming. I just didn’t think the game / puzzle design was very well crafted. Rather than getting “Aha!” moments, you got “Could it be this? Let’s try it. Yep. Huh.” moments. Does that make sense? I guess the puzzles just seemed a bit too random, and what you had to do to solve them just seemed too arbitrary. It’s probably also not a great game for more than three people. Having to pass around the material gets annoying, and having someone else solve a puzzle before you even understand what’s going on isn’t very fun. (And these puzzles weren’t that great to begin with.)
Some of my other family members enjoyed it, though.
But, like I said, I was intrigued by the concept of it. It’s like a linear RPG puzzle game. I’d really like to try creating one myself.
Another interesting video featuring Jordan Peterson on the subject of empathy. Also featured is psychologist Paul Bloom.
Just thought it was interesting because my positions on a lot of issues aren’t about empathy, and can therefore be accused of seeming cruel. It’s not that I’m not empathetic. The example I use a lot is the kid who cries because he wants ice-cream for dinner. The parents who deny him that don’t do it out of lack of empathy. You might as well never discipline a child because it will make him cry. What’s best for a human is not based entirely on what he feels or really wants or suffers with.
So then you look at controversial social issues like immigration or abortion or affirmative action or same-sex marriage. To me, my positions on these issues are based on principles. If you base your conclusions too greatly on feelings, too greatly on empathizing with certain groups, you threaten making things worse, leading to worse suffering. Because it’s not about getting what you think you want right now, it’s about wanting the right thing that will do you the most good in the first place. Does that distinction make sense?
If you want to own the moon, you’ll never be happy. And me refusing to pretend that you own the moon isn’t about my lack of empathy. Ultimately you’re going to have to make peace with the fact that you can’t own the moon.
The suffering endured by someone by the enforcement of my position is not the issue of my position. I’m perfectly capable of being sorry about that suffering. I honestly believe killing the child in your womb is bad for us, regardless of feelings. Engaging in sexual acts while purposefully denying its natural procreative potential is bad for us, regardless of feelings. Giving preferential treatment to certain individuals based on group identity is bad for us, regardless of feelings. Mismanaging our immigration policies are bad for us, regardless of feelings.
Doing the right thing can and many times does lead to suffering, but I hold my positions despite that, not because of it. And, like I said, I believe my positions (at least the ones I have stronger opinions about) ultimately lead to less suffering, if one’s desires are oriented properly. “Oriented properly” might sound like an escape clause, because the proper orientation of desires is part of the argument itself, but it’s necessary to mention; like I said, if you desire something that just can never be, you’ll always be suffering.
Discerning between right and wrong isn’t about eliminating suffering. We can’t use only our emotions or our empathy as a moral compass, because they’ll only serve us inasmuch as they’re oriented correctly in the first place.
Firstly, my mini film reviews for April 2017 are here.
Wisdom from Jordan Peterson
I first saw Canadian professor Jordan Peterson after the video of him conversing with some very disrespectful students went viral. Quite a few people I follow were posting it on Twitter and Facebook. I don’t know how he had the patience.
Anyway, I only recently starting looking at some of his actual videos and lectures, and he talks about a lot of stuff I’m very interested in, such as Jungian psychology, mythology, and anxiety and depression. And he has thoughts and viewpoints I’ve never encountered before, or at least have not heard explained in such a succinct manner. He’s got a lot of fascinating material.
So what follows are just some highlights of some of his talks that I thought were interesting…
On interpreting dreams:
On having goals:
On fixing small problems first:
On Free Will vs determinism:
On a side note, I believe Free Will and determinism are compatible. They’re simply different viewpoints of a decision-making process. Free Will is the experience of determining. You have Free Will because you are the part of the universe that is making that decision. The laws of physics are not determining instead of you, rather you are part of those very laws. Your very being is part of the clockwork universe. A computer can run a program to calculate the answer to a problem in a completely deterministic fashion, let’s say, but it still needs the program to do that. The program is part of that-which-determines.
That said, I don’t know whether or not the universe is deterministic. I just don’t see how the concept is necessarily incompatible with Free Will, or all the spiritual implications of theism for that matter.
Speaking of theism, here’s the problem with atheism:
On depression: “That bad grade is like a portal through which snakes can crawl.” I’ve certainly been guilty of that at times…
Onto more social issues, we have the Gini coefficient, which I had never heard about before:
From my perspective, if I have a strong opinion or belief about something, there are reasons for it. There are lots of things I don’t have strong beliefs about, such as the stock market and the economy, which usually just baffle me. But for things I have strong opinions about, I have reasons.
So when I disagree with someone about something, I’m usually interested to know why. I want to know why they think the way they do; I want to know what led them to that conclusion. Obviously, that doesn’t mean I’m going to instantly agree with them or those reasons. I may disagree with those reasons just as strongly as the viewpoint they seem to lead to. But that’s the point: I like to try to find out where the crux of the disagreement really lies. If I’m wrong about something, I want to know why, and I’m more than willing to change my mind.
I’m willing to argue or discuss stuff I have strong opinions about because I don’t feel a personal attachment to them, at least not in the sense that I’ll feel really bad about being shown to be wrong. After all, a wrong viewpoint can be a perfectly valid logical conclusion from faulty premises, so it’s still a valid viewpoint from my own experiences. A belief can be a valid conclusion and wrong. As long as I know I’m being honest with myself, I can’t really lose face or be ashamed by being shown to be wrong, because the premises themselves were honest.
If one of those premises is wrong, I want to know! I’ll be happy because I’ll have learned something, and my opinion will then be that much stronger. Obviously that doesn’t mean I’ll blindly accept any opposing argument, it just means I’m ready and willing and often even excited to explore the underlying premises that lead different people to such widely different conclusions. I hate to just “agree to disagree” or just avoid disagreements; I want to explore the multiple facets of the differing viewpoints, at least for topics I’m interested in. Of course I’m still going to argue my case, and I’ll think I’m right at the end of the day. After all, if I ever think I’m wrong, I change my mind. Who argues about something they think they’re wrong about?
I say all that because sometimes, more in person than on this blog or in social media, I begin defending my viewpoint about something (sometimes perhaps too passionately), and others may think I’m simply trying to pick a fight or shut someone else up, because I’m just a big meanie. But really I want to know why we disagree on something. Often the root cause is some philosophical viewpoint. Sometimes its as basic as whether or not someone believes in God.
This is also why I quite like Dave Rubin’s The Rubin Report on YouTube. It really depends on who his guest is, but he actually has respectful conversations with people who have a wide variety of viewpoints and they don’t descend into ad hominem attacks or trying to “win” arguments. Granted, the show is more about a conversation than a debate, but you just don’t see this sort of thing on TV these days, not that are idea oriented at least.
A particularly interesting part comes at 40:42 to about 46:17. Peterson is talking about whether or not someone can change his personality, and it sort of segues into beliefs and perspectives. It’s quite an interesting point to make in relation to what I just wrote above. In fact, here’s a little transcription:
… We tend to think, and this would be part of the Enlightenment rationality, is that you look dispassionately at the set of facts, you abstract out a rational conclusion from that, and you believe it. And the thing is that isn’t how it works. Now it’s kind of how it works, but we’ll get to that. What happens instead is you look at a field of facts that’s so broad you can’t see the edges. And then you filter that a priori with your temperament so some things… It’s like, imagine there’s a bright light, and then there’s a black curtain in front of it, and there’s holes in the curtain and light shines through. Well, depending on who you are, those holes are going to be in a different place. So the thing is that the facts that present themselves to you will look different than the facts that present themselves to someone else.
Now, you can overcome that to some degree. That’s why free speech is so important, as far as I’m concerned. Because you’re going to look at the world your way, honestly, and it can be different from mine, even if I look at it honestly. So… But then we can talk. And I can listen to you, and I can alter my preconceptions to some degree by that exchange of ideas.
It’s hard because you unfold the idea and you blast it to me, and then I have to unfold it into action, and into the restructuring of my perceptions. It’s very very complicated. I have to… If we have a profound conversation, I’m allowing little parts of me to die and new parts to grow on a constant basis. So it’s effortful. But it’s one of the mechanisms we’ve evolved to overcome the limitations of the individual human being. We filter information, we’re lazy in our habits, we’re not good at thinking, which is an internal argument, let’s say. Very few people can do that. They don’t think… What they do is, ideas appear to them and they believe them. That’s what happens.
Thinking is different. Thinking is saying, OK, well here’s a set of ideas, and here’s another set of ideas. All right, so let’s put them in combat and see what emerges. Often you have to do that by writing.
Isn’t that… interesting?!
Not long after, Peterson makes an interesting point about AI vision, which I somehow never heard before, even after taking a course in “computer vision” in college:
What you’re doing really when you’re seeing is mapping the world onto your action. In fact, there are connections from your eyes that go directly to your motor cortex. They bypass your conscious vision. So, for example, when you look at that cup, your eyes make your hands prepare to do this. [Makes cup-holding gesture.] Because, well you say that’s an empirical object, it’s a cup. But that isn’t what your brain thinks. Your brain thinks, no, that’s a thing to drink from.
… Why are a beanbag and a stump both chairs? They share no objective features in common, except size. Well, the answer is because you can sit on them. And so a lot of our categories are of that sort. They’re not empirical categories, they’re functional categories.
I never thought of it quite like that! You see? Interesting!
Lord of the Flies
Lastly, one of my friends from high school recently recorded a PowerPoint presentation we did in high school about Lord of the Flies, in which we parodied a teacher giving a presentation. There are a lot of inside jokes (such as the teacher offering a bookmark as a prize for the completion of a puzzle), but it’s very educational and earned us an A++++.