SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.66k stars 1.12k forks source link

Battlefield style battlescreen #11

Open boombatower opened 9 years ago

boombatower commented 9 years ago

Basically a large second screen minimap with more detail. Perhaps showing unit icons instead of just colored pixels.

The Battlefield version is done using a web interface (not sure if connected to local game or central server). For openage it could be done in any variety of options.

I bring this up since I've been doing some basic research into this before I discovered openage. My plan was to either intercept network traffic (like voobly does for observer proxy) or read the record game file as it is being written (assuming it dumps fairly often).

There is some code out there to parse the starting point of recorded games and stats and what not, which voobly uses on their site, but not a lot of info on the meat of the file. Does openage support recorded game files? As such I imagine I could look there.

I would be interested in creating this if it sounds feasible, although my plan was do it as a local webservice. If there is information on recorded game format perhaps it would be better to create it standalone so it works for AoC, HD, and openage. Thoughts?

mic-e commented 9 years ago

Sounds like something straight for one of our "idea" files (gameplay? interface?). The current design for networking includes a dedicated server (optionally run when clicking the 'Host' button), so both the client and server could provide such an interface. Hacking around in attempts to parse recorded game files/network streams is unnecessary though, since you can build your interface, and even the web server (or maybe an OpenGL rendering window?) directly into the game.

thehydroimpulse commented 9 years ago

This would be awesome to have. You could definitely have a web service as a proxy to the game server. It would connect to the game server and proxy the needed data to a web socket, for example. Considering Battlefield achieves this with dedicated servers, it's slightly more challenging when you have a peer-to-peer network.

One could have a python server (as a plugin/module) send the needed data to a web socket. Polling would be another alternative, or comex but a web socket would be vastly more efficient. Then you can load up the "battle" screen in a browser on another device or monitor.

boombatower commented 9 years ago

Just an updated set of thoughts. I assume this could be done as a enlarged and enhanced version of minimap #344. Where it could represent group of units by their icon...like a group of knights by the icon shown a stables to build them. I have a lot more ideas like trying to show map control heatmaps, battles, and alerts, but it really boils down to a large minimap at the most basic level.

I confirmed that game record files are written as the game progresses (quite frequently) and there are a number of projects that document the spec and provide basic parsing ability. Assuming one wrote a parser and used something like inotify to detect updates and parse added bytes it could be conceivable to issue those commands in openage to provide a synced game state if slightly delayed. Similar to an observer, but without the network/sync/lag strain nor having people agree to that. It would be an alternative to set it up as network connected if openage ever supported interoperability with original age of empires games. The main benefit of building this in openage as opposed to a separate project being that openage will have all the features built in and it can share the openage game simulation code rather than having to build that on top of parser.

I understand the comment about not need to read recorded game file if built into openage, but the reason for that was to be able to also use this with the original game since I expect to have to keep using it for quite sometime.

Anyway, once the game state is synced the battle screen provided by openage could be used in conjunction with the original age of empires client as a supplemental display. Ideally the games would be interoperable, but I feel like someone stated that would be unlikely.

At this point I am not sure if there is a point to implementing it as an HTML based solution if the rest of the UI is going to be implemented in python. Might as well stick with that. I presume battlefield used html solution since it allowed one to seamlessly switch between battlescreen that communicated with local game client and the rest of their services that communicated to their central server via the website itself which is usable without the game client running. Since neither openage nor original game has such a central service this seems unnecessary to rebuild all the rendering capabilities that will already be built in openage.

seiyria commented 5 years ago

I would be interested in the web/display aspect of this if someone can handle getting the data out of the game.