dev, computing, games

📅January 29th, 2019

This was after I tried

  • Cleaning cartridge reader with rubbing alcohol
  • Cleaning cartridge with rubbing alcohol
  • Re-seating the 72 pin connector
  • Replacing the 72 pin connector

I'm sad to say this console has never worked, this is just the last straw. I got it as-is at a garage sale >10 years ago. There are multiple problems. First was with what appears to be the PPU; the evidence is that a sprite layer is invisible. See how the placed pieces show up, but the piece-in-flight does not. And then there were problems with the 72-pin connector. Before re-seating, it was black screen. After re-seating, it showed the corrupted image.

It's tragic, the feature that makes me want the NES instead of an emulator (that tactile-ness of cart pushing in-and-down) is also one of the features that kills it.

I kept this console for parts, got a new one and it's working well.

January 29th, 2019 at 11:14 pm | Comments & Trackbacks (0) | Permalink

📅January 24th, 2019

Finished the Community Center in Stardew Valley (PC)

Stardew Valley is like a "what could have been" if SNES Harvest Moon were transported into our post-Minecraft present day. It's really approachable and fun.

HM (left), Stardew(right)

Comparison is specific to SNES HM because of the similarity of gameplay and visual arrangement of things.

For Stardew I have some small gripes which are visual
• Colors burn retinas
• most of graphics uses low-color palette but lighting effects from lamps and torches have access to way more colors?
• Pixels do not align to pixel grid for fishing line and many animations (see image)

Stardew Valley is not the only offender in the category of "retro-style game that can't pick one video resolution". Shovel Knight and the Scott Pilgrim game also do this. Scott Pilgrim is probably the worst offender I have ever seen. Stardew Valley is not the worst but it's one where I have screenshots on hand.

Why is it bad? There are two parts to this, functional and aesthetic.

Functionally, it is capable of causing eye strain coming from the fact that it is visually confusing. Suppose we are looking at some 2D pixel art at a relatively coarse resolution. We use the same parts of our brains that could, say, appreciate mosaic tile artwork. The image lacks the full fidelity of the real world, but our eyes "fill in the missing information". Blocky edges become round in our mind's eye, detail is made out of nothing. When the resolution changes, it's like a tiled floor where big patches of tiles are different sizes. It's funhouse looking. It defies expectation. How can your brain interpolate things at a consistent rate, then? It's not altogether natural. Personally I experienced eye strain from this. While I am not a medical professional- just a person with a data set of size 1- I believe it could affect other people too since my eyesight is medically typical. I don't see anything necessarily causing my experience to be very unique. For people who aren't involved with graphics or low-res-looking games but play this one, they might experience eye strain yet not be to articulate why.

Aesthetically, it wrecks your scene composition. Here you've gone and standardized line width, balanced the colors of lines against the light source in your scene, taking into account the limited fidelity of the low resolution you've standardized on. But, wait a minute! You have this completely other part of the scene which is at a different video resolution. There's not an easy way to account for that in how you set up the scene. It will just look bad and I'm sad to say once you see it you can't un-see it.

The reason why the problem is possible is because these games are drawn at a much lower resolution than your native display resolution. When I run Stardew, for example, each 4x4 region of pixels tends to be (* minus the exceptions discussed here) of uniform color. On my 1920x1080 graphics setting, this implies the game is meant to run at 480x270. See if I were running the game somehow natively on a very old monitor, it wouldn't need to do anything 'special' in terms of scaling. Each of the TV's pixels is already the size of your face so whatever. But to fake a low resolution on higher resolution displays, upscaling is necessary. And that's perfectly ok. The problem is the way in which these games do the upscaling.

Most upsetting of all is that it's typically harder to get this wrong than to get it right. Yeah you read that correctly. Of course I don't have any game source code and I don't know how the developers have organized things, so I am making broad assumptions.

The supposed ease of implementation falls out of how geometry transforms and co-ordinate spaces work. If you keep a consistent low-resolution, you can set up things by:

  1. Allocate a low-resolution (e.g., 480x320) intermediate target and a full-resolution (e.g., 1920x1200) final target
  2. Draw your graphics to that intermediate. Move, flip, rotate sprites as necessary in that low-resolution space
  3. Draw the intermediate, scaled, to the final target

The complicated step for #2 isn't so bad since you only need to deal with one co-ordinate space. The scale at the end is really simple.

But instead, games decide to do this:

  1. Allocate one full-resolution (e.g., 1920x1200) final target
  2. Draw graphics directly (?) to that target.
    • Each sprite's transformed position needs to take into account the scale-from-lowres-space-to-final-target

The problem is in step #2. Even if your calculations are 100% correct for getting everything positioned correctly in the final target, this setup will cause resolution-mixing artifacts (e.g., if you rotate anything by non-45-degree increments) since it is baked right into the design.

