Monday, April 28, 2008

PyToolkit:: the hybrid pygame and Tkinter module

Finally, after two hard months... or at least busy months, I have finished my forst complete version of PyToolkit.py. This was created to circumvent the issue that occurs when trying to use pygame and Tkinter in the same program. You are free to download it at:

PyToolkit_8.4.0 (source code)

PyToolkit_8.4.0 (Windows Installer)

Please post any comments/questions you may have about this library. The pytk_help.py file is designed to give you a sample run through of how each class works. more to come later.

.:Sween:.

Saturday, March 8, 2008

Beware the MonaRonaDona Virus (UPDATE 3/10/08)

A little caveat for anyone who has downloaded or is considering downloading RegistryCleanFix2008.

DON'T.

Okay, if you already downloaded it, chances are you might have experienced an annoying pop-up in the corner of your screen regarding MonaRonaDona and the fact it is a virus. Apparently someone is pissed about something regarding human rights and they decided what better way to protest a "Human Rights Violation" than to annoy the living crap out of innocent computer users who thought it may have been a good idea to download software that would clean up their Registry.

The repercussions of this virus so far are:

1) lack of use of Taskmanager - a messageBox pops up stating you don't have Administrator privileges (even though you probably very well are the Administrator)

2) Start Button doesn't say "Start" in it. My Start button still works although I've heard reports that some have lost the use of their Start button.

3) Lack of use of Regedit - Type "regedit" in the run prompt and you get a window that flashes on for a fraction of a second then doesn't take. You can access regedit in safe mode. For a while. It eventually made it to operate the same as my TaskManager where Admin privileges were needed For a list of files to look for in the registry see the first link below.

4) Internet Explorer title bar has the website name plus " - MonaRonaDona" . Inadvertantly, your homepage is now going to be a wikipedia site about Human Rights. I do't know what happened that got the author(s) of this virus so riled up but they really have some social issue they're pounding.

UPDATE IN BOLD


Here's what I did:
-Delete SRVSPOOL.exe from Start/Programs/Startup
(I had to do it in safe mode)
-Check "C:\Windows\pss" for SRVSPOOL.exeConfigureStartup or something similar. Delete it of course.
-Edit your Registry. See sites below for tips and steps on that process.


Here are some sites I found useful in my hunt for eradicating this beast:

xp-vista site
A step by step process for XP or Vista users

Specifically about Task Manager
There are probably other sites but I found this useful for how to get Taskmanager working again


About Regedit
I found this tip particularly useful because it sets disableRegistryTools to false


As of yesterday (March 9, 2008, about 5pm EST)I finally got myself rid of the virus and it's lingering effects. It is possible that others have different experiences with what the virus wants to do. I've mentioned my symptoms. I didn't open too many of my other programs because I figured if the virus changes registry values particular to Office or something, I would rather not hunt for those values.

May you not get malicious viruses
.:Sween:.

Friday, February 1, 2008

Widget Class

So you're programming a game or doing something using pygame. You have need to input a string so you can perhaps save a file or enter your new high score. How does one do this without using input or raw_input? Well if you have knowledge of the Tkinter library and the widgets it provides you may also know that it seems difficult to make Tkinter work with pygame (or at least that is my experience... maybe I just don't know how to focus a Tkinter widget). I have started work on some widgets like Entry and Label and Button. It uses pygame to draw the widget and the class for each of these has parameters that are defaults but it requires the class to be called with screen and background instances, which isn't a huge deal, it's just helpful to know.


UPDATE


I have updated my widget.py file to include buttons and a label. Go here to see the new and improved version. There will be regular updates as Idubug and meticulously include more features. I may just limit this library to Entry, Button and Label until such a time as I need more things like menus and such.

.:Sween:.

Sunday, December 30, 2007

Invalid Token Errors

