Free Game Downloads -- Sodaware.net

Free Game Downloads -- Role Playing Games, Puzzle Games and Action Games.

Browsing Category: Blitz Tips

10 Apr, 2007

New Resource – BlitzBuild

What is BlitzBuild?

BlitzBuild is a command line tool for compiling BlitzPlus and Blitz3D applications, although it can be used to automate other tasks in a similar fashion to Windows batch files. BlitzBuild’s primary aim is to make it easier to build software with the Blitz series of languages, to remove the IDE from the build process and to combine several key build steps (such as documentation creation and testing) into a single step. This saves time and can also improve the quality of the finished article.

For the latest updates to this project, see the BlitzBuild project homepage.

Important Note: This release is very much a “preview”, and as such isn’t really recommended for a production environment.

License

BlitzBuild is freeware and may be used without restrictions.

Quick Links

Project Home: http://www.sodaware.net/dev/tools/blitzbuild/
Project Documentation: http://docs.sodaware.net/blitzbuild/
Bug Tracker: http://bugs.sodaware.net/?project=3

Donations & Support

If you find this library helpful in your projects, please consider donating. Donations of any size are always welcome!

If you have any comments, please feel free to leave them here. You can also send an email or leave them as a feature request on the bug tracker.

Download

Download Latest Release (0.1)

blitzbuild-0.1.zip (543KB)


15 Feb, 2007

Using zip files with Blitz Basic

Zip files are one of the most common compression formats around, and are a great way of storing files. Using the userlib functionality of BlitzPlus and Blitz3D, it’s now possible to access and manipulate zip files from within your Blitz applications. This can be useful for packing your media, as well as compressing network data.

This article will show you the following:

  • What files you need to use zip files in Blitz, and how to install them.
  • How to open an archive file and find out what files it contains.
  • How to extract a file from an archive.
  • How to create a new zip file and add files to it.
  • How to compress and uncompress Blitz banks.

What will you need?

Blitz.ZipApi — A free library that you can include in your Blitz project. It comes with everything you need to use zip functionality within Blitz.

Installing the files

Once you’ve downloaded the library, you’ll need to copy “zlibwapi.dll” and “zlibwapi.decls” to the appropriate “userlibs” folder so that you can use the userlib functions in your application. This will be something similar to “c:\program files\blitzplus\userlibs\”. The userlib file is fully documented and has XML comments for use with Protean IDE.

You’re now able to use simple zip functions, but if you’d like to get easier access to some of the more common functions, you should include the following into your project:

  • Blitz_File_ZipApi.bb — Helper functions for using zip files in Blitz.
  • Blitz_File_FileName.bb — A few functions for manipulating file names. Use them to get a directory name, file name and extensions from a string.
  • Blitz_Basic_Bank.bb — PeekString and PokeString functions.

All of these files are included in the Blitz.ZipApi distribution, along with full documentation in HTML format.

How it works

The zip library works in a similar fashion to the standard Blitz file functions. Before a file can be read from it should be opened with ZipApi_Open, and once finished with it should be closed with ZipApi_Close. Files to be written to should be opened with ZipApi_CreateZip and closed with ZipApi_CloseZip.

Fully documented examples are included with the library, and are also available online.


11 Sep, 2006

New Resource – Blitz.ZipApi

What is Blitz.ZipApi?

Blitz.ZipApi is a userlib and set of helper functions for BlitzPlus and Blitz3D that allow you to use ZIP functionality, such as compression and decompression of data. The helper functions take care of the most common operations, such as adding data (either from a file or a bank) to an archive or extracting a file.

Using Blitz.ZipApi, you can compress Blitz banks, read the contents of ZIP files and create your own archives.

For the latest updates to this project, please see the Blitz.ZipApi page.

License

ZlibWapi.dll is released under the zlib license. More information can be found at the Zlib homepage.

The userlib declarations and wrapper functions are free to use and modify without restriction. If you modify the code, please consider letting me know what was changed and why so it can be improved. If you do use this library in a project, I’d appreciate a mention but it isn’t required.

Quick Links

Project Home: http://www.sodaware.net/dev/blitz/libs/blitz.zipapi/
Project Documentation: http://docs.sodaware.net/blitz.zipapi/
Bug Tracker: http://bugs.sodaware.net/?project=2

Donations & Support

If you find this library helpful in your projects, please consider donating. Donations of any size are always welcome!

