About hdon

Entries

hdon's Trophies

hdon's Archive

Twisted and Pygame

Posted by
Saturday, April 24th, 2010 4:35 pm

Twisted provides a network reactor framework for Python that simplifies network programming down to implementing methods on a class that inherits from one of their base classes. You can have an arbitrary number of classes and instances of those classes managing the chatter with a particular connection.

My current problem with it is that it doesn’t seem to provide an API for adding more sources of events to be handled. Pygame is equally uncooperative in this regard. I can’t, for instance, tell a Twisted reactor to listen to another arbitrary file descriptor and how to handle it. Glib has “GSources” which encapsulate this notion, and are abstracted well enough for applications which have to poll for data readiness that is unrelated to a file descriptor. Rarely in a *NIX environment will you ever have such a thing, but platforms like MSWindows have a whole slew of data sources which you can’t select() on. (That may be out of date. It’s been a long time since I’ve done MSWindows API.)

The compromise I’ll have to make for LD17 is to use a timer-driven callback which pumps my Pygame event loop. The Twisted API for this is the callLater() reactor method which accepts a timeout and a callback function as arguments.

Anyone know anything better?

Game Idea for my Competitors, plus Ubuntu Sucks

Posted by
Saturday, April 24th, 2010 7:20 am

A cool (I think) interpretation of the “islands” theme just struck me: Islands of human waste! It’s a real life phenomenon: http://www.falloutearth.com/documentary/garbage-island/

Also about every 50 times or so restarting my game I notice that my compiz window manager (default on ubuntu) bails out and I have to restart because metacity causes nasty tearing in my game! If you have this problem, drop to a virtual terminal and execute:

sudo /etc/init.d/gdm restart

Or I guess do it from xterm with “nohup”

Font

Posted by
Saturday, April 24th, 2010 5:55 am

It was important for me to use this font in the first game I have attempted to make in over a year. I received this font in the final email I will ever receive from an important friend of mine.

Isle Politic

Rest in peace

Game Concept and First Screenshot

Posted by
Friday, April 23rd, 2010 11:50 pm

So I’m thinking the game (networked multiplayer real time strategy game with trade, military, and acts of god) will be a little bit like Tigris and Euphrates. I really like that board game, and thought I’d borrow the concept of competing dynasties vying for control of a finite number of industries / institutions. In Tigris and Euphrates there is (forgive my not knowing the actual names they use in the game) farming/cultivation, religion, trade, and rule/order.

In Tigris and Euphrates, your final score is the lowest score you possess in any of these four industries/institutions. You distribute your representatives (one for each institution) among the various kingdoms in Babylon. As the kingdoms develop, your representatives earn you points for developments in the kingdom that apply to their designated institution. I don’t think I’m going to do that exactly, but what I do like the idea of doing is allowing kingdoms to merge and divide through acts of god.

So in my idea is that each player will be given a finite number of acts of god they can play. To bridge islands together, a player must invoke Global Warming Land Bridge which causes the water level to recede and reveal a land bridge beneath the surface of the ocean. This will cut off oceanic channels (changing the game board with respect to sending your ships places) and it will merge two islands. As in Tigris and Euphrates this means that leadership of the new unified kingdom/island will be contested and one of the dynasties loses out. I’m not sure of the specifics for my game, but I like this idea. The inverse operation of the Global Warming Land Bridge is not an act of god, but a simple Canal.

Anyhow, here is the screenshot I promised. It looks much cooler with motion and blinking, but Istanbul has been completely broken on Ubuntu 9.10 for over half a year now, so I can’t exactly do a screen capture of video right now :(

Sailing North-North West

Island music = streaming calypso radio?

Posted by
Friday, April 23rd, 2010 8:21 pm

I was thinking of trying to find a calypso stream on the net and use that as my music. What do you guys think? Would that be against the rules?

Networked Multiplayer Only?

Posted by
Friday, April 23rd, 2010 8:12 pm

Feedback sought on this:

I am going to do a real time strategy game that is inspired by Starcraft and ATC Air Traffic Controller Simulator from the bsdgames package.

For the uninitiated, atc is an all keyboard-driven game to be played in your favorite terminal emulator. All of the controls are commands that you issue to individual planes attempting to get them to land. I think that by factoring out the mouse, I’ll simplify my programming a bit, and get to tickle my fetish for frenzied keyboard commands.

The rub, and this is what I want feedback on: What do people think of an entry that has no single player mode? I’m planning to run a server (or several) in San Francisco so that everyone can connect quickly and easily and begin playing immediately. By factoring out single player mode, I am avoiding having to write an AI player for the game. To my mind that is a big simplification, and will make it much more practical to finish this game in 48 hours.

The only problem is that I have no idea if this will fly. Is this acceptable to the LD community? How would I reconcile player instantiation versus the long lifecycle of the server? Should the game restart periodically? Should there be a win condition that ends the round? I can’t decide.

Please give me your opinions!

Pixel Ludum Dare logo

Posted by
Friday, April 23rd, 2010 8:03 pm

I’m using this for the splash screen:

Pixel Ludum Dare

Pixel Hawaii

Posted by
Friday, April 23rd, 2010 7:58 pm

Anyone doing a strategy game or need a world map? Satellite photos of Hawaii make a great source for lo-fi pixel graphics:

Satellite Hawaii

Pixel Hawaii

[cache: storing page]