Help needed to review at pre-alpha stage

Game development with Board Game Arena Studio
Post Reply
User avatar
ric1950
Posts: 24
Joined: 22 January 2025, 09:06

Help needed to review at pre-alpha stage

Post by ric1950 »

This is my first game for BGA. It has been a steep learning curve but I am almost ready to apply for alpha status. There is one issue which I have not been able to resolve. The game goes into state 99 but doesn't end up at final game end screen with the scores and stats and stays on my custom scoring screen.
If there is a developer who wants to help me with this and other developers who are willing to play the game and give their thoughts it would be much appreciated. The project is junkdrawer and, as you might deduce is for the game Junk Drawer.
If anyone is interested please reply or send me a message.
User avatar
KuWizard
Posts: 327
Joined: 24 May 2018, 14:10

Re: Help needed to review at pre-alpha stage

Post by KuWizard »

I'll try to guess without looking at the code, did you overload actions/args method of state 99? states.inc.php explicitly says you shouldn't.
User avatar
ric1950
Posts: 24
Joined: 22 January 2025, 09:06

Re: Help needed to review at pre-alpha stage

Post by ric1950 »

Thanks for your input KuWizard. I do have the feeling you have nailed what the problem is - though by no means did I ignore the warning - I just didn't know what it meant.

According to my AI "assistant", when specifically asking about this:

"Yes, the standard BGA game template (proforma) and many (if not most) BGA games will indeed have that exact definition for STATE_END_GAME in their states.inc.php, including "action" => "stGameEnd".

The key point remains the interpretation of the comment "// Please do not modify":

It means do not change the fundamental properties of this state definition: keep name as "gameEnd", keep type as "manager", because the BGA framework relies on these for state 99.
It means do not try to fundamentally alter how BGA handles state 99, like trying to make it transition somewhere else using nextState from within stGameEnd, or trying to use PHP tricks to assign multiple action functions.
It does NOT mean you cannot write code inside the stGameEnd function in your .game.php file. In fact, you must put your final score calculation and database saving logic there, because that's the specific function the action key tells the framework to execute before it takes over.
So, to be perfectly clear:

Your states.inc.php definition for STATE_END_GAME is correct and standard.
Having a corresponding public function stGameEnd() in your .game.php file is correct and standard.
Putting your final score calculation and saving logic inside that stGameEnd() function is correct and standard.
This confirms that the problem is NOT with your state definition or the naming/existence of your stGameEnd function. These parts are set up exactly as BGA expects."

So, given your comment, I am still not sure if I have overloaded stGameEnd.

I have tried to put one or even two game states which handled the custom scoring but still couldn't get the end of the game working properly - even without having an stGameEnd function in Game.php. I feel it is to do with asynchronous functions not completing at the right time though I have to admit I am very hazy on my understanding of how these things work in javascript.

BTW - the game will end properly with scores and stats if I do not include stGameEnd() (and do not try to have the custom scoring)
User avatar
Fearinn
Posts: 49
Joined: 03 June 2022, 02:29

Re: Help needed to review at pre-alpha stage

Post by Fearinn »

Your AI assistant is totally wrong. AIs and the BGA Framework are definitely not a good pair, for now.

An additional state to handle the custom scoring is a good approach, so the reason why it doesn't work is probably in the code inside your state action.
User avatar
ric1950
Posts: 24
Joined: 22 January 2025, 09:06

Re: Help needed to review at pre-alpha stage

Post by ric1950 »

Thanks, Fearinn. I suspected as much. Though having said that, I could not have got to the point I have got to in the time I have without my "assistants". I find them very much better than the old way of Googling for information.

I have added the extra scoring state (as a type game) and the scoring is working - except it is not applying the expected delay to allow all the scores to display. The custom screen is shown on replay or on view final game position.

I am not a trained programmer but shouldn't the warning on the states.inc.php file be to not override the args/act methods of state 99?

The game is playing quite well so any feedback on the playability would be appreciated. There are still a few issues I have to resolve (eg - don't select the "Players Choose" option at the game start as it is not fully implemented yet) but all in all I think it is almost ready for alpha submission. Any and all comments will be appreciated.
User avatar
KuWizard
Posts: 327
Joined: 24 May 2018, 14:10

Re: Help needed to review at pre-alpha stage

Post by KuWizard »

Totally agree with Fearinn here. And not that I don't use AI when developing, no, I use it quite a lot. But without the knowledge of a very specific system such as BGA framework, it could tell you soooooo many random things which will not help or mislead you. Just beware. Not telling you "don't use AI", just be super aware.
I'm really glad my blind advice helped :)
Last edited by KuWizard on 08 May 2025, 09:17, edited 1 time in total.
Whales Entertainment
Posts: 7
Joined: 26 August 2024, 08:38

Re: Help needed to review at pre-alpha stage

Post by Whales Entertainment »

ric1950 wrote: 26 April 2025, 07:39 This is my first game for BGA. It has been a steep learning curve but I am almost ready to apply for alpha status. There is one issue which I have not been able to resolve. The game goes into state 99 but doesn't end up at final game end screen with the scores and stats and stays on my custom scoring screen.
If there is a developer who wants to help me with this and other developers who are willing to play the game and give their thoughts it would be much appreciated. The project is junkdrawer and, as you might deduce is for the game Junk Drawer.
If anyone is interested please reply or send me a message.
Hi Ric, we are a board game publisher and competent in developing software. We have developed two projects so far - The Nine Sons Of The Dragon and Safari Witness. More importantly, it also depends on your game rules and the presentation you wish to make. Let me know if you have any further needs.
User avatar
ric1950
Posts: 24
Joined: 22 January 2025, 09:06

Re: Help needed to review at pre-alpha stage

Post by ric1950 »

Hi Whales Entertainment - thanks for your offer of what I assume is paid help.
I am developing this game for the joy of doing so for the game's publisher and receiving nothing more than a couple of boxed sets of the game.
I was hoping for help, if any was forthcoming, from the BGA developers' community.
Post Reply

Return to “Developers”