So, why have game developers gone out of their way to get this resolution-mixing behavior?

Maybe to save perf or memory. That said, I'm not pursuaded a small (~480x320) intermediate and a scale will make or break you for these games. Maybe they don't care or they don't think people will notice.

As much as I like Minecraft I think a lot of people have been corrupted by Minecraft aesthetic. You have the low-res-looking, limited-pallette-looking voxel art, where perspective transform is putting boxes of different sizes in your face all the time until it seems visually normal to you.

As for whether mixing low resolutions is bad or even a problem is getting out of the technical and into the subjective world of art. I assert that it's bad. I assert that it's bad in the same way that the author of McMansion Hell puts forth a case against certain architectural styles. I put forth a case against mixing of low video resolutions here. Now I think this post is way too long for describing something so simple and obvious but it's written without any particular target audience in mind so maybe you can make something of it.

But wait, there's more! Pallette inconsistency.

How many colors are in the pallette? Answer: yes.

The color inconsistency, I can also sympathize with-- it's hard, and arguably more work to take the result of your lighting calculation and quantize it down to the pallette used for the rest of the sprite artwork. But I mean, is it that hard? It's something you really can do programmatically, it's not like you need new art assets. You can use a lookup table in a shader, a volume texture if you want. There are different options for fixing this, but they just don't for some reason. Stardew Valley has no shortage of ambitious stuff- a procedural dungeon, a multiplayer mode, lots of characters with real-time behavior-- so it's not like they want for time or talent, but the take-away is this isn't where they chose to spend their time.

All of this being said, I want to make it clear that I liked the game.

So back on the game itself-- what Stardew does better than Harvest Moon:
• Automation of tasks. The sprinklers and auto-machines to feed and care for animals are a huge ease off of grind, unlockable in the game.
• Controls are less frustrating by design. It's impossible to accidentally expend seeds on an ineligible place, or drop things on the floor. How many times I've attempted in HM to give someone a gift only to Throw It On the Ground
• You can step "through" most crops, allowing for more flexibility in how to organize them
• The Minecraft-isms are fun and thoughtful.
• You can customize where new buildings are placed
• You can marry a person regardless of gender (e.g., same gender)- a step forward. While the original 1996 Harvest Moon doesn't have this, the modern Harvest Moons (Story of Seasons) don't have it either
• More interesting characters. For example I liked Linus's storyline, where he lives as a homeless person but your role is not to "fix" or "save" him. Rather, your role is to be his friend
• The relationship system is less broken. The rate of heart levels increase is slowed as the number of allowed gifts is fixed
• There is an interesting variety of characters. They all have unique events for friendship, not just marriage candidates

The game doesn't have a conventional "ending" like HM where there is a long scene and then credits.

There is an "evaluation" of sorts on the 3rd year as well as two big milestones. An easier, sad-outcome one (completion of Joja Community Development project) or the difficult, happy-outcome one (renovation of the Community Center). I ended up making two farms where one got each outcome. Although I did these, there is still a lot of replayability potential.

Overall verdict: it's good! Krobus/10

January 24th, 2019 at 11:23 pm | Comments & Trackbacks (0) | Permalink

📅January 20th, 2019

I made a Winamp plugin that broadcasts what song you're playing as a Discord Rich Presence.

An uncommon scenario? Sure, although I'm not too worried about that. This idea of functionality came from the integration Spotify has with Discord right now, plus there are a lot of other interesting ways in which app developers are implementing Rich Presence.

The main challenges for this project were understanding not one flow of communication, but two; the Discord RPC API and Winamp plugin architecture. You figure out how to do one, then how to do the other, and then merge the result together. One thing I am grateful for is the fact that Winamp is debugger-friendly and can also be launched by a debugger without issue. There wasn't anything too gnarly that happened for this project but it helped to be able to step through some things- for example, the plugin configuration menu code-- to debug. There was one problem where DialogBox was being called with NULL instead of the proper module handle, and it would indeed create a dialog box but of an unexpected type. It helped to be able to step through and debug this.

What it looks like, in action:

The source + binary distributed through GitHub repository here: https://github.com/clandrew/wdrp

Problem solved!

January 20th, 2019 at 4:54 am | Comments & Trackbacks (0) | Permalink

📅November 22nd, 2018

Finished Final Fantasy Legend (GB)

This is a spin-off to the Final Fantasy series and related to the Sa-Ga series made by Square Enix.

The whole thing with Legend is it's "a lot more epic than it seems like it should be". See the games I remember Game Boy original were fairly light in subject matter, emotional power and how the story is delivered. But, this game:
• Levels with a scary unkillable monster
• Real actual character death
• An ending sequence where you fight the creator of the universe
Confirmed the creator of the universe is wearing a top hat
It turns out the composer for this game is also Nobuo Uematsu the same as mainline Final Fantasy series except for XIII. If you listen carefully you can hear similarities to the rest of the series' music.

