*HISSSSSSSS*

Posted by DesertFox on Jan. 30, 2008, 12:48 a.m.

Yeah - Python is an easy language, and its awesome. Especially if you use the PyGame module for game development. Its really high-level and has wierd syntax, but once you get used to it its really easy. I ditched GM a long long time ago, and finally, after a long wait, Python has lodged itself as a suitable replacement.

Today's bit of code?

from socket import *

sock=socket(AF_INET, SOCK_STREAM)

sock.connect(("irc.astrolink.org", 6667))

while 1:

…..sock.send('SPAM')

Theoretically that would send the IRC server packets containing 'SPAM', indefinitely. Quick and easy :D (the 5 dots represent a tab, cause of whitespace removal >_>)

On my physics midterm, the class average was around 55%. My score? 87%! Yeah - I pwn - ph34r my 1337 physics skillz! Etc… I also made an anthill simulator for another class for midterm project.

Also, my roommate is continuously playing Odin Sphere - an interesting looking game.

Comments

Mush 16 years, 8 months ago

Quote:
I also made an anthill simulator

Was that a program or in real, physical life?

Also, are you still a mod?

DesertFox 16 years, 8 months ago

Quote:
Was that a program or in real, physical life?

Also, are you still a mod?

Program, and yes.

shad0w 16 years, 8 months ago

Try pyglet (http://pyglet.org). A lot of people prefer it to pygame (my self included).

DesertFox 16 years, 8 months ago

Hmmmm… PyGlet looks interesting? What benefits does it have over PyGame?

shad0w 16 years, 8 months ago

Updated more frequently. Simple OpenGL access (Pygame needs PyOpenGL which is a pain to set up- and you will want open gl to use textured primitives). Pygame requires numeric (old. no easy support for the newer numpy) for surfarray. In my experience, pyglet was easier to learn and had clearer docs. Pyglet supports easy multiple windows (and multi screen) [maybe pygame can too?].

Those are the ones that I know of anyway. I didn't use Pygame for long enough to be able to tell you other disadvantages compared to pyglet (I really wanted easy textured primitives) [but this isn't to say that pygame doesn't have advantages as well!].

If you try it, then don't go past the 'programmers guide' that comes with pyglet docs.

JoshDreamland 16 years, 8 months ago

FAWKS

PY 16 years, 8 months ago

I just like people talking about it because it contains my name <_<

Also, Holy cow DF is a mod? When did this happen <_<

stampede 16 years, 8 months ago

Pyglet looks awesome! Reading docs currently.

OL 16 years, 8 months ago

Python… games?

[deleted user] 16 years, 8 months ago

Python is sexy. And your codez are whackk;

[pre]import socket

irc= socket(AF_INET, SOCK_STREAM)

irc.connect('irc.astrolink.org',6667)

irc.send('USER fukuuuu fukuuuu fukuuuu :fukuuuu\r\n')

irc.send('JOIN #64digits\r\n')

while 1:

data = irc.recv ( 4096 )

if data.find ( 'PING' ) != -1:

irc.send ( 'PONG ' + data.split() [ 1 ] + '\r\n' )

irc.send('PRIVMSG #64digits :fukuuuuuuuu\r\n')[/pre]

Much better