From dc8c5398602f868f7f80f0e2b1d0ada725d30b0c Mon Sep 17 00:00:00 2001 From: Harsh Pandey Date: Tue, 23 Mar 2021 13:16:45 -0400 Subject: [PATCH] more readme updates --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0e53a2b8..76be64a3 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,9 @@ The entry point for the application's backend logic lives in the root of the `se ### Internal state -The server side state representation. +The server side representation of a single state instance. -### Initialize +### Initialize method Returns the initial internal state based on the user context and arguments. @@ -98,10 +98,16 @@ Returns the initial internal state based on the user context and arguments. Modifies internal state based on the user context and arguments. Returns a success or error result. -### getUserState +### getUserState method Maps from the internal state to the user state based on the user context. This mapping allows privacy rules to be enforced so that the user only gets the data they should have access to. +### onTick method + +Server ticks can be enabled by setting `tick: true` in `rtag.yml`. + +This method is called at a regular interval in the server and has access to the internal state. It is used for background tasks that can update the state, e.g. physics simulations etc. + ## Frontend One of rtag's most powerful prototyping features is the generated debug app, which lets you interact with your application and test your backend logic without writing any frontend code. Furthurmore, rtag provides ways to incrementally add custom presentation logic as you become ready for it.