Sunday, December 16, 2012

LD25 - killCity postmortem

So, I just finished (gave up) my first LudumDare 48 hour compo run (create a game in 48 hours, solo).
I used my pre-made game-engine (called Excessive Overkill), but had to hack quite a lot on it in order to actually make a game (I've only ever used it for one game, more than a year ago).

The game and objective?

My game is a reverse missile-command, you're trying to destroy the villages, because you are the villain!
You target your satellites by clicking on a satellite, then click on a village.
When all your satellites are aimed at a target, you FIRE FIRE FIRE!
yes.. the game sucks.

What went right:
  • More or less functional game.
  • I found something that was kind of related to the theme.
  • I got it to build and run on Linux/Windows.
  • It's not randomly crashing..

What went wrong:
  • The mechanics are lame, and not that fun, given more time, I might have been able to extrapolate my initial idea into something better.
  • I overslept and had a cold which took the edge off of my concentration, and I decided to just hack.

What to improve:
  •   Next time I'll try and have the engine in better condition, that's the main limit, but I do want to use my own engine, that's half the fun. 

Oh, and one more thing:
Something wonderful happens when you destroy all the villages, but I will leave that as an exercise for the reader.

Thursday, November 29, 2012

Transcode files of different formats

Some times FLAC is nice, sometimes MP4 videos are neat.
Sometimes though, you have an SD card that's too small, or a device with limited output quality, or decoding resources, and what you want is Mp3 in a space-saving, but still nice-enough sounding Variable Bit Rate (VBR).

Maybe it's a playlist for a mobile device? Who knows..
But when things like that happen, and you have a directory full of files, here's what you do:

mkdir out
ls | while read L
  OUT=`echo "$IN" | sed 's/\(.*\)\..*/\1/'`
  ffmpeg -i "$IN" -aq 1 -vn -map_metadata 0 "out/$OUT.mp3"

This loops through all files, cuts off their extention, and trancodes them to variable bitrate between 190-250 Kbit/s ( )
Notice the -vn option, which, in case it's video, greatly speeds up encoding by ignoring the video part of the input file.
The -map_metadata 0 attempts to take the first chunk of metadata from the original file, and save its fields in the newly encoded mp3 file, milage may vary, it worked in most of my files.

Your files end up in the "out" directory.

I came up with this when assembling a playlist for my phone, not needing (or wanting to waste space on) super high quality, or music videoes.. Amongst input files were FLAC, Mp3, Ogg and video-files in avi and mp4 containers.

Sunday, August 26, 2012

Wizznic update

So, I've been busy with real life, and being sick..
But yesterday I did manage to squeeze a few lines of code into Wizznic! :)
While collecting energypoints for the big endeavor of creating more real game content, I decided to implement some transitions into Wizznic, I think they turned out rather nice for a first try.

I have also converted from a Dark and Damp Debian Zealot (DDDZ) to a Happy and Fluffy Arch Linux User (HFALU), and was surprised at how nice the AUR is, some awesome person out there already made an AUR package for Wizznic! (Check that out, here), however, I pondered, and decided to make another package aswell, not as a replacement for the existing one, but an alternative, see, the package I made, is not a stable, or officially "released" wizznic, it is instead, the latest and greatest code, directly from github.
I really do try my best never to push breaking code (jenkins will at least scream at me for making uncompiling code). And I believe that if you like to be updated, then my package is for you:
Without further ado: The Wizznic-git AUR package!

I made a little video, showing the complete build and installation process, and my fancy new transitions too.
How awesome is that? Pretty awesome I'd say ;)

You can, ofcause, also grab prebuild binaries for Linux, Windows and Wiz over at the jenkins buildserver.


Saturday, July 28, 2012

Wizznic 1.0 preview and build stuff

Finished mouse-support in the Level-Editor.
Got distracted and wanted to push some pixels around so I had some fun with the "waveImg" function, if you feed it two additional pictures, an "overlay" and a "mask", it will, for every visible pixel in the picture to wave, check the same position on the mask picture for a pixel with a GREEN component of 0 (yep, I'm that weird, black colour works nicely), if a green value of 0 is found, it will read the colour from another (moving around the X and Y axis) position on the overlay image.

Anyway, this video shows the intro, and editing/playing a level, all using the mouse/potential touchscreen.

Oh, and I've linked the Wizznic Github project with my jenkins buildserver at that means that every time I put a change to the main branch, the following packages are built:
  • Wizznic for Linux (32 and 64 bit)
  • Wizznic for Windows (32 bit, also works on 64 bit and in WINE)
  • Wizznic for Gp2X Wiz
  • Wizznic Source code package (for people with no GIT)
These releases are not tested automatically, and not all platforms can be expected to be tested, therefore these can not be considered 100% stable, however I am making an effort that all builds are working, if you are eagerly waiting for 1.0 or if you are interested in the progress of Wizznic, these are for you.

Tuesday, June 5, 2012

Wizznic work

Work continues slowly on Wizznic, All aspects of the game can now be controlled using the mouse, or a touch-screen, this really makes sense on the Wiz console, PC and other consoles too. That is, except the level-editor, but I might start hacking on this soon.

In less geeky news, the level-editor got a facelift thanks to my secret graphics guru with whom I spend an evening talking about graphics and wathing the magic happen.
 I'm very satisfied with this new design as it is very specific to the editor and helps the interface a great deal.

Other changes include a new "back" button for when mouse is used, and the ability to use all features on the high-score entry screen using the mouse/touchscreen.

Before Wizznic 1.0 we will create two completely new themes, each for it's own pack, thus, two completely new packs! That is 40 new puzzles, leaving the mainline puzzle set at 80 puzzles.

However, before doing that, we will sit down and play through the entire game, this should allow us to come up with some really evil puzzles for the later levels ;)

Anyway, just wanted to say, in this in-browser, Object Oriented, Accelerated, flashy, highres, 3D world, that little pixel pushing Wizznic is not dead!
I'm eager to finish this, and hopefully start working on the next big thing, johnny, which is secret, shh!

Wednesday, April 18, 2012

The deal with donations

I received a donation today, and that inspired this text. For me, it is a rare
event, I believe that this is the third time that I have received a donation
since 2008 when I first released SDL-Ball. So, for me it is something rare, I
don't know how often other projects receive donations, or how they react.

Personally, I become very happy, the size of the donation do not matter, but
the fact that somebody out there used my stuff and enjoyed it to the extent
where they were felt motivated to do such a gesture. It is not like salary for
work, where you get paid to do something because it needs to be done. It is a
affirmation that somebody liked the stuff that you made for your own reasons.

The few times that I have received donations, I've been thrown into a dilemma;
Should I contact patron ?
If so, what should I say/offer?

What I mainly feel like doing, is adding this person to some kind of credits
file, or pay me respect in some other way.. Basically, letting them know that
I appreciate their gesture and also showing to others that the project gets
donations. This has something to do with motivation and pride, even if it is
small and simple projects, it makes me very proud to have created something
that people enjoy.

I remember observing that some project had trouble spending the money, I could
imagine such a problem up to the extent of "who should be given what", but for
myself, I don't see this as an issue, I'll buy something, at some point, and
decided that "this was bought with my donation money", be it beer? Fine :)

If you're involved with a project, or have received or given donations,
I'd like to hear about your thoughts and experiences :)

Wednesday, April 4, 2012


So, seems I messed up sligthly with git, using another computer, which had another email address and name configured globally for git.. I'm OCD with stuff like that, so I rewrote history, sadly breaking any forks out there.. It's something you really have to think about when cloning a project... Ask yourself, "Do I want my global options in this, or set per-project options?" Anyway, I am sorry for breaking history..

I took the time to get osgg from svn on sourceforge into github.. It was nice..
I'm thinking about trying to hack multiplayer into it, everyone would start in the middle of the map on their own private start-base (no other ship should be able to land there), then race for missions, and shoot each other down in the process :)

I'm also thinking about another game concept that's so brilliant that I'll keep it a secret :P

Back to Wizznic: I'm still procastrating the annoying and unsatisfying task of making the options-menu, the level-editor-menu, the level-editor and the highscore-entry work with poiter devices.. I wanted the menu code to be as straight forward as possible, after being burned writing a 10k lines framework with all the bells and whistles, just to discover that I simply did not need, nor want such a beast.. But something in between.. The code for menues in wizznic is not abstract enough, which is also a bad thing, it makes for a LOT of redundant code, and a lot of things which evolved to a point where they now look rather silly.. But do I really want to change it now? I guess I don't.. Wizznic is nearing completion, code-wise, all that really needs is a few more packs of levels, and I'll call it finished :)

Friday, February 10, 2012

