Off to Milan for the weekend!
Month: March 2018
Yawn
Yawwwwwwn…
(having fun animating with SKAction)
Walkers, 1985-91
Walkers, 1985-91
Sub Orbital Guardian
Sub Orbital Guardian, 1991. Blacktron II walker (more like a shuffler) has a canopy that opens and plenty of transparent neon green parts.
Super model components
The M:Tron super model was built from the parts of the following three sets: Particle Ionizer, Celestial Forager, and Vector Detector.
Secret Space Voyager
Secret Space Voyager, 1991. Super model made with parts from three sets. Large spaceship with three astronauts. The medium-sized rover is securely held by magnets fore and aft.
Reducing friction
In my post on changes I wrote:
I want to simplify my online life/presence. I was maintaining (neglecting) two separate blogs while mainly posting to Twitter instead.
7 years ago I started a coding blog using free WordPress hosting. This wasn’t ideal, but was good enough at the time, and the price was right. A year later I started a personal blog that also used free WordPress hosting. (The reason for the separate blog was not wanting to dilute my coding blog with personal content.)
Over time I became increasingly frustrated with WordPress dot com’s ads and my lack of control over what are supposed to be my websites. Having two blogs to manage was just extra hassle. Fast forward 6 years and both my blogs had been neglected for years, and when I did post online it was to Twitter. Posting to my own blog should be as frictionless as tweeting. I had been following the development of Manton Reece’s micro-blogging service, micro.blog for some time, but had not yet signed up. In February with the extra free time of not having an employer and inspired by this great post by Brent Simmons, I decided to finally tackle my blog problem. I wanted to accomplish three things:
- Move my blogs from wordpress dot com
- Combine my two blogs into a single site
- Integrate micro-blogging (status) posts into my blog
I decided that I would stick with WordPress as a platform, just not WordPress dot com as a hosting company. I signed up for 5 years of hosting with BlueWin because the price was right and their WordPress support was good enough for me. I had some trouble with WordPress’ import/export tools and ended up having to do a lot of manual migration, but otherwise it was pretty straightforward to port over all posts from my two blogs and combine them into a single site. As a bonus I made SSL mandatory for the site. I even added support for JSON Feed.
At the same time I signed up for an account with micro.blog. While they offer an option to host your micro blog posts, I wanted to host everything here on my own site (which micro.blog fully supports in both their website and apps). I created a micro
category to be used with all status posts, so that I could hide them from the main page of my blog. I did opt for a $2/month cross-posting bot that would intelligently post my blog entries to Twitter. (This post by Chris Reed on Configuring WordPress for Micro.blog was very helpful in getting everything set up.)
What I’m doing is not exactly POSSE because status posts under 280 characters are cross-posted to Twitter as plain tweets and don’t link back here, but that’s fine by me. I don’t care if Twitter has copies of my photos and words as long as I have the originals hosted here on my blog.
I downsized from two blogs to one, and now instead of tweeting, I publish status posts to my blog (which get cross-posted to Twitter). I mostly use micro.blog’s iOS app for status posts, but any WordPress-compatible client would work.
Status: 2018-03-14 11.49.04
Quick salmon lunch
Pixel Art Map Tiles in SpriteKit
I decided to use SKTileMapNode to render the mountain that must be climbed. There will be tiles for stone, sky, ice, snow, flowers, etc.
As I mentioned in my previous post, Mountain Dash renders 1x pixel art at 2x (which means 4 × 4 or 9 × 9 pixels on screen for each pixel in the original assets). I chose to do tiles at 16 × 16 pixels, so I need each tile to render at 32 × 32 points. It is entirely possible to do this using the Tile Set Editor and Tile Map Editor in Xcode, but I ran into two problems:
- Every time you assign an image in the Tile Set Editor, it defaults to the image’s actual size (16 × 16) and must be manually changed to the desired size (32 × 32)
- Occasionally Xcode for whatever reason decides to blur the tiles when scaling them up. The only solution with the Tile Set Editor is to remove and then re-add all the images (and manually retype all the sizes yet again).
I already knew that I could fix the blur in code by setting filteringMode = .nearest
for each texture, but while the Tile Set Editor lets you define textures, it doesn’t let you set filteringMode
.
All of the above was way too much hassle and as it turns out unnecessary. Instead of scaling up my maps and my sprite by 2x, I could use all my assets at their native sizes and just use an SKCameraNode and set cameraNode.scale = 0.5
to scale in 2x. I need to use SKCameraNode anyway to scroll my map (you just change the position of the camera), so this was perfect. Also it’s helpful for debugging to use the camera’s scale to either zoom in (see pixel art details) or zoom out (see more of the map on screen at once). (The above screenshot was taken at 4x or scale = 0.25
.) I may even add a pinch-to-zoom gesture to allow the player to do the same. The scale on SKCameraNode was unintuitive at first because it is the inverse of what I expected; I’m used to writing scale = 2
to double a view’s size.
Even with everything at 1x, I’ve still had the Tile Set Editor barf on me once and give me blurry tiles, so I’ve decided to permanently fix this by looping through all the textures in the tile set and setting the filteringMode. I wonder if there’s a better way of handling this…
let tileSet = map.tileSet for tileGroup in tileSet.tileGroups { for tileRule in tileGroup.rules { for tileDefinition in tileRule.tileDefinitions { for texture in tileDefinition.textures { texture.filteringMode = .nearest } } } }
Status: 2018-03-14 09.07.35
Beignets for breakfast courtesy of Cafe du Monde from New Orleans. My son wrote “Cook Me Plz” on the box! 😂