Changes between Initial Version and Version 1 of Atlas_-_Real-time_Editing


Ignore:
Timestamp:
Feb 23, 2008, 4:18:58 AM (16 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Atlas_-_Real-time_Editing

    v1 v1  
     1== Overview ==
     2The normal 'design' and 'test' modes exist, but are different from most games in that the test mode allows jumping backwards/forwards in time (in a similar way to recorded games), and all the editor's features are still available while testing.
     3
     4The reason is to blur the distinction between editing and testing, to allow much faster iteration. If you're playing a scenario and notice that a trigger has incorrect timing, or a river crossing is too narrow, or there aren't enough trees nearby, you can immediately fix it and then carry on playing with the updated map.
     5
     6The implementation doesn't require many new features from the engine - it mainly relies on the same systems as recorded games, saved games, and synchronised network play, which will have to be implemented anyway.
     7
     8It is a superset of the normal design/test cycle, so users are not forced to use the extra complexity if they don't want to.
     9
     10
     11== Details ==
     12
     13The editor can be in one of two modes:
     14
     15 * Design
     16 * Test, with two submodes:
     17  * Play - similar to the normal game
     18  * Edit - similar to the design mode
     19
     20
     21Data can be categorised as:
     22
     23 * Static data - time-independent
     24  * Triggers
     25  * Players
     26  * Civ tech tree
     27  * Diplomacy
     28  * Playlist
     29  * Cinematics
     30  * Name, description, instructions, author, etc
     31 * Dynamic data - time-dependent. (Initial state is specified; future states are calculated deterministically)
     32  * Entities
     33  * Nonentities (may be deleted by building placement)
     34  * Terrain (may be autoflattened by building placement)
     35  * Lighting (may be changed by triggers, particularly for pretty cinematics)
     36
     37
     38The world has an ''initial state'', containing all the static data and the initial states of the dynamic data.
     39
     40The world also has many ''dynamic states'' (each at a different time) and a continuous ''input recording''. The dynamic state at time 0 is solely based on the initial state. The dynamic state at time ''t''+''dt'' is calculated from the dynamic state at ''t'' followed by a deterministic simulation-update of length ''dt'' with the appropriate section of the input recording.
     41
     42The dynamic state is equivalent to the data that is used when saving the game or when resyncing over the network - it must include JS state, GUI state, as well as all the static data and the current state of all dynamic data.
     43
     44The input recording is equivalent to the data that is used for recorded games.
     45
     46Any dynamic state can be calculated from the initial state, the current time, and the input recording up to that time; but that is probably not particularly fast, so the dynamic states are cached at occasional intervals (e.g. every few seconds) (compressed so that it uses a sensible amount of memory). The user can jump backwards and forwards (and the game will calculate from the nearest cached state), play (in the 'play video' sense, rather than 'play game'), fast-forward, etc.
     47
     48
     49When editing static data:
     50 * In design mode, things are easy.
     51 * In test-edit mode, changes will either:
     52  * be easy, e.g. when editing the scenario's instructions; or
     53  * invalidate all cached dynamic states, e.g. when editing a player's initial resources; or
     54  * invalidate cached dynamic states after a specific point, e.g. when editing the effects of a trigger but not editing its conditions (since it can't affect the simulation before it is first triggered).
     55
     56When editing dynamic data:
     57 * In design mode, the initial state is edited, and things are easy.
     58 * In test-edit mode, the current and future dynamic states are invalidated.
     59
     60
     61When dynamic states are invalidated, it means they no longer correspond to `simulate(initial_state, t, input[0..t])`. To avoid disrupting the user unnecessarily, they will simply be marked (probably in red on the timeline), and no immediate action is required.
     62
     63At any time, the user can:
     64 * delete all invalid states and restart the simulation from the last valid state, either automatically (using their original inputs) or manually (recording the inputs again).
     65 * mark the states as 'acceptable', if they wish to clear the warning without having to do any work.
     66 * mark a given state as 'acceptable' and delete all subsequent states, and resimulate them (as above).
     67 * ignore the warning.
     68
     69(The difference between 'acceptable' and 'valid' is that the 'valid' states are known to exactly match the deterministic simulation, while 'acceptable' states probably don't but the user has stated that they don't care about the possible differences.)
     70
     71The aim is to achieve a balance between correct simulation and user convenience - they will often not care that their new hill would have slightly affected all pathfinding since the beginning of the game, and will just want to carry on playing/editing the map. They would, however, care if they were convinced their map was fine when actually they had stuck a lava pit underneath the starting position of their army.
     72
     73
     74In test mode, the user can choose to play the game (in test-play mode), in which case they can make use of normal inputs; the game will be storing the input recording and valid dynamic states.
     75
     76The input recording is exactly equivalent to recorded games and replays, and it would make sense to make it compatible - if someone is playing a scenario and finds a bug, and they have been recording the game, they can send it back to the scenario's designer, who can then open it directly in Atlas, fast-forward to the appropriate point, see the problem, rewind, make minor edits the scenario, then go into test-play mode and see if it's now fixed.