Friday, January 27

The Independent Game Developers Co-operative

Many developers are fond of excorciating the current state of the games industry, bemoaning how broken the current publisher - developer model is, and are looking for a more sane alternative that concentrates on the quality of the games themselves. At least three times in my career I've experienced the tension between the need for a publically owned company to maximise profit for its shareholders and the desire of game developers just to keep working on a game, until it reaches the quality threshold they are comfortable with putting their name to. Realistically, there is no way that this is going to get resolved in favour of the developers. I've accepted that as part of working in the industry; if you need the results for this quarter, you need the results for this quarter and that's how it is.

However, there *is* a positive alternative if there are enough people brave enough, out there. A co-operative. The whole essence of a co-operative is the opposite of a company. Members own shares, and the co-operative exists to provide services or goods to the members in the most effective possible way. For an up-to date example, see the Tech Co-op in Canada.

Off the top of my head, this is how I see it working:

I'd envisage a game developers co-op working as two-coperatives: first there would be a gamers service co-op and secondly there would be a smaller game developers workers co-op, the membership of the first driving the second. The reaons for this are that the membership of the gamers co-op would be open to anyone on the internet. Membership would get you regular mailed game CD's for at least a year, then these would be provided thereafter for a small subscription fee. The gamer as a member of the co-operative would be able to pitch ideas and designs to the developers-cooperative, get technical support, game server hosting, and other services to be identified.

The game developers co-operative would provide or sell services to the gamers co-op at a preferential rate, but would also engage in marketing and distribution efforts on behalf of it's members. This would enable an otherwise less affluent group of developers to talk directly to publishers and get access to platforms it would otherwise not have access to. Revenue would be ploughed back into the memebers projects.

These are only tentative back of the envelope thoughts; the main point is that with the reach of the internet, a co-operative has the potential be a much larger, more effective organisation than before. The inherent problems with such a proposal - no one reaching any agreement - have to be dealt with by careful sturcturing of the co-operative.

It's time for me to do more research..

Sunday, January 8

Oracle XE on Gentoo

Installing Oracle Express Edition on Gentoo Linux was both easy and hard. It's the usual case of synthesising bits and peices off the web: the system tweaking you have to do pre-install is well documented here; then you need a portage overlay, as documented here, and then you can use the ebuild from this thread to install it.


Once it's up and running getting emacs to talk to it is a peice of cake. You need to customise the oracle-sql program to point to the installed sqlplus binary, and you need to source oracle_env.sh from the config directory..then launch emacs and connect.


It took some work, but it's *much* better than using a bare sql plus instance and notepad in Windows. I can develop my SQL in a similar style to my Lisp, sending fragments to a running instance via C-c C-r, which is the absolute minimum I am coming to expect of any language.

Sunday, December 18

Lets try plugging this into this...

My last two assignments (Java, Web coding) were very straightforward and boring, so I've decided to make my life interesting by using a combination of Oracle 10g Express, CLSQL, and Gentoo Linux for my database assignment. Neither officially supports any of the others, but they should fit together. Let's see...

Lisp software renderer

My pet Lisp project has been languishing on my laptop recently; I've had a fiddle with the Linux Framebuffer Device interface, and it's occured to me I might more usefully bind to that than the PTC library. Potentially it could be a non X based graphical backend to the McCLIM. Someone is already working on an Open GL backend and that code could map over quite nicely...the fonts would be some kind of awful hack, though...

Sunday, November 27

Bitmap Fonts, Java, Wingdings and Unicode

Bitmap Font Builder App

After my brush with the script-fu I thought I'd go back to basics and do the bitmap font creator as a Java app. I have whipped up this app for knocking up old school bitmap fonts. The gradient fills haven't really surrvived Pay attention to the picture, as it shows at what code points to find the Wingdings glyphs in the Unicode set. It's not 0..255, as has puzzled many Java coders before!

Thursday, November 17

Bitmap fonts and the script-fu.


Despite my rant against script-fu, it must be acknowlgeded it's highly useful for getting game art knocked out in double quick time for example, bitmap fonts. Here's a script that can knock one up in a jiffy - it's just a sligtly modified version of a standard script. I'm somewhat dismayed by the size of the .png file.

Wednesday, November 16

Script-fu

Today I delved into the realm of Gimp, SIOD, Script-fu; and let me tell you it's the least productive environment I've hit since the ZX81. I mean (set! variable value) is your assignment operator, so like a good lisp monkey I try (set! (aref string 1) "A"). Does that work? No. You use something called (aset string 1 65) why doesn't it have a bang, eh?


