BattleCrypt Art Style

Commit 977b814.

This is it. This is what BattleCrypt looks like right now for REALS. I really liked the progress I had on tiles using Photoshop to paint. However, it took forever to create tiles and was difficult to keep the continuity of style across elements. This is my natural style. This is the type of art I can do quickly, maintain a consistent feel across assets and be satisfied with the presentation. I’m still tweaking color palettes, ink lines and other stuff but I think I’m hitting my stride in the overall look.

I started with this mockup work:


Then I recreated almost every Tiled asset I had created over several weeks in Photoshop in a few long, caffeinated evenings. I also overhauled characters and started sketching some UI stuff. Spells, particles and lots of that stuff are still screwy.

Is this style better than the previous? I don’t know. I like that style a lot too. But I can’t turn it around fast enough to bring the game together. Another thing I like a lot better about this is that it feels more “fun”. The other style’s more realistic feel was a bit dark and scary. I want this game to be something parents are comfortable letting their kids play. The theme, while it does have skeleton wizards, is not intended to be horrific, occult in any serious sense, or aligned with any particular religion. I think this style nails that so much better. Hope you like it!

Snapchat: Get Off My Lawn

WE recently hired a 30 year old, single, male software developer and an 18 year old, single, female admin assistant. Both of them are active users of Snapchat and were eager to show me how it works. I downloaded the app, added them as friends…and never used it after the first week.

It’s not that I don’t like its functionality. It just bores me. And it has no place in my life. I tried to think about why it’s a useless app to me and I realized: it’s because I’m old, married and “uninteresting”. Normally I’d find that depressing but in this case, it was a positive realization.

I hate Snapchat because it’s exactly counter to the life I have built. It’s transitory, unsubstantial. You capture a memory and, moments later, it’s gone. I remember when life was like that. Relationships were short term. Time was not super important. And I was eager to leave bad decisions in the past without a lot of evidence they happened. Snapchat fits that lifestyle. Snapchat makes it difficult or impossible to post photos from your gallery. It forces you to take extra action to save a photo, otherwise it’s gone forever.

I don’t have that life. The significant and interesting memories I make are perhaps fewer in quantity, but greater in quality. The relationships I have are long term and the passage of time is a burden I feel more keenly. The memories I capture, I want to keep.

I want to back my photos and videos up to Google’s cloud. Forever. I like how Google creates “remember this day” galleries. I want to remember those days. I want to pause more and enjoy the good times I’ve had with friends and family. I want to keep those memories fresh, not discard them seconds after they’ve happened as if I have an endless amount of time for disposable memories.

Maybe that’s not just getting old? Maybe that’s maturity.

Manga/Clip Studio and More Art

Commit 2c94b2c.

I follow a guy on twitter named Derek Laufmann. I love this guy’s work and bought his art book (SPOILER: It’s amazing). He recommended a program called Manga Studio (now named Clip Studio), which was on sale at the time for only $20. This program is AMAZING.

I consider myself pro-level with Photoshop as a designer. But I’m a bit of a noob as a digital artist. I have gotten better but still really struggle with the “feel” of Photoshop and a Wacom tablet. My digital work has always been inferior to my traditional media skill. Manga studio may have just completely changed that. It’s out-of-the-box brushes are fantastic and within an hour felt so much more like the art tools my eye and hand know. It does have tons of quirks that frustrate the crap out of me but this is a cheap program! I pay more every month for Adobe Creative Cloud than this product cost me forever and it is a really solid application.

Anyway, I’m really having fun with this. I grew up drawing a very comic-book-realism style and I finally feel like I might be able to nail that digitally. I’ve been working on some sketches that might become the menu backgrounds and have been playing with UI stuff too.

Here’s one of the first sketches I did in Manga Studio:



Here’s me getting the feel for coloring with the various tools:


Playing with what a menu might look like, characters still unfinished:


And testing some UI component style and stuff:



The character at the top of this post was one of the last things that I did. I was playing with masks and other things that will differentiate characters and personality at small sizes. Note that I also have been sketching more non-digitally as well:


A Brave New (HD) World

