Yummy Digests

I’ve been working on a few projects that require blitzmax and a web-server (php/mysql) to communicate. Along came the need to hash files. This code archive entry was very useful :). I decided to wrap it into an object and add a new method to it. Even though it’s a series of functions I still tend to make types with functions in them to help me organize them (it’s like a cheap way of namespacing). I needed the ability to hash a file using Sha-1 hashing. Seeing that php has a function called sha1_file($pathToFile) I figured I’d implement the equivalent on blitzmax. With this THasher type, I’ve added a SHA1_File(path) function also. Why hash files? There are many reasons to use hashes, but recently I used it to check for file changes. If you’ve ever wanted to find out if some arbitrary file has ‘changed’ since the last time you’ve opened it this can prove to be useful. If you save the hash beforehand then recompute the hash now and if they are different, then something’s changed! Some applications of this are: Write a file-updater to quickly find out which new files need to be downloaded. Just comparing hashes would be sufficient in most cases, instead of having to go individually byte-by-byte or traversing the file structure to find a difference. help stop cheating. If you don’t want users changing texture files to gain an advantage or don’t want them ‘mucking’ with any other data file. If you check the current hash against a previously approved one and it doesn’t check out then the file has more than likely been tampered with. How Do I Use THasher? If you want to hash a string using SHA-1 then: Local hashedFoo:String = THasher.sha1("Foo") Want to hash a whole file? Then: Local filehash:String = THasher.SHA1*File("someFile.txt") Keep in mind you can hash _any* file, not just text files like in the above example. Anyway, read on for the whole file. With the exception of SHA1_File() I did not write these hashing functions for Blitzmax. They were simply taken from Yan’s very helpful code archives post :). ...

July 19, 2008 · Alex

How to create concave polygons

Yes, yes I know the documentation is lacking at the moment for Farseer.BMX. I’m still working on it on a few fronts. First, I’m trying to do api documentation (bbdoc mostly). Secondly, I’m trying to write tutorials/guides that help show how to use some of farseer’s features. I had hoped that releasing the demo application source code would’ve covered this aspect as the demos cover pretty much each feature, but I guess since the demo source is a bit more complex in design (handling a lot of graphics related mumbo jumbo), the actual ‘needed content’ wasn’t particularly easy to find....

June 29, 2008 · Alex

Flavors of Farseer…and new Module!

So far feedback has been great on Farseer.BMX working in Blitzmax. Some users have tested Farseer.BMX on Linux and Mac and it works without a hitch. Farseer.BMX is officially cross-platform between Windows, Linux, and Mac! That’s great news seeing how widely available the Farseer engine is becoming. It’s now available on: Windows C# – XNA C# – Silverlight Blitzmax XBox 360 C# – XNA Linux Blitzmax Mac Blitzmax Your Toaster * ?...

June 3, 2008 · Alex

Farseer.BMX 1.0 Released

And there was much rejoicing! It does feel great to finally ‘finish’ something. I started out this project as something to give me a foundation to code my own game project on, and now after 110+ hours of coding there is a 2D physics library for Blitzmax :)! I hope it proves useful to those that end up using it. While the engine hasn’t been tested for ‘real-world’ use it I think the demos do a good job of putting it through its paces....

June 1, 2008 · Alex

More Farseer.BMX

I was hoping to have an update a little earlier than this, but decided to hold off and throw together at least a bit of content with the update. I’ve added a slew of joints and controllers into the Farseer engine for Blitzmax (which I think I’ll just start referring to as just Farseer.BMX to save my poor little fingers). Below is a list of stuff I’ve added since the initial post:...

May 28, 2008 · Alex

Farseer Physics in Blitzmax Demo

Hurray! Finially got to a stable stopping point in porting over Farseer Physics from C# on XNA to Blitzmax! Farseer Physics Engine is a 2D physics engine originally written by Jeff Weber who develops XNA/Silverlight games over at Farseer Games. Much thanks to him for creating a great physics engine and for allowing me to move it to another language, which once done, I hope will help others create fun physics games in Blitzmax....

May 17, 2008 · Alex

GTA4 Rant [Read: Initial Impressions]

Wow! GTA4 is an awesome game! The amount of content in it is mind-blowing. It seems whatever gta4 lacks in gameplay departments it makes up for by sheer quantity and quality of content. It was pretty sad when I spent 20 minutes in gta4 watching TV. Watching TV inside a video game…wtf…that’s a new low for me. As if being a couch potato or an eccentric gamer wasn’t ‘bad’ enough. It just goes to show the brilliance of gta4’s design....

May 5, 2008 · Alex

Zzz

Functioning off of very little sleep in the last 48 hours… But finally got a good lock on what game I’ll be designing and developing in the coming months. More news on that in the upcoming weeks! My head is still spinning as I’m trying to pick up WPF, Open XML, Linq, and a host of other new technology/concepts for the last couple of days for a project at work I’ve just been assigned to....

April 5, 2008 · Alex

State of Mind

I always knew that your state of mind affects your productivity. Had a pretty rough week last week and work on my prototype suffered for it. But in the end, I realized time was a-wasting. You have to keep at it regardless of how you feel that day/week/month, because at the end of the day no one is asking you to do this. I never doubted that working on indie games would be difficult and you should approach it just like any other serious job, but it’s now becoming clear how to approach it....

March 16, 2008 · Alex

Random Static

Going onto my 4th prototype this coming week. One thing I’ve quickly realized is if I want to make a decent game that has enough depth to warrant as a full game then trying to crank out a prototype in a single week is unrealistic. With my current work schedule plus life’s many other challenges, the average 10-15 hours a week I invest wouldn’t be enough. I’m ‘redefining’ my time schedule to mean ‘total time spent on a prototype shouldn’t be more than week’s worth’....

February 10, 2008 · Alex