For the gameplay, you have the flexibility of choosing all characters in your party and their type (Human, Mutant, Monster). The game suffers from some balancing issues which make certain bossfights far, far disproportionally harder than others.

There is apparently an homage to Legend in Final Fantasy XIII where (spoiler) Orphan can be killed instantly by Vanille's Death spell. It is not 100% guarantee but there is a chance particularly if staggered. In the Final Fantasy XIII Scenario Ultimania book it says outright this was an intentional reference to Legend.

November 22nd, 2018 at 9:24 am | Comments & Trackbacks (0) | Permalink

📅November 7th, 2018

For a side project creating a shader that added VHS degradation effect (for the end result of that-- shader posted here).

I was looking around for reference material. For some reason I was having trouble finding good stuff in the form of other shaders. I was put off by how common it was to mix tape degredation effect with CRT monitor style distortion and scanline artifacts (scanlines which cannot be chalked up to tape banding). I guess it's not cool to have one without the other? I wanted to reproduce a degraded tape. But, not the experience of someone pointing a camera at a monitor.

Since I couldn't readily (in the like ~15s of searching) find the type of video comparison I was looking for I quickly made one using a rip of one of my old anime tapes (I used like this $20 USB-composite dongle attached to my VCR) and the DVD re-release of the same thing.

Left: DVD
Right: VHS

Blown-out colors, blurriness. The real money areas were the band of distortion at the bottom and left... The tape, despite being nearly 30 years old, didn't look as 'bad' as I was hoping. It didn't look s***ty enough to be directly taken as reference. I used it as a starting point, and hammed it up a lot for the shader.

If you were to attack this problem a different way you could do an ML style transfer. I did this in a non-ML way because I wanted some control over the warping and noise, some debuggability, rather than just "throwing more and more data at the problem until it looks right".

The resulting shader is here: https://github.com/clandrew/vapor/blob/master/VaporPlus/PostprocessPS.hlsl

November 7th, 2018 at 9:54 pm | Comments & Trackbacks (0) | Permalink

📅October 22nd, 2018

One track of the music from Primal Rage sounds a LOT like Secret of Evermore
SoE "Boss theme 2": https://www.youtube.com/watch?v=RwyXdGPYOWw
Primal Rage "Stalagtite Cave" https://www.youtube.com/watch?v=yPwTDlgR0x0

They have different composers so maybe a coincidence.

October 22nd, 2018 at 10:02 pm | Comments & Trackbacks (0) | Permalink

📅October 16th, 2018

Uncommon real-life problems are solved by Tintin++ scripts

October 16th, 2018 at 5:26 pm | Comments & Trackbacks (0) | Permalink

📅October 13th, 2018

Art project: Advertisement

To attract possibly some new players to Deathwish, a text RPG I play sometimes, and to increase visibility I had an idea to purchase an ad. The MUD community has two big portals for indexing MUDs: MUD Connector, and TopMudSites. TopMudSites already advertises 4-5 MUDs on rotation in the form of 728x90 banner ads which are not too intrusive. We could put an ad for DW into that set.

I wanted the ad to be pixel arted and look a bit like DW's home page- skulls and fire! And be animated.

After drafting up most of it I went through iterations with the MUD administrator until getting the final version which was sent to TMS.

I was worried it would not be accepted, if they thought the skull was too much or having a mild curse be in the hostname would be an issue. But I'm happy to say they accepted the ad and it's up there now! The site administrators were kind enough in letting me sign up for extra time so it will be up for a while- about 2 years.

Final result:

As of right now you can see the ad at TopMudSites, if you just refresh the page a few times and ensure your ad blocker isn't running.

October 13th, 2018 at 12:18 am | Comments & Trackbacks (0) | Permalink

📅October 1st, 2018

Whenever there are no mirrors around, I’m a pair of disembodied hands, to save on rendering costs. Everyone is always very polite in not pointing it out.

October 1st, 2018 at 9:17 am | Comments & Trackbacks (0) | Permalink

📅August 12th, 2018

Finished Gundam Wing: Endless Duel (SNES)
Story Mode with Vayeate

This is a Gundam-inspired fighting game released in Japan only. You can play as several of the Gundams from the show. Gosh this game has so much graphical polish and the soundtrack is A++++. For this I played through the story mode and recorded it on my capture card.

I got this replica cart to play it

From playthrough (recorded with my awesome new capture card)--

Deathscythe and Epyon if unlocked are very over-powered in this game. In general the mechs are not very balanced. Still, my regular tends to be Vayeate because it is my favorite from the show. Life would be boring if everyone playing Street Fighter was Zangief, right?? Vayeate has a couple good features- this huge space rifle-like thing that can be used as a bludgeoning weapon, plus a few attacks that go diagonally.

August 12th, 2018 at 12:40 pm | Comments & Trackbacks (0) | Permalink