So, I want to create an array. Now I created a list with make-list, so, of course, I want to use make-array. No? Gotcha again! It's cons-array. Arrgh!


Add that to the fact that pressing the escape key closes the script-fu console window; which is something I do quite a lot, as it's hardwired into me that Escape means "clear the input" and that the documentation is just a scrappy list of functions that makes it hard to find what you need, that's a recipie for a very frustrating morning. The tragedy is that this is going to be some peoples first exposure to a lisp-like language..it could be so much better; the scintilla component could have been embedded in, there could be a much better tutorial and reference; but I guess someone would have to be paid for that..

Monday, November 14

Sony are in so much trouble..

This story just runs and runs. Not only do Sony release a rootkit that installs itself onto Windows PC's without telling people, and get discovered, it turns out that the rootkit is a GPL violation! This one is going to run and run...are Sony trying to replace Microsoft as the Evil Empire? They seem to be taking a pretty good shot at it!

Monday, November 7

Package du Jour: Dia

I've been playing with Dia and been moderately impressed with what I've found. I've been using it as part of my course; being able to export to .pngs is good. It's happy with a wide range of diagrams: mostly I am using it for entity relationship diagrams and UML. There's even a uml to code generator for it which I intend to try using for my Java assignment. While I can't say it's as good as Visio (when did that become part of Microsoft Office), it's a cheap way for students to explore UML and "good enough" for most small projects, and it has an interesting quirky diagram set: isometric game tiles - houses, railways, fields - which can be used to layout a small toy town. It might even be a game prototyping tool one day; with the right tileset..

Change of Direction

It might seem strange to some people that I have recently left Reflections and decided to enroll on a Masters degree course; it's a strange thing to do at 38 years of age. Even stranger, the Masters course is not strictly games-oriented. Well it's not as big a jump into the unknown as it looks: many of the new mobile platforms use Java, databases are increasingly important - both as repositories for the huge number of assets used in game development, and for the backend of MMPORG's as well as their more humble play-by-web cousins.


The web itself is probably the most interesting platform around today: it's a mass medium based on a mishmash of standards and technologies that can be bent to do almost everything; a giant laboratory free from the restrictions of proprietary console platform development.


I'm beginning to suspect a much better (as in scalable, among other things) platform for games development can be assembled out of some of the emergent technologies available now; a distributed, social system capable of handling vast amounts of assets, and large numbers of distributed collaborators. It's my intention to try and assemble a platform capable of this, and offer it as a model for further research.


It's also my intention to learn as much as possible in a short time whithout my brain exploding; as this is the most challenging course my local university has to offer, that might be hard. Still, onwards...

Thursday, October 13

More newbie thoughts on Lisp

It's become obvious with the code I've been writing recently that Lisp's strength and weaknesses are all tied to it's lack of syntax. The fact it has very little in the way of syntax leads to a combinatorial explosion - there are an almost infinite number of ways to do simple things: it makes me wonder if the whole purpose of strong syntax in languages isn't simply to prevent this, and guide the energies of programmers into productive channels. It certainly was the case in C and Fortran where syntax was carefully constructed to enable mapping high level language to machine instructions a straightforward transformation.

However the lack of syntax has to be an achilles heel: the huge number of idioms that could be applied to simple programs means no two coders are going to write anything neccesarily similar. I'm assming the full set of coders of all levels of competence here. I expect a smaller set of seasoned coders would converge on similar solutions given similar problems. Which makes it a devastating weapon in the hands of a sesoned coder, but probably in a team of mixed abilities it would lead to much higher communication oveheads.

Thursday, October 6

Project Madness

I simply have to back off, I'm trying to do too many bloody things at once.


Here's my long list


    Get deeply enought into web/database tech to get a small play-by-web game running.

    Update the Omega rougelike game for the SDL & modern multiplatform code.

    Update Blah, a roguelike skeleton that fell off the net many moons ago, with SDL graphics and Lua scripting.

    Finish the LISP software renderer.

    Create a tool for parsing C into sexp's with an eye to auto-generating UFFI or CFFI bindings.

    Some unspecified Java app, just to keep my hand in : possibly a Blogger to Live-Journal migration tool.

    Some more games that have been bubbling under the radar for what seems like years.

    Lunch with Laura - a graphic novel. Nothing to do with coding, but it competes for time.

