Introducing pyTower, a python based Sim Tower clone. This is a new project I started, after finding the existing clones lacking. So far it’s in a really useless stage of development, but I wanted to show if what I had done so far.
I’m building it on the pygame library, which is a low level wrapper around SDL. I have to say, I am incredibly impressed with this library. You can get started really, really fast. Just focus on surfaces, rectangles, events and blitting. Ta-da, you have the basic tools for a game.
Anyway, the dev work is at github for your enjoyment.
One of the (I think) cool things I am doing is implementing the menu system in Qt4. Menu’s are hard in pygame, IMHO, so I went around them. This gives it a bit of an MDI feel, but I like it so far. If things go well I might find a way to move the mini box into another window. I think this will be beneficial long-term because I’m planning on making the technology tree really flexible and extensible.
Anyway, here are the totally not-cool looking screen shots I have so far. Art is hard.
The main menu, Qt4 + pygame.
The game space, with mini map!
“Watching someone else use your computer is like watching a drunk orangutan solve a Rubix cube.
– Matthew Inman, The Three Phases of Owning a Computer
“It is better to destroy, than to create what is meaningless.”
– Every Time I Die,
Imitation Is The Sincerest Form Of Battery
on The Big Dirty
Dear Loved and Semi-loved ones,
The time of year has come to out do my fathers Christmas Letter. For those of you who do not get a letter from my parents, you need only know that I am already “winning.” For those of you who do…sssshhh.
I would have to start off by saying that John and I have had nothing but a great year. As our second Christmas approaches we have nothing but everything to be grateful for. This October we were able to move into our very own house with our very own yard and front door and everything. We have also had the pleasure of learning to rake our own leaves, shovel our own snow, and go outside to get the mail. This is all worth the trouble though because having our own house also means we don’t have to carry groceries up three flights of stairs, can have our very own chickens (coming this spring), and can plant as many flowers in the yard as we want. Having our own house is truly awesome and we’re really grateful for it.
This June, John and I had the pleasure of going up North for a really fun vacation. We spent about half a week at Niagara Falls, and the other half of the same week in PA with family. The few days in Niagara were truly a great experience and brand new to both of us. On the way there we did all the things on a road trip that we were never allowed to do with our parents. We drank juice boxes, and ate melty candy in the car and we even stayed at an off brand, seedy hotel without a free breakfast. It was a lot of fun just getting there. When we finally did get there we were amazed. I have never seen anything so immense and powerful as those falls.
While we were in the area, John and I also tried another first together and visited a foreign country. Canada was close so we decided to give it a try. We stayed in a little bed and breakfast not too far from the falls and really loved it. I would say that the Canadian side of the falls was about a hundred times better than the American side, and not just because of the view. Canada not only had the B&B we loved so much, but also a lot of other great attractions and some great restaurants. The American side had a Hard Rock cafe and a bunch of Indian food. Plus, a giant seagull pooped in my eye on the American side.
We did all the standard stuff while we were there. We rode the “Maid of the Mist”(just like Pam and Jim on the “office”) and walked down to the “Cave of the Winds” and did our best to walk under part of the American falls called the Bridal Veil. We still have the bruises to prove it.
Pennsylvania was just as good as the falls. In fact, we visited some much smaller falls while we were there. A hike through “Rickets Glen” was a lot of fun. Besides being a beautiful example of Gods creation, we were also able to spend a whole afternoon with our favorite uncle named Pete and our favorite cousins named John Michael and Darin. Though the hike was a big highlight of the trip, the best part was getting to see so much family and watching our favorite cousin named Seth graduate.
Besides all the fun we’ve had this year, were also glad to report that all the little things are going great as well. John’s job seems to be a good fit for him and they must like him too because they are treating him well. I graduated in February and am staying busy doing things like writing the Christmas letter, going back to school, and spending a couple of mornings a week as a preschool teacher at the church’s W.E.E. School (That stands for weekly early education…we don’t spend all day potty training).
The last two members of the household also seem to be doing well but we aren’t really sure. The language barrier between us and our cats, Pick-Wick and Spatula, is ever present but doesn’t seem to be causing too many problems. They have adjusted well to the new house and have already decided it’s theirs, not ours. They sleep wherever the heck they want, eat things they shouldn’t and have learned to use the clapper in our bedroom (yes, we have a clapper). They take every moment they can to show us who’s boss and to also appear as cute as possible.
To finish up this Christmas letter John and I just want to say how much you all mean to us and how glad we are to have friends and family to send a letter to in the first place. We hope you all have a merry Christmas and a happy New Year. When this letter is all you get from us this year keep in mind that Jesus is the real reason for the season. God Bless you all,
John and Darcy Hobbs
View 2009 Photo Gallery
I put a bunch of scripts together into a collection on github, called pyUSB7. Check that out for lots of this sort of thing.
I recently dug out my USB7 and thought I would play with it. I don’t know if it has to do with my distro (sidux), or the kernel development in general, but the USB7 works on plug in, contrary to what the product site says.
Anyway, once I got tired of echoing numbers to the USB7, I thought I’d try writing something with pySerial, which I had looked at a long time ago, but never tried.
It is remarkably easy once you get the settings right. Here is a little clock program that I wrote which counts up the elapsed seconds in the day, and also has an hour/minutes/seconds layout. These toggle back and forth every 10 seconds.
# -*- coding: utf-8 -*-
from time import sleep, mktime
from datetime import datetime, date
ser = serial.Serial('/dev/ttyACM0', 9600, timeout=0)
swap = True
now = datetime.now().timetuple()
now_t = mktime( now )
then_t = mktime(date.today().timetuple() )
diff = int( now_t - then_t )
if 0 == diff % 10:
swap = not swap
ser.write( "%d\n" % diff )
ser.write( "%02.0d.%02.0d.%02.0d\n" % ( now, now, now ) )
sleep( 1 )