acemod / ACE3

Open-source realism mod for Arma 3
https://ace3.acemod.org
Other
1k stars 735 forks source link

ACE_Spectator TODO list #1781

Closed nicolasbadano closed 9 years ago

nicolasbadano commented 9 years ago

Branch: ace_spectator

SilentSpike's overhaul todo list (for 3.2.0):

For (3.3.0):

kymckay commented 9 years ago

!(_x in allMapMarkers)

Since we will be making this compatible with respawn missions then the code that moves those respawn markers will need to be totally changed anyway :+1:

kymckay commented 9 years ago

I'd propose introducing a new marker "spectator_respawn" (or similar) to handle the spectator holding position. With some code to just move players somewhere off map if it doesn't exist.

kymckay commented 9 years ago

Oh and good idea merging this for further development, I was considering the idea myself :+1:

kymckay commented 9 years ago

Created branch ace_spectator for development (and updated issue).

nicolasbadano commented 9 years ago

I'd propose introducing a new marker "spectator_respawn" (or similar) to handle the spectator holding position. With some code to just move players somewhere off map if it doesn't exist.

Sure. We can also specify hardcoded default positions for common maps. I remember a list of default pen coordinates existed on an addon by Columdrum for ACE2; we could ask permission to use those as they are.

kymckay commented 9 years ago

Actually, looking at the calculation for the pen position now it seems fine. It just shoves players off map. Which removes any possibility of the position being a problem in a mission. I'd probably change it to just be a fixed value and cut down on some of the code, but that's fine in my opinion.

The respawn markers being moved was presumably to avoid any weirdness with people spawning then being moved, but I'll take that code out anyway because it introduces more problems than it fixes (when respawn support is desired).

kymckay commented 9 years ago

Come to think of it, do all terrains start with (0,0) in the bottom left?

I simplified the pen calculation with the assumption that they do.

nicolasbadano commented 9 years ago

Come to think of it, do all terrains start with (0,0) in the bottom left?

No. There are maps that have an offset (a certain map from Iron Front comes to mind; it was discussed on the 10 digit gps thread).

kymckay commented 9 years ago

Hmm, that fixed default position should only be an issue in very edge case situations then. I'll leave it as is, but if anyone feels it's worth changing I have no objections :smile:

nicolasbadano commented 9 years ago

Hmm, that fixed default position should only be an issue in very edge case situations then

Probably. We can very well wait for gps people to solve it for us and then rip off the reward.

voiperr commented 9 years ago

@SilentSpike So how do we want to handle missions with proper respawn? Put a respawn timer in the corner somewhere? Is there a way of postponing the respawn menu?

R.e. gear: Ideas for preventing players from drowning without scuba gear? Maybe make a PFH to setPosASL the player floating in air (network overhead?) or attachTo a static object with an offset above the water?

nicolasbadano commented 9 years ago

Maybe make a PFH to setPosASL the player floating in air (network overhead?)

Yes, that would create large network overhead.

attachTo a static object with an offset above the water?

That'd should probably work.

Another random solution would be to actually put spectators inside bloody submarines. TBH I'm in love with that idea. It'd would also be hilarious if the respawn point is on land, but it'd still work.

kymckay commented 9 years ago

@voiperr The respawn system is up to missions designers, what's needed to allow for that is just plenty of flexibility. What I'd personally consider necessary for this:

kymckay commented 9 years ago

On top of that, we could develop some configurable standard respawn systems (wave respawn, life pool, etc.) as quality of life improvements for users. Though that's me planning a little far ahead :wink:

kymckay commented 9 years ago

Another random solution would be to actually put spectators inside bloody submarines.

Read my mind :grinning:

I've also been considering a PFH to setOxygenRemaining 1 and figuring out a way to override the vision blurring.

kymckay commented 9 years ago

Hmm, there is another possible solution:

We could delete the player unit and cache all of it's details (so that it can be recreated upon respawn). However this might not be handled well by external scripts.

Edit: Hell we could add a spectator unit to switch into, would also be an easy way to identify spectators without locality trouble. I wonder if doing so would break any other ace systems.

nicolasbadano commented 9 years ago

We could delete the player unit and cache all of it's details

That could be problematic; IDK if we can trust radio spectator modes working without the player existing.

kymckay commented 9 years ago

without the player existing.

Would this be a problem if we switched into a virtual spectator unit?

voiperr commented 9 years ago

Wouldn't just assigning a public objectVar be simpler?

kymckay commented 9 years ago

For checking if a player is a spectator sure, but a virtual unit could bring some advantages (and solve multiple birds with one stone) if it wouldn't cause issues elsewhere.

I'm just spit balling though, I'm not going to change the code unless it's an immediate solution/improvement or an agreed design decision.

kymckay commented 9 years ago

So, good news everyone: hideObjectGlobal actually disables collision too in A3. So we technically don't even need to move spectators out of the way on respawn (which would also happen to make the rest of the code more simple).

voiperr commented 9 years ago

I've seen a few mission scripts use area proximity detection for whether to count players for various reasons. I still think it's prudent to throw them out of the map area.

kymckay commented 9 years ago

Hmm, that's a good point, triggers could also act unexpectedly as a result :+1:

So yeah, probably need to move them regardless.

kymckay commented 9 years ago

I've implemented a basic spectator enter/exit function in ff4fce39501ab0938f8d791b4a59d2da4a4bf1d7

Submitted PR #1783 to implement method of handling object hiding into ace_common (see comment in the code as to why).

kymckay commented 9 years ago

RE: Drowning, we could put the units high in the air and enableSimulation false them?

kymckay commented 9 years ago

Well I tested that and it works, but...something went wrong with the camera script and I'm unsure if it's related

kymckay commented 9 years ago

Okay so I think because the player is being moved so far off map the game is running out of memory and crashing. Introducing optional marker "ace_spectator_respawn" to define an explicit position and avoid that problem.

Currently it'll just use [0,0,0] if the marker doesn't exist, which should avoid potential issues with triggers and things well enough for now. Once the GPS people get something done we can explicitly use the bottom corner.

kymckay commented 9 years ago

I think we should consider just removing the view distance slider.

It feels a little out of place (and redundant) to me having it in the spectator interface.

voiperr commented 9 years ago

Streaming/screenshots/etc would benefit from it. I'm making it optional via module.

nicolasbadano commented 9 years ago

Streaming/screenshots/etc would benefit from it. I'm making it optional via module.

Keep in mind that we have a viewdistance module already, and the plan is to include keybinds to up/down the viewdistance at any given time (those keybinds are not added yet). Maybe that could serve the same purpose here.

voiperr commented 9 years ago

Aren't there plans for VD restriction, though? Some mission makers might want it so spectators can see further than living players.

nicolasbadano commented 9 years ago

Aren't there plans for VD restriction, though?

There's already a configurable (optional) viewdistance restriction. We could add independent restriction distances for playing vs spectating players on that same module.

voiperr commented 9 years ago

VD done: https://github.com/acemod/ACE3/pull/1789

voiperr commented 9 years ago

Oops, still a few left (I blame notepad++): https://github.com/acemod/ACE3/pull/1791

voiperr commented 9 years ago

Keybindssssssss: https://github.com/acemod/ACE3/pull/1794

kymckay commented 9 years ago

All that's immediately left to do is get the enter/exit system to a reliable state and do some cleanup.

There are further enhancements to be made, but we can work on those after this.

nicolasbadano commented 9 years ago

Yup. Keep in mind that entering/exiting spec mode needs to bind/unbind keys now too

kymckay commented 9 years ago

:+1: Good call, I'm gonna clean that stuff up in a bit

kymckay commented 9 years ago

@voiperr May I ask what purpose the "killed" EH serves exactly?

voiperr commented 9 years ago

@SilentSpike Local EH applied to remote units. As soon as they die, updates the tracking array, exits POV if inside that unit, and provides a death message (if markers are on). Could be inherited to base class via XEH, but I thought it would be cleaner if the "CheckUnits" PFH applies the Killed EH only when spectator is actually used.

@esteldunedain For respawn missions or all missions? Are we allowing players to exit spectator on permadeath missions...?

kymckay commented 9 years ago

I mean the one in postInit :)

voiperr commented 9 years ago

Handles when player initially dies, then applies in case player somehow dies in pen (unlikely) or hits respawn button in menu. No reason it can't be a function. :wink:

kymckay commented 9 years ago

Isn't it redundant though? All of those things seem to be handled on respawn as far as I can tell

voiperr commented 9 years ago

The hearing update and fadeout, the fade to black, all need to start on player death (assuming we're keeping those (I think we should keep the sound one, at least)). Group joining could go to respawn.

kymckay commented 9 years ago
kymckay commented 9 years ago

My todo for tomorow:

kymckay commented 9 years ago

Taken care of some respawn stuff, haven't pushed as I'm in the process of cleaning up the display configs.

kymckay commented 9 years ago

ace_spectator now essentially supports respawn. The framework is there, but I plan to add more ease of use functionality into it.

First I want to clean up the interface code/config though. Already made good progress on the config but it's not quite in its final form.

kymckay commented 9 years ago

Oh, there are also some errors present in the interface code I'll have to take a look into.

kymckay commented 9 years ago

Considering stripping out the time acceleration functionality as it seems a little like feature creep, any thoughts?

It's only really useful in single player, but then you'd only enter the spectator mode via script in SP anyway as either a result of:

  1. The mission designer - who presumably wouldn't want you messing with time acceleration.
  2. Yourself - who presumably could execute the necessary commands manually as desired.

Is our design intent for ace_spectator to be multiplayer-centric?