Jump to content
skruis

Athena - An ARMA 2nd Screen Application

Recommended Posts

ChuWie: Is it freezing immediately or getting worse over a period of time?

Becario: Some news on your front...the recordings are working. I might need to add a setting to capture every nth frame to keep disk space down. I have a pretty fast computer so it generates a file/second. Over 8 minutes, it added up and when compressed, the file size came out to 1.5MB. That's not horrible but you can imagine hours long matches generating huge amounts of files. I also haven't implemented any sort of feedback to the user about what's happening and any errors that are generated. It's just failing silently...if it fails. Also, playback isn't included yet. That's coming soon.

In other news, I've identified and resolved several other script bugs and procedural errors in the app. In addition to adding the ability to record matches, I've also added in the option to track units other than the player.

athena_20150409sm.png

Edited by skruis

Share this post


Link to post
Share on other sites

The hiccups/FPS lags in intervals occur as soon as a mission is started and at least 1 player getting tracked.

It does not getting worse over time. The hiccups continuously happen in the same intervals as on level start.

However I noticed a change in these intervals when loading another mission file. I had 12 seconds interval in between these FPS hiccups in another mission.

Share this post


Link to post
Share on other sites

I've released a new version of the mod/app. The pair fixes what is basically a show stopping issue which came about during missions that loaded additional scripts on mission start which is ... the majority of missions but in my testing, I hadn't expected that sort of complication or that really, that that complication was something that actually existed so ... for that reason, I'm kind pushing this update out for users to get around that particular issue. Additionally, a bit earlier than I expected, I'm releasing a couple of additions to the app: the ability to select the unit to follow (in case you don't want to follow yourself) and the ability to record and playback. The playback controls are limited at this point: they will be expanded on to allow you to select the frame. Additionally, I'm going to determine the average time per frame and will adjust the playback of the frames to match. Currently, it will attempt to play a frame per second. So, update released. You can download the updates @ athenamod.com:

Desktop 1.0.0.13

Athena Mod

Thanks!

Bus

PS: ChuWie: I haven't forgotten you!

Share this post


Link to post
Share on other sites

Kecharles: thanks for updating the mod on Six!

Share this post


Link to post
Share on other sites
Guest

Thanks for sending us the updated version :cool:

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Installed the newest update and tested around a bit more.

I found out that Athena Desktop lags out if 3 of the conditions are met; If either 1 of those doesn't, it doesn't lag;

- Athena Desktop is in running state "Start-ed"

- Loads into GPU System memory (not Dedicated Memory) [around 849 MB for me]

- Is visible on at least 1 screen (not minimized)

------

- it stops lagging when the app is minimzed (still in start-ed state and tracking and still in GPU's System Memory)

- it didn't lag when the app is running purely on GPU's Dedicated Memory (ingame FPS were worse then overall)

(this scenario happened only a few [2/20?] times that it used the Dedicated GPU- over the GPU System Memory)

- it doesn't lag when the app is visible on 1 screen but not on start-ed mode

(though it still lags in this state when moving around the app map with the mouse, lags occur every 3 seconds then)

Also the amount used GPU System Memory doubles when starting Athena Desktop app and moving it from the primary monitor to secondary monitor.

(The app freezes in that moment for about 5 seconds.)

This will only happen once in a session of the app until it gonna be restarted.

Share this post


Link to post
Share on other sites

ChuWie: That info is extremely helpful. Thanks! The memory footprint is so high because I've basically plastering the background of the app w/ images that are up to 14000x14000. So they take up a huge amount of memory. I want to reduce that which will result in a performance increase. I'm going to re-engineer the background so that it 'streams' the image section based on where the user is actually looking. The good part is that the memory footprint will be lower. The bad part is that as you scroll around, you might notice areas of the map populate: you kind of see this in the ingame map/editor.

Share this post


Link to post
Share on other sites

ChuWie: I've implemented a new method that keeps memory usage below 100MB. The drawback: your CPU usage will spike up to 10% depending on the amount of panning (looking around the map) you do and ... the panning performance, in the app itself, is pretty poor as it extracts only the visible map data from the image file w/o actually loading the whole image file into memory. So, as you're panning, it's constantly eating into general IO (CPU/Memory/HDD) in order to fill the visible space which would result in an overall hit to FPS during panning/zooming vs the repetitive drops you're experiencing now due to memory congestion.

So, I ran some testing of my own and because I have a somewhat high end system, I don't notice the FPS drops during play, they 'are' there but just not noticeable because my system has performance to spare. My thinking is that if I allow you to have the same amount of breathing room, then though u too will actually have FPS drops, the impact will be less noticeable. It's kind of a tradeoff. The reason they came through in my video was because I was recording w/ a pretty poor software but during play while not recording, I'm not experiencing that behavior and the performance in the app, because the entire image is loaded into memory, is pretty smooth. So, I'm thinking ... probably the best route is to drop this new rendering system because the in app performance under this new system sucks...bad and instead, I'm going to expose a setting that allows you to specify a desired quality. That quality will determine what scaling I apply to the image as it's pulled into the app. On high quality, it's pulled in 1:1. On medium or low, I'm going to apply a scale so that the resulting image takes up less memory ... but the entire image will be loaded into memory and thus in app performance will be consistent w/ smooth panning and zooming.

The only other alternative is for me to break up the visible canvas into a grid and load sections of the images into the grids under different threads as the viewport brings those grid sections into view and then dump them as they drop out of view. That would probably be the best of both worlds. And then the panning and zooming would probably be more responsive ... dammit. Let me try that.

Share this post


Link to post
Share on other sites

Nice to hear you could narrow down the issue :)

Thanks for the in-depth explanation. The way you explained makes sense to me and I see a massive performance improve coming.

Looking forward to an updated version :)

