Page 1 of 1

a guy in trouble

Posted: 16 January 2025, 18:13
by Dr-Samourai
Hi everyone,

I'm working on my very first project for BGA Studio, and I’ve hit a wall. At first, my game wouldn’t launch due to several PHP errors. After debugging those, I managed to get it to run. However, when I launch the game, all I see is a blank screen.

I inspected the page, and it seems only an empty HTML file is being loaded. I suspect the issue might be related to the structure or placement of my files.

Here’s the structure of my project files:
(Attach a clear screenshot or description of your folder structure here.)

Also, my module folder is currently empty. Could this be the cause of the issue?

If anyone has advice or tips, especially for debugging file structure issues on BGA, I’d really appreciate it!

Thanks a lot for ur time ! :D

Re: a guy in trouble

Posted: 16 January 2025, 19:32
by thoun
We don't see your structure, but do you use a tpl file ? If yes, try to delete it on your FTP and look at the reversi tutorial to see how to work without a tpl file. It should never show a blank screen without a tpl file.

Re: a guy in trouble

Posted: 16 January 2025, 21:01
by Dr-Samourai
Folders:
img
misc
modules (empty)

Files:
LICENCE_BGA
_ide_helper.php
constants.inc.php
dbmodel.sql
gameinfos.inc.php
gameoptions.inc.php (empty)
gameoptions.json
gamepreferences.json
material.inc.php
pcea.action.php
pcea.css
pcea.game.php
pcea.gameoptions.inc.php
pcea.gameview.html
pcea.js
pcea.view.php
pcea_pcea.tpl
states.inc.php
stats.inc.php
stats.json
version.php


Thanks for your reply! I do have a .tpl file in my project, but I’ve defined most of my templates directly in my JavaScript like this:

define([
"dojo", "dojo/_base/declare",
"ebg/core/gamegui",
"ebg/counter",
"ebg/stock"
],
function (dojo, declare) {
// Game templates
var jstpl_voteDialog = `
<div id='vote_dialog' class='vote_dialog'>
<div class='vote_title'>\${_('Choose a player to ignore for this round')}</div>
<div id='vote_buttons' class='vote_buttons'></div>
</div>
`;
// Vote button template
var jstpl_voteButton = `
<button id='btnVote_\${id}' class='vote_button'>
\${name}
</button>
`;
// Additional templates...
...

return declare("bgagame.pcea", ebg.core.gamegui, {
...
});
});
I thought this approach might bypass the need for the .tpl file entirely, but I’m still getting a white screen. Could the presence of the .tpl file, even if it’s not actively used, cause conflicts? Or is there something else I might be missing?
I give u my structure a this top of my message

I’ll check the Reversi tutorial as suggested, but if anyone has additional ideas, I’d really appreciate them!

Thanks again for your help!

Re: a guy in trouble

Posted: 16 January 2025, 22:22
by thoun
Yes, tpl is used if present and should contains header and footer tags. If you delete it, it will work.