Page 1 of 1

Stuck at the "Game Interface with BGA Cards" - Adding Dependencies in Tutorial Hearts

Posted: 04 January 2026, 19:28
by MiracleLambda72
I dont know what to do next when I reach this step. I copied the code and added close brackets but the code still not run.

"If you open cards.jpg in an image viewer you will see that it is a "sprite" image - a 15x4 grid of images stitched together, which is a very efficient way to transport images. So we will use the card manager class to mark up these images and create "card" divs for us and place them on the board.

First, we need to add dependencies in the .js file:

define([
"dojo",
"dojo/_base/declare",
"ebg/core/gamegui",
"ebg/counter",
getLibUrl("bga-animations", "1.x"), // the lib uses bga-animations so this is required!
getLibUrl("bga-cards", "1.x"), // bga-cards itself
], function (dojo, declare, gamegui, counter, BgaAnimations, BgaCards) {
return declare( // ...

Now we will remove the fake card we added (in .js file) search and remove


Then we will add initialization code of bga cards and related component in setup method after the template code and before setupNotifications"

I think there is somethings missed here. Help me.

Re: Stuck at the "Game Interface with BGA Cards" - Adding Dependencies in Tutorial Hearts

Posted: 04 January 2026, 20:05
by MiracleLambda72
log=Uncaught%20TypeError%3A%20gameModule.Game%20is%20not%20a%20constructor%0AScript%3A%20https%3A%2F%2Fstudio.boardgamearena.com%2F1%2Fheartsmaugames%3Ftable%3D827611%0AUrl%3A%20https%3A%2F%2Fstudio.boardgamearena.com%2F1%2Fheartsmaugames%3Ftable%3D827611%0ABGA%20version%20260102-1021%0AU%3Dnull%0AMozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F143.0.0.0%20Safari%2F537.36%0A&noerrortracking=true

Re: Stuck at the "Game Interface with BGA Cards" - Adding Dependencies in Tutorial Hearts

Posted: 04 January 2026, 20:25
by thoun
Where did you see these instructions?

If your main JS file is called Game.js, the way to import the lib has changed, see the wiki page for bga-cards

Re: Stuck at the "Game Interface with BGA Cards" - Adding Dependencies in Tutorial Hearts

Posted: 04 January 2026, 20:37
by MiracleLambda72
thoun wrote: 04 January 2026, 20:25 Where did you see these instructions?

If your main JS file is called Game.js, the way to import the lib has changed, see the wiki page for bga-cards
I'm study this link:
https://en.doc.boardgamearena.com/Tutor ... d_Graphics

Is there any latest tutorials? Thanks

Re: Stuck at the "Game Interface with BGA Cards" - Adding Dependencies in Tutorial Hearts

Posted: 04 January 2026, 21:03
by thoun
Reversi tutorial is always up to date, but doesn't use bga-cards.

Re: Stuck at the "Game Interface with BGA Cards" - Adding Dependencies in Tutorial Hearts

Posted: 05 January 2026, 03:48
by MiracleLambda72
thoun wrote: 04 January 2026, 21:03 Reversi tutorial is always up to date, but doesn't use bga-cards.
I'm not sure. I drop the tutorial Reversi once. How about Hearts? I need tutorials to make card game.

Re: Stuck at the "Game Interface with BGA Cards" - Adding Dependencies in Tutorial Hearts

Posted: 05 January 2026, 15:59
by thoun
I updated the Hearts tutorial a bit so it matches the new writing that is used in the Reversi tutorial.
I can't update the example repository as it is made by a volunteer dev, but I hope she'll be able to update it one day.

Re: Stuck at the "Game Interface with BGA Cards" - Adding Dependencies in Tutorial Hearts

Posted: 15 January 2026, 18:37
by Victoria_La
I cannot keep up with framework API changes. Let me know when it slows down and I will update the code in repo
thoun wrote: 05 January 2026, 15:59 I updated the Hearts tutorial a bit so it matches the new writing that is used in the Reversi tutorial.
I can't update the example repository as it is made by a volunteer dev, but I hope she'll be able to update it one day.