Commit 69e4f6c.

It has been about two months since the last post and there have been HUGE overhauls!

First, I worked on a variety of mockups per the last post. I started by mocking up what a character might look like with higher-resolution sprites:


Then I mocked up what the level might look like in the same style:


Then I played with what the background walls might look like, starting with things like windows:


Then I took that style, created some quick-and-dirty tiles and played with a map in Tiled to see what it would really look like:


I didn’t like aspects of this style so I played with color palettes and changed stone styles a little bit. This is a Photoshop mockup, not actual functioning tiles:


I liked that and turned a lot of the foreground into real tiles. I created a Tiled level and then mocked in the background in Photoshop. This is a combination of real tiles in the foreground and mocked up sketches in the background:


I turned the background concepts into tiles too, and I also played with tiled light pieces. This is all real tiles:


Finally, I got this all into the actual game. This was a big effort because ALL of the art changed. Moving to larger tile sizes broke literally everything and also required changes to character movement and properties because levels were now further apart.

Another thing I’ve struggled with is character animation. Even being super excited about art, I have to have limitations. I can’t animate hundreds of frames of character art and ever finish this game. I also can’t have characters with no animation. So, I have been working on a procedural animation. I think this is going to be a good balance of quality/presentation and reasonable level of effort. Characters won’t run and have complex leg movements, they’ll float.

The image at the top of this post is the current product. The game is once again playable with procedurally-animated characters, higher resolution tiles, better parallax, new character art and all new tiles. This is an interesting graphic of the art journey so far:


Authorization Errors with WordPress API

I have wanted to explore the use of WordPress as a back end for Single Page Applications for some time. I installed the WordPress REST API v2 and have tried various types of authentication. I’m not a big fan of OAuth so I originally tried Basic Authentication just to get things working. GETting page information worked just fine with or without authentication because GET requests generally don’t require auth. However, POST or PUT requests would fail with a 401.

I thought maybe it was because the Basic Authentication plugin was pretty old and not well tested with the latest version of WordPress. So, I also tried using Application Passwords, which is cooler and safer anyway. Unfortunately, I only got 401s with that too.

After much Googling with few results, and having minimal time to pursue information, I gave up and moved on. Recently, however, I’ve had renewed interest in being able to interact with WordPress via an Angular2 app. I dusted off my test blog with the WordPress API installed and started poking at it again. I crawled through the REST API plugin code to try to figure out why authentication was failing and found the “rest_cannot_edit” message in the class-wp-rest-posts-controller.php file. After tracing the path of authentication through WordPress core and plugins, I became suspicious that authentication was not even being attempted. I serialized the $request object available to the permissions check methods and returned it with the 401 response. Sure enough, no authorization header was present in the request object!

I took my inspection higher and realized that the Authorization header was being stripped at the server level, before WordPress or even PHP could use the information. I’m aware that some shared hosts do this but I was testing this on a VPS. I did not expect my VPS provider to have that set up by default. I found some .htaccess rules that would work around this but they didn’t seem to work (my .htaccess skills are rusty at best).

After going down a couple of rabbit holes related to server settings and PHP configurization I contacted my server support team via live chat. While waiting for them to respond I took another look at the .htaccess file and moved some stuff around on a whim. To my surprise, my next Postman request returned a post object with an updated title!

So after all of my work and suspicions that plugins were outdated, my password was wrong and a hundred other false leads… it turned out to just be an annoying server config that was not mentioned on any wiki I could find on my provider site.

So, if you have 401 Not Authorized response on all WordPress Rest API requests, you’ve checked your username, password, base64 encoding and header formatting…it’s probably your hosting provider and it may be possible to allow the HTTP Auth via your .htaccess file. WordPress’ .htaccess file looks like this out of the box:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Update it to look like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

# Enable HTTP Auth
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# END WordPress

The [L] at the end of those lines means “last” so the server will stop processing the file after the wordpress conditions are met, before the auth rule is applied. So, the auth rules need to come before the WordPress default rules or they will never be applied!

Hopefully this helps the next person, I wasted a lot of time on this.