Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

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:.

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:.

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, 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

Thursday, November 15, 2007

Now for Something Completely Different

As we all know, I lack the habit of blogging regularly. Maybe that will all change now as I am seeking to change the world... or not.

I have recently been flirting with python-- an object-oriented programming language--(whatever that means...) and I hope to start programming video games again as a hobby. For those of you who know me, you may not have ever known that I could program games... well, back in the day I was familiar with QBasic and made the start of an RPG which I called "Bloodshed". I spent months drawing sprites and backgrounds and writing program which made those sprites and backgrounds move and do stuff that only sprites can do... which... they can't do anything unless you tell them.

Abbreviated history aside, I have returned today for the sole purpose of sharing with the world my new creation...

--a random bingo card generator!--

"Why?" you may ask? I ask you, "Why not?"

Bingo is a great way to pass time in boring staff meetings, church services... anything that you have to sit through in which technical jargon and cliche phrases run rampant. This is no regular bingo where numbers are used. This bingo, as you should have guessed, is the kind with words on a grid.

Though it may seem that my intent for making was purely for my entertainment (and the entertainment of others) it is actually a useful tool for paying attention to what is actually being said. Kind of like the days in McMillan's classes where I would keep track of how many times he would say "In any case" in any given class, the game actually helped me get higher grades because I had to actively hear what was being said.

All that being said, be on the lookout for my next post which will (hopefully) provide a screenshot of my new product and if any are interested, you can send me a list of words that can be generated onto a 5 x 5 grid.

Until then:
Cheers

Sween