Cant preview my game

I just downloaded the Game Develop engine and it looks amazing. I’ve been doing the tutorial, The only problem is - I can’t preview my game.
I use Chrome, and when I press preview button it opens a new window in chrome and the address is localhost:2828 - it’s just black page no loading no nothing.
also, I’m just moving from Construct 2 engine which is very similar and this has been working flawlessly.

I tried restarting my browser and opening as Administrator nothing helped.

-I use windows 7 64bit
-It’s a 5Html Project, And when I tried to view the “3DRacingGame2Player.gdg” it’s working but not in the browser, its a built-in preview.
-If I start a new Project and do not add anything just press Preview I see a grey background but if I add any sprite then try to preview I see nothing

one last thing I tried not adding Sprites and added extensions and Text and it did work. Something is wrong with the sprites… when I add any sprite objects the project turns black and wont show anything. (Even if I delete them and revert back to only text, I see nothing after adding a sprite to the project)

Anyone have a solution?

Can you export a project that does not work ? Click on File > Export to the web. When exporting is done, send me the whole folder containing the game.

Try also these games and let me know if they are working:
compilgames.net/games/AngryPeasExample/
compilgames.net/games/WebShoot/
compilgames.net/games/WebSoldier/
compilgames.net/games/EnhancedTutorial/

One last thing, which browser are you using?

Thanks for the reply!

I can view and play all the game links you gave me. plus the last one is the tutorial I was following.

The weird thing is, when ever i used sprites in a project I cant preview it at all. I tried reinstalling Game Develop and restarting my computer either didnt work.

here is the download link of the exported project: wikisend.com/download/912612/Project.rar

Ok, it is because assets are stored in a folder on your desktop and they are not copied when previewing the game.
For now, be sure to always store the assets in your game folder ( or eventually in a sub directory of your game ) and everything will be ok :slight_smile:

1 Like

Ohh thank you! I would never have get that one on my own :blush:

I wonder why the engine does not copy the assets automatically… anyways big thanks!:slight_smile:

The engine copies automatically the assets if they are located by a relative filepath.

Yes, when the assets are stored in a folder relative to the game file, GD tries to keep the directory structure. Here, the assets are stored on the desktop and the game is in a folder on the same drive, so GD refers to the assets using relative filenames. ( …/…/Desktop/assets/image.png for example )
When the game is exported, GD tries to keep this structure but it does not work as GD does not have the right to create a folder in another location than the folder where the game is exported I think… Anyway I’ll try to change this behavior. :slight_smile:

Whats a relative filepath?

Am I to understand I’m speaking with the creator of this software? Awesome work man!!

A relative path is a path which is relative to a folder. For example :

../test.txt

refers to the file text.txt of the parent directory (represented by “…”) of the current folder.

folder1/test.txt

refers to the file text.txt of the the sub-folder “folder1” of the current folder.

In GD’s case, the paths are relative to the project folder.

That should be ok for the next version, the directory structure of the assets won’t be preserved when previewing/exporting a game ( i.e: everything will be copied in the game directory ) so no more problem. :slight_smile:
EDIT : Done, see version 3.1.60

Thanks! :slight_smile:

you sir have saved me a lot of trouble thankyou