Access speed option

Game development with Board Game Arena Studio
Post Reply
User avatar
Nanaki404
Posts: 47
Joined: 18 November 2013, 16:28

Access speed option

Post by Nanaki404 »

Hello fellow developers !

Is there any way to access the speed option (Realtime fast, normal, slow, turn-based...) during a game ?

Here is why I'd like to get this option info :
You know how automatic actions and animations during game have to be slowed down "manually" so that players can understand what is going on.
But at the same time, if animations are too slow, expert players may become bored and complain, while newer players will get lost if it's too fast.
So I thought "Why not adapt the animation speed to the clock game speed ?", because beginners will probably use slow speed (if realtime) while experts will often prefer fast. Thus, animations could be faster in realtime-fast games, than in realtime-slow games, and everyone would be happy.
I don't know what to choose for turn-based though, but a slightly slower animation than realtime-slow could do it, and identical for each turn-based option.

Cheers !
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

Re: Access speed option

Post by Victoria_La »

If you want to implement user side options you can actually do it though user preferences, I suggest to not bind it to game speed since lets say turn-based has nothing to do with animation speed. I believe I added info to wiki explaining how to add user-side preference option (http://en.doc.boardgamearena.com/Game_o ... ns.inc.php)
User avatar
Inaofr
Posts: 142
Joined: 26 March 2020, 22:26

Re: Access speed option

Post by Inaofr »

I find out that game speed option is accessible through the table_globals, as global 200. In php:
$speed_option = $this->gamestate->table_globals[200];
The result is a string, with value "0" for real-time fast, "1" for normal "2" for slow, "10" for fast turn-based . 24 moves per day, "11" for 12 moves per day,...

The base time is global 8, the extra time is global 9. The result is a string in seconds.
The game mode is global 201, the result is a string with value "0" for normal, "1" for training. This one is indeed already documented in the wiki: http://en.doc.boardgamearena.com/Game_o ... ns.inc.php (for detecting if ELO is OFF).

I don't know if these values are stable, they may change with studio updates.

Does someone know if these data are stable ?
Post Reply

Return to “Developers”