Unitsync Access

Unitsync Access

For the discussion of infrastructure improvements and changes.

Moderator: Moderators

Post Reply
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Unitsync Access

Post by AF »

I'm currently trying to figure out how to access unitsync to get lists of games, maps, and their minimaps, but I've ran into several issues that I don't have answers for:
  • Unitsync used to have a method for generating JPEG minimaps, which no longer exists
  • How do I extract data from a dynamically typed language that has marshalling requirements and no native support for libraries?
My currently chosen language is Javascript & Node, I'm aware there are projects such as Node-FFI but this would complicate the build process from a 1 liner to something significantly more involved, making the project unviable
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Unitsync Access

Post by AF »

Nobody? :( This is kind of a major blocker for me at the moment
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Unitsync Access

Post by Forboding Angel »

I could be completely wrong, but I think that non-luaai has fallen out of favor enough so that pretty much no one uses those interfaces anymore. I'm sure kloot/jk/abma probably know the answer though. I would imagine that you could use a similar method to how springlobby extracts them (assuming it hasn't changed from the old days).

Fwiw, I think it would work a lot better if you made it a luaai and threw it up on rapid as a package that games could depend upon. You could then pick and choose support and let us know what games work with it so we could add your major releases as a dependency.

Follow with subforum for questions and updates, etc etc etc.
User avatar
TurBoss
Jauria RTS Developer
Posts: 89
Joined: 27 Jan 2014, 01:04

Re: Unitsync Access

Post by TurBoss »

pr-downlaoder is how springlobby extract info from unitsync using lsl

Plz correct me if I'm wrong
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Unitsync Access

Post by AF »

I'm not using it in an AI, but SpringLobby uses the DLL/etc interface, which isn't possible in most dynamically typed languages without jumping through hoops and the nightmare of marshalling data types. Setting up JNI for AFLobby<->Java<->Unitsync access was a lot of work, and JNA was that much more work that it was never finished
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Unitsync Access

Post by AF »

Do lua gadgets have full access to unitsync data via the APIs, or just the archives that are already loaded into the VFS? If so it might be possible to write a game that writes out the necessary information
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Unitsync Access

Post by AF »

This would suggest that it's possible to get a list of games AIs and maps: https://springrts.com/wiki/Lua_VFS#Archives

I did spot:

[quote]
VFS.DownloadArchive New in version 101.0
[/quote

What system does this use? I don't see any examples or a way of getting a list of archives that can be downloaded

As an aside this thread can probably be moved to the engine forum
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Unitsync Access

Post by gajop »

AF wrote:
VFS.DownloadArchive New in version 101.0
What system does this use? I don't see any examples or a way of getting a list of archives that can be downloaded

As an aside this thread can probably be moved to the engine forum
It uses pr-downloader.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Unitsync Access

Post by abma »

you could try to use lslextract:

https://github.com/spring/pr-downloader ... lslextract


its wip / not finished, but maybe it fits your needs. maybe http://api.springfiles.com/ fits as well. as you didn't write what you are trying to do, its very difficult to answer.
Post Reply

Return to “Infrastructure Development”