nathandemick.com

Need a sprite editor? Try GraphicsGale

I was looking around for a free/inexpensive sprite editor the other day, and came across GraphicsGale. It has both free and shareware versions, and the free one is definitely nice enough for beginners (such as myself). Funnily enough, the features that I appreciate the most are the ones found in the Mario Paint "stamp" editor: a small preview window and a pixel grid.

· 0 comments

Simple keyboard handling in PyGame

Seriously, how easy is this? For smooth movement, usually a boolean "move" variable is set on a keydown event, and unset on a keyup. Then while the boolean is true, a game object is moved.

#!/usr/bin/python
import pygame, sys
from pygame.locals import *

# Init screen
pygame.init()
screen=pygame.display.set_mode((200,50))
pygame.display.set_caption('Keyboard input test')
pygame.mouse.set_visible(0)

# Main loop
while 1:
	# Process events in event queue
	for event in pygame.event.get():
		if event.type==QUIT: sys.exit()	# Exits the 'main' function
		elif event.type==KEYDOWN and event.key==K_ESCAPE: sys.exit()

		elif event.type==KEYDOWN and event.key==K_UP: print "up!"
		elif event.type==KEYUP and event.key==K_UP: print "up off!"

		elif event.type==KEYDOWN and event.key==K_DOWN: print "down!"
		elif event.type==KEYUP and event.key==K_DOWN: print "down off!"

		elif event.type==KEYDOWN and event.key==K_LEFT: print "left!"
		elif event.type==KEYUP and event.key==K_LEFT: print "left off!"

		elif event.type==KEYDOWN and event.key==K_RIGHT: print "right!"
		elif event.type==KEYUP and event.key==K_RIGHT: print "right up!"

· 0 comments

Halo 3 shots, courtesy of Poobs

This is neet. Apparently you can take screenshots in-game, whereupon they are uploaded to Bungie's website. Poorbaugh has taken a few cool shots, and I am linking them here. Because I can. Not that I actually play Halo at all, but the idea is cool.

· 0 comments

Make a Bionic Commando level!

Some contest to make a Bionic Commando level. Seems cool. 'Course, not really practical since you can't play test your own creation, but I'm sure they're just looking for cool ideas. I think I'm gonna try to make one!

· 0 comments

Adventures in PyGame

So, I was getting frustrated with attempting to program in C/C++; I just didn't have the motivation to finish projects, and wanted to remove obstacles to completion (in this case, the complexity of mixing a graphics API with a game API in a compiled language that I don't use much anymore). I decided to try out PyGame, and so far am fairly impressed. I'm leaving out the OpenGL side of things, and going with just straight pixel blitting, but so far doing simple stuff like loading an image (pygame.image.load()) and writing text (font.render()) is way easier than it's SDL/OpenGL counterpart. To be fair, this may just be complexity with OpenGL, but I also like Python's syntax more than C++. I mostly use PHP at work, so I'm way more familiar these days with interpreted languages. If you want to follow along at home, download a Python interpreter and PyGame. Heck, there's even a PyOpenGL wrapper, so if I want I can get back into the three-dee.

· 0 comments