January 08, 2025, 03:52:56 pm

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 ... 33 34 [35] 36 37 ... 77

Author Topic: Official PyGG2 Development thread  (Read 162910 times)

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12532
  • Another one --
Re: Official PyGG2 Development thread
« Reply #510 on: February 13, 2012, 01:00:02 pm »

you know the best way to identify players is by a unique id
the easiest good way to do is to make a list or array of players like gg2 does?
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Official PyGG2 Development thread
« Reply #511 on: February 13, 2012, 01:03:50 pm »

you know the best way to identify players is by a unique id
the easiest good way to do is to make a list or array of players like gg2 does?
Yeah, but that's not the problem.

The problem is recognizing the packet origin, and telling the difference between packets from the same computer. TCP does this automatically for you, gg2 doesn't have this problem.

But no, I made a mistake, it should be possible, seeing as random ports are used. There's 1 chance in 65000 that multi-clienting doesn't work, but we're going to live with that.


As for now, it simply crashes with some error. Gimme a moment to look at this.
« Last Edit: February 13, 2012, 01:04:25 pm by Orpheon »
Logged

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Official PyGG2 Development thread
« Reply #512 on: February 13, 2012, 01:14:39 pm »



Fixed multi-clienting, would've actually not worked for any kind of multiple players, but that uncovered a new source of bugs (look at the bullet streams).

:I
« Last Edit: February 13, 2012, 01:15:13 pm by Orpheon »
Logged

RedBluYellow

  • Guest
Re: Official PyGG2 Development thread
« Reply #513 on: February 15, 2012, 09:44:56 am »

Don't lose hope young jedi

you're doing great  :c1:
Logged

Flaw

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 109
Re: Official PyGG2 Development thread
« Reply #514 on: February 16, 2012, 12:26:32 pm »

How far is the core engine of this? Meaning running, rendering, networking, sound, input, etc. I'm not talking about gameplay (or anything GG2 specific), just the engine.
Logged

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Official PyGG2 Development thread
« Reply #515 on: February 16, 2012, 01:21:16 pm »

How far is the core engine of this? Meaning running, rendering, networking, sound, input, etc. I'm not talking about gameplay (or anything GG2 specific), just the engine.
Rendering: Done.
Input: Done.
Networking: Programmed, but buggy.
Sound: Non-existent.
Physics: A scaffold once made for testing is done (and works), but it'll probably get changed once we add stuff like less movement after being juggled etc...
Logged

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12532
  • Another one --
Re: Official PyGG2 Development thread
« Reply #516 on: February 16, 2012, 01:37:00 pm »

physics is coded in gg2 on a per-object basis
so yeah
that's like the final step in remaking it :U
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Port

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 82
    • portify.github.io
Re: Official PyGG2 Development thread
« Reply #517 on: February 24, 2012, 09:18:20 am »

How do I actually install Pygrafix?
Logged
portify@neko.im

nightcracker

  • NC
  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 516
  • PyGG2 dev
    • NC Labs
Re: Official PyGG2 Development thread
« Reply #518 on: February 24, 2012, 10:33:11 am »

How do I actually install Pygrafix?

If you are on windows it's easy. You download [this zipfile](https://github.com/downloads/nightcracker/pygrafix/pygrafix.win32.zip) and you unzip it's contents into C:\Python27\Lib\site-packages.

Obviously replace C:\Python27 with the path where you installed Python.
Logged

Nukleus

  • Guest
Re: Official PyGG2 Development thread
« Reply #519 on: February 24, 2012, 04:17:27 pm »

HOW TO RUN PyGG2 ON WINDOWS

1) INSTALLING PYTHON 2.7

Download Python 2.7

Install it to "C:\Python27".
Go to "controlpanel>System>Advanced>Environment Variables".

In the "System Variables" box, click on "Path", then click "Edit".
In the "Variable Value" box, add to the end: ";C:\Python27;C:\MinGW\bin".
Click OK, then OK again in the system menu.

2) INSTALLING PIL, PYGRAFIX AND MINGW

Download and install PIL

Download Pygrafix
Unzip, and move to "C:\Python27\Lib\site-packages"

Download and install MinGW

3) INSTALLING PYGG2 AND BITMAP EXTENSION

Download and unzip: PyGG2

Move the folder to My Documents and rename it to "PyGG2".

Go to command prompt (start>accessories>command prompt) and type "cd " (with a space after cd).
drag the PyGG2 folder into the command prompt window and press enter.

Type in "python make.py build" and press enter.

After it is finished, exit command prompt.

4) MAKING PyGG2.bat

Go to notepad (start>accessories>notepad).

Type the following, but change <USER> to your computer's username.

cd "C:\Documents and Settings\<USER>\My Documents\PyGG2"
python make.py testclient


Click file>save, and in the "File Name" box, type "PyGG2.bat", and set the "Save as Type" box to "All Files".
Save it wherever you like.


And you're done! Whenever you want to run PyGG2, you just have to open PyGG2.bat
If you want to update PyGG2, just repeat delete the PyGG2 folder in My documents and repeat step 3.
Should probably put this on the OP
Logged