Thoughts on Wizznic3D and kickstarter.

I was inspired today, by this project, and wondering if it could be done for a smaller-scale project.
Being able to work full-time on Wizznic3D would yield a commercial quality game in about one year. Documenting the process, maybe combined with webcasts, like would provide me with input and the patron with insight and involvement with the project and an unique chance to really have their say in the process.

Not sure if it could be done, just a thought, maybe a dream.
Still need to finish mouse support in Wizznic, it's almost there, I wonder if there are any graphics for the next pack, that would be awesome :)

Sunday, January 29, 2012

Bad luck

Disk crashed, must spend time fixing computer instead of coding game :(

Wednesday, January 25, 2012

Wizznic! for Nokia N900/Maemo5

Some awesome person, Aapo Rantalainen have worked on Wizznic! And ported
it to the Maemo5 platform, and in particular, the N900 phone. This looks really
promising, and there's even touchscreen support there, which will be really sweet
when I complete my work on making the whole UI pointer-aware :D

The code from Aapo will be merged into the Wizznic! master branch as soon as I
complete the UI work. :)

Here's the announcement.

The code is here, I think it was done on windows since the patches are a bit off,
which means a some manual labour for me, but never the less, this is an amazing piece of work which is greatly appreciated :)

And last and most awesome, a video of the thing running! :)

Monday, January 23, 2012

More Wizznic :P

Been hacking a bit more on Wizznic, finding the "angle of least change" in order
to turn the text/arrow keys based menus into something that also works with a mouse-pointer..
I made a nasty hack that I quite like, and that I suggest you think about twice before doing..
Every time I call my "txtWrite" function, that function will now update an internal variable containing the "box" size of the text..
So, right after a call to txtWrite, if I do getTxtBox, I get a pointer to this rectangle.
txtWrite("Some text", some, position);
if ( isBoxClicked( getTxtBox() ) ) { //Box was clicked }

In other news, I was briefly hospitalized this thursday, and thus, wasted a weekend of coding, so wizznic release date is pushed a week, meaning there's also a slim chance my gfx guy have the time he needs to finish another theme :)

Saturday, January 14, 2012

Wizznic, Content and the big 1.0.

  1. was to go through the 4 subdirs, having the first "map" logically to "1,2,3,4" and the second to "5,6,7,8" and so on, this way, we would only have to worry about sorting a chunk of 4 levels at a time, which is a lot easier than to inspect 20 levels as a whole.

Sunday, January 8, 2012

More Wizznic! hacking! :D

I've been giving Wizznic some attention lately, and gotten some nice things done, I feel sharp :)
I added a little cursor inside the cursor to give the user a better feel of where the actual cursor is, it feels right :)
I fixed a long standing bug that made the cursor sometimes "jump" around when moving a brick with a brick on top of it, this happened because I have this lock mechanism, but I forgot to "unlock" the bricks after un-grabbing them :P

I also rearranged the way levels load graphics, walls are one part, "brick die" animations is one part, and the rest of the tiles are one part. This means that for example, die-animations are no longer dependant on the name of the tileset, walls are no longer dependant on the name of the tileset. This makes it possible to have several wall-sets in (or tile-sets, or die-animations or any combination hereof) in a theme.

I also solved an issue that have annoyed me for quite a while, that the "magnet/glue and one-way only" tiles were not treated as walls, even though they are basically that.. Now they are, which makes the wall-tile-selection a lot prettier to look at visually, they are also overlaid on top of the walls, making reuse easier (but optional).

I also noticed that some players had trouble detecting (yes, people are machines) the edges of the walls, making them believe that sometimes they were able to move bricks, even though there were a wall there, other times they would not move bricks to obvious places, because they believed that there was a wall (when, in fact, there was none). I have partly solved this by making the edges of the walls a little brighter. In addition, I am thinking about adding some more details to the inside of the wall tiles, tough at this moment I don't know what it would be, maybe my graphics guy have an idea and will do this? :D

And here's a little video showing those new cool things, the code is not on github yet, I still need to convert all the levels..

Friday, January 6, 2012

Wizznic! Touchscreens!

So, I hacked around Wizznic a bit last night and got some pretty decent mouse/touchscreen support going, this is pretty usefull on wiz, and if there's a touchscreen on the PSP I could imagine it'd be nice there too..

Anyway, it also works on PC.. I', not done with this yet though, if you wanna try it, you'll have to compile the source from github.