| ||||||||||||||||||||||||||||||||||||||||
Sunday 25 March, 2007[ simonwittber @ 18:53 ] Messing around at 3AM...Just for laughs, I thought I'd build some spaceships. Here's the first one. It's not textured, unless someone wants to volunteer? I like spaceships... freighter.obj[ simonwittber @ 17:33 ] My Past Pyweek MistakesPyweek #1. Quido: The Failed Experiment The game wasn't fun. I focused on eye-candy, and gameplay suffered. Placed second overall, first in production. Pyweek #2. CorsairI tried to build a MMO. Geez. Nuff said. The game might have done better if I had created a bigger universe (The server ran out of planets to allocate to new players, so most people got a black screen on startup). Didn't place at all. Pyweek #3. No starter.Problems at work nuked my brain, and I only got as far as the basecode. I didn't finish an entry. Pyweek #4.I work for myself now, so I can probably make time to compete. I'm also working alone, so perhaps I'll aim for something more achievable this time... or maybe not! :-) [ simonwittber @ 01:58 ] ThemesGreat selection of themes! I'd be happy with any of them. Wednesday 21 March, 2007[ simonwittber @ 13:31 ] OpenGL light test
#!/usr/bin/python2.5
import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
def main():
pygame.display.set_mode((1024,768), DOUBLEBUF|OPENGL)
#GL Setup
glShadeModel(GL_SMOOTH)
glEnable(GL_DEPTH_TEST)
glDepthFunc(GL_LEQUAL)
glClearDepth(1.0)
#Viewport Setup
glViewport(0, 0, 1024, 768)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
gluPerspective(45.0, 1024.0/768, 0.1, 100)
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()
#sphere setup
q = gluNewQuadric()
glFrontFace(GL_CCW)
gluQuadricTexture(q, GL_TRUE)
gluQuadricNormals(q, GLU_FLAT)
gluQuadricOrientation(q, GLU_OUTSIDE)
#lighting setup
glEnable(GL_LIGHTING)
glEnable(GL_LIGHT1)
glLightfv(GL_LIGHT1, GL_AMBIENT, (0.0, 0.0, 0.0, 1.0))
glLightfv(GL_LIGHT1, GL_DIFFUSE, (1.0, 1.0, 1.0, 1.0))
glLightfv(GL_LIGHT1, GL_SPECULAR, (1.0, 1.0, 1.0, 1.0))
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, (1.0, 1.0, 1.0, 1.0))
glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, (0.0, 0.0, 0.0, 1.0))
glEnable(GL_COLOR_MATERIAL)
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE)
glLightfv(GL_LIGHT1, GL_POSITION, (0.0, 0.0, 0.0))
while True:
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
glLoadIdentity()
glTranslatef(0.0, -1.0, -5.0)
gluSphere(q, 1.0, 32, 32)
pygame.display.flip()
for event in pygame.event.get():
if event.type in (QUIT, KEYDOWN):
return
if __name__ == "__main__":
main()
Saturday 17 March, 2007[ simonwittber @ 12:23 ] OpenGL Options?I'd really like to use OpenGL2.0, what are my best options for this? From what I can see, OpenGL-ctypes doesn't yet provide OpenGL2.0. Wednesday 14 March, 2007[ simonwittber @ 05:33 ] PyOGREAnyone planning on using PyOGRE? I'd like to try it, has anyone got a prebuilt linux binary? It would save one lazy programmer (me) a lot of hassle!. |
Last Challenge
September 2008 [entries, ratings] Previous March 2008 [entries, ratings] September 2007 [entries, ratings] > April 2007 [entries, ratings] September 2006 [entries, ratings] March 2006 [entries, ratings] (June 2006) August 2005 [entries, ratings] Not logged in Login | |||||||||||||||||||||||||||||||||||||||