Myg Posted January 3, 2011 Share Posted January 3, 2011 The following is an example of the info required to send to a running C&C95 instance to initiate a pre-configured game in "internet mode". This is what Wchat.exe sends C&C95 when the game has started. *NOTE: There is a byte[] header that consists of the following - IT WILL NOT WORK WITHOUT IT* { int32, int32 } - First int is length in little endian. Second is just zero. [internet] Address=192.168.0.1 Port=8054 Host=0 GameID=0 StartTime=0 HWND=0 [Options] Handle=TestClient Color=5 Side=0 Credits=5000 Bases=1 Tiberium=1 Crates=1 AI=0 CaptureTheFlag=0 BuildLevel=7 UnitCount=1 Seed=1 Scenario=1 [Timing] MaxAhead=15 SendRate=5 Additional notes: - GameID Is auto-generated (can be anything) - StartTime Unix, since the epoc; system call - HWND Used to return the focus to the wchat client after ending session - Host can be either set to 0 or 1 (boolean) - Port can be any port (the client uses this for sending/receiving) - MaxAhead is the maximum frames the eventengine can run ahead - SendRate is the number of event packets sent per second from this client Link to comment Share on other sites More sharing options...
Iran Posted January 3, 2011 Share Posted January 3, 2011 Why is UNIX time used? Link to comment Share on other sites More sharing options...
Irony Posted January 3, 2011 Share Posted January 3, 2011 The servers probably ran on unix based systems Link to comment Share on other sites More sharing options...
hifi Posted January 3, 2011 Share Posted January 3, 2011 The header starts with a DWORD in little endian format containing the total packet size including header Link to comment Share on other sites More sharing options...
hifi Posted January 11, 2011 Share Posted January 11, 2011 Proof of concept test client at https://github.com/hifi/cncqm The game seems to work just fine. A new unknown is the huge end game result dump (over 3 KB). I haven't looked into it yet much but it contains a lot of information how the game went. Link to comment Share on other sites More sharing options...
uNdeAd Posted January 12, 2011 Share Posted January 12, 2011 dummy question, does it work for win7 too ? Link to comment Share on other sites More sharing options...
pichorra Posted January 12, 2011 Share Posted January 12, 2011 dummy question, does it work for win7 too ? it should. Link to comment Share on other sites More sharing options...
hifi Posted January 12, 2011 Share Posted January 12, 2011 Ok, going forward: BROWSER INTEGRATION Yes, thats right, it is AWESOME. Now I just need to write a real game setup tool, clean the client up and we have a 1on1 wchat replacement integrated into cnc-comm.com (only the web part needs to be hosted). Test site with manual setup: http://hifi.iki.fi/cncqm/ Link to comment Share on other sites More sharing options...
Tore Posted January 12, 2011 Share Posted January 12, 2011 That sounds interesting, Myg was thinking of something similar sometime ago. Link to comment Share on other sites More sharing options...
pichorra Posted January 12, 2011 Share Posted January 12, 2011 Nice hifi! if we could capture that data in Sole Survivor, and do the same thing as you did into that, we can... Bring the server online AGAN! Link to comment Share on other sites More sharing options...
Myg Posted January 13, 2011 Share Posted January 13, 2011 Aha! Hifi, nice work; seems you beat me to it! I wasnt able to complete my client and you have a browser based version up! Wow :-) Me and cheese tested and found some stuff worth looking into: 1. This error appears when you *Don't* enter the LAN lobby first when you press "start game" (on the web page) and then go back into the main menu to get it to start connecting. It isnt fixed/effected by - Compat mode - cncddraw - Previous versions of the exe It is fixed/effected by - Scorpio9's LAN dll (note: doesn't transmit thought - no traffic sent) What is possibly breaking it? - cncnet dll code used by the Internet mode (maybe socket creation?) - Improper writing of INI file Link to comment Share on other sites More sharing options...
hifi Posted January 13, 2011 Share Posted January 13, 2011 Old versions of cnc-ddraw broke wchat mode. I just released a fix a while ago. It should work by not having the game open when pressing start game. At least thats how I tested it. Did write support for launching a game even when the game is already open but never tested it. Anyway, the code needs a cleanup or a rewrite. It is hacky and ugly. Link to comment Share on other sites More sharing options...
Nyerguds Posted January 13, 2011 Share Posted January 13, 2011 1. This error appears when you *Don't* enter the LAN lobby first when you press "start game" (on the web page) and then go back into the main menu to get it to start connecting. Does this mean that it's something I could fix by making the game run some of the LAN network init code when running the wchat code? Link to comment Share on other sites More sharing options...
hifi Posted January 13, 2011 Share Posted January 13, 2011 1. This error appears when you *Don't* enter the LAN lobby first when you press "start game" (on the web page) and then go back into the main menu to get it to start connecting. Does this mean that it's something I could fix by making the game run some of the LAN network init code when running the wchat code? The game is supposed to be run with the -WCHAT parameter for correct wchat initialization. Behaviour for anything else is unexpected. If -WCHAT works everything that is supposed to work, works. Link to comment Share on other sites More sharing options...
pichorra Posted January 13, 2011 Share Posted January 13, 2011 @hifi: look at 0x0DC863... There is a MaxPlayers option on Internet Section! Link to comment Share on other sites More sharing options...
Myg Posted January 13, 2011 Share Posted January 13, 2011 Yes, I was contemplating this the other day when I heard about it. Theoretically it may be possible to make the game aware of a set of players in which to add to the list of users in the hosted game; Since it still uses the same detection technique as used in the LAN lobby. Nyerguds you did say to me that you could add a list of IP addresses, but the problem is we dont know if it contains the proper behaviour to iterate through a list since it is made to use only one. Obviously im assuming alot; but if you think its possible it may be worth a proper test! Link to comment Share on other sites More sharing options...
hifi Posted January 14, 2011 Share Posted January 14, 2011 1. This error appears when you *Don't* enter the LAN lobby first when you press "start game" (on the web page) and then go back into the main menu to get it to start connecting. Just a recap from IRC: this was fixed in a newer CnCNet thipx32.dll which is not currently officially released. Link to comment Share on other sites More sharing options...
Myg Posted February 18, 2012 Share Posted February 18, 2012 Was thinking we could use this old tech for the C&C95 tourney? What do you guys think? Link to comment Share on other sites More sharing options...
pichorra Posted February 18, 2012 Share Posted February 18, 2012 I don't think so. Westwood chat have a lot of issues when running in Wine. But if we are going to use CnCQM, I can't see the problem. Or even an packet injector with the settings. Link to comment Share on other sites More sharing options...
Myg Posted March 14, 2012 Share Posted March 14, 2012 Thats what I meant, bro. Cheese, what do you think? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now