Share this post


Link to post
Share on other sites

Maybe you could also have a setting to use a large amount of RAM at high quality, for those who can spare it, to improve performance when panning?

Share this post


Link to post
Share on other sites

I really like this addon, thanks for the great work!

I have two ideas:

- GPS Coordinates displayed for the player iam following.

- Map Coordinates on the border of the map, possible?

Thanks again! :-)

Share this post


Link to post
Share on other sites

ChuWie/Doveman: I might be able to satisfy both requests. I've re-engineered (or rather, I'm in the middle of re-engineering) the map display to load separate image files into each of the 100 grid chunks in the overall map grid. As you pan and zoom, the app determines what chunks are visible and then in a separate thread, grabs the image content and renders it in the appropriate grid chunk. It's kind of a pita to manage and it's not as smooth as having a single large image loaded into memory but this is a 2ndary app compared to the game itself so I'll have to sacrifice some chrome here and there. The trade off to this is that the original compromise I made, which was decreasing the resolution of both the Altis and Stratis maps, so that they wouldn't cause Out of Memory exceptions should now be able to be reversed and/or configurable which should allow users with higher end systems to gain a higher degree of overall quality. We'll see how it goes but I should be able to accommodate both of your requests/concerns.

Clawhammer: Thanks! I'm glad you like it :-) So, I'm going to regurgitate what you said in my own words so you can confirm I understand you correctly, ok? So, 2 sets of coordinates. Tracked unit and Mouse Cursor. I could simulate the ingame map and display the x,y,z and/or the grid ref near the mouse cursor in a smallish font size so that in order to ascertain the position of something in the world, you need only hover your cursor over it's position and read the POS. As for unit tracking, I'm assuming you would to display the tracked units position on screen near the visible object?

Thanks!

bus

Share this post


Link to post
Share on other sites
Clawhammer: Thanks! I'm glad you like it :-) So, I'm going to regurgitate what you said in my own words so you can confirm I understand you correctly, ok? So, 2 sets of coordinates. Tracked unit and Mouse Cursor. I could simulate the ingame map and display the x,y,z and/or the grid ref near the mouse cursor in a smallish font size so that in order to ascertain the position of something in the world, you need only hover your cursor over it's position and read the POS.

I will check this

As for unit tracking, I'm assuming you would to display the tracked units position on screen near the visible object?

Yes! :)

Share this post


Link to post
Share on other sites

skruis, is there anything special to make Arena work ?

I installed the application (win 8.1) and started Arma with Athena as the only addon.

I then started a multiplayer game (VTS mission) on my PC using VTS. Athena can detect the right map, mission name and player when clicking on start but I don't see myself nor any units I'm spawning.

Tried the same but as just client, hosting a server (non dedi) on my second PC: still no luck.

Could you point me to what I'm doing wrong ?

Thx !

Share this post


Link to post
Share on other sites
ChuWie/Doveman: I might be able to satisfy both requests. I've re-engineered (or rather, I'm in the middle of re-engineering) the map display to load separate image files into each of the 100 grid chunks in the overall map grid. As you pan and zoom, the app determines what chunks are visible and then in a separate thread, grabs the image content and renders it in the appropriate grid chunk. It's kind of a pita to manage and it's not as smooth as having a single large image loaded into memory but this is a 2ndary app compared to the game itself so I'll have to sacrifice some chrome here and there. The trade off to this is that the original compromise I made, which was decreasing the resolution of both the Altis and Stratis maps, so that they wouldn't cause Out of Memory exceptions should now be able to be reversed and/or configurable which should allow users with higher end systems to gain a higher degree of overall quality. We'll see how it goes but I should be able to accommodate both of your requests/concerns.

Sounds great thanks, apart from being a PITA for you to manage of course!

Share this post


Link to post
Share on other sites

1212PDM.....: There shouldn't be. 1 thing that kind of annoys me (and I plan on correcting) is that the unit/group markers don't scale as you zoom out so I'm wondering if the following is happening for you:

1. Do you see a list of units in the Target Unit drop down in the lower left?

2. Have you zoomed in? By default on Altis, it's almost impossible to identify your units location if you're not tracking and you're not zoomed in (the icons don't counter scale when zoomed out ... yet)

3. Are you in 'track' mode (the track button is labeled to "UNTRACK" indicating you are currently in track mode)? Track mode simply pans the screen as the tracked unit moves around.

Chewie/Doveman: I've almost completed the rendering changes. As an example, when replaying a recording (which is basically the same as using the app while playing the game), on my PC (i7-4770k running Athena on a 1920x1200 monitor full screen), the Athena app is consuming 2% CPU (constant) and when zoomed out as far as the app currently allows showing 18% of the Altis map (18 images out of 100 are loaded and in memory), I'm currently using 250MB of RAM. About 6 zoom levels out from the closest, I'm using only 70MB. The usage (both memory and CPU) decrease as I zoom in because it's loading less 'chunks' of the map and it will be different for your systems as well because you may be running the app at a lower resolution which will display smaller portions of the map than I am. I would consider my usage scenario (full screen @ 1920x1200) to be a worst case. The CPU usage will spike as the map pans and will fluctuate pretty much in sync with your ingame speed (how fast you're moving). Whenever the Athena map is moved, the app checks to see what chunks have to be loaded. The ones that are visible are populated via separate threads for a smoother experience. Panning performance isn't as perfectly fluid as before (because it jitters as the images are loaded) but it's not bad at all, especially compared to the same solution but without the background threads. There are some slight stutters as I test panning across the map but nothing that will cause any usability issues, especially during normal play.

EDIT: Actually, I've just made another small improvement that in the same scenario: playing a recording, full screen 1920x1200, 6 steps out from fully zoomed in on Altis, The CPU usage is on average less than 0.5%.

Claw: Your requests are next in line after I wrap up the rendering changes.

Edited by skruis

Share this post


Link to post
Share on other sites

skruis,

the resuslt are a bit inconsistent:

1. most of the time, I only see the player. Is Athena able to catch units spawned by script after mission start ? Does it track all units or only units detected by the player ?

2. yes, no issue to zoom on the proper location to try to find me :)

3. yes, I'm in track mode.

Just once I manade to see some of my units: divers, once they reach the solid ground (not before). For some reason, it seems Athena, on my PC, is unable to catch what is happening in Arma, acting like it's really really slow. I'll try again today switching off the antivirus for few minutes.

Share this post


Link to post
Share on other sites

1212: Athena should catch all friendly units on an ongoing basis. There should be a data.json file in your (by default) my docs\athena\data folder. Can you zip it and send it to seankruis@hotmail.com? I 'should' be able to play that file into Athena on my workstation and potentially identify the issue.

Thanks!

bus

Share this post


Link to post
Share on other sites

I identified another localization bug and eliminated it which was causing 1212's issue. I'd like to release that bug fix sooner rather than later so for the next release, I'm going to lock the changes to:

1. Allow user to supply their own images for new (or existing) maps via an import map process (kind of a spin-off bonus from redesigning the map display functions)

2. Add additional controls for playing back recordings

3. Add support for unit locations and mouse hover locations

Hopefully, I'll have that ready some time this weekend.

Thanks,

Bus

Share this post


Link to post
Share on other sites

Just wanted to follow up. I've been wrangling with what shouldn't be a dilemma but is. With the change over to the grid image system, I've also introduced support for users adding their own map images. So, a user will be able to define a custom map that's used in arma along with a large image (up to 14k*14k) and have that map called up automatically. With those changes, there's now an import process for the map images. It takes the source image and cuts it up into 100 pieces so that when the mission starts, I can load multiple chunks at the same time via different threads w/o having to wait for a file release. So, because there's that process, there's no immediately visible way to pre-bundle the altis and stratis maps in an already imported form. How much of a pain would it be if I split up the download into an app download and then separate downloads for Stratis and Altis? Specifically, I'd want to separate them just because the current Altis image is 440MB whereas the old one was around 90MB I believe.

Share this post


Link to post
Share on other sites

skruis, personnaly, I have no issue having maps being multiple separate downloads. Do what you think is the best.

Share this post


Link to post
Share on other sites

Ok, cool. I'll put the finishing touches on it and release.

Share this post


Link to post
Share on other sites

Just wanted to provide an update: the map import functionality is ready for use. I'm sure once I release this upcoming version, you'll find something that could use improvement or is (hopefully not) completely broken but I just wanted to let you know that that part is ready.

So, I've been playing with the AiA TP lately and one of the maps is Zargabad. Via the export topography 'cheat' (http://killzonekid.com/arma-scripting-tutorials-how-to-export-topography/), I was able to have Zargabad exported, converted to a PNG and then imported into Athena in less than 15 minutes. As far as the topography export method goes, a key thing to remember is that terrain exported via this method does not include the location names (city names), hill numbers, icons (windmill, buoy, tower, etc.) and other various data that would be available on the ingame/editor maps. For the current Altis and Stratis maps, I took screenshots of the maps in the editor and stitched them together. It took hours and hours per map to get it pixel perfect so keep that in mind. The fortunate thing I guess is that if someone creates a good copy of any particular map is that they 'can' share it with others for them to import into their Athena installs. If you use the terrain export method, keep in mind that the exported image (after converting to PNG) is NOT pixel perfect. For example, Zargabad is 8192*8192. The exported image came out to something like 8193x8195. I had to use Paint.net to trim the image to get an image that matched the ingame 8192*8192 space. Again, this is something that, if the images are shared, only has to be done once but I wanted to make you aware of it in case you export terrain for maps that I haven't and as a side note, I will be making my clipped export images available for download from athenamod.com as I make them.

Also, I had previously mentioned that the image size limit is around 14k*14k. That is incorrect. That was a limitation imposed on a single object in .Net due to the way it manages memory. It is possible to use a larger image as the 'source' for the import. One thing to keep in mind though is that even though I'm breaking the image up in to 100 pieces, that depending on how much of the map is viewable via Athena via your zoom level, that will dictate how much or how little memory is used. If you load my Altis image and zoom all the way out, it will, fully zoomed out on a 1920x1200 monitor, take up around 450MB of memory on average. If you're constantly panning, forcing it to load in and out chunks, it will take up more so, yes, high res images are supported but balance that against your desired memory usage. Another thing to keep in mind is oversized images are essentially useless. In order to maintain accuracy, Athena will scale the images to match the map dimensions. So if you have a 50k*50k source image for Zargabad, that 50k*50k image is going to get resized, on the fly, to fit a 8192*8192 surface. You'll simply be eating up CPU cycles by causing Athena to scale the chunked images on the fly as they're loaded, unloaded and then reloaded.

So the process for importing a map is such: You go to File->Import Map. You specify the map name (it should match the ingame map name), the source image and the map dimensions. It'll then carve up the source image (it preserves the original) and stores the chunks in My Docs\Athena\Maps\Map Name. Once that's done, you can call up the map manually or if Athena is in 'start' mode, it will pull up the map as soon as you start a mission that takes place on that map. At this time, there isn't any logic to handle multiple instances of the same imported map so don't go importing Zargabad a billion times. If you dislike the current Zargabad map and want to re-import, delete the My Docs\Athena\Maps\Zargabad folder and then import Zargabad again. On my PC, w/ a 1TB 850 EVO SSD, Zargabad imported in less than a minute.

An interesting thought that I had after realizing the difference between the ingame map and the exported map images is that there's now a possibility to have a seriously customized map image. What I mean by that is, and I can't fully realize a situation in which this would be desirable (but that's why you're here), is that imagine you are in command of a large op and you have several subordinate PL's, SL's and TL's under your command and you've somehow persuaded all of them to buy a 2nd monitor (everyone should have a 2nd monitor anyway - its so much more efficient) and run Athena. The "BIG OP" is coming up and as part of your large ultra serious super involved plan, you break up sections of an area into various zones named Whiskey, Xray, Bus and Barley (Sorry, I don't know the right names). You could theoretically export the game map, mark it up in Paint.net, Photoshop or whatever image editing software you like, place different colored highlights over sections of the map to denote the various zones, and then distribute that map to your subordinates for them to import into Athena. Yes, a lot of that, actually, all of that can be done in the game editor which is why I'm struggling to justify a reason but it's just a bit of an example to somehow spur the imagination.

In that same vein, I'd also like to say that Athena's primary goal is to take whatever is in the ingame map and copy it to a 2nd screen interface. We're not 'there' yet and that is always going to be a work in progress but I'm also not going to limit Athena to what's 'only' in the ingame map. My overall goal for Athena is to allow you to define markers in Athena and have them propagate back into the game and to eventually allow Athena to Athena data sharing. What I mean by that is ... I have a Surface Pro 3. That SP3 has a pen which I can use to ink. What I really want is to 'ink' the map and share my 'on the fly' notes with other players running Athena in the same mission. To literally draw a proposed plan on the game map and share that. To me, that would be awesome even for my own use but if Athena proves popular, I think it'll be a killer feature (for those users that can actually use it).

Anyways, I'm going to implement the 6 digit grid stuff on the mouse cursor and the target unit and I'll release the next version.

Thanks,

Bus

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×