Game films#505
Conversation
|
TODO CONT'D:
|
| "ALTER TABLE games ADD COLUMN properties TEXT ", | ||
| "ALTER TABLE games ADD COLUMN spawn_order INTEGER ", | ||
| "ALTER TABLE games ADD COLUMN frame_time INTEGER ", |
There was a problem hiding this comment.
I'm torn on spawn_order here. I think we have pretty much settled on using the hybrid setting for games so I think maybe it should be left out of this table and perhaps added to properties? I assume properties would capture one-off settings for a game? And ideally spawn_order is something you can override in an ALF file for a level.
Also, setting the frame_time implies that it can't be changed during a game. I'm actually fine with that limitation but some code might have to change to ensure that frame_time isn't changed during a recorded game (or maybe any game, nobody is changing that setting any more).
There was a problem hiding this comment.
Properties was at first going to be a list of the players, but then I added a players table. I was going to store some of these attributes in there. But then I decided not to involve JSON serialization if I could just make more columns on these tables. Everything so far fits pretty easily, I left it in just in case.
re: frameTime, if we want to support changing it, I think we can capture the ConfigPlayer packet and mirror the frame changes in the recording. This setting is just for the starting frameTime. But I think it probably also makes sense to lock it down per-game. It makes for a really cool demonstration of variable fps but in practice switching between them is whiplash.
|
|
||
| OSErr CAvaraAppImpl::LoadLevel(std::string set, std::string levelTag, CPlayerManager *sendingPlayer) { | ||
| SDL_Log("LOADING LEVEL %s FROM %s\n", levelTag.c_str(), set.c_str()); | ||
| if (itsGame->itsFilm->HasUnflushedFrames()) itsAPI->RecordFrames(itsGame); |
There was a problem hiding this comment.
Need a way to enable/disable saving game recordings, like a check against kSaveGameRecordings, off by default?
There was a problem hiding this comment.
Instead I would like to have it keep the last N games, lets say 30 by default, rotating out the oldest film that isn't marked to be saved explicitly. A value of 0 would mean to never rotate out any games (record and keep all).
I do think recording is something that should be enabled by default but I'm willing to hear opposing arguments.
I'm planning to leave the updates to game metadata in place, but remove the function tables from the database and only save them in files, then I'm going to focus on playback. After playback is working, and some tests for serialization are in, I plan on integrating zlib + zstr. That way we can wrap the input/output streams for some compression. Using macOS "compress file" on the binary film reduced it from 100kb to 15kb for a minute of (~3500) player frames. |
First prototype of game films
TODO:
I wanted to get this reviewable ASAP. There are around ~3k frame function tables, or about 90kb of database, per player per minute of game.