So, you ever have a black and white image and just thought to yourself "gosh darned, I wish this white was transparent, that would just make my day".
Well, in the past that thought has often gone through my head, and I had wondered why no one had ever found a solution. I thought I'd use some techniques to solve this problem.
Basically this application loads up an image, in any common image format, and converts it to greyscale. Then it sets each pixel as black, with transparency equal to its greyscale value. This makes black completely opaque, and white completely transparent, with other values in between.
Somewhat of a useful tool, if you want to make a black and white image transparent.
Download here
Ency's Blog
Friday, May 11, 2012
The Super Awesome Alpha-conversion Application
Monday, February 6, 2012
Steam Game Relocator
I took a short break from my main project to do something I've always been meaning to do.
I am using a computer that has a relatively small (120gb) solid state drive.
On this drive I have my Steam installation, and as you may guess I can only have a limited amount of games on this drive at a time.
There is no way in Steam (at least, no way that I know of) to install games to directories or locations other than the steamapps subdirectory of Steam. As someone who wants to take advantage of their SSD when using steam games it would appear I would have to limit the number of games I had installed.
Previously my only other option was to manually go through to the steam directory, copy the entire folder of the game I wanted to another drive, and manually create a symbolic link. This was bearable, but a little tedious, especially if I had to do several games at a time.
But in the past couple of days I wrote a little .NET application that will do this all for me.
Features include:
Steam Relocator by Ross Callister is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
I am using a computer that has a relatively small (120gb) solid state drive.
On this drive I have my Steam installation, and as you may guess I can only have a limited amount of games on this drive at a time.
There is no way in Steam (at least, no way that I know of) to install games to directories or locations other than the steamapps subdirectory of Steam. As someone who wants to take advantage of their SSD when using steam games it would appear I would have to limit the number of games I had installed.
Previously my only other option was to manually go through to the steam directory, copy the entire folder of the game I wanted to another drive, and manually create a symbolic link. This was bearable, but a little tedious, especially if I had to do several games at a time.
But in the past couple of days I wrote a little .NET application that will do this all for me.
Features include:
- Automatic detection of Steam installation in default locations
- 'Memory' of steam Installation location and default migration location
- 2 button migration once Steam location and migration location are configured
- Record of which games have been migrated for easy reversal
- 1 button migration of a game back to the Steam folder
I am pretty pleased with it, the application requires administrator privileges in order to create the Symbolic Link, but works pretty well once everything is configured.
It'll save me a little time at least.
So, for anyone who wants a simple way to put a Steam game on a different/external hard drive, or in a different folder this may save you a few headaches.
I also made a neat logo for it, took me all of 10 minutes.
Steam Relocator by Ross Callister is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Friday, February 3, 2012
Presenting choices to the user
The most recent thing I've done in relation to the project is to create a method for presenting choices to the user, letting them select one of the choices, then allowing that choice to be used in a script.
Now, the engine already had a dialogue box interface. Essentially the dialogue box becomes visible, all input for the rest of the game is ignored, and text is drawn on the box. You'd press a button to continue through the text, or to close the box once it had run out of text to display.
This would be called using a Lua script that looked something like this:
ShowMessage("your text goes here")
That would call a method that activated the dialogue box and gave it the text.
A problem came in when I wanted to have a method that would return the user's choice.
Previously ShowMessage would simply add the text to a queue, and then instantly continue on to the next line in the script. However, presenting options would require waiting for user input, and since most of the Lua script calls were from the same thread as the game that would just lock the entire game, as there's no way to tell if you get input while the thread is waiting.
The solution was a lot simpler than what my paranoid mind was telling me it would be.
I changed the Lua script calls to run in new threads, created by the TaskFactory. While that thread was executing no input would be accepted from the user for the screen that called it. This prevents more than one script running simultaneously (although I'm sure it's technically possible). This way I could safely set the newly created thread to wait while still allowing input through the main game thread. When input is selected by the user the waiting thread would be reawoken and continue from where it stopped.
I made a method that can be registered in the Lua runtime which follows the pattern
ShowOption("message", {"choice1", "choice2", ... "choice n"})
Making the pretty interface for selecting input was relatively simple.
All in all this particular problem was more simple than I'd expected.
Thursday, February 2, 2012
Where I am
You'd guess that after more than a year of development time that I'd have something pretty to show for my efforts.
If that was your guess then I can say you are sort of correct.
What I have is definitely not pretty (well, it's pretty to me), but it is at least somewhat towards looking like a proper game.
The Engine
Below is a screenshot showing my cute little zone that I use for debugging.
It is so amazing, I created it all myself you know.
Now, from the screenshot you can see a few things:
Firstly we have a nicely tiled map, with some rather ugly tile sprites (another thing I made myself)
It is also displaying the classic perspective of something that is in 3D.
Another thing, which is more exciting than the previous two things, is that there are NPCs wandering around. You can see the little guy at the top is walking east for some reason, and the little lady at the left of the screen has stopped (presumably to examine my not at all ugly grass tiles).
The character at the centre of the screen is the player, and happens to have the same sprite as the other NPC because that happened to be the one I randomly selected for debugging purposes.
Now, you may be wondering what those black dots all over the screen are, and I will tell you.
Those are trees that I broke (borked) in a recent code update. They were models that I created with vertexes that had colour information in them. Not long ago I slightly overhauled the drawing code to work differently, and now it won't display coloured vertexes. Hopefully I can fix that in the future, but that's not a great concern since most models will be expected to have textures anyway.
The engine also contains a semi-functional battle engine, cutscene and cinematic capabilities, a Lua scripting system, and many other more esoteric goodies.
The Mapmaker
You may now be thinking "but Ency, how could you possibly make that wonderful masterpiece of a zone?". Well, the answer to that is forthcoming.
I crea... no, we creat... no I created a lovely mapmaking application to go with the engine. It's working title is the LiveMapMaker, and that does a fairly good job of describing what it does.
It's main purpose is to give a graphical user interface (GUI) for creating and modifying the things that are run by the engine. Below is a screenshot, with my lovely debugging zone loaded up.
Currently it allows you to create new zones, change the sprite on each tile, place scripts on tiles that activate when a player steps on them, create and edit NPCs, and create and edit scenery objects.
In the design I have tried to arrange interface elements in a way that makes it easy to figure out how to operate the mapmaker.
There are still plenty of bugs, plenty of things that need to be implemented, and plenty of features that would make using the mapmaker a lot less painful. However, it is almost in a solid working state, and is probably enough to make some sort of 'tech demo'.
So this is pretty much where I am in terms of development. There have been many hurdles and challenges that I've had to overcome, and each one of them has taught me some valuable lessons.
If that was your guess then I can say you are sort of correct.
What I have is definitely not pretty (well, it's pretty to me), but it is at least somewhat towards looking like a proper game.
The Engine
Below is a screenshot showing my cute little zone that I use for debugging.
It is so amazing, I created it all myself you know.
Now, from the screenshot you can see a few things:
Firstly we have a nicely tiled map, with some rather ugly tile sprites (another thing I made myself)
It is also displaying the classic perspective of something that is in 3D.
Another thing, which is more exciting than the previous two things, is that there are NPCs wandering around. You can see the little guy at the top is walking east for some reason, and the little lady at the left of the screen has stopped (presumably to examine my not at all ugly grass tiles).
The character at the centre of the screen is the player, and happens to have the same sprite as the other NPC because that happened to be the one I randomly selected for debugging purposes.
Now, you may be wondering what those black dots all over the screen are, and I will tell you.
Those are trees that I broke (borked) in a recent code update. They were models that I created with vertexes that had colour information in them. Not long ago I slightly overhauled the drawing code to work differently, and now it won't display coloured vertexes. Hopefully I can fix that in the future, but that's not a great concern since most models will be expected to have textures anyway.
The engine also contains a semi-functional battle engine, cutscene and cinematic capabilities, a Lua scripting system, and many other more esoteric goodies.
The Mapmaker
You may now be thinking "but Ency, how could you possibly make that wonderful masterpiece of a zone?". Well, the answer to that is forthcoming.
I crea... no, we creat... no I created a lovely mapmaking application to go with the engine. It's working title is the LiveMapMaker, and that does a fairly good job of describing what it does.
It's main purpose is to give a graphical user interface (GUI) for creating and modifying the things that are run by the engine. Below is a screenshot, with my lovely debugging zone loaded up.
Currently it allows you to create new zones, change the sprite on each tile, place scripts on tiles that activate when a player steps on them, create and edit NPCs, and create and edit scenery objects.
In the design I have tried to arrange interface elements in a way that makes it easy to figure out how to operate the mapmaker.
There are still plenty of bugs, plenty of things that need to be implemented, and plenty of features that would make using the mapmaker a lot less painful. However, it is almost in a solid working state, and is probably enough to make some sort of 'tech demo'.
So this is pretty much where I am in terms of development. There have been many hurdles and challenges that I've had to overcome, and each one of them has taught me some valuable lessons.
I am Ency
Well, I guess I should start with the fact that I am Ency. This is quite an important fact, and will become even more vital as time goes by.
We don't want you to forged who I am after all.
This blog is essentially my experiences, challenges, solutions, learning, and celebrations about developing software.
I am not what you may call an expert, by any means, but I do like to think that I have some ability.
I am currently working on a project for a little group that likes to call itself tenFold Studios. I don't know why the capitalisation is like that, but it is correct according to my trusty source.
tenFold, and also me I guess, are working on a free Pokemon engine, and also a game created with that engine.
It is being created using Microsoft XNA and C#, pretty much entirely from scratch.
It has fairly interesting having to learn a new programming language, and learning how to use XNA for game development.
The project has currently been under development for a little over a year if my memory serves me correctly. For a team made up entirely of a bunch of people who have never made a game before I think the progress we've made is admirable.
So, this is Ency's Blog, and it will be a place where I can gloat and nerd-rage.
Labels:
game development,
introduction,
programming,
tenfold,
video games
Subscribe to:
Posts (Atom)