Tag Archives: game development

Upotreba Objective-C u igrama; moje mišljenje

A short Croatian language opinion post on use of Objective-C in games

Dobio sam nedavno pitanje o tome da li se isplati učiti Objective-C (u kontekstu igara).

Moje je mišljenje da Objective-C ima deset puta logičniju internu strukturu nego C++, te da je svojom kombinacijom karakteristika dinamičnih i statičnih jezika izuzetno pogodan za pisanje igara. Primjerice, evo stvaranje kapitalnog svemirskog broda koristeći string, i spremanje istog u SvemirskiBrod:
Continue reading

What sort of software do I need libre/open-source?

After thinking a bit about what I need open-source, and what I’m capable of implementing but too time constrained, here’s a short list. If I had enough cash and if I didn’t have to study, I’d go now and work on some of these.

Open source Steam

And I don’t mean just a game browser and installer. I mean the full deal: friends, shop CMS, patching, DRM, DLC, ingame overlay. Friends could work with XMPP, and when I think about it, so could everything else. How about login with OpenID, Facebook Connect, XMPP?

Better, modular X11 login manager

I want a login manager where I can easily write a GUI in OpenGL or whatever I want, and just plug it in with the backend code that’ll handle the login itself.

I started writing that, but then I got a Mac.

In-game XMPP overlay

I’m sort of obsessed with in-game overlays, right? But that’s what I want to have: a way to talk to my google-talking buddies from in-game. Steam’s in-game browser is NOT a solution. I’ve tried looking around for something like this; I found some open source code for in-game overlays (Mumble VOIP has one), but nothing simple enough for me to fork and add XMPP code and a simple GUI (perhaps using my GLICT or my company’s AprilUI) to be able to have a proper in-game IM experience.

Well commented and structured code

This is not something I can fix even with a lot of time. I try to structure my code well, but that’s about it.

I’ve been through too much OSS code lately that wasn’t commented well. In fact, I know of one instance where I was studying implementation of in-game overlays, and the already-confusing code didn’t have a single useful comment in it. I’ll do an evil namedrop and mention this was, again, Mumble. I want to make it clear: it’s an excellent project, with lots and lots of cool ideas, well implemented tricks such as positioning audio according to the position in the game the speaker and listener are playing, et cetera. But, simply put, when I looked at the code they had in SVN, I found something I couldn’t put my head around.

Functions and classes were oddly named, not to mention files. Platform-specific code was all mixed up and was not separated; while there were attempts to be modular, separation of platform-specific stuff (and when it’s about in-game overlays, you know it’s VERY platform-specific) was done very clumsily. I couldn’t find where the code initializes system-wide monitoring for the launch of a game, and where the overlay is initialized. I gave up.

But this is what defeats the purpose of open source. Why bother releasing it as FLOSS if people can’t learn anything from it? I wrote a lot of code over the years, but if it isn’t instructional or useful, why would I release it as FLOSS? One goal may be to get it into Debian which has a social contract to ship only free software, but if that’s the entire point, then say so.

Don’t insert assembler blobs without commenting them (oh yes, that too).

What about you?

What do YOU want from open-source community that you can’t find? Or, can you imagine a financing model for developing the above? Tell me your thoughts!

Mathematical perfection and piloting

I just wrote a larger piece for the “…zomg it works!” (a programmers’ blog in Croatian language) entitled “Mathematical perfection and piloting” (Matematičko savršenstvo i pilotiranje) so I’m inviting those of you following this blog, but not “…pa to radi!” to plug in and read it.

It’s quite long, but meh. Read it or suffer my wrath. You’ll suffer either way.

For those of you non-fluent in Croatian, hop on and read the poorly auto-translated edition. I don’t feel like rewriting it in English.

Axis aligned boxes on particle systems in Ogre3d and PythonOgre


/Users/ivucica/Developer/ogre/Mac/Ogre/../../OgreMain/include/OgreAxisAlignedBox.h:246: failed assertion `(min.x <= max.x && min.y <= max.y && min.z <= max.z) && "The minimum corner of the box must be less than or equal to maximum corner"'

In Cateia, we were getting this bug on one particular place in the game, related to a particle system in Ogre3D.
We use PythonOgre and we normally quite liberally throw around try..except blocks to catch issues. Most exceptions are caught properly on the Python level because PythonOgre wraps most Ogre3D exceptions. However, this is not an exception, this is an assertion.
Basically, particle systems in Ogre are interesting in that they automatically update their own AAB (axis aligned boundary [box]) for initial 10 seconds (after which they are presumed to reach their maximum size). You can change the length during which update will happen, if at all.
We have a particle system of water which falls to the ground. This means that at one point AAB becomes very, very small (or perhaps even inverses itself?) Since our game is a 2.5D adventure (2D backgrounds, 3D characters), we really don’t need AABs that much because only objects that are on scene are relevant.
So the solution is:
   aabInf=ogre.AxisAlignedBox()
   aabInf.setInfinite()
   self.ps.setBounds(aabInf)
   self.ps.setBoundsAutoUpdated(False, 0)
We expand to infinite boundary box, and tell the particle system not to update itself. C++ code is the same.

Great tutorials for SDL coders

Anyone familiar with GL knows about http://nehe.gamedev.net/ but there is precious little information and tutorials with regard to SDL. Which is sad, considering that once you get to know the little beast, you start to like it.

But what about SDL?

Apart from Googling, I’m suggesting these below:
* http://sites.google.com/site/sdlgamer/
* http://sol.gfxile.net/gp/index.html

Bottom one is the one I visited several years ago, and it doesn’t seem to work anymore. Try the internet archive wayback machine.