Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by SILENCE

Hi all,

I baked my game without any error and I have "game.min.js"
In "index.hrml", Paths to "lib/xxx" have been replaced with "game.min.js" path

but the game is still dependent to "lib/impact" folder. I found some path information in baked file:
lib:'lib/'

what is the problem?

1 decade ago by dominic

How did you come to this conclusion? Is there an error message in the console about unloaded/missing dependencies, or what exactly happens when you try to load th game?

Having the path information ( lib:'lib/' ) in the baked .js is normal; it's just not used.

Can you upload your game (the baked version) somewhere so we can have a look?

1 decade ago by SILENCE

Thank you for your prompt response dominic.

Nothing happens when I try to load the game, just the gray HTML5 frame showing up.

There is no error in the console:
loading E:\xampp\htdocs\impact\lib\impact\impact.js
loading lib/impact/loader.js
loading lib/impact/image.js
loading lib/impact/font.js
loading lib/impact/sound.js
loading lib/impact/system.js
loading lib/impact/timer.js
loading lib/impact/input.js
loading E:\xampp\htdocs\impact\lib\game\main.js
loading lib/impact/game.js
loading lib/impact/impact.js
loading lib/impact/entity.js
loading lib/impact/animation.js
loading lib/impact/collision-map.js
loading lib/impact/map.js
loading lib/impact/background-map.js
loading lib/game/levels/shooter.js
loading lib/game/entities/gun.js
loading lib/game/entities/stone.js
loading lib/game/entities/bound.js
writing game.min.js

baked 20 files: 272.6kb -> 244.4kb

Sorry but currently it's not possible to upload the baked file.

1 decade ago by dominic

I meant the browser's error console. Does it show a JavaScript error when loading the game?

Otherwise, hard to say what's going on without an error message or being able to poke around. You could try to disable the minification in bake.php - maybe there's an issue with that.

// in bake.php, line 11 change this:
$baker = new Baker( Baker::MINIFIED );

// to:
$baker = new Baker( Baker::PLAIN );

10 years ago by Rungo73

Hi @dominic

As above, I have this trouble too. My minified file still has dependency on
"lib/impact" folder.

I get errors in console..

GET <1> game.min.js:141
Uncaught Failed to load module impact.loader at lib/impact/loader.js required from impact.impact game.min.js:141
GET <2> game.min.js:141
Uncaught Failed to load module impact.system at lib/impact/system.js required from impact.impact game.min.js:141

etc and so on for all the impact modules.

Any ideas why?

10 years ago by Joncom

@Rungo73: Try baking a fresh copy of Impact that has not yet been modified in any way. If you can bake that, then there's likely an issue in your game code. If not, then maybe there's a step you're not quite following correctly.

10 years ago by nightbyter

Hey,
have you changed the index.html?

<script type="text/javascript" src=“game.min.js"></script>

nightbyter

10 years ago by Rungo73

@nightbyter and @Joncom

Thanks for the responses - appreciate that someones out there!

Worked it out - I was baking in my wamp folder on another drive and had changed the bake.bat file paths to match but I've found if I moved my project folder to my desktop and left the file paths as is its all good.

Baked and all worked as it should. Phew.
Page 1 of 1
« first « previous next › last »