[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4752: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4754: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4755: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
www.gcvets.net - View topic - openGame Project Update Thread


openGame Project Update Thread

Post all general things in here.

Moderator: Moderators

Board-General
User avatar
Posts: 303
Joined: 05 Mar 2012 06:32
Location: United States

openGame Project Update Thread

Postby stAtrill » 06 May 2015 04:37

Hey hey all,

This is just a thread I started to document the progress of the GR replacement I am working on. I did a brief test last Sunday with Darix and Carter, so will also document the changes from that as well.


-This version was a basic implementation of the torrent udp tracker protocol, and could connect to a tracker, and pull a list of ip addresses.
-This version was a bit less than 100 lines of code.
-The test on Sunday was successful, there were no errors.

-This version is 303 lines of code.
-The code is published open-source here: https://github.com/stAtrill/openGame/

Changes/additions:
-Added verbosity settings to console output
-Coded in all 'infrastructure', the peer lists, connection lists, and managing code is all there to some degree of completion.
-Added in public IP discovery based on internet query, with user-entered backup
-This version can now listen for connections, and accept connections (or send them) to and from other peers
-This version has bugs in the connection manager

Problem: Since I basically am at a stage where I can't easily debug this on my own (as it needs to be run from at least two computers simultaneously to test), I have been recruiting my brother to help me test this. This arrangement should be valid for the time being.

TODO: this list is enormous. Will probably start updating this section in future updates.

Expected in next update:

-A repo on Github to track versions, and changes EDIT: I went ahead and made the repo, since it takes all of 5 minutes to do
-Debugged connection manager, able to stabilize connections with multiple peers
-Tracker interfacing moved to functions
-Proper socketerror error handling

Major hurdles left:
-Public IP discovery via STUN protocol (this one will be hard, but necessary to do things right)
-upnp nat hole punching (this should be easier)
-Switchover to new python selectors module (which, of course, is too new to be completely documented)
-TUNTAP integration (this should be tedious, but not hard)
-Decentralized routing (this alone will probably add another few hundred lines of code)
-GUI (this should fully double the code base, and will almost certainly be saved for last)


Curiously, but not surprisingly, the connection attempts are blocked by routers (at least, my brother's router blocked the incoming connection). There are a plethora of tricks/methods used to get around this, but a proper implementation of upnp should fix this for the majority of modern routers.

BTW, re: 'a plethora of methods' from earlier is why I have no trust in router security (or the windows firewall in general). Any coder with half a brain knows how to punch through these, and more often than not without user interaction.

I'll save the rant for some other time,
-Stat
Last edited by stAtrill on 06 May 2015 08:40, edited 1 time in total.


Another GC archive:

Board-General
User avatar
Posts: 106
Joined: 26 Jan 2012 04:10

Re: openGame Project Update Thread

Postby Admiral Ghat » 06 May 2015 05:38

Thanks so much, Stat! This is exciting. Let me know if you want to do any testing during the week.

Board-General
User avatar
Posts: 303
Joined: 05 Mar 2012 06:32
Location: United States

Re: openGame Project Update Thread

Postby stAtrill » 06 May 2015 09:59

Wow! I can't believe you responded so quickly. I must not be the only person who can't sleep! I would very much look forward to testing this with you! I should mention, however, that I tend to work on coding projects at the strangest hours. Though, if you responded just now, it must not be that strange!



-Alerts were made 'smarter'
-Improved connection managing infrastructure
-Improved readability, removed a bunch of ultra-shorthand
-All tracker interfacing now moved to functions
-Fixed some bugs in both connection and peer management
-Improved diagnostics quality
-Only 322 lines, which is good considering I was streamlining and cleaning the code.

So I think I fixed two bugs, one of which may cause an unpacking error, and another, harder to find bug that I suspect was corrupting the connection list if the first peer connection attempt failed. I say I think, as I can't test this until tomorrow when I have others to try it with. I also significantly improved the error handling overall, though there is still a long way to go (you literally can't count on anything when it comes to networking).

I also think I have the selectors module figured out, so it should just be a matter of implementing it when I have time soon.

Expected in next update:

-Implementation of selectors module
-Finishing bookkeeping of completed outgoing connections
-Finishing up peer management
-More error handling
-Setting verbosity (and other defaults/settings) from arguments

And potentially either:
-upnp implementation (can automagically open required ports for you on supported routers)
or
-storage file implementation (helps keep ip discovery requests down, forms underpinnings of a 'friends list', etc)


Also, I am starting to get excited - nearly everything in networking is bloated, and this is starting to look like it will end up extremely lightweight and streamlined. As in, could happily run on 10-year-old computers, maybe 20 kb total file size, could run on your mobile phone, lightweight. We will see, though, after the GUI is completed.

More later. Though possibly not until late tomorrow.

-Statrill


Another GC archive:

Real Member
User avatar
Posts: 55
Joined: 29 May 2014 23:50
Location: Brasil - São Paulo

Re: openGame Project Update Thread

Postby GCMarcos » 07 May 2015 05:20

That look very hard .

Real Member
Posts: 52
Joined: 23 Apr 2013 12:32
Location: Italy

Re: openGame Project Update Thread

Postby DarixIta » 07 May 2015 08:00

kudos Stat! I'm not an expert in coding, but if you need help testing let me know

Board-Major
User avatar
Posts: 64
Joined: 18 Mar 2012 02:34

Re: openGame Project Update Thread

Postby Compuguy » 07 May 2015 09:30

Not bad comrade! We should make a mod that directly integrates this into the 'won.net' network that the game client used to use. This would greatly simplify the game and the system, allowing direct interaction without the dilly dallying of seperate programs and all the shenanigans. If we replace the multiplayer interface of the whole of the ground control that would be amazing. No more server dropping players, no more functionally lacking chat, no more scorelessness in the multiplayer section. We should have stats and leagues like so we can rank ;), just like in cs:go.

Also I would like to suggest upgrading the base game on its base files to create a new client that you can download directly on the site, on the old engine and creating new iterations that dont overcomplicate the game but make it a big larger and the terrain more interactive *hint* destruction *hint*, and also have a more optimized code. And MOAR FORTIFICATIONS :D minor structures like walls that you can build are great. A radar jammer might work too. Just a rant

Real Member
User avatar
Posts: 55
Joined: 29 May 2014 23:50
Location: Brasil - São Paulo

Re: openGame Project Update Thread

Postby GCMarcos » 07 May 2015 15:47


Board-General
User avatar
Posts: 303
Joined: 05 Mar 2012 06:32
Location: United States

Re: openGame Project Update Thread

Postby stAtrill » 08 May 2015 09:58

Woot! I would love to test this with you guys! I am a bit disappointed: I was originally hoping to have a semi-functional version ready by Friday's games, but I am just starting to build in the bits of code that create tunnels between everyone now, so I think I am a bit behind schedule :(

It's not gametime yet though, so we will see!




-Now saves and reads internal settings to/from a file
-Improvements to internal code structure
-Properly shuts down connections on close (re: error handling)
-Changes for readability (removing more shorthand, etc)
-More error handling
-Misc changes to storage directory

I can confirm the peer list corruption bug is squashed, btw! Additionally, the previous version would crash spectacularly if any peer it was connected to closed the program, and this version should not do that (due to properly shutting all sockets down before close)! Additionally, the save file was added, and the internal data storage structures changed about. Other misc internal improvements. It is about 378 lines now, I estimate it will be around 1000 when it is fully functional, not counting GUI code.

I didn't get around to implementing selectors, and I really should do that before I continue working on the peer manager. Although, there is enough in place as-is that I have been considering going for gusto and putting the tunneling bits in.

Expected in next update:

-Implementation of selectors module STILL
-Peer manager updates
-More error handling

I decided against command line arguments, since no 'casual users' use them, and especially since a GUI is coming. Also decided against upnp as I've since learned that STUN servers can help create a reliable hole, whereas upnp is based on whether someone's router supports it, and then if the feature is enabled. STUN should work in all cases.

Let's see what I can cook up before tomorrow's games,

-Statrill
Last edited by stAtrill on 08 May 2015 18:31, edited 1 time in total.


Another GC archive:

Board-General
User avatar
Posts: 105
Joined: 27 Jan 2012 17:21

Re: openGame Project Update Thread

Postby Sarvik » 08 May 2015 12:59


Board-Major
User avatar
Posts: 94
Joined: 27 Jan 2012 23:08
Location: Lisbon - Portugal

Re: openGame Project Update Thread

Postby mind-pt- » 08 May 2015 16:56

yay !!

Next

Return to Ground Control - General

Who is online

Users browsing this forum: Bing [Bot] and 2 guests