Screeps3D
Screeps3D copied to clipboard
[Idea] Cinematic Mode
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.
- [ ] Cycle through owned rooms
- [ ] Cycle through enemy rooms
- [ ] Cycle through rooms with PVP
- [ ] random zoom to POI objects (spawn,sources, controller..?)
- [ ] fly-through room combine zoom and "random" navigation around a room for a while
- [ ] patrol/fly-through base generate a path between all your rooms making an entire "loop" letting it fly / patrol around it
- [ ] "Random" selection of units to show "interesting" details on the side panel
#client-abuse Ability to control cinematic mode by console output from your ai, perhaps an ability to control cinematic mode by creep.say
- [ ] Go to room (perhaps utilize room links #24 , where the type="cinematic")
- [ ] Go to position in room
- [ ] follow creep
- [ ] rotate around object
- [ ] "save" patrol/fly-through route
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.
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
@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.
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.
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.
#49
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.
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