11/21/12

Tribulations in porting software

Long time no update, time to fix that!

So, last night my friend Morg asked me to port a certain tool (namely, ttm_unpack) to Python from C, since he didn't want to introduce a C-compiler as a dependency for GOGonLinux project. A quick note about GOGonLinux - the project's main task is to make installing games from GOG on Linux as easy as possible. I'm an avid supporter and follower and this is my first major contribution to the project. Join us on #gogonlinux @ freenode and contribute to the codebase!

Back to the topic at hand, since we already had the C-code available I thought "why not?" and said yes, since I thought it would take an hour at maximum with testing.

How wrong can a man be?  Very wrong, I'll tell you that. But in the end, we succeeded, and you can download ttm_unpack_py from my Github-page.

So, what kind of problems did we have while porting the tool?

8/16/12

Curious look into code evaluation

If you have been programming for a while, you already should know about operator precedence. If you for some reason don't, now is a good time to read about it on from Wikipedia or the documentation of your language of choice.

Before proceeding, remember that this may contain some erroneous information, and if you notice any, please inform me so that article can be fixed.

Let's take a rather simple set of expressions:

int i = 5; 
i = ++i + ++i;

This seems rather simple, doesn't it? So did I think, but the results (which we'll see a bit late) left me thinking wtf was actually going on. If we look at the Wikipedia-article, we can see that unary operators such as prefix and suffix increment and decrement come before the addition and substraction, at least in C-family of languages. Now, what do you think the answer will be? Write your guess down somewhere, we'll take a small plunge in to the world of compilers soon.

So, you got your answer? Good. If you did a quick test with a short code of piece, shame on you. Now, let me guess what you got.

If you used Python or Ruby, you got 10.
If you used JS, Java or C#, you got 13.
If you used C, C++ or Perl, you got 14.

Wait, what? How does this even happen?


11/21/11

Penguin on a Unicycle (or Experiences from a Game Jam)


So, it's been a long time since the last update, so, sorry 'bout that one. I've had all kinds of things, such as laziness and lots of university projects to keep myself busy. Well, anyways, if you've been following my Twitter, you may have noticed that I atteded a Game Jam, here at Oulu. What is a Game Jam? A Game Jam is an event during which you have to assemble a team of the participants and make a game (video or board). Usually this timeframe is around 48 hours, such as the case with Global Game Jams, or this one.

We made a little game about penguin riding a unicylce (why? Because.) going to a circus (see, it makes sense). It works on mobile phones which support Qt, such as Symbian^3 or Maemo/MeeGo phones. The "circus" is found by looking at the green bluetooth-signal bar at the bottom of the screen, and once you get close enough, you'll find one waypoint to circus. Finding two of them means you've gotten to circus. However, we simply couldn't let the player run from one point to another, so we used accelerometer to force the player to have stable movement. Should he move too fast or in too quick motions, the penguin becomes stunned for a moment and you can't find the waypoint until you become unstunned. It's very simple game, and you can download the project here and build it using qmake supporting 4.7 or later.

Now, what did I learn from this Game Jam? First: be clear about what you want to make. When we pitched game ideas about the theme, I noticed that several ideas were very ambitious, maybe too much so, as it later turned out to be, not all games were finished. Our idea was very simplistic, maybe even too much, as most of the work was done by the saturday night, even though we added few things that weren't originally going to be in it (such as rumble when you found the waypoint/got stunned, and a scoring system which we didn't implement finally, as we didn't think it was that good). Some projects apparently didn't even get to a playable state, as the backend work took too much time, even when the front-end work was already working and just waiting for the back-end to get finished. So, in short: keep it simple, stupid. You have limited time and limited resources, work with them.

Speaking of resources, let's talk about people. I met many interesting new persons in the site, which was nice, as you could propably find opinions on any given subject you could think of, and in case of dire need, someone would probably lend you a helping hand. There were few who had already made games in a professional company, and some who barely knew how to program. It's this diversity which makes the jam such a great place to make games. And it was also very nice seeing people doing things they normally wouldn't do - people knowing more about graphics would make music or program, and programmers made art (coder art woo!). So, points two and three: don't be afraid of jumping out of your comfort zone, you'll meet new people and learn new skills.

And to add to the "jump out of the comfort zone", we worked with Qt, as I mentioned earlier. The catch was, no one at the project had done any serious stuff (as far as I know) with Qt, so it was an interesting experiment, especially as our UI-programmer/designer didn't know how to program in C++ or QML, though luckily QML apparently resembles JS closely enough for allowing him to work with it, and C++ wasn't really needed on the UI-side. So, I worked with bluetooth and haptic side of the device while the other main programmer worked with accelerometer (from which he had some experience previously) and the game logic.  Qt is a neat system to be honest, and I can see myself working more with it, as it makes development for mobile phones ridiculously easy.

Let's get a quick recap: if there's a game developer club near your area, be in contact with them, as Global Game Jam is in January and it's quite likely they'll participate too. See more from here and see if there's going to be a jam close to your location: http://globalgamejam.org/
Seriously, go there. You'll meet new people, learn new skills and get to make a game in short time-frame so you'll see the product of your hands in a short time, what's more to ask?

Oh me, am I going for the next jam? Absolutely. I already had a short discussion with our other programmer that maybe we should try doing some WP7 development next time, should we get our hands on any phones.

If you want to see and download games from this jam of ours, go here. If you want some pictures and raporting (though in Finnish, sorry), go here instead.

So, that's all for now!

9/1/11

So, what is happening?

As some of you may have noticed, 30th of August came and went, but JARL 0.1 is nowhere to be seen. What happened?

Busy happened, that's what. And now that I'm back to uni, I have a bit less time to develop JARL. However, I've set up a GitHub for JARL, and you can check and download the code from here. I haven't decided anything on the license yet, but the code itself doesn't have that much basis anyway, so feel free to use it any way you want. It's not stable and it won't compile for now, but I'm finishing up the dungeon generation code (corridors have proven troublesome, but I'm not going to give up on that). After that it's just merely creating the player and taking input for movement.

6/19/11

JARL status update ft. Link Dump Time III

Okay, so, long time, no update, let's do a little fix on that. I've been writing a little rant about gaming and my opinions on it, but this is not the time for it, so let's have a little status update on JARL instead, and some interesting links again.
 "
This is what success tastes like
So, JARL. I've been working on the ruleset, and will update it soon to much more complete version. I've also been playing with SDL a little, so it will most certainly be featured on release 0.1 and as such, makes the chances of having tileset much more likely. Also, I've begun to rewrite most of the code, as internal logic was getting way too hard to follow. Now it's much more clear and better designed.

Also: there are now 11 character classes, I may add one more if I have time. 12 races still. Aaaand... Tumblr failed me, and now the original projectblog on Tumblr is inaccessible by me, I can't edit or anything. So, when I gain some inspiration, I'll just put a new one up.

And then, links:
A modeling tutorial series for XNA using Blender. Seems pretty nice, though I haven't much experience in either modeling nor Blender in particular.

Alternative way of making 2D animations using skeletal animations. "A word of warning: while skeletal animation helps solve some problems with memory, loading times, smoothness, it is not a silver bullet."


How to make fewer mistakes at writing code. This oughta interest everyone who does any coding. Read through, it's very interesting read.


A chapter on book called "The Architecture of Open Source Applications", this particular chapter being about The Battle of Wesnoth. Really interesting read. "Our developers attempted to lay the foundations for broadening accessibility right from its earliest iteration. This would have undeniable consequences for all aspect of the programming architecture. Major decisions were made largely with this objective in mind. This chapter will provide an in-depth examination of our program with a focus on the efforts to increase accessibility"


Cliffski is angry that indie seems to mean these days the same as "cheap" and "unpolished". I agree with him, it makes no sense. Valve is basically indie company, you see.


Remember to have secure passwords.


Thomas from Frictional Games takes on the subject "Player - the artist?" and I do agree with him very much. "Consider doing a trek through the woods. Even if several people follow the same route in the same forest, each one will have with very different experiences. Some might take side-tracks, have some unique encounters, do the trekking at a different pace, etc. The possibilities are essentially endless. The person doing the journey shapes his/her experience in a unique way and has a big responsibility in how it all turns out. Still, this is not an artistic endeavor."


That's all for now, enjoy.

5/14/11

Roadmap


So, I’ve come up with a small roadmap for this project (up to version 0.3). 0.1, as promised, should be ready this summer (meaning, at least before the end of August). 0.2 should come out before new year. 0.3 should come out the next summer, if not sooner.
(Major) release versions, estimated time of release and major features:
0.1 (31.8.2011)
  • Basic (inter)actions - movement, (melee) attack, killing, dying, xp, leveling up?, picking stuff up?
  • inventory(?)
  • console/terminal based
  • random generation
  • dungeon save format(?)
0.2 (31.12.2011)
  • SDL/SMFL/OpenGL (not quite decided yet)
  • inventory
  • skills (basic)
  • more detailed/fleshed out leveling up
  • debug/developer-mode
  • dungeon save format
  • save game format
  • spellcasting (?)
  • ruleset v. 1.0 should be finished by now
0.3 (1.6.2012)
  • more skills
  • basic special abilities/attacks
  • dialogue
  • more interaction
  • classes and races
  • character generation
  • ruleset fixes, should they be needed

Hopefully I'll get 0.2 and 0.3 out sooner than planned, but 0.1 release date is pretty much what it will probably be.

Hey, also, if you have Tumblr, you might to want to follow the project there, there will be less general gamedev-yammering there and more about "what has happened". At least there'll be once I have a little bit more time, at the moment I have final exams for this Spring and two larger schoolprojects going on.

5/3/11

Concepts

I've been drowned in schooldwork lately, and now that I'm getting out of them, I got sick. Brilliant. My nose has been running non-stop for the last 12 hours, and the same thing the day before this one. I feel really heavy-headed. So, not much real work has been done, and I've mainly been playing video games and playing around with concepts and ideas.

I've been thinking about changing the way leveling up works. Instead of the generic DnD-like way of "new talents and abilities per levels", I've been thinking about what if you basically had acces to every ability and spell from the start, but might not be able to use them until you level up enough and gained enough of Mana Points/Power Points/Focus Points/X Points to actually use them?