Introducing: Communicate with a running spring - Page 2

Introducing: Communicate with a running spring

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Introducing: Communicate with a running spring

Post by Licho »

Yeah it should use text form probably and be specified in some doc beyond .h file.. but meanwhile this interface is fully useable.

Code is clean and simple and you get all you need to know by reading it.
There are no issues with numbers because all numbers are just 1 byte uchar.
Texts are encoded ascii because all spring uses is ascii.

And tbh lobby devs could have already implemented at least basic communication spring<->lobby the way springie did even without this interface.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Introducing: Communicate with a running spring

Post by AF »

Actually lobby devs did try.

The main reason AFLobby does not do this is because at some point taking the chat and piping it to std::out was stopped. Raven iirc wrote code that read infolog.txt but that was hackish and I dint want to mess around with that. Spring lobby ppl iirc had similar results but I'm not sure on whether it was them or another project.

Thank you for the changes.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Introducing: Communicate with a running spring

Post by Licho »

It still works (the piping) but I think you have to set debug flag (in registry)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Introducing: Communicate with a running spring

Post by AF »

Yeah, at the time there was no unitsync interface for settings stuff though so it wasn't worth the bother.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Introducing: Communicate with a running spring

Post by Tobi »

The 'int' datatype in C/C++ is 32 bit on both 32 bit and 64 bit Windows and Linux. 'long' is the one you don't want to touch because it's 32 bit on 32 bit and 64 bit on 64 bit.

(both Linux and Windows on x86-* architectures (x86-32 and x86-64 AKA amd64) use the LP64 model as opposed to ILP64.)
Post Reply

Return to “Engine”