dAn

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 216
Re: Official PyGG2 Development thread
« Reply #520 on: February 24, 2012, 05:31:28 pm »

Hey I have a question on pyGG2:

You mentioned mod lobby being disabled until you think of a policy, but how is vanilla-capable modding done? Because right now some things that should be skill indexed are easily emulated by the computer.

(click to show/hide)
« Last Edit: February 24, 2012, 05:32:20 pm by IJumpIntoRockets »
Logged

Port

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 82
    • portify.github.io
Re: Official PyGG2 Development thread
« Reply #521 on: February 25, 2012, 02:11:15 am »

Hey I have a question on pyGG2:

You mentioned mod lobby being disabled until you think of a policy, but how is vanilla-capable modding done? Because right now some things that should be skill indexed are easily emulated by the computer.

(click to show/hide)

(click to show/hide)
« Last Edit: February 25, 2012, 02:11:33 am by Port »
Logged
portify@neko.im

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Official PyGG2 Development thread
« Reply #522 on: February 25, 2012, 02:39:38 am »

Hey I have a question on pyGG2:

You mentioned mod lobby being disabled until you think of a policy, but how is vanilla-capable modding done? Because right now some things that should be skill indexed are easily emulated by the computer.

(click to show/hide)

(click to show/hide)
What Port said is mostly correct. Those two hacks are very hard to prevent, as they are completely independent of the server, and are only client-side.
The easiest fix would be making gg2 closed-source (which of course won't and can't happen). The next easiest is making the server check by some hash-check whether the client is a vanilla client, which would kill any sprite-mods too, and still be hack-able by the best.
As for the fix for the second problem, I'm a bit scared of that because of desync. Imagine shooting in the air. You'll only see blood when the server confirms there was a spy there, which means an extra event to confirm that, the need to sync graphical stuff (usually a very bad idea), and just in general a huge desync.

The only viable solution I see is just to ban distribution of them as best as possible (which we're already doing), so at least only the coders can do it (they usually don't).

Also, although this is inconsequential, the first mod ever of pretty much every modder is usually some form of a hack (It is so damn easy to make the second kind of hack, and it teaches much).  :hehe:


Hey I have a question on pyGG2:

You mentioned mod lobby being disabled until you think of a policy, but how is vanilla-capable modding done?
Although I have yet to discuss this with NC, we need a policy for automatically downloading stuff (a server can tell a client "go download and execute that"). Mods like they exist now are fine.
Logged

Port

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 82
    • portify.github.io
Re: Official PyGG2 Development thread
« Reply #523 on: February 25, 2012, 03:49:25 am »

Hey I have a question on pyGG2:

You mentioned mod lobby being disabled until you think of a policy, but how is vanilla-capable modding done?
Although I have yet to discuss this with NC, we need a policy for automatically downloading stuff (a server can tell a client "go download and execute that"). Mods like they exist now are fine.

I can see how validating the safety of a downloaded script could be problematic. One solution could be running it in a virtual environment with most potentionally harmful features removed.

Instead of allowing full scripts to be downloaded, we could also just simply allow only resources to be downloaded (images, sounds, etc). Then for instance, the server could manually tell the client to play a sound or create a sprite at a specific position, deciding itself whether it should have physics applied and being able to transmit velocity, position and other parameters. Possibly also being able to tell the client that a specific object (such as a character, autogun, etc) should have a different sprite.

If the latter solution was used, we could also have options such as "Download Sounds", "Download Images", "File Cache Size" and other things to allow users to control policies themself.
« Last Edit: February 25, 2012, 04:58:39 am by Port »
Logged
portify@neko.im

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Official PyGG2 Development thread
« Reply #524 on: February 25, 2012, 04:00:52 am »

Hey I have a question on pyGG2:

You mentioned mod lobby being disabled until you think of a policy, but how is vanilla-capable modding done?
Although I have yet to discuss this with NC, we need a policy for automatically downloading stuff (a server can tell a client "go download and execute that"). Mods like they exist now are fine.

I can see how validating the safety of a downloaded script could be problematic. One solution could be running it in a virtual environment with most potentionally harmful features removed.

Instead of allowing full scripts to be downloaded, we could just simply allow only resources to be downloaded (images, sounds, etc). Then for instance, the server could manually tell the client to play a sound or create a sprite at a specific position, deciding itself whether it should have physics applied and being able to transmit velocity, position and other parameters. Possibly also being able to tell the client that a specific object (such as a character, autogun, etc) should have a different sprite.

If the latter solution was used, we could also have options such as "Download Sounds", "Download Images", "Download Cache Size" and other things to allow users to control policies themself.
Another solution would be to just accept what the lobby declares as legit, and then we could manually control mods who want to be distributed, and upload their hash or whatever to the lobby server (whitelist). There aren't enormous numbers of them anyways, so it would be feasible.

Whatever. This is a discussion that should take place after we've got vanilla covered.


By the way Port, have you been here under another name already or are you new? In both cases, can you code Python? And are you interested in helping?
Logged
Pages: 1 ... 33 34 [35] 36 37 ... 77
 

Page created in 0.038 seconds with 36 queries.