Page 1 of 1

Bga globals from legacy framework

Posted: 09 March 2026, 02:18
by RavingWanderer
Is there a way to use bga globals (and perhaps more generally other features of the bga object) from a legacy X.game.php source? I'm not ready to reconstruct my game in the current framework model but accessing the bga object capabilities could serve as a useful gradual transition.

Re: Bga globals from legacy framework

Posted: 09 March 2026, 09:05
by thoun
You can access it the same way as for non-legacy Game.php

Re: Bga globals from legacy framework

Posted: 09 March 2026, 14:29
by RavingWanderer
$this->bga is either not defined or is null, I get exceptions trying to access it. (Game is Hand and Foot.)

Re: Bga globals from legacy framework

Posted: 09 March 2026, 15:56
by thoun
I replaced the extends \Table in your main class by Bga\GameFramework\Table and I was able to access $this->bga. Don't hesitate to cleanup the warnings of the Dry-run build if you can :)

Re: Bga globals from legacy framework

Posted: 09 March 2026, 17:27
by RavingWanderer
I was wondering if that was needed, but was concerned if there were knock-on effects to doing so. Thanks for looking at this.