thmsndk / Screeps3D

A 3D client for the MMORTS Screeps.com
89 stars 17 forks source link

[Idea] Cinematic Mode #39

Open thmsndk opened 5 years ago

thmsndk commented 5 years ago

bonzaiferroni#13

In Cinematic mode, the camera will cycle through rooms, zooming in on features like the spawn, sources, and controller. This will be a passive way to view what is happening in screeps, and will require no player interaction. It should also be controllable via console output.

#client-abuse Ability to control cinematic mode by console output from your ai, perhaps an ability to control cinematic mode by creep.say

ssmith151 commented 5 years ago

One note on the Ability to control cinematic mode by console output from your ai since the screeps token has full api access and the c sharp api has memory availablity, it would be possible to just have a memory item for and array of rooms / things to keep track of too.

AlinaNova21 commented 5 years ago

Using Memory would likely be problematic, can only read memory once per second, and if you also have stats setup, you would have to have it adjusted to not rate limit. Using console is much simpler, since then you just watch through the websocket

thmsndk commented 5 years ago

@ssmith151 great idea, but @ags131 does raise a valid point, if anyone has any ideas for this feature both the cinematic mode itself and the client-abuse related to it. Feel free to post them so we can discuss them :) heck even the things I just listed in the initial post are up for debate, it's just what I thought would be neat on top of what bonz already suggested.

ssmith151 commented 5 years ago

How often did you need to create data/access it for the cinema mode? My thought was setting it (possibly with a list of owned rooms in game and maybe adding to creep.attack prototype to store rooms with recent combats) very sparingly, caching it in c sharp and reading it only to get key waypoints for the flyby, possibly once every loop is complete.

thmsndk commented 5 years ago

Well, I guess that depends on, how often your ai would want to #client-abuse the cinema mode. console.log does not use any memory either, i'm not sure how much memory people have to spare for such things.

In regards to what rooms to fly to for PVP, we currently have the PVP Spectate implemented that pulls data from the api/experimental endpoint.

thmsndk commented 5 years ago

49

thmsndk commented 5 years ago

If we utilize memory, it would allow clients like screeps-cap and other users that are not spawned in, and thus does not have running code on the server to have an effect on the cinematic mode.

thmsndk commented 5 years ago

ags utilizes a mapstats query to get a list of all users over a large area /api/game/map-stats https://github.com/ags131/screeps-cap/blob/master/index.js#L447-L476