Everything for the Nothing

Somewhat Random nerdy things that happen to me and others.

Recent Comments

Powered by Disqus
Fri Feb 20

Cool Stuff

Thanks David and Alfonso.  I’ve been doing a little searching around as well and think the pygame way will be best.  I’ve also heard good things of pyglet but I haven’t seen nearly as much online support for it as pygame.

Those sprites look great David.  I will definitely use them as reference for the ones that I’m going to make in 3D.  Yeah, I know, your probably wondering why I would build them in 3D for a 2D sprite based game, especially since I could use them for free… Well I wanted to build everything from scratch (at least as far as the art is concerned) since that will teach me about good colour pallets and composition in a dynamic environment.  Plus, I suspect that the art will be the easy stuff for me since I have been doing 3D for a long time in TV and movies.  It’s all that darned programing stuff that will get me in the end.  Though I do find it strangely relaxing learning this programing stuff after a hard day at work.

Speaking of work.  Sorry I haven’t been around lately to update this blog… when you work 10 hours a day for 6 days a week and it’s also your girlfriends birthday and her mothers and valentines day… well, it can get a little busy.  I expect to have a some time next week to update with some images on the interface that I’ve built in Maya (it’s the fastest thing that I can work in for this kind of stuff, at least for me ;) and maybe some of the design doc if I can put something coherent into it.

Thanks again guys for the insight into what will probably be a hair-puling-out experience!

Colin

Comments (View)
Wed Feb 11

Am I just Perfect?

Well… I’m not getting too many hits here even though I’m practically begging people to look at my code and give some constructive criticism.  I guess it just goes to show I’m doing an awsome job with the code that I’m posting here and will now take on the next phase of my learning of Python.  Which is:

Make a game in Python.

Yep. That’s right.  I’m going to make a game.  I figured that it would be better to learn python that way.  As well, it’s a break from what i normally do for a day job (don’t worry, I won’t quit it yet) but not so far from my day job that I’ll get stuck so bad that I won’t know what to do (I hope).

SO. Now to pick a genre…   I think I’ll do a top down shooter like 1942 except with a little bit more depth and some updated graphics.  What do you think?  Is it possible to do a scroller in python?  Can python keep up with the performance needs of a top down shooter?  Please comment below with your thoughts and suggestions.

Comments (View)
Mon Feb 9

Convert TGAs to PNGs

So I gave myself a little project over the weekend.  I needed to convert a bunch of Targa files over to PNG to help save space on my server. I decided to do it with Python.

Why convert the Targa image files to PNGs?  Well, file size was the first reason.  The PNG format stores 8 bit per pixel files in a nice small package. Smaller, even, than Tiff or OpenEXR.  They do take a bit longer to create than the aforementioned, but time is on my side, so it’s not an issue.  And just to make sure that I didn’t mess things up with the actual contents of the files, I took the original Targa and did a difference in Photoshop then cranked up the levels to see if there were any changes in the image data that would affect quality.  They were exactly the same including the alpha channel. The only difference was the file size.

The savings on file size are fantastic! The original size of the files was between 6 and 8 megabytes each and there were about 100,000 files to convert.  On average they were reduced to about a third their original size without any quality loss.  And because the script delets the Targas (only after it creates the PNG file) when its done I end up getting a ton of room on my drive.

So, here I give you, the Python script.  You will need to install PIL (Python Image Library) and pyGame (some files have meta data and couldn’t be opened with PIL but could with pyGame) to run this script.  It’s best to just run py2exe on it and then attach it to your context sensitive menu for your file browser.  That way you can just right click on a folder and run the script.

ImageConvert.py

Comments (View)
Fri Feb 6

Sort Sequences of Files

I’m not really sure how to post code on here without it looking completely crazy, so I figured that I should probably just post a link to the .py file. Here it it:

TestForSequence.py

This script will search out the folder that it’s in as well as any child folders contained in that folder, for files and then sort them if they are a sequence and return a list of grouped sorted files

I’ve said it before and I’ll say it again.  Any creative criticism is welcome, and I mean any!

Oh! Please keep in mind that this is the first python script that I have done that does anything more then just “Hello World” as well as being the first language that I have tried to learn other then MEL. Please be Gentle :o)

Comments (View)
Tue Feb 3
Comments (View)
And here is the other page.

And here is the other page.

Comments (View)
Thought I would jazz up this python reference card to help with my tired brain.  Thanks Michael Goerz for the clean ref card.

Thought I would jazz up this python reference card to help with my tired brain.  Thanks Michael Goerz for the clean ref card.

Comments (View)
Mon Feb 2

Comments are Now Working

Got comments working on the site… Now to see if i can get some other things working that I use in my TiddlyWiki.

Comments (View)
Comments (View)

Still figuring it out

I haven’t had much time to see what tumblr can do but I’ve got a little time to see what I can figure out

Comments (View)