Defold Black Screen

Hi folks, I know that this has been extremely useful for me before, so I thought id ask here again. I have made a 3D game in Defold (I know its primarily a 2D engine with 3D capabilities), but when i try to build my game i get a black screen. I have spent countless hours searching through similar posts, and have tried the suggestions, but i still get the same result. I’d be eternally grateful if someone could take a look, and suggest how to have a working game. Thank you so much
Archive.zip (1.0 MB)

The zip archive doesn’t contain all files:

My apologies. Here (hopefully) should be the full project. Thank you

Hello @Jackpot2992 I took a quick look at your Archive.zip project . First thing I did a quick build and got the error message.

Which tells me that you are using 3d models in your project and the material needs changed. Took a look at the models and noticed you are using the built-in materials for model. So I copied the material and pasted it into your project and then changed the vertex space to “world” and applied it to all your models. So that got rid of that error and I moved on to try and find out why the screen is “black” for you.

So I then took a look at the camera script that was attached to it in main collection and noticed -

  • go.property("viewDistance", 0)

setting the cameras view distance to 0 may be one of your issues here as 3d scene need some distance. So I up-ed the setting to 1000 did a build and was able to see your scene. Though now when I start the game another issue reveals itself as the camera begins a descent downward leaving the scene behind into abyss of darkness. :stuck_out_tongue:

Thank you so much for the quick response. I’ve noticed that I get the error each time I open up the project, and end up changing it every time.

I didnt notice that, thank you so much. I will work on getting the falling camera issue sorted. Thank you!

1 Like

My guess is that the camera is attached to an object with dynamic physics OR that it follows a falling object.

Agreed , and there is most likely no collision mesh/components to prevent the fall.

It is attached to a kinematic object (the player), and the map is set to a static object. I have the groups and the masks set correctly as far as I can tell. Do you mind taking a look at it? Thanks

The game doesn’t start:

INFO:ENGINE: Initialised sound device 'default'
DEBUG:SCRIPT: NOTE: rendercam - No active camera found this frame...using fallback camera. There will be no more warnings about this.
INFO:DLIB: SSDP: Started on address 192.168.0.126
DEBUG:SCRIPT: Unloaded	url: [loader:/go#menuproxy]
ERROR:GAMESYS: Failed to create Model component. Material vertex space option VERTEX_SPACE_LOCAL does not support skinning.
WARNING:RESOURCE: Unable to create resource: /map/walls/wall.modelc: NOT_SUPPORTED
ERROR:GAMESYS: Failed to create Model component. Material vertex space option VERTEX_SPACE_LOCAL does not support skinning.
WARNING:RESOURCE: Unable to create resource: /main/friendlies/player/character.modelc: NOT_SUPPORTED
ERROR:GAMESYS: Failed to create Model component. Material vertex space option VERTEX_SPACE_LOCAL does not support skinning.
WARNING:RESOURCE: Unable to create resource: /main/friendlies/player/character.modelc: NOT_SUPPORTED
WARNING:RESOURCE: Unable to create resource: /_generated_d7ed88c5.goc: NOT_SUPPORTED
ERROR:GAMEOBJECT: Could not instantiate game object from prototype /_generated_d7ed88c5.goc.
INFO:DLIB: SSDP: Done on address 192.168.0.126

Thats another annoyance I get. I have to go into model.material and change vertex space to World. It always resets to local, and I don’t know how to get around this

Have you made a copy of the (read only) builtin material?

2 Likes

I wonder if moving the material to a new folder, renaming the copy of the material (as well as the fp/vp), and re-aiming it’s references to the new folder would help.