I encountered a problem today. It happened when I was creating a map for one of my 2d engines and I had something that looked like:
return[[08,07,07,07,07,07,16,07,07,07,07,07,07,07,07,06],
_______ ^
invalid token


Upon further study, I found that Octal numbers are represented by 0 then a number from 0 - 7. Since the symbol 8 and 9 don't represent anything in an octal numbering system python returns a SyntaxError: invalid token. This causes a headache for me because I need to have my maps line up under one another:

[08,07,07,07,07,07,16,07,07,07,07,07,07,07,07,06],
[01,00,00,00,14,10,22,00,00,00,00,00,00,00,00,05],
[01,19,07,06,09,00,00,00,00,00,00,08,00,00,00,05],
[01,00,00,01,09,00,00,00,00,00,00,08,00,00,00,05],
[01,00,00,01,11,10,10,19,12,00,00,09,09,09,00,05],


But to omit the leading "0" causes this:
[8,07,07,07,07,07,16,07,07,07,07,07,07,07,07,06],
[01,00,00,00,14,10,22,00,00,00,00,00,00,00,00,05],
[01,19,07,06,9,00,00,00,00,00,00,8,00,00,00,05],
[01,00,00,01,9,00,00,00,00,00,00,8,00,00,00,05],
[01,00,00,01,11,10,10,19,12,00,00,9,9,9,00,05],


messy, hunh?

To rectify the problem, I used a "." after 8 and 9 to fill up the spaces. It lines up well and if you wanted to be consistent, all your single digits can be done that way.

[8. ,07,07,07,07,07,16,07,07,07,07,07,07,07,07,06],
[01,00,00,00,14,10,22,00,00,00,00,00,00,00,00,05],
[01,19,07,06,9. ,00,00,00,00,00,00,8. ,00,00,00,05],
[01,00,00,01,9. ,00,00,00,00,00,00,8. ,00,00,00,05],
[01,00,00,01,11,10,10,19,12,00,00,9. ,9. ,9. ,00,05],


*NOTE* this "." fills up the spaces only on the Python Editor and basic textpad files. in Word or some other higher level format the "." is significantly smaller widthwise and will not line up with other items vertically. I've never used Word to make something like this, but I'm just sayin'.

So for those who have run into this exception and it's driving you nuts, I hope this was a help!

Cheers!
.:Sween:.

Saturday, December 29, 2007

New Developments I

Here it is! Something new!

...Kind of...

I now have an updated version of "SpriteMaker"! In this version I got rid of the annoying prompts at the beginning which ask for the tile size and the filename you are planning on saving the graphic as. I figured it made more sense to input a filename when saving and loading. So I did just that! Speaking of loading, I now have a means to load the graphic into the tile grid and in the window in the corner. Graphically, nothing has changed. That will be for "SpriteMaker2.0". This one is only version 1.2.

So, if you are a masochist or enjoy meticulously plotting little dots on a surface to make a 10:1 scale graphic, then this is the application for you! If not, Adobe Photoshop(r) is where it's at for you, my friend.

here's a little cutie I made for a friend of mine's game. Kinda tiny, he is...

Like I said, most of this stuff is in it's beginning stages and I will probably (or definately) make more defined graphics. I feel my color changes are too subtle and the resolutions on monitors these days is a lot more magnanimous than they were in the late 90's when I was doing 20x20 sprites and tiles on QBasic. *phew* That octoganal fire eyeball is a 30x30. Not real big.

Anyhow, there will be more news soon. And something maybe even playable. If anyone is interested in my source code, I'd gladly email it to you, because I don't exactly know how best to upload to an FTP site or something...

Until then!

Cheers!

.:Sween:.

Saturday, December 22, 2007

The Christmas Break

My apologies to any who have been looking for updates a bit more regularly. I have yet to settle into a routine where I am producing regularly. I must say that my Bingo Card Maker is in use right now as I am printing 68 cards for folks at my church.

My next major project is going to include some casual games for my friend Whitey's SkitZoman website.

I'd be on a look out for that! It would be fun to be a full time video game programmer but I need to make sure I can make money.

I hope this post find everyone healthy and in good spirits and I do wish you all the very best Christmas

Cheers
.:Sween:.

Saturday, November 24, 2007

Finished Project #2:

A Mock Paint Program



Now, this project is by no means an Adobe Photoshop but I can use this for making the tiles and sprites(characters) that would be found on some game surfaces... well, on old systems like SNES and such. I may someday delve into the world of 3D animation and all that but let me take it one step at a time, please!

You can see the screen shot of my new program right here:


I just threw something together merely for the fact I can show that I use a grid to draw the tile up in the upper right corner. You can use the left and right arrows to switch between the individual RGB values and use up and down to alter that value. I also have it set up so you can get a color at a pixel in the grid, or you can fill the grid and tile with selected color.

It's a little cumbersome but it is just another small victory in my quest for becoming a freelance game programmer!

So it may be a while before I post anything of great accomplishment for a little while...

Until Then:
Cheers