February, 2007
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.
Pages: 1 2
Related posts:
Subversion is an open-source version control system. That doesn’t sound particularly interesting, and at face value it isn’t, but you only need it to save your skin once to realise how useful it can be.
Version control is a method of storing different revisions of the same file, usually source code or documents. This allows developers to see when changes to a file have been made, which can be useful for isolating bugs, and can also be used to “roll-back” a file to a time before a bug was introduced.
Along with these features, version control allows developers to merge two versions of a file, which is very useful for projects with more than one person.
This article covers the following:
- What software you need
- Creating a new repository
- How to set up a Subversion server
- Adding password protection to a Subversion repository
- Laying out your repository and importing files
- Checking out and checking in
- Using tags and branches
What you’ll need
Subversion – The primary download is source code, but there are binary versions available for different operating systems, including Windows, Mac OS and most common flavours of Linux.
If you intend to use Subversion mostly from the command line, you might want to add the Subversion binaries directory to your Windows PATH variable.
Optional Downloads
TortoiseSVN – If you’re using Subversion with Windows, I highly recommend installing TortoiseSVN. It integrates with the Windows explorer shell, so you can see an icon if a file has been changed. You can and also check in items, commit changes and perform other common operations with a few clicks of the mouse instead of using the command line.
Pages: 1 2 3
Related posts:
Games can make us feel many different emotions. Fear, excitement and even sadness are common emotions in games, but what about love?
What is love?
Many people throughout time have attempted to describe what love is. Poets, philosophers and scientists have all had a go, but love remains a complex mystery.
If you’re the romantic sort, love is the greatest thing ever. It makes the world a more beautiful place. Birds sing more clearly, flowers smell better and everything is wonderful. If you’re not quite so romantic, love is just nature’s way of getting two people together to mix DNA.
The fact that love is so difficult to describe makes it all the harder to convert into a gameplay element. To some, even the very notion of turning love into something trivial for a videogame is unthinkable.
For the purposes of this article, I’ll be discussing two kinds of love. The first, and perhaps easiest to experience, is a caring, nurturing love. The second form is the romantic love that makes Valentine’s Day so very expensive.
How do we create love in games?
To create a sense of love, you must give the player something to care about. Several factors make a person more likely to care about a fictional character on their screen.
Create a connection between the character and the player. Creating a common ground between the player and the character is a good place to start. You’re much more likely to care if you see part of your own personality in the character.
Make the player feel important. You can foster a relationship between the player and the character by making the player feel as if what they’re doing is important. For example, Tamagotchi’s would get sick if they weren’t properly cared for. Creating this sense of responsibility in the player makes their decisions seem important, and increases the chances that they’ll care about their character.
Make the experience unique to the player. This is perhaps the biggest element into creating something special. Tamagotchi’s were special to people because they weren’t the same as someone else’s. You become more protective of something if you believe it can’t be recreated.
What about romance?
Romance is a completely different experience, and much, much harder to recreate. There are several barriers, both physical and moral. Is it right to make someone fall in love with a fictional character? Most players will be aware that “it’s only a game”, and won’t succumb to anything more than lust for what’s on screen.
A more realistic way of creating romantic love is to let the player take the role of a different character on screen, and have the romance play out between them. This approach is commonly taken in RPGs, but is often scripted and gives the player very little control over what is happening. This can create a sense of distance between the character and the player, and should be avoided if wishing to create something deeper.
The “S” word
Sex is quite popular, apparently. With adult books, DVDs, websites and more, it’s only natural that games should get attention from the adult industry. The majority of sex games are overly salacious, and merely an excuse to put some porn in the form of a game. Even the Atari 2600 got some of the action (pardon the pun), with some truly awful sex games being released, such as the infamous Custer’s Revenge.
With advances in artificial intelligence, and the proliferation of cyber sex in MMORPG’s such as “Second Life”, the future may see AI bots replacing pornographic games. It’s quite plausible that such a bot may one day pass the Turing test, and fooling the player into believing they are interacting with a human may be the best way to improve the player’s experience.
Conclusion
There is still a very long way to go, but using techniques from artificial life makes it easier to create a sense of love between a player and a character. It may never be the same as the love between two people, but perhaps that’s for the best. However, at least you don’t need to buy a computer dinner…
Related posts:
Music can easily convey feelings and information that graphics and text can’t or shouldn’t. Appropriate music and sound, employed effectively, will make your island platformer more jaunty, your subarctic wasteland more desolate and your army of forty-legged robots incomparably evil.
Imagine the scene.
Your player has just hit the spider boss between the eyes with a well-aimed rocket. It screeches and falls from the ceiling of the tunnel, crashing in front of the player. The music falls from a thumping beat to a clear silence. The enemy stops twitching and stiffens. The player leaps over it and runs towards the exit, the new upgrade clearly in sight, the final key…
BOOM! A deep bass drum resonates.
You can almost hear the gulp from here.
Music’s importance in mainstream games is now widely-recognised, but in terms of indie games it still seems to be an afterthought in some cases. Here’s why that should change.
Make it enjoyable
Every aspect of your game should be carefully planned to ensure the player will find it appealing and enjoyable. If your music is repetitive or unsuitable, you can be sure they’ll switch it off as soon as possible.
No matter what kind of game you’re developing or playing, good music is highly important. Think of any genre and there’s a classic game with a great tune attached:
Puzzle – Tetris. Chances are you know it and like it.
Platform – Sonic or Mario. Green Hill Zone and the Overworld theme are two of the most famous pieces of music for any game, widely recognised and admired.
Racing – OutRun. I can say no more.
Good music will genuinely elevate the quality of your game if it’s suitable, memorable and enjoyable. You work hard on making the rest of your game those things, so why not the music?
Don’t waste chances
Unless you’re developing for a system that includes rumble or force feedback, indie games only use two senses: sight and sound. Not maximising those senses is a waste, and severely limits the impact of your game.
Try playing your favourite game, indie or otherwise, with the music off. Does it feel different? I always feel much less interested in a game without music; there seems to be no mood, and I can hear my brain thinking “this isn’t any good.” It’s okay, you can put the music back on now. Much better, isn’t it?
“I can’t do it!”
You don’t have to. Hiring and collaborating with musicians over the Internet is easy; you send them artwork and they send you music. You send them money and they send you thanks. It’s straightforward, the quality of music will be much higher and it leaves you with the other nine billion jobs to take care of.
The key to good music in games is…
Not to waste it. Use suitable music for the mood you want to achieve and your player will become much more involved and, as a result, enjoy themselves so much more. Seeing as that’s your business, you owe it to everyone to put great music in your games.
James Newton is a writer and musician from York, England. He has written music for several independent films and documentaries, and has also created tracks for several games. You can listen to his work and read his thoughts on games and more at Prosody.co.uk.
Related posts: