Page 2 of 2

Re: Infinite Ascension - My 2.5D Online Space Sim

Posted: Fri Jun 19, 2009 5:44 pm
by CowboyX86
Good Work! I'm impressed.

Re: Infinite Ascension - My 2.5D Online Space Sim

Posted: Mon Jun 22, 2009 11:53 pm
by teamtwentythree
So first off thanks for all of the kind words. Its a far cry from when I first posted regarding the idea of the game and got "noob" flamed to the stoneage (Different forum).

New vids live, less flashy than the warp vid, more behind the scenes/math as it were. A bit quick on the explanations, feel free to post if you'd like something clarified.




Re: Infinite Ascension - My 2.5D Online Space Sim

Posted: Tue Jun 23, 2009 12:03 am
by eatcomics
Just watched them, I love it, the explosions are very good and the collisional should be pretty efficient! As I said in the comments I can't wait to see more, seeing other people get things done with their games makes me want to continue with mine :)

Re: Infinite Ascension - My 2.5D Online Space Sim

Posted: Mon Jun 29, 2009 6:23 pm
by JaxDragon
How are you managing networking? What library? Or is it built in to pyogre?

Re: Infinite Ascension - My 2.5D Online Space Sim

Posted: Mon Jun 29, 2009 7:02 pm
by teamtwentythree
I'm using python's socket object, no fancy stuff there. I have some classes which make packets/messages for me, I send, I recv, thats about it. The Client + Server are both multi-threaded (Sorta, Python's GIL means its fake but yea...). One thread does game processing, one thread does network handling.

Why not use something like Twisted? Well, I started this project with no networking experience, and no 3D experience. In order to properly train myself in those two arts I tasked myself with creating a network game using sockets and OpenGL. I swapped OpenGL for Ogre after my first prototype/version for perf. But the networking stuff honestly hasn't become an issue sufficent to warrant outsourcing to another lib. Python may be slow, but its not WAN slow. And the messages are all my own, so I know the size/format of them, I don't think Twisted could make them much more efficient.

Thats pretty much it at a high level, are you interesting in specifics?

Re: Infinite Ascension - My 2.5D Online Space Sim

Posted: Mon Jun 29, 2009 7:55 pm
by JaxDragon
Well could you maybe tell me how you learned to use pythons sockets? If it was through the docs, just let me know. I tend not to look at them unless necessary.

Re: Infinite Ascension - My 2.5D Online Space Sim

Posted: Mon Jun 29, 2009 8:27 pm
by teamtwentythree
Programming Python, Chapter 10, apptly named Network Scripting.

Found this code in the python docs for the "socket" lib http://docs.python.org/library/socket.html:

Server

Code: Select all

# Echo server program
import socket

HOST = ''                 # Symbolic name meaning all available interfaces
PORT = 50007              # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connected by', addr
while 1:
    data = conn.recv(1024)
    if not data: break
    conn.send(data)
conn.close()
Client

Code: Select all

# Echo client program
import socket

HOST = 'localhost'
PORT = 50007              # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.send('Hello, world')
data = s.recv(1024)
s.close()
print 'Received', repr(data)
Took that piece of code, and just kept iterating on it.

Re: Infinite Ascension - My 2.5D Online Space Sim

Posted: Mon Jun 29, 2009 8:42 pm
by JaxDragon
Well thank you for that, should come in handy should I also decide to make a python space game with the same graphics, story, items, and users as you completely custom content. 8-)

Re: Infinite Ascension - My 2.5D Online Space Sim

Posted: Mon Jun 29, 2009 8:45 pm
by teamtwentythree
JaxDragon wrote:Well thank you for that, should come in handy should I also decide to make a python space game with the same graphics, story, items, and users as you completely custom content. 8-)
Sounds good, its a race!

Re: Infinite Ascension - My 2.5D Online Space Sim

Posted: Mon Jun 29, 2009 8:55 pm
by JaxDragon
By the way, im looking at amazon for 'programming python' and I was wondering, do you have the third edition, or the regular?

Re: Infinite Ascension - My 2.5D Online Space Sim

Posted: Mon Jun 29, 2009 8:57 pm
by teamtwentythree
I've got the second edition, circa 2001.