Monday, December 31, 2018

The Classes branch is in another hive

HKEY_CURRENT_USER contains several subkeys, but not all of them are stored in same Registry hive file. As expected, most are from ntuser.dat in the root of the user profile, but the Classes subtree gets a hive to itself. It's stored in AppData\Local\Microsoft\Windows\UsrClass.dat. Interestingly, that file doesn't exist under the default user profile. It appears that the classes hive is initialized empty when profiles are created.

Sunday, December 30, 2018

Markeen maps update 12/30

While re-playtesting all the Markeen-inspired maps I've finished so far, I noticed that one of them was utterly devoid of decorations and therefore a bit dull. So I sprinkled a few background arrangements around. I've also selected the next randomly-generated map to polish up. It's moderately messy, but I think it could become interesting:


Saturday, December 29, 2018

Markeen maps update 12/29

Today I finished up the seventh Markeen-inspired map.


Since the level is small and not very complicated, I used creatures to provide most of the challenge. On Hard mode, there are two areas with a Shelley dive-bombing in from both sides, which can get exciting.

Friday, December 28, 2018

Markeen maps update 12/28

With the sixth Markeen-inspired map all cleaned up, today I moved onto a new one. I selected this Markeen-generated starting point:


It's significantly smaller (less than 1/5 the area) and less messy than the previous level I polished. I've already fixed the foreground, determined the level's flow, added a couple secrets, and started adding sprites.


Thursday, December 27, 2018

Markeen maps update 12/27

Today I did some more playtesting and refining of the sixth Markeen-inspired map. There were a few tiling errors and point imbalances lingering, which were easy to correct. Weirdly, there are two versions of the solid platform top tiles - one set as front and one not. I'm not sure when one want might to use the non-front one; I had to replace it with the front version to make climbing look right.

I noticed that part of the space secret area was inaccessible, and when I initially fixed that, it became an inescapable trap. I worked around that by providing a one-way ride out of the hazardous part. (Riding the short lower loop back toward the long loop is deadly.)

When I tested on Hard mode, I found that I had exceeded the objects limit, so I had to take out a few infoplane items. But now the level could be considered done!


Wednesday, December 26, 2018

Markeen maps update 12/26

I'm still working on the sixth Markeen-inspired map. Today I fixed the points distribution and most of the decorations. Previously I just connected all the areas together with secret passages, so most of the secrets weren't worth anything. Now there are appropriate rewards for all of them. The high-scoring point items that Markeen likes to scatter generously have been replaced with normal items.

To put the stars in the space background, I used the random mode of Abiathar's Tile Instance Remapper, though I had to use Contextual Help to remember how to operate it. Pipes are also cleaned up, but I still need to add background decorations for variety.

Monday, December 24, 2018

Markeen maps update 12/24

I'm still working on the sixth Markeen-inspired map. Today I populated the level with creatures, put in the first sketch of the background, and fixed a bunch of solidity errors. Having the background really makes it look like it's coming together. I still need to add some background details to break up the monotony, fix the points, and clean up the pipe decorations.


Sunday, December 23, 2018

Markeen-based level project continues

Today I made a bit more progress refining the very large Markeen-generated level. All tiling errors have been corrected. All optional areas are now reachable through (quite a few) secret passages. The level can be won, though I've barely started placing creatures, so it's not very challenging yet. I am also yet to start on the background and pipe decorations.

The original level generated by Markeen

The level as refined so far

Saturday, December 22, 2018

Continuing the Markeen-inspired project

With some time on my hands now, I'm looking at the projects I left in progress. One was to create a Keen 5 level pack by starting from random Markeen-generated levels. I previously finished five levels but got stuck on a particularly large one. Yesterday and today I chipped away at it by fixing incomplete platforms and smoothing out the structure. That's nearly done now; the next phase is to make it playable.

Thursday, December 20, 2018

Mod demos on Keen Modding Live

I've been corresponding with another PCKF user about using the Keen Modding Live platform to host demos of mods. This will make it possible to embed demos on web sites like the KeenWiki. It will require some special considering from KML since uploading an entire mod doesn't fit the "user level plus standard episode package" model. I don't plan to deeply integrate the two kinds of players. The one for mod demos will probably not be linked at all on the main site; it'll just be for embedding.

Sunday, December 16, 2018

Creating an object with New-Object -Property won't preserve property order

A convenient way to create PowerShell objects with a given set of properties and values is to make a psobject with New-Object and supply the data in a hashtable literal to the -Property switch. But since hashtables are unordered, this will add the properties to the object in a jumbled order. For example, New-Object psobject -Property @{'a' = 1; 'b' = 2; 'c' = 3; 'd' = 4} produces:

c d b a
- - - -
3 4 2 1

If you're going to display the objects raw and want a nice order to their properties, you need to create a plain psobject and add the properties one at a time in the desired order with Add-Member.

Tuesday, December 11, 2018

Volley's retry mechanism works better than manual retry

I recently discovered Volley's setRetryPolicy feature to automatically retry requests that time out. I had previously been restarting the web request in the error callback up to a certain number of times, which worked but was messy. When I replaced that logic with Volley's mechanism, I found that my app became more likely to successfully get the data. In my testing, I've almost never needed to use the UI's retry feature anymore.

Saturday, December 8, 2018

onCreateOptionsMenu can be called before onCreate

Today I investigated a NullPointerException crash inside an activity's onCreateOptionsMenu. It was strange because the reference that was null is always initialized by onCreate. Apparently, onCreateOptionsMenu can be called first, though apparently that's not usually the case. I was able to trigger it by opening the activity in question, switching to the Settings app, revoking a permission from my app, and switching back to my app.

Friday, December 7, 2018

Volley can automatically retry timed-out requests

I had previously added some logic to my app to try a Volley request a few times if it failed due to a timeout. Today I learned that Volley can handle this automatically. Request objects have a setRetryPolicy method that takes a RetryPolicy, probably a DefaultRetryPolicy specifically.

Monday, December 3, 2018

Export-PfxCertificate won't export non-exportable private keys

Upon import to the certificate store, private keys can be marked as non-exportable. A commenter on Super User pointed out that PowerShell's Export-PfxCertificate cmdlet fails on such certificates. That makes sense, though I had hoped the non-exportability restriction was only enforced by UI. There are unofficial/unsupported ways to get around this by using tools like Mimikatz.