Tag Archives: Flash

Frantic Bouts of Productivity

Work continues on my long-overdue website upgrade. I now estimate that the project has reached the milestone halfway point of completion. And I’m feeling pretty good about the changes; not only is the site looking slick but also includes some major improvements. At every step, I’m testing to make sure it’s functional and readable on a variety of resolutions from mobile to 4K, and that it smoothly scales for everything in between. CSS sure has come a long way in the last decade towards making element scaling more possible.

I was also impressed by the CSS grid layouts. They made it pretty simple to realize my bento box-style homepage with different-sized blocks that automatically arrange themselves to fill in any gaps and any number of columns. And almost no JavaScript was required for this, save for a bit to make all the columns end on the same row, which warrant either hiding or resizing some blocks. I think this new look for the homepage is a lot more compelling. And since it’s an automatically generated mix of posts and pages, it won’t require any additional publishing work like the old homepage “slider” (which has been randomly breaking a bunch lately despite me not touching it for a decade).

I’ve also been designing the look from the start with a dark theme, as I think that’s generally the preference these days—to not have your eyes blown out by bright screens all day. But I do plan on tacking on a light theme as well once it’s all done. I also have a slick new background mask that’s better compressed. It was a whole saga figuring out that WEBP alpha channels are not compressed the same way as RGB channels, and then discovering that there’s now actually masking native to CSS so I could just make the mask be grayscale with no need for an alpha.

snake spinner animationAnd I’ve finally made a snake spinner/throbber animation for loading events (seen at left). I wanted to do this in the past when I was making the current version of the site. I tried using Flash animation, but it didn’t look quite right. This time I rotoscoped footage of a sidewinder snake moving across sand. It’s only 8 frames, but I think it works pretty well. It gives kind of a lo-fi effect and scales quite well. *wink wink* I originally intended to use animated PNG for the final format, but ended up finding the dependable old GIF format worked best, so why not—it’s not like it’s deprecated or anything.

And lastly, I made several improvements to how media is used in posts/pages. I’ve been trying to make all the media usage consistent and standards compliant. So, all audio clips use native audio elements, and all (YouTube) videos use WP oEmbeds. I actually found old videos on here that were still trying to use Flash players for fuck’s sake. Downloads will also be improved by listing previous versions and downloading directly from the server instead of through a WordPress plugin (I think that was the cause of a lot of corrupted downloads in the past😬). And I’m making better use of syntax highlighting for code blocks and markdown-formatted changelogs.

Back to Diablo 2

Now it’s time for the (what’s become) regular section on game modding. I’ve been replaying Diablo 2 lately. Of course, I love the game, but the more I play it, the more I become aware of its flaws. I think they mostly stem from the game being just so dated. Or maybe the game is a bit bad, but we just overlook it because of the nostalgia…? I would love to give Resurrected a try, of course, but I’m not sure I can justify the price quite yet, especially since mods only seem to work in singleplayer. Bleh.

This is the first time I’ve tried playing the sorceress class. I’m usually more inclined to play melee or archer since the controls for magic can be so fiddly. Unlike Diablo 3, you can’t use skills on a single button press. You have to first switch to the skill, and then use it. And because you want to move with your left click, you really don’t want that to also use a skill, especially for a ranged character, it would be a constant dance of switching between move and hold still (to cast a skill without accidentally walking over to enemies). So that leaves you using all your skills with right-click and then either scrolling the mouse wheel to cycle through them (fine for a few skills) or selecting skills with keys first. Ugh… I dunno… you get used to it, I guess.

The sorceress is certainly a powerful class (well, until you start running into elemental resistance monsters), but the way the skills are setup really forces you to focus your points on only one skill. If you start spreading your skills out over several elements or spells, you undoubtedly fall behind on DPS. And the loot is less fun than melee, too, since the weapon damage and any added damage from items isn’t relevant for spell damage. I used the same staff (Bane Ash) for most of Normal, and just recently switched to a Leaf runeword staff in Hell, so there’s not much in the way of options for magic-user weapons. You just get whatever pumps up your skills the most.

The last time I was playing D2, I mentioned wanting to try removing magic find from the game. As a recap, my issue is that magic find is antithetical to the function of gear. Gear is there to help you survive and kill monsters, and it shouldn’t be there to find more gear. Better gear should just come naturally. Plus the way the game was originally balanced, you basically had to pump up your magic find to get good gear in the first place. It felt too forced.

Well, removing magic find is what I’ve been testing during this most recent playthrough. I’m still tweaking the drop rates, but I’ve eliminated magic find as a property from all items, replacing it instead with a mix of other properties: sometimes gold find, sometimes sockets, stamina regen and movement speed for topaz gems, added skills for Ist rune, etc. It’s been working fine so far. I’ve attempted to balance the drop rates so that you’ll get about one or two legendaries and set items during a session, and many rares. I’ve also cut back on the chances for legendary and set items with gambling as I found I was relying on that too much. But I only reduced the chances by about 25%—I don’t want it to be too tedious to gamble if you’re hunting for a specific item.

No idea when I’ll release any update to my Balanced Better Drops mod. I might want to do another playthrough first, maybe another Demon Hunter or Barb. Or maybe I’ll finally give Necromancer or Druid another try—if I have the fortitude to endure another spell-caster. I’ve also been thinking about making my mods easier to install and more modular and customizable by making a mod manager program. I know something like this exists for D2R, so I dunno…maybe it’s a waste of time since few people are still playing classic. But I’m finding it more and more difficult to keep my mods separated; they keep needing changes to the same files. We’ll see.

Also during this playthrough I’ve been trying out the high-res and high-fps mod called D2DX. It’s been a blessing for keeping me from getting migraines due to the low framerate of the base game. It does have a few bugs like a logo showing up on tooltips; sprites stretching weirdly, wiggling, or swapping out when moving; and occasional black screen flashes. But it’s still better that nothing.

Posted in Gaming, Modding, Website | Tagged , , , | Leave a comment

The Monolithic Procrastination Post

Yes, I’m aware that I’m a bastard for not posting for a whole two months despite not having any work obligations. I was honestly going to post last month following the release of the new Cursor Lock version, but got sidetracked with other projects. The story of my life really–project ADD.

news270

Cursor Lock 2.5 alpha

However, for anyone yearning for a new version of Cursor Lock, I can assure you that I will finish it soon as it’s practically complete already (as the screenshot at right will show). I’ve already completed a majority of the testing and just have a few more issues to resolve and documentation to update. I’ve also found a game that puts the new features to use: DX-Ball 2. The new window locking mode works perfectly in the game’s windowed mode to keep the paddle’s responsiveness from drifting out of the window with the mouse.

Another project that I wanted to post about alongside Cursor Lock last month is my newest Age of Empires 3 mod, Banner Army Reforms. It’s a relatively simple tweak that makes a big difference to the manageability of the Chinese civilization. It allows the player to train units individually instead of in unique groupings (Banner Armies). While a key facet of the Chinese, Banner Armies were just a strategic annoyance to me. Too bad the Chinese still suck.

Last post, I mentioned a PHP script that used PEAR’s Text_Highlighter package, but which I had some concerns about and thus wasn’t ready to go live with. Since then, I’ve been racking my brains trying to come up with a way to securely show external source code files (that have been parsed with Text_Highlighter) embedded inside a formatted page. My second implementation idea was to use my inflatable wrapper technique that places a formatting script inside the target source code file; however, that would force me to make the source code files have .php extensions. I also considered a database of IDs and associated code files, which would be secure but also a hassle and it would obfuscate the underlying source code files.

After much googling and frustration, I finally found a way to make certain file extensions be passed to a handler script. This obscure Apache manual page shows how to add an action to extension handlers. If the target of the action is a script, it will receive the originally called file as some sort of CGI parameter; in PHP, it’s placed in the ENV variable $PHP_SELF (don’t use $PATH_INFO, it can be spoofed).

Once I had all that snazzy handler business figured out and implemented in the script, I noticed a glaring oversight in the Text_Highlighter package. Since they place all the source code in a <pre> tag, no word-wrapping is done. Quite frankly, I never care enough to bother with manually line-breaking code and just let it run off as far as I need. However, on a webpage, horizontal scrolling is a cardinal sin. So, I spent more time than I’d like to admit rewriting the output module of Text_Highlighter to put the source code in a table which would allow it to wrap effectively while preserving line numbering and line indentations. I ended up actually having to put the indentation whitespace in a cell by itself. The script still needs a bit more polish, but can be seen in action on the files in this parallel program directory.

Those source code files are actually part of a column I’ve been working on lately to show off the parallel program I wrote for my final college project. Besides having beautified code, the column is also to have a web-based version of the Powerpoint slideshow I gave during my results presentation. I had originally made a simple PHP script that took a page number as a parameter and showed the appropriate slide image with all the formatting and such. I had two problems with this, however: there was no ability to copy the slide’s text and it was a bit underwhelming in this Web 2.0-hyped world. So, on a whim, I decided to have a go at making a Flash movie with all the typical play controls as well as Fullscreen and Copy Text buttons, which could load in an external SWF file with one slide per frame. Of course, it has all sorts of delicious alpha effects, too. The parallel presentation slideshow isn’t quite live yet, but you can see the new Flash in action on the lovable old Tony the Worm column. It still needs a smidgen of work yet, though, such as tooltips. I find Flash a decidedly quirky and frustrating format; finishing one button is enough for celebration.

Posted in Modding, Programming, Website | Tagged , , | Leave a comment