Archive for the 'Code' Category

End-of-June GSoC Status Update

It’s been way too long since I’ve written here; and, it’s going to stay that way for now, unfortunately. I’m just going to quickly copy my weekly status reports for the first five weeks of GSoC in here, to share…

Week 1

Hi, all!

I was in Barcelona at UDS last week, so I didn’t get that much work done, but I also started early so as to get something done.

So far:

* I started (and got a good ways on) a much-cleaner and more-modern-seed rewrite of Lights Off. There’s all kinds of awesome brokenness (mostly a result of airport coding practices) so I wouldn’t suggest installing it at the moment.
(http://jayne.hortont.com/git/cgit.cgi/lightsoff3.git/)
(http://hortont.com/files/lo3.png)

* I created a PPA for those of us working on GNOME Games to publish our work; I’m going to get introspection and Clutter and seed and whatever you guys need in there shortly, and once all that is working, I’m going to merge all of the GSoC GNOME Games branches, build a copy, and push it to the PPA (and wash, rinse, repeat, at least once a week). (if anyone has working debian packaging for the as-yet-unreleased gobject-introspection-0.6.3, let me know, I’ve been fighting with it all morning)
(https://launchpad.net/~gnome-games-experimental/+archive/ppa)

* I worked with racarr to get seed-0.8 out the door while at UDS, which includes an important GC-related fix that affected ClutterAnimations, so we reduced leakage (or hacky code to avoid leakage) in all of the seed games.
(http://ftp.gnome.org/pub/GNOME/sources/seed/0.8/)

* I blogged about the Lights Off tiles (just for fun!), and got about 1000 votes, choosing the new ones 4:1 (not even remotely surprising).
(http://www.hortont.com/blog/2009/05/lights-off-tiles/)

Week 2

I spent a good part of the last five days (my last status report was late, so the duration between these two is less than it ought to be; do let me know if Sunday night is the wrong time for these!) working on various things:

* I created a branch of GNOME Games for myself (gsoc-seed-games) and imported the rewrite of Lights Off from last week into it.

* I finished populating the PPA that I mentioned that I created in the previous cycle. It has fresh-from-Git versions of webkit, seed, opengl-glib, gobject-introspection, gir-repository, gnome-js-common, clutter, and clutter-gtk as well as a copy of gnome-games which includes my branch, Guillaume’s branch, and Zhang’s branch (so, as far as I know, all of the GNOME Games GSoC Goodness).

* I talked to both Guillaume and Zhang to fix tiny packaging problems in their branches in order to achieve the above.

* I spent the better part of an entire day deep inside the Clutter source, trying to determine the source of a bug; I eventually found the _source_ of the bug (#1631), but do not have a proper patch; the PPA includes a patch (which is also in the seed repo, in the patches subdir) that removes the broken optimization, but I’m not sure how to appropriately /fix/ it… in any case, this means that the most significant animation bugs are fixed.

* I cannot wait until Clutter-1.0’s API stability. There was lots of updating Lights Off to the changes caused by the merge of the integration-1.0 branch into head, this week, too…

All in all, a week of bugs and packaging, and not a whole lot of awesome new code… but these are important things! I also made a very overview-y next-steps-to-do list at Thomas’ request:

1) Get libgames-support installed + building gir/typelib.

2) Consume libgames-support inside LO so I get game-related stock items and stuff, finish LO UI.

3) Move LO + Same into gnome-games git. (this is half done, now)

4) UI for Same (consuming libgames-support stuff); high-scores, preferences (?)

5) Mines!

Week 3

Hi, again!

This is going to be a terse status report, as I’m currently running around rather busy…

This week, I:

* got libgames-support installing into prefix/share/gnome-games-common (commondatadir)

* got libgames-support build generating introspection data

* consumed the aforementioned introspection data in Lights Off, and started (about halfway) to consume it (for high scores) in Same

Next, I want to:

* move Same into my branch of gnome-games, and get it building as an option (alongside the C version)

* figure out what to do about ggz introspection data

* finish high scores code in Same, menu, etc.

Week 4

Another week! Another short, last-minute status update.

* Fixed a longstanding bug (#579008) in gobject-introspection, which was requiring us to carry around a patch to Clutter that would /never/ get applied (it removed annotations to work around the bug). Hasn’t been committed yet, but since it ended up only being a single line (once I realized what was going wrong), I’m sure it will be soon. Also, filed a bug (#1653) against Clutter to *add* some necessary annotations once this gets fixed…

* Worked a bit on getting the SVN version of GGZ to generate its own introspection data. This is proving to be slightly annoying, because GGZ is split into numerous parts, and I’m having awesome crashes and stuff…

* Moved Same (the JS version) into gnome-games repo, get it building properly (right now, it installs beside the real version, should become a switch at some point).

* Same (when it was still in the Seed repo) has a C version that I’m using to figure out some oddities with Seed+Clutter, and both that and the JS version work with Clutter head now.

Stuff in the gnome-games repo hasn’t been pushed yet (just got home from NY, fighting with Git, I hate losing the ability to rewrite history, etc.; it’ll all be up by tomorrow).

Week 5

* Made a to-do list to keep up to date (http://hortont.com/gsoc-seed-games-todo.html) Right now, it only has stuff that I could think of off the top of my head this morning, but it’s already a relief to no longer need to keep such things in my head. Anyway, I’ll continue updating it and checking things off from here on out.

* Cleaned up animation and events and stuff in Same, which fixes some strange flickering when you move the mouse over the window, and makes most of the animation smooth again (update to match the fact that Seed handles animation memory now, too). This is incomplete, still, there’s a little left to be done.

* Wrote a tiny ‘gettext’ C module for Seed, so that we can _(”asdf”) from JS. I still have no way to scan JS files (xgettext in C mode pulls out all of the strings for some reason), but my to-do list links to a promising project (I don’t know what licensing problems would be involved in utilizing a MIT-licensed project to do this, though…) that scans JS for gettext calls.

* Added an About dialog to Lights Off, after getting gettext working as above.

* Finished the LO menu (except for “Help”), fixed keyboard accelerators.

* Fixed the blue corruption around the LED display, and make drawing much more logical and efficient (not sure what I was thinking making dozens of ClutterCairoTextures)…

* Theme names are pretty printed now, not just the name of their directory.

* Keyboard-based play (use the arrow keys and enter) – move around a small glowing dot, and play without the mouse. It’s not fun, but I saw it somewhere else — Same, maybe? So it seemed like a good thing to have. Accessibility in games? I’m not sure.

* GConf schema for LO prefs! Whoops; this one should have happened a long time ago.

* Got most of the PPA updated. However, for some reason, gnome-games refuses to build on non-x86 architectures. If anyone wants to help me, please do :-D

Anyway, LO is almost done (needs “Help” and various bits of cleanup, but it’s mostly happy)… Same isn’t far behind.

Comment

Get your fresh games here!

During one of my first conversations with my GSoC mentor, Thomas H.P. Andersen, he suggested that we set up a Launchpad PPA. A PPA would be a great way for people (people using Ubuntu, at least) to get ahold of the very latest work being done with Gnome Games, provide a lot more eyes, and encourage much more feedback from the community during the summer development process.

So, this week, I went ahead and created the gnome-games-experimental PPA. It currently contains all of the dependencies for my branch of Gnome Games (including WebKit, seed, gobject-introspection, and Clutter), as well as a build of Gnome Games itself. This build includes three branches:

gsoc-seed-games – my ports of Same Gnome and Mines to Clutter+Seed, and a new game, Lights Off

gnibbles-clutterGuillaume Beland’s port of Gnibbles to the Clutter canvas

sudoku-tubeZhang Sen’s implementation of joint Sudoku games over Telepathy tubes

Keep in mind that we’ve only been coding for a week and a half, so if you go ahead and try out the PPA today, expect to see very little working, and within what works, lots of horribleness (I personally know of numerous gigantic animation bugs in Lights Off that you’ll get to experience!). However, if you do decide to jump onto the cutting edge, you can feel awesome about yourself for helping us out, and you’ll also get to play with the finished products long before anyone else.

I plan to update the packages in this PPA once a week at the minimum; you’re welcome to use it (please, use it!) and let me know how it goes… I’m new to packaging things (relatively; I packaged bits for Seed before, but that never went well), and I’m probably doing it slightly (or totally) incorrectly. Let me know, and I promise I’ll fix it!

It seems to install properly against a fresh Jaunty install (just add the repository, upgrade gnome-games, and watch as the dependency list explodes in your face; most of those won’t end up actually being dependencies of Gnome Games, it’s gir-repository’s fault…); Karmic builds will be ready soon. I make no promises about stability or about these packages not screwing up your machine (especially things that use WebKit)… but if you have trouble, again, please let me know!

Comments

Lights Off Tiles

Today more or less officially starts coding for GSoC; however, I’m leaving for Barcelona (for UDS) at 10AM. To offset the fact that I’m going to be missing for the first week, I started hacking on the clutter-0.9/modern-seed version of Lights Off. You can check it out if you want, you’ll need a recent version of Seed and a patched Clutter (the patch is in the Seed repo, under /patches). I’d suggest you wait, though, because all of the shiny (animations and such) is currently broken (looooong airplane flight tomorrow, we’ll see what happens!).

Anyway; the Lights Off tiles from the video are from six months ago, and were made in a matter of minutes in Inkscape, designed to look as much like the physical copy of the game as I could achieve (I am not an artist). Robb has since been trying to convince me to try again, suggesting that they might not be the most Gnome-y tiles in the world. I decided to grab the nicer, Tango-colored tiles I made for my Seed port of Same Gnome, create a black tile, and see how that looked (redesigning most of the rest of the somewhat-minimal UI in the process)…

In any case, I’m not sure what to use! I’m pretty sure I’m going to have a few swappable themes, but I don’t know what to use as the default… or even if either of these were the best we can do. In the meantime, I figured I’d let you guys vote between the two, and if you have any ideas for improvement (or, even better, SVGs!), send me a note!

Newer style is on the left, the originals (from January) are on the right. Click away (your last vote is the one that counts, and voting is immediate when you click the link)!

16 Comments

Hello, Planet! (and, about Games+GSoC)

It would appear that I’ve been added to Planet GNOME as a result of my summer job working on GNOME Games as a part of Google Summer of Code, so I figured it would only be appropriate if I introduced myself!

I started out as a lurker in this community almost a decade ago, when I was deciding what DE to use on my hand-me-down 100MHz IBM desktop my parents got me so I’d stop breaking their computer by installing a different distro every week. I was still in elementary school at the time, so I was (reasonably) encouraged to not participate in the community for privacy and maturity reasons, and eventually I drifted off to OS X for a few years.

Over the course of the last two years, however, Robb has dragged me to a FOSSCamp and a GNOME Summit Boston (and, we’re going to UDS Barcelona, too!), and I’ve been quite reintroduced to the community. Being off at University (I’m at RPI, studying Computer Science) means I can participate all I want.

Anyway… Robb, Matt (another friend of ours from RPI), and I are the developers of Seed, which many of you have probably heard of (if not, try it out!). I’m using Seed this summer in order to port Mines to Clutter, as well as to complete my port of Same Gnome, and the new game, Lights Off, both of which I wrote during the development of Seed as examples.

I have a feeling that I have a good bit more time in the summer than is required to finish and polish these three things, so I expect to end up doing more; I’m currently in the middle of sending an email to my mentor, Thomas Andersen, to say hello and start to form a course of action (perhaps, once all I’ve promised to do is done, he’ll have some ideas to move forward with!).

In any case… hello, Planet!, and I hope to see you all again, soon.

Comments

GSoC ‘09 : GNOME Games Edition


Yesterday, I got a wonderful email from Google telling me that my proposal for Summer of Code was accepted! So, this summer, I’m going to be working with Thomas Andersen on GNOME Games. I’m going to finish polishing Lights Off and the Seed-Same Gnome rewrite, make it easier to write games in Seed (by making libgames-support available), and (primarily) port Mines to Seed+Clutter. I have a feeling the work encompassed in my proposal might not take the whole summer, so I’m keeping my mind open for anything else that might be interesting to do towards the end. We’ll see!

Anyway; thanks, again, to Google, GNOME, Thomas, and everyone, and I hope we all have a great summer!

P.S. A little birdie told me that Mike and Matt both also got GSoC projects this summer! Congrats!

Comments

UDS : Karmic Koala

Ubuntu Logo

The FOSSCamp at UDS : Hardy Heron was, more or less, my reintroduction to the Linux world… I’d been solely using Mac OS X up until that weekend. Robb dragged Gino and I (and Sarah) down to Boston to hang out with everyone there, and see what was going on. Since, I’ve become somewhat more involved in said world, mostly through contributions to Seed…

Fast forward to this year: Mom and Dad are helping (for Christmas) to send me to UDS : Karmic, so I’m going to Barcelona!!

I’ve been looking around at hotels and flights and stuff; most places in the area only offer doubles, so if anyone’s going sans sponsorship and is looking for a roommate (and doesn’t mind Hotel Rey Juan Carlos’ 200€-a-night prices), I promise not to be too bad (really, I just might talk about JavaScript a lot… that’s all!)! Email me if you’re interested (or, even better, if you know of somewhere in the area that’s cheaper!)…

Comments

Chromium on OS X

Chromium is surprisingly usable on OS X at the moment. There’s some quirky bits in rendering (which are funny because of the whole it’s-really-WebKit thing), and you can’t reorder tabs at the moment (they drag out and don’t reattach to the window). I haven’t crashed it yet…

In any case… I’m rather impressed with how far it’s come so far, what with nearly nobody ever actually talking about it. Nate is convinced it’ll be a worthy competitor to Safari, but I don’t understand what a browser could offer that Safari doesn’t already :-)

Oh, also… Google’s SVN server is a million times faster than Apple’s. I checked out all of Chromium (including a whole checkout of WebKit) within an hour. Which is signifcantly faster than the half-a-day it takes to get from Apple’s SVN or Git. And build was really fast, too. But I’ve never built WebKit+Safari, so I have nothing to compare with (still, I’d say the overhead of Chromium+V8 over what WebKit normally takes to build was minimal…).

Try. It. In a few months…

P.S. Wrote this from Chromium!

Comments

Breadboards and ATmega

I spent a bit of time trying to get the Intervalometer working, after Dad and I carved up the case while I was home. The board is really a mess; unsoldering the posts I put on from before turned into a real mess, so that’s not going too well. We’ll see – in any case, I put that off for a day when I’m not soldering at 1AM.

Instead, I got angry at the amount of crap required to get a standalone ATmega working (and programmable) on a breadboard. Even though it’s only a handful of components (3) and wires (a bunch), the most annoying part is getting the ICSP cable attached. Right now, I’ve been just poking wires into the cable, which is annoying because there’s no way to unplug it without looking up what goes where, again and again… very annoying.

So I sat down and started putting together a little gadget, based on one of the tiny little bits of protoboard I got from SparkFun. It’s got a ICSP header, 16 MHz resonator, reset switch, and power LED, as well as the reset pullup resistor. There are 9 pins on the bottom (one more than optimal, really), in two rows (3 and 6) spaced at normal IC-spacing (0.2″?), so it drops right into a breadboard. Now, it’s just 9 (optimally eight) wires to the ATmega, and you’ve got everything working great (except analog input, but that’s just one or two more wires), and can easily remove the programmer without issue, and everything remaining is contained on the breadboard.

It’s not as elegant as the little board that slips over the ATmega that I saw on that Arduino blog a few months ago, because the protoboard I had wasn’t wide enough to span all of the necessary pins. Perhaps revision 2!

I’m not posting a schematic because it’s obvious (and because it’s 3AM), but if I revise it to be more interesting, I might…

Comments