Clearly, something has to give, somewhere..

Thursday, September 8

XEmacs Wins

Mostly because you can configure it seven hundred ways to Sunday, and after lots of fiddling I arrived at an init.el I kind of liked. It has room for improvement. It probably shouldn't rely on cscope for tagging, becasue that's platform specific. It probably should fall back on plain old tags. Onwards to do some actual coding then: programmers are the only people who can get so preoccupied with sharpening an axe they forget about the damn tree.

Wednesday, September 7

Grand Text Editor

I find myself prevaricating between editors. I know I have to pick one and stick to it, but I can't make up my mind which. I've narrowed it down to a few promising candidates, all cross-platform.


  • Emacs.

  • XEmacs is pretty much *the* editor if I want to code in Lisp, as it has Slime, one of the most interactive and potentially productive programming environments I've ever seen. The Emacs Code Browser gives me IDE-like organisation and navigation. It integrates nicely with gdb and the shell. The con side is that the tagging is poor, and requiring more than three keystrokes to do anything useful makes it difficult and "slow;" feeling to work with. It's so configurable it's difficult to zero in on a single working style with it. The learning curve seems endless.


  • Gvim.

  • Vi - Improved. Another editing heavyweight, and the keystrokes are both brief and seared into my brain as I've been exposed to it on and off throughout my career. Frankly, if it wasn't for the amount of Lisp I do, it'd be my editor of choice. It doesn't have anything like ECB - but it does have sessions - a collection of settings that can be quickly saved and restarted. Which is fine for keeping track of different projects. It also as a huge collection of scripts and customisations, like Emacs..The keyword completion is wicked, but it's not context sensitive like Intellisence.


  • JEdit.

  • JEdit is another contender. It handles sessions and tags pretty much as well as Vi and XEmacs do. It's set of plugins are not as comprehensive as vim or XEmacs, but there's enough for the job. It's main benefit is a more modern gui and a slicker feel. Comfort is an important factor. The plugins are very Java-centric, and I suspect this editor would be a powerhouse for a Java coder, but I'm not so sure about how it would pan out for a C++/Lisp coder.


  • Visual Slick Edit.

  • The only commercial editor of the bunch, and the slickest. It intelligently does completion of structure and class members, parameter lists, and does incremental tagging in the background: as a result I'm more productive when coding in C/C++ with this editor. It gave me a real competitive advantage over my Visual Studio bound colleagues back in the days of Visual Studio 6. Although they have since caguht up. It can handle Python and there is a script for Lisp support on the website, which I haven't tried.Lack of Lisp is a major minus, otherwise this would ne a no-brainer. Although, perhaps I could use this in conjunction with the LispWorks IDE.

    So which one do I pick? They all have something I want, and they all miss something else. Can anyone spot anything I've missed? Some plugin or mode that would give one an advantage over the other? Shorter XEmacs keystrokes? Intellisense for vim or JEdit? A good Lisp mode for Visual Slick Edit?

    Monday, September 5

    Goodbye Slackware

    One of the first things I've done with my newfound freedom since leaving Reflections is to review all my Linux installs. For a long time I've been soldiering on with the redoubtable Slackware. However, I resolved to give Debian a try, and frankly I'm amazed by what I've seen. Compared to Slackware install was fast, friendly and trouble-free: network, video, and sound were all auto-detected, and the graphical login came up first time.


    Gnome is gorgeous, too, all point and click and "just works". Even this post came straight from the desktop blogging tool, rather than via Firefox.

    Every time I revisit a mainstream distro, I'm amazed by the progress. Frankly, if something like this came pre-installed, damn few people would touch a Windows PC. Mind you, Steve Jobs has probably recently come to the same conclusion, so there maybe hope, yet...meanwhile, it's back to my Lisp rendering follies, I guess.

    Saturday, June 18

    Lisp, the language that does your coding for you..

    Well, not quite - but almost. After reading Rogue Malcontents nifty post where he uses macros to wrap simple-arrays with structure - like syntax (very handy for interacting with APIs like OpenGL), I went back and looked at my code with a fresh eye. I found I was writing lots of forms like this :-




    (red (get-red p0) (funcall red-interpolator))
    (blue (get-blue p0) (funcall blue-interpolator))
    (green (get-green p0) (funcall green-interpolator))
    (alpha (get-alpha p0) (funcall alpha-interpolator))


    ..where the same form was wrapped around each colour channel of a pixel. So I thought "Hmm, time for a macro". My first attempt was something like this:



    (defmacro with-pixel-colour-list (body)
    (list
    `list
    (replace-symbol 'get-pixel 'get-red body)
    (replace-symbol 'get-pixel 'get-blue body)
    (replace-symbol 'get-pixel 'get-green body)
    (replace-symbol 'get-pixel 'get-alpha body)))


    Where replace-symbol was a utility function of my own devising which car'd its way through a form, replacing a matching symbol as it went - given here for completeness. So the form fed to with-pixel-colour list gets replicated four times - the first time with the get-pixel call replaced with a get-red call, the second time get-pixel replaced by a get-green call, and so forth. So I only have to write one form once, rathte than four times, and the compiler does the rest of the work for me, macro-expanding the code before compiling it.



    (eval-when (:compile-toplevel :load-toplevel :execute)
    (defun replace-symbol (sym1 sym2 list)
    (cond
    ((null list)
    nil)
    ((null (car list))
    (replace-symbol sym1 sym2 (cdr list)))
    ((symbolp (car list))
    (if (string= (symbol-name sym1) (symbol-name (car list)))
    (cons sym2 (replace-symbol sym1 sym2 (cdr list)))
    (cons (car list) (replace-symbol sym1 sym2 (cdr list)))))
    ((listp (car list))
    (cons (replace-symbol sym1 sym2 (car list))
    (replace-symbol sym1 sym2 (cdr list))))
    (t (cons
    (car list)
    (replace-symbol sym1 sym2 (cdr list)))))))


    So, (with-pixel-colours *my-pixel*) expands nicely to (LIST (GET-RED *MY-PIXEL*) (GET-BLUE *MY-PIXEL*) (GET-GREEN *MY-PIXEL*) (GET-ALPHA *MY-PIXEL*)) and I can write things like:



    (defun sum-colours (pixel)
    (apply #'+ (with-pixel-colours (get-pixel pixel))))

    (setf *my-pixel* (make-pixel 1 1 1 0))


    (sum-colours *my-pixel*)


    3



    Fantastic - but there has to be a wider application than this - so my next task was to generalise it a bit. More in the next post. :)



    I do get the feeling I'm re-inventing a well known technique, as I'm a newbie, and this kind of thing is just too useful. Any experienced Lisp coders care to comment?

    Tuesday, May 31

    Ion Drive

    I've never found a window manager I've been 100% happy with - KDE and Gnome are far to slow to live on my old P600 Laptop, Afterstep, while asethetically pleasing, had too many menus, too many different feels and options and and I never could settle on a consistent set. Ratpoison was my most recent discovery, and while I liked it for it's simplicity, it was a bit too simple - it handled modal dialogs like mozillas download manager dialog badly - putting them in a whole window. At last I've discovered Ion - a tad more sophisticated than Ratpoison, but not much, so it still responds instantly on a clapped out laptop. It just handles dialogs much better, and works on the same principe - you should be able to treat your window manager in exactly the same way as you treat your text editor window - by having multiple windows and frames you can split, delete, create, and traverse between via simple keystrokes. If you dislike mice, it's worth giving it a try..


    The only problem is -- there will never be a Windows version. It'd be interesting to see what a Mac user would make of it, though..

    Sunday, May 15

    And now colour it in..

    Added coloured tris to my renderer yesterday - it's coming along nicely. Started out as a "learn lisp" exercise, but now it's taking on a life of it's own.

    Monday, May 2

    Dynamic game difficulty adjustment.

    Some thoughts after reading The Psychology Behind Games by Anders Hejdenberg.

    Should a game adjust it's difficulty level based on the players observed ability in the game? Possibly, but it's an artificial device. Response to changes in the players ability should probably err on the cautious side when making the game easy and on the converse side when making the game harder. It's important to have player profiles, too. Visual feedback of the current setting and a manual override would be nice, too. Some people don't want things to be too easy and for the game to "surrender", but other people would use such a mechanism to cheat, or just plain want to go through the game quickly.

    Feedback and control are the watchwords, as ever.

    Sunday, April 24

    Brand new Baby Bouncing Triangle

    At last cl-ptc (the Lisp software renderer) plots a nice, clean triangle, after weeks of fiddling around with interpolator functions, it's a relief. It's my first ever time as a lisp, so I'm proud to present my first ever bit of Lisp porn..