May 19, 2024, 06:19:02 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 ... 35 36 [37] 38 39 ... 77

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

MEDIK

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 272
  • winter is coming
Re: Official PyGG2 Development thread
« Reply #540 on: March 10, 2012, 02:21:48 am »

I added some stuff around client ID passing, and 2 players on the same server now work. 3 don't, for some reason I'll investigate, but that's secondary.

The main point is that we should now test it on a bigger distance than loop-back. I want to see whether it works on a real connection too.
OK, make it run without GUI and I can host a 24/7 test server ;)
It's not even possible to run a server with GUI.  :drool:


WHAT!?

Why...

No host playing then?
Or the host needs to open another window to play?
Logged



See you in another life brother

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Official PyGG2 Development thread
« Reply #541 on: March 10, 2012, 03:38:46 am »

Aww, and I just added the UUID to the list of known lobbies :P
Eh...We're probably going to use the standard gg2 one as soon as it stops breaking everything.

I added some stuff around client ID passing, and 2 players on the same server now work. 3 don't, for some reason I'll investigate, but that's secondary.

The main point is that we should now test it on a bigger distance than loop-back. I want to see whether it works on a real connection too.
OK, make it run without GUI and I can host a 24/7 test server ;)
It's not even possible to run a server with GUI.  :drool:


WHAT!?

Why...

No host playing then?
Or the host needs to open another window to play?
"other window"? What other window? Atm, the server doesn't open a window at all, it doesn't even load pygrafix.
You host a server with one console, and join with another. For now, that's sufficient, seeing as much networking debugging still has to be done, and you need separate console for that.

At release, we'll make an option that'll start both the server and the client separately, and let you play with one click.
Logged

Loler

  • New Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 3
Re: Official PyGG2 Development thread
« Reply #542 on: March 10, 2012, 06:12:37 pm »

I hope this comes out soon.
Logged

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Official PyGG2 Development thread
« Reply #543 on: March 13, 2012, 01:52:57 pm »



Found the multiclient bug.

This
Code: [Select]
    for index in range(numof_players):
        player = engine.player.Player(game, game.current_state, index)

        player.name, player_class, character_exists = struct.unpack_from(">32pBB", event.bytestr)
        player.nextclass = function.convert_class(player_class)
        event.bytestr = event.bytestr[33:]
should have been
Code: [Select]
    for index in range(numof_players):
        player = engine.player.Player(game, game.current_state, index)

        player.name, player_class, character_exists = struct.unpack_from(">32pBB", event.bytestr)
        player.nextclass = function.convert_class(player_class)
        event.bytestr = event.bytestr[34:]
Spot_the_difference.jpg
Logged

notajf

  • Guest
Re: Official PyGG2 Development thread
« Reply #544 on: March 13, 2012, 02:00:55 pm »

Spot_the_difference.jpg

     for index in range(numof_players):
         player = engine.player.Player(game, game.current_state, index)
 
         player.name, player_class, character_exists = struct.unpack_from(">32pBB", event.bytestr)
         player.nextclass = function.convert_class(player_class)
-        event.bytestr = event.bytestr[33:]
+        event.bytestr = event.bytestr[34:]
« Last Edit: March 13, 2012, 02:01:35 pm by T. Terry S. »
Logged

Rodoval

  • Seasoned Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 3937
  • It's been 8 years already, am I oldfag yet
Re: Official PyGG2 Development thread
« Reply #545 on: March 13, 2012, 02:32:51 pm »

Seriously
a single digit

Wow you guys have courage
Logged

read this post about minors without looking at the last page first, and I thought you were encouraging rodo to hunt for young women.

NAGN

  • Developer
  • ******
  • Karma: 146
  • Offline Offline
  • Posts: 16150
  • Yeah so now I have an idea
Re: Official PyGG2 Development thread
« Reply #546 on: March 13, 2012, 02:45:57 pm »

yes well its essential to unpacking, if you're just one byte off or on, then the whole game could crash
Logged

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Official PyGG2 Development thread
« Reply #547 on: March 13, 2012, 02:55:03 pm »

yes well its essential to unpacking, if you're just one byte off or on, then the whole game could crash
It's when it doesn't crash, but spawns a player a fraction of a second too soon and crashes the game 10 seconds later that it gets hard.
Logged

notajf

  • Guest
Re: Official PyGG2 Development thread
« Reply #548 on: March 13, 2012, 03:15:04 pm »

Seriously
a single digit

Wow you guys have courage
??

A single digit that's very meaningful.
Logged

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1752
Re: Official PyGG2 Development thread
« Reply #549 on: March 13, 2012, 03:51:03 pm »

Nice find! That kind of bug can be a nightmare to hunt down.
Logged
Quote from: Alfred North Whitehead
It is the business of the future to be dangerous; and it is among the merits of science that it equips the future for its duties.

Quote from: John Carmack
[...] if you have a large enough codebase, any class of error that is syntactically legal probably exists there.

notajf

  • Guest
Re: Official PyGG2 Development thread
« Reply #550 on: March 13, 2012, 03:53:38 pm »

Nice find! That kind of bug can be a nightmare to hunt down.
Tell me about it.
I've spent literally weeks looking for bugs in my Minecraft server written in C.
Let's just say my coding skill when I wrote it wasn't good and dealing with networking in C isn't exactly fun.
Logged

Rodoval

  • Seasoned Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 3937
  • It's been 8 years already, am I oldfag yet
Re: Official PyGG2 Development thread
« Reply #551 on: March 14, 2012, 12:39:33 am »

Seriously
a single digit

Wow you guys have courage
??

A single digit that's very meaningful.
I have no experience whatsoever with coding, so to me yes it is very surprising that a single little digit can create such a glitch.
Logged

read this post about minors without looking at the last page first, and I thought you were encouraging rodo to hunt for young women.

notajf

  • Guest
Re: Official PyGG2 Development thread
« Reply #552 on: March 14, 2012, 01:39:10 am »

Seriously
a single digit

Wow you guys have courage
??

A single digit that's very meaningful.
I have no experience whatsoever with coding, so to me yes it is very surprising that a single little digit can create such a glitch.
It's splitting up a packet of data, which is rigidly formatted. If you split it at the wrong place, of course it won't work as it will read the wrong data.
Logged

nightcracker

  • NC
  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 516
  • PyGG2 dev
    • NC Labs
Re: Official PyGG2 Development thread
« Reply #553 on: March 14, 2012, 02:18:08 am »

Seriously
a single digit

Wow you guys have courage
??

A single digit that's very meaningful.
I have no experience whatsoever with coding, so to me yes it is very surprising that a single little digit can create such a glitch.

You could see it like this, say I am splitting this string:

Code: [Select]
1234aaaabbbb9876into
Code: [Select]
1234, aaaa, bbbb, 9876
But I mess up in the first thing:

Code: [Select]
123, 4aaa, abbb, b987, 6
Quite a difference huh?
Logged

Dusty

  • 2012 Haxxy Award Winner
  • *
  • Karma: -78
  • Offline Offline
  • Posts: 10312
  • Dust in a box under a table
Re: Official PyGG2 Development thread
« Reply #554 on: March 14, 2012, 07:22:39 am »

So, what exactly did that do to prevent multiclienting?
Pages: 1 ... 35 36 [37] 38 39 ... 77
 

Page created in 0.039 seconds with 32 queries.