This library has been tested, but some bugs may still be present. If you find any, please submit them to the bug tracker. I can’t promise they’ll be fixed right away, but I’ll do my best to sort out urgent problems.

If you have any comments, please feel free to leave them here. You can also send an email or leave them as a feature request on the bug tracker.

Download

Download Latest Release (1.0)

blitz.zipapi-1.0.zip (100.7KB)


25 Jul, 2006

What’s going down…

As many of you will know, hot weather and software development do not go together. The last few weeks have seen temperatures in Britain hit the high 90s, which wouldn’t be so bad if I had air conditioning. Suffice to say, my productivity hasn’t been as high as I’d like it. Still, at least I have a mild sun-tan.

Here’s what’s been cooking (almost literally) over the last few weeks:

Flexible Resource System

So far this has turned out to be a huge time saver. Instead of altering code every time a new resource should be loaded, the application will scan the resource directory and load resources as required.

The current system uses XML to define which resources should be loaded. XML makes the whole system nice and flexible, and it’s easy to read and modify. Every resource used by the game can be loaded using this system, and each resource file has a namespace to avoid naming collisions.

Future improvements will add a “load on demand” system and a resource cache to help lower memory consumption.

Debugging System

Debug log preview

The standard Blitz debugging system is somewhat lacking. It does the trick if you’re running your program from the IDE, but once it’s in the wild it’s useless. Naturally, I had to write my own system.

The logging component is quite simple, uses XML for storage and XSL to make it look pretty. It’s not particularly powerful, but it’s useful for getting system information and tracking function execution times. So far it’s saved me from a few problems, and helped me to smooth down a couple of time consuming functions, so it’s powerful enough.

Debug Console

I created a Doom style console that allows the user to manipulate game objects using a command line. It can also display internal information that can be useful for debugging purposes. It’s the sort of component that isn’t vital, but is super handy when it’s there. Just the ability to spawn objects manually is worth the time it took to create.

An Object / Entity System

This is easily the most time consuming thing I’ve worked on, and it’s also the most complex and frustrating. It’s still not finished, but it’s usable.

The main idea is to have a “pluggable” object that will be given different behaviours. At the moment, each object is made up of States, and each State is made up of Triggers. These triggers fire “Actions” when they are activated. For example, a treasure chest would have two states (“Opened” and “Closed”). A chest with the “Closed” state would have an “onInspect” trigger, which would run several actions when the character inspected it. These actions could include giving an item to the character, as well as playing sounds, animations and changing the state of the chest to “Opened”.

BlitzPlus doesn’t support true Object Orientation, so the whole system has been a bit of a battle. I’ve been using the “Blitz Virtual Machine” to script behaviour, and it’s working nicely so far.

Some Flexible Tools

To save time, I created an automatic build script that will build resources using a simple script. At the moment it’s a series of batch files and smaller tools, but I’ve started writing a Blitz builder that’s loosely based on nAnt.

The Blitz Builder uses an XML script to build the application and its resources, and each script can have various configurations. It’s quite simple at the moment, but it’s being built in a flexible way so new commands can be added easily using plugins. It also has much better output, so the full build process can be built and timed. No prizes for guessing what file format the output logs use…

Other Bits and Pieces

Other tasks I’ve been working on include designing a nice website for the project, trying out various project management tools and cleaning up some of my code libraries so they can be released at a later date.


30 Jan, 2006

Protean goes free

Protean IDE, an IDE for Blitz Basic has gone free today, along with a source code release. It’s a shame that development fizzled out towards the end, but it was a heavy duty IDE that towered over the original Blitz editor. It’s use of the .NET framework seemed to put a lot of people off, which is unfortunate because it was a nicely written piece of kit that benefitted from .NET.

One of my favourite features was the plugin engine, and although I never released any “proper” plugins, I wrote a few quick and dirty ones. Perhaps now development has ceased I’ll finally get around to cleaning up and releasing something of use.

A good IDE can really improve productivity when programming, and Protean made a real difference to how I worked with Blitz (and probably kept me using it). Cheers for all your hard work over the years, Rob, and best of luck with your future endeavours!


Complete Archives

 


Browse By Date

Adventures in Shareware

Welcome to "Adventures in Shareware", the blog of an indie software business known only as "Sodaware". Learn all about indie games, the people that make them and how you can improve your own indie business.

Download Free Computer Games | Site Map | Links | Contact Us

© 2005-2007 Sodaware. All rights reserved. About Us | Privacy Policy