> For the complete documentation index, see [llms.txt](https://electoriaengine.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://electoriaengine.gitbook.io/api/engine/onload.md).

# Onload

adjustments before the game engine starts

{% code title="onload.js" overflow="wrap" fullWidth="true" %}

```javascript
Engine_onload = //https://electoriaengine.gitbook.io/api/engine/onload
{
    fps:"auto",//you can select "75","vsync" or "auto" (auto = 250),
    tickrate:"11",//tickrate in milliseconds (1 is 1000/1 refresh time), "auto" 
    forcetickrate:true,//even if the computer crashes, it continues events in the background
    onlyonscreen:true,//just render what's on the screen (perfect for optomisation)
    splitelimit:"20000",//sprites on max screen
    backgroundspeed:"250",//transition speed to the next image if background is animated
    gravity:"0.9",//default physics settings
    yfriction:"0.5",//default physics settings
    xfriction:"0.08",//default physics settings
    forcepresstime:"60",//keypress fps
    autoshaders:60000//something like the shadow of the sun,If you type 0 it closes,you enter in-game time
}
```

{% endcode %}

If you say auto, the system sets it itself, if you say vsync, setInterval() forces it to the system.\
It is recommended to leave it on auto
