diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-01-19 10:57:25 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-01-19 10:57:25 +0000 |
| commit | dd21ae1bc7a648138d33727628983a3b25a07570 (patch) | |
| tree | caf87523cda90c3a0fb235ea6e642765136d3f88 /src/engine/docs | |
| parent | 4eb71856948077b4c0cf9b5ef7178075433b7259 (diff) | |
| download | zcatch-dd21ae1bc7a648138d33727628983a3b25a07570.tar.gz zcatch-dd21ae1bc7a648138d33727628983a3b25a07570.zip | |
large commit. documented a bit. editor updates. general cleanup of everything
Diffstat (limited to 'src/engine/docs')
| -rw-r--r-- | src/engine/docs/client_time.txt | 4 | ||||
| -rw-r--r-- | src/engine/docs/prediction.txt | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/engine/docs/client_time.txt b/src/engine/docs/client_time.txt new file mode 100644 index 00000000..24ca2be5 --- /dev/null +++ b/src/engine/docs/client_time.txt @@ -0,0 +1,4 @@ +Title: Time on the client + +tick, intratick +predtick, predintratick diff --git a/src/engine/docs/prediction.txt b/src/engine/docs/prediction.txt new file mode 100644 index 00000000..d5771d1a --- /dev/null +++ b/src/engine/docs/prediction.txt @@ -0,0 +1,19 @@ +Title: Prediction + +The engine calls <modc_predict> when reprediction is required. This happens usally when new data has arrived from the server. <modc_predict> should to prediction from the current snapshot and current snapshot tick (<client_tick> + 1) upto and including the tick returned by <client_predtick>. + +Predicted input sent to the server can be retrived by calling <client_get_input> with the corresponding tick that you want the input for. Here is a simple example of how it might look. + +> void modc_predict() +> { +> int tick; +> prediction_reset(); +> +> for(tick = client_tick()+1; tick <= client_predtick(); tick++) +> { +> MY_INPUT *input = (MY_INPUT *)client_get_input(); +> if(input) +> prediction_apply_input(input); +> prediction_tick(); +> } +> } |