I Wanted Orange (The machine would not make a mistake.)

25Mar/11Off

PackBSP 2.0.5 released, open-sourced

PackBSP 2.0.5 is now available on the download page, and is open-sourced (in all its badly-commented tests-disabled glory) on GitHub. Eventually I want to migrate certain things (like the "support" page) to the GitHub system as well.

Edit: For the moment I think I need to focus on checking that everything can be successfully downloaded and easily built by anyone interested in doing so, and then investigate what I need to do to make it "seamless" in terms of versioning and Maven artifacts/repositories.

Tagged as: Comments Off
23Mar/11Off

Open-sourcing PackBSP, 2.0.5 release

For the last week or two I've been cleaning up PackBSP's documentation and build process to get it ready for open-source hosting on GitHub. With everything important out in the open (including the jhllib and hl2parse libraries) I hope to avoid the type of abandonment that befell Pakrat. With luck, I'll finally cut the ribbon sometime this week and simultaneously release version 2.0.5.

Version 2.0.5 is primarily bug-fixes, particularly to solve an issue where PackBSP won't start up correctly on certain Windows installations.

If anybody already has a GitHub account, feel free to add or vote on the Issues Page in terms of what needs to be done next, but I'm currently thinking of support for parsing PCF files (custom particles) to determine what sprites or materials they depend-upon.

16Mar/11Off

PackBSP 64-bit issues

I think the third-party jRegistryKey library is exploding on 64-bit systems, which is why people have had problems with PackBSP 2.0.4.

I've rewritten things so that it is no longer a dependency, and plan to release 2.0.5 within a week or so, which will also include some minor fixes in terms of recognizing ambient-occlusion texture dependencies.

Tagged as: Comments Off
7Mar/11Off

Released HL2Parse on Github.

After a lot of procrastination I've released HL2Parse under one of the Creative Commons licenses... I still plan to add a few things to it, but now it's out there, warts and all. See the project-page for more information.

10Feb/11Off

BC2 Bullet drop comparison

About a week ago someone made a video for Bad Company 2 showing a sniping comparison between the use of normal bullets versus the "Magnum" ammunition upgrade. Interestingly, they thought it showed no difference, while I came away with the opposite impression. This post is a horribly nit-picky comparison of shots in the video.

Tagged as: Continue reading
27Jan/11Off

Miscellaneous updates

Mainly focused on my day job right now, with a bunch of projects gently simmering and making me feel guilty they're not being done.

  • Adding SLF4J logging to my github branch of Preon
  • Getting a working Preon-based parser for Valve's DMX format (with a further focus on PCF particle definition files.)
  • I'd like to try making something with Processing.js that helps compare and contrast weapons in the game Battlefield:BC2
  • Learning to make a Blender animation, visualizing the control scheme of BC2 helicopters as the topic.
  • An improved version of ctf_2fort_revamp (particularly since the Engineer Update weapons have altered the balance in some areas.)
  • An improved version of ctf_2fort_fixup (backported features from Revamp, like moving clouds.)
Filed under: Uncategorized 1 Comment
10Jan/11Off

Being a lazy programmer

Well, I managed to survive the holiday season, went off to see some relatives, and snapped up Battlefield: Bad Company 2 from a sale on Steam, which is proving to be one of my major distractions right now.

PackBSP stuff is somewhat on hold pending work on Hl2parse, where I'm having some difficulty getting Preon to work in quite the way I want it to.

9Dec/10Off

Codec decorators in Preon: The right way

Here's the wrong way to use decorators in Preon. They'll only work on the first level, and won't apply to nested Preon objects.

final DefaultCodecFactory fact = new DefaultCodecFactory();
Codec<MyFileType> codec = fact.create(MyFileType.class);
final LoggingDecorator ld = new LoggingDecorator(new CustomLogger());
codec = ld.decorate(codec,null,MyFileType.class,null);
// Resulting codec only does outermost-level logging.

The right way appears to be:

final DefaultCodecFactory fact = new DefaultCodecFactory();
final CodecDecorator[] decorators = new CodecDecorator[]{
    new LoggingDecorator(new CustomLogger())
};
final Codec<MyFileType> codec = fact.create(null, MyFileType.class, new CodecFactory[]{},decorators);
I haven't found any other way to alter the decorator-chain yet.
Tagged as: Comments Off
8Dec/10Off

Working on Hl2Parse: Learning Git, working with Preon

Working on Hl2Parse this week. I want to release it at some point, but I don't really want to stick with my own hodgepodge of code for reading binary files. Sure, it works, it's customizable, but I still think something could be better. Preon caught my eye a while back, and I'm going to try to rewrite my code to use it.

As a bonus, this offers me an opportunity to experiment with Git, which I've been meaning to learn for a while after being used to Subversion. It also offers some interesting possibilities when it comes to synchronizing work I might do on different computers.

Once I get existing binary file functionality (BSP, MDL, PHY, Clientregistry.blob, etc.) translated into Preon annotations, I can see about adding more detail to the MDLs and parsing PCF dependencies.

30Nov/10Off

Friendly Enums in Java with JNA

Well, it's a slow week so I think I might as well share some old code to apologize for not making new code. In jHllib, which allows Java programs to inter-operate with a certain C/C++ DLL, I found myself needing to refer to certain integer values that were defined in C. All the documentation and examples for JNA (the Java< ->native bridging platform) tell you to use non-type-safe integer constants in your program, but this just didn't sit well with me.

After some experimentation, I found a way around to use Java's type-safe enums with JNA. First I'll show you what the final product looks like, and then look at the guts that make it possible.