Page 1 of 1

Couple noob questions (accessing all 10 dev logins and accessing game database)

Posted: 06 September 2020, 05:06
by PurplishCat
I recently created my dev account (noob alert!) and am trying to work through first steps and Reversi tutorial (not web dev expert... yet).

1) On the First steps with BGA Studio page it says, "Choose one of your 10 accounts (ex: myusername0), and login into the website - as you would do for Board Game Arena." How exactly do you choose one of your 10 accounts? When I use the email+pw I see I get logged in as my username+0, which is fine for one account (I can also choose my username+0 and enter my password and login that way), but how do I login as the 1-9 accounts? When I try and enter my username+1-9 w/ the same password it fails. The increasing penalties for login attempts with wrong password are becoming painful...

2) The Reversi tutorial (and the database page) recommends clicking the "Go to game database" button and designing database there. Clicking that takes me to a phpMyAdmin login page. How do I login? The username/pw I use for studio.bga does not seem to work for phpMyAdmin.

Bonus questions (not blockers but more general web dev questions if you're feeling charitable...):
3) If I upload a changed client-side file (e.g. .jpg/.png, .js) what's the easiest way to actually get the new version to download when testing? Check the disable cache button in debugger and reload? That re-downloads everything, but at least works. Just wondering if there's a better way that doesn't require going into debugger.

4) What's the easiest way to debug scripts that run when page loads? For example to debug the setup function. If I set a breakpoint on DOMContentLoaded (most promising idea I could find from a Google search), the user interface js appears to not actually be downloaded yet. If I wait until the page finishes loading/displaying (setup has already run), then set a breakpoint in setup and refresh the page, the breakpoint is removed as part of the refresh. I've tried this on both latest Chrome and Firefox.

Thanks!

PS: Are these sort of questions are ok to ask here?

Re: Couple noob questions (accessing all 10 dev logins and accessing game database)

Posted: 06 September 2020, 06:04
by hersh
1) that should work, but you can also mimic another user in the active game by clicking the > arrow next to the player name in the game panel.

2) there’s another username / password for MySQL. It should be in the welcome email. I think it might be the same as the sftp.

3) I click disable cache or Ctrl-f5 to re-download assets

4) can set a breakpoint in dev tools. I use “debugger;” in Js source code. I find it easier then breakpoint. Just remember to remove it before deploying.

Re: Couple noob questions (accessing all 10 dev logins and accessing game database)

Posted: 06 September 2020, 15:46
by pickardj79
Quick note. Myself having worked through the tutorials just recently, there are some missing pieces and a couple things "wrong" for each of them. I had made a list for the last one (Gomoku) but never took the time to (1) verify them, or (2) update the wiki. On the minus side it was annoying to have a tutorial that wasn't complete. On the plus side the debugging work was a great learning exercise. Actually, I'll add the Gomoku list here, just to get it into out there...

* Missing stCheckEndOfGame
* Game state transition from playerTurn is stonePlayed, should be playStone
* When playing stone, gmk_stone class needs to be added to intersection
* Intersection stones don’t show up, remove position: absolute?
* Comment out reattribute colors based on preferences
* updateCounters in .js not implemented[/list]

Re: Couple noob questions (accessing all 10 dev logins and accessing game database)

Posted: 06 September 2020, 17:06
by PurplishCat
hersh wrote: 06 September 2020, 06:041) that should work, but you can also mimic another user in the active game by clicking the > arrow next to the player name in the game panel.
Yeah, I understand I can click on users to open as them in new tab, but it doesn't help for testing from a different machine, particularly with different people. Surely we don't expect testers to each have their own studio account?

Edit: I just found the answer. Passwords are in the welcome email!
hersh wrote: 06 September 2020, 06:042) there’s another username / password for MySQL. It should be in the welcome email. I think it might be the same as the sftp.
Yes and yes. Thanks!
hersh wrote: 06 September 2020, 06:043) I click disable cache or Ctrl-f5 to re-download assets
I did not know about ctrl-F5. Perfect!
hersh wrote: 06 September 2020, 06:044) can set a breakpoint in dev tools. I use “debugger;” in Js source code. I find it easier than breakpoint. Just remember to remove it before deploying.
Yeah, can use debugger statements in js code, but that seems like unnecessary code churn just to get debugger to break before setup runs. Seems like there ought to be a way to debug the code without changing the code.