Jump to content

[DDE]C&C95 + Wchat


Guest cncNetServer

Recommended Posts

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

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

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

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

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

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

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

  • 1 year later...
  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...