Friday, December 23, 2005

Pygames Snakey is covered in snow!

Inspired by the ugliness of a certain other gamedev site, pygames Snakey is transformed with snow and a santa hat.

Also check out some of the cool new games and projects that people have been making.

Saturday, December 17, 2005

Of urls and single url DHTML sites.

Dynamic sites, and urls.

A website I am working on now, is one of those single url sites with lots of fancy DHTML where everything changes dynamically without changing urls. Everything is loaded with a python twisted, wsgi server sending xmlrpc into separate tabs.

A while ago I implemented a scheme which works with javascript to inspect the url, and open up different tabs. For example, this link opens up a review and an article into different tabs

Putting in a site url box.

Now, to make people be able to share links of what they are looking at in the site, we are going to place a url box in there. So as they open up different bits of the site they can see a link for where they are. It will be like a browser inside of a browser. With a url bar, and tabs.

Saving the whole state of website as a url.

Now I am working on encoding the whole state of the page into a url. Including the scroll state of the bars in the tabs, and which tabs are focused. Then, periodically as a person visits the site it will save this state into a cookie. Then next time they visit the site they will be redirected to the saved state of the website as a url.

This gives many advantages. Especially once search is implemented. They will be able to arrive at the site, and have thier searches from last time appearing in the tabs. So if they searched for say noise gigs, and poetry readings in their suburb last time the same search tabs will appear with all the latest noise gigs, and poetry readings in their suburb.

Of course, this means that I need to finish off the UI for search...

Saturday, December 03, 2005

Save, compile, run cycle. Except with templates.

The save, compile, run cycle I reduced in my source code, why did I think it would be ok in templates?

I used the cheetah templates for They are a pretty nice way to handle templates. They are nice except for the compile that needed to be done when they are used. This is great for run time efficiency... I think. But not so good for development time efficiency.

However now I have removed the need for the templates to be compiled from my code. With the change of a config variable I can also use the compiled templates. Which will be good for the live version of the site.

Now I'm starting to think about the other parts in the save, compile, run cycle.

If I could get rid of either the save, or run cycles then that'd be great. No more pressing save to see what changes occur. Just change something, and then it will show me the results within a second or so.

How can removing the save and run parts be done? By having the editor in the browser. Or having the editor, automatically save things. Then once a change is noted, the thing tries to run itself automatically. If there is no error, then it will display the change.

I think there are probably nice editors written in javascript around. Ones that can do syntax highlighting for python, sql, javascript, css, and html. Easy modification would be good too.

Then I could type in an element to edit in a shell, have the file pop up in a html layer, or another window ready for editing. Once the changes are made, they are reflected in the site I am editing. As I edit things. No need to press save, or press run.

GP2X likes my batteries

I have been learning about the GP2X I received the other week. I have an arm gcc tool chain setup on my windows box, and my linux box. It could have been a much easier experience. However hopefully now the gp2x dev wiki has gathered enough information so new commers should have an easier time.

It has a bunch of potential to be a really nice device. It just needs a whole bunch of bug fixes. I think the people at GPH will eventually fix things up.

So I wait until I can afford a power supply for the unit. So that I do not have to recharge batteries all the time. Having to copy the file to the SD card via the card reader, then put it in the GP2X and reboot is no fun at all. Considering boot time is 25 seconds or so. Which means a lot of iterative development will not work if I need to wait 1 minute between changes. I am used to waiting 1 second between changes.

In the meantime someone else has already gotten python, and pygame working on the machine. Which is great! As soon as I get my power supply(about $40 AUD at dick smiths) I'm going to play around with that.

If someone can get tcp/ip over usb working with the machine, then iterative development with python should be a bunch easier. All the software is available for it. It just needs to be compiled into the kernel, and tested. Unforuntately GPH has not released the code for their modifications to linux. So this will have to wait.

I want to add a gp2x module to pygame. With all the extra things that can be done with the GP2X. For example, turning the red led light on and off. Putting the LCD to sleep when a game is paused. Nicely named constants for all of the joystick buttons. Putting the second CPU to sleep. Using the hardware overlays, scaling, and other abilities of the video post processor etc etc.