December 22, 2024, 10:48:03 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Wondering where all the forums have gone?

Join the community Discord server!

Pages: [1] 2 3 4

Author Topic: Gang Garrison Dedicated Server (GGDS)  (Read 18596 times)

Flaw

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 109
Gang Garrison Dedicated Server (GGDS)
« on: July 23, 2011, 04:55:01 am »

GGDS is going to be a dedicated server software for GG2 servers with no graphical interface or local player. The entire application will be made in Python (python.org), using only (so far) default modules.

A Git repository is available at https://github.com/Flawium/GGDS.

Current server functionality includes a configuration file, the actual server socket listening, accepting connections, kicking clients, actually joining (not playing yet, though).
Logged

Flaw

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 109
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #1 on: July 23, 2011, 04:59:12 am »

In case you didn't know, Python is cross-platform. There's versions for Windows, Mac and GNU/*nix. Most Linux distributions even come with Python pre-loaded.
Logged

MTK5012

  • 2011 Haxxy Finalist
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 773
  • if (ping <= 150) jaw.y += 100;
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #2 on: July 23, 2011, 05:20:39 am »

both u and orpheon love Python...
got to check it out

notajf

  • Guest
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #3 on: July 23, 2011, 02:25:40 pm »

GGDS is going to be a dedicated server software for GG2 servers with no graphical interface or local player. The entire application will be made in Python (python.org), using only (so far) default modules.

A Git repository is available at https://github.com/Flawium/GGDS.

Current server functionality includes a configuration file, the actual server socket listening, accepting connections, kicking clients, actually joining (not playing yet, though).
Hi Flaw. I have also wanted to create a Python dedicated server for a long time. Since you seem to have got started already and at some level of usability, can I join and contribute to your project?

I would particularly like to transition to using Twisted. It is a much better choice for big networking projects like this than using sockets raw (I have learned this from experience...)

Also, I have some experience with networking projects (I have written a fully functioning Minecraft classic server, https://github.com/TazeTSchnitzel/SchnitzelCraft).

Thanks.
Logged

Flaw

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 109
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #4 on: July 24, 2011, 03:22:04 am »

Hi Flaw. I have also wanted to create a Python dedicated server for a long time. Since you seem to have got started already and at some level of usability, can I join and contribute to your project?

I would particularly like to transition to using Twisted. It is a much better choice for big networking projects like this than using sockets raw (I have learned this from experience...)

Also, I have some experience with networking projects (I have written a fully functioning Minecraft classic server, https://github.com/TazeTSchnitzel/SchnitzelCraft).

Thanks.

Yes, do you have a Github account? (silly me) Then I'll add it to the list of contributors. Added.

Also, I've tried using Twisted for this a bit, but hit a rock because how asynchronous it is (you can't request data, only do stuff when you recieve data), and I'm not that familiar with buffers.

If you could help a bit with that, that would be great, too.
« Last Edit: July 24, 2011, 03:24:24 am by Flaw »
Logged

notajf

  • Guest
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #5 on: July 27, 2011, 10:33:28 am »

Ah, Twisted and buffers. What I did was something like this:

  • Upon receiving data, add to the buffer
  • Parse the packets in the buffer by looking for the packet type, then seeing if there was enough space after it (complete or incomplete)
  • If packet is complete, send it to packet parsing function
  • Keep on doing this until no packets remain or one incomplete packet
  • This process is repeated each time data is received

You have to learn to live with asynchronousness really with networking. It's never a good idea to use blocking sockets.
Logged

dontcare4free

  • New Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #6 on: August 04, 2011, 07:31:35 pm »

GGDS is going to be a dedicated server software for GG2 servers with no graphical interface or local player. The entire application will be made in Python (python.org), using only (so far) default modules.

A Git repository is available at https://github.com/Flawium/GGDS.

Current server functionality includes a configuration file, the actual server socket listening, accepting connections, kicking clients, actually joining (not playing yet, though).
Hi Flaw. I have also wanted to create a Python dedicated server for a long time. Since you seem to have got started already and at some level of usability, can I join and contribute to your project?

I would particularly like to transition to using Twisted. It is a much better choice for big networking projects like this than using sockets raw (I have learned this from experience...)

Also, I have some experience with networking projects (I have written a fully functioning Minecraft classic server, https://github.com/TazeTSchnitzel/SchnitzelCraft).

Thanks.
AFAIK Twisted is a pain to set up under 64-bit Windows, however.
Logged

NAGN

  • Developer
  • ******
  • Karma: 146
  • Offline Offline
  • Posts: 16150
  • Yeah so now I have an idea
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #7 on: August 04, 2011, 10:00:54 pm »

I'll be anticipating once this gets released :woot:
Logged

Dronery

  • 2012 Haxxy Award Winner
  • *
  • Karma: 3
  • Offline Offline
  • Posts: 1835
  • █Goodbye█
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #8 on: August 04, 2011, 10:37:54 pm »

Wait, does this actually work?
Logged


ก็็็็็็็็็็็็็็็็็็็็ กก็็็็็็็็็็็็็ก็็็็็็็็็็็็็็็็็็็็ กก็็็็็็็&ก็็็็็็็็็็็็็็็็็็็็ กก็็็็็็็&ก็็็็็็็็็็็็็็็็็็็็ กก็็็็็็็&ก็็็็็็็็็็็็็็็็็็็็ กก็็็็็็็&ก็็็็็็็็็็็็็็็็็็็็ กก็็็็็็็&ก็็ก็็็็็็็็็็็็็็็็็็็็ กก็็็็็็็็็็็็็ก็็็็็็็็็็็็็็็็็็็็ กก็็็็็็็&ก็็็็็

dontcare4free

  • New Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #9 on: August 05, 2011, 03:01:31 am »

Wait, does this actually work?
As he said, no, playing doesn't work yet.
Logged

notajf

  • Guest
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #10 on: August 06, 2011, 09:18:22 am »

GGDS is going to be a dedicated server software for GG2 servers with no graphical interface or local player. The entire application will be made in Python (python.org), using only (so far) default modules.

A Git repository is available at https://github.com/Flawium/GGDS.

Current server functionality includes a configuration file, the actual server socket listening, accepting connections, kicking clients, actually joining (not playing yet, though).
Hi Flaw. I have also wanted to create a Python dedicated server for a long time. Since you seem to have got started already and at some level of usability, can I join and contribute to your project?

I would particularly like to transition to using Twisted. It is a much better choice for big networking projects like this than using sockets raw (I have learned this from experience...)

Also, I have some experience with networking projects (I have written a fully functioning Minecraft classic server, https://github.com/TazeTSchnitzel/SchnitzelCraft).

Thanks.
AFAIK Twisted is a pain to set up under 64-bit Windows, however.
Provide some proof please. Surely it will work out of the box if this is py2exe packaged?

Disclaimer: Ubuntu 64-bit is my main OS atm
Logged

dontcare4free

  • New Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #11 on: August 06, 2011, 05:51:52 pm »

GGDS is going to be a dedicated server software for GG2 servers with no graphical interface or local player. The entire application will be made in Python (python.org), using only (so far) default modules.

A Git repository is available at https://github.com/Flawium/GGDS.

Current server functionality includes a configuration file, the actual server socket listening, accepting connections, kicking clients, actually joining (not playing yet, though).
Hi Flaw. I have also wanted to create a Python dedicated server for a long time. Since you seem to have got started already and at some level of usability, can I join and contribute to your project?

I would particularly like to transition to using Twisted. It is a much better choice for big networking projects like this than using sockets raw (I have learned this from experience...)

Also, I have some experience with networking projects (I have written a fully functioning Minecraft classic server, https://github.com/TazeTSchnitzel/SchnitzelCraft).

Thanks.
AFAIK Twisted is a pain to set up under 64-bit Windows, however.
Provide some proof please. Surely it will work out of the box if this is py2exe packaged?

Disclaimer: Ubuntu 64-bit is my main OS atm
I mean, installing it for development, with 64-bit Python.

Quote from: TwistedMatrix.com
Q: Why am I getting a "Python does not appear to be installed" error message on Windows?
A: Twisted requires a 32-bit version of Python for Windows. Using a 64-bit version of Python will result in this error message.
Logged

notajf

  • Guest
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #12 on: August 07, 2011, 03:19:44 am »

GGDS is going to be a dedicated server software for GG2 servers with no graphical interface or local player. The entire application will be made in Python (python.org), using only (so far) default modules.

A Git repository is available at https://github.com/Flawium/GGDS.

Current server functionality includes a configuration file, the actual server socket listening, accepting connections, kicking clients, actually joining (not playing yet, though).
Hi Flaw. I have also wanted to create a Python dedicated server for a long time. Since you seem to have got started already and at some level of usability, can I join and contribute to your project?

I would particularly like to transition to using Twisted. It is a much better choice for big networking projects like this than using sockets raw (I have learned this from experience...)

Also, I have some experience with networking projects (I have written a fully functioning Minecraft classic server, https://github.com/TazeTSchnitzel/SchnitzelCraft).

Thanks.
AFAIK Twisted is a pain to set up under 64-bit Windows, however.
Provide some proof please. Surely it will work out of the box if this is py2exe packaged?

Disclaimer: Ubuntu 64-bit is my main OS atm
I mean, installing it for development, with 64-bit Python.

Quote from: TwistedMatrix.com
Q: Why am I getting a "Python does not appear to be installed" error message on Windows?
A: Twisted requires a 32-bit version of Python for Windows. Using a 64-bit version of Python will result in this error message.

Erm, why does that even matter? You can't handle two installs of Python?
Logged

dontcare4free

  • New Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #13 on: August 10, 2011, 05:11:50 am »

GGDS is going to be a dedicated server software for GG2 servers with no graphical interface or local player. The entire application will be made in Python (python.org), using only (so far) default modules.

A Git repository is available at https://github.com/Flawium/GGDS.

Current server functionality includes a configuration file, the actual server socket listening, accepting connections, kicking clients, actually joining (not playing yet, though).
Hi Flaw. I have also wanted to create a Python dedicated server for a long time. Since you seem to have got started already and at some level of usability, can I join and contribute to your project?

I would particularly like to transition to using Twisted. It is a much better choice for big networking projects like this than using sockets raw (I have learned this from experience...)

Also, I have some experience with networking projects (I have written a fully functioning Minecraft classic server, https://github.com/TazeTSchnitzel/SchnitzelCraft).

Thanks.
AFAIK Twisted is a pain to set up under 64-bit Windows, however.
Provide some proof please. Surely it will work out of the box if this is py2exe packaged?

Disclaimer: Ubuntu 64-bit is my main OS atm
I mean, installing it for development, with 64-bit Python.

Quote from: TwistedMatrix.com
Q: Why am I getting a "Python does not appear to be installed" error message on Windows?
A: Twisted requires a 32-bit version of Python for Windows. Using a 64-bit version of Python will result in this error message.

Erm, why does that even matter? You can't handle two installs of Python?
Not in the %PATH%, at once, no.
Logged

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Gang Garrison Dedicated Server (GGDS)
« Reply #14 on: August 13, 2011, 04:59:25 am »

An idea about collisions:

Using masks to check would probably be too slow, so I thought we could do it like this.

Map Wallmasks would be passed at compile time in a special script that checks each pixels and creates a rect there if it is black/opaque/whatever.

This also allows us to scale the maps, which is not easy to do otherwise. Now we just have to scale the surface before drawing.

The string of rects would then be saved and embedded into the .png or even kept as separate file.

It can then be loaded without much problems and without much lag, and suddenly you have rects to collide with instead of masks.
(which, if you only check the rects in the area around the Character, is much faster)



My problem is this:
Code: [Select]
import os
import glob

import pygame
from load_image import load_image

from pygame.locals import *

surface = pygame.Surface()

path = 'Maps/'
for infile in glob.glob( os.path.join(path, '*_wm.png') ):

image, rect = load_image(infile)

# Loop through all the pixels and create a rect per black pixel

for a in range(0, ???)
There is no built-in function of pygame.Image to determine it's size, so I either have to guess a very large number or get creative.
Ideas?
« Last Edit: August 13, 2011, 05:02:06 am by Orpheon »
Logged
Pages: [1] 2 3 4
 

Page created in 0.045 seconds with 78 queries.