Black Preview Screen

After I added a sprite, my preview screen turned black and stayed black until I deleted it. It seemed that the issues began happening when I went into Piskel to rotate the sprite so that it was accurate with the auto rotate in the Top/Down Movement behaviour.

Next time it happens, press ctrl + shift + i, click on console and check for any error messages (in red). They should give you a clue to whats going on.

Aslo, you can open the project manager icon (top left under file) click on game settings > resources. Then right click on the list of resources, and select “remove resources with an invalid path”.

The only error I get was the app not being able to find an image I deleted from the project files a few hours before the error happened, and the image isn’t even used anywhere in the project. I doubt this error is causing the problem, as scrolling up reveals that the error has been happening long before the black screen problem began happening.

Well, I got rid of the resource, but it didn’t help anything. I checked the console in the actual project window, and got this.

Then why mention it in the initial post?

Can you post a snip of your events? It may be you’re referencing something that isn’t right (are you using the word “variables” anywhere? Or is there a semicolon that shouldn’t be there?

Here’s the best way to make this easy: I haven’t used any events or variables whatsoever, consider it talent :stuck_out_tongue_winking_eye:
I also haven’t used java yet either.

Oh, the image I’m talking about is an old texture for a sidewalk, not related to the sprite in any way.

So use that ‘talent’ to work it out for yourself then. If you won’t share a screen snip of your events, then don’t expect us to be able help you. We would be flying blind. And that’s of no use to anyone.

1 Like

OK, sheesh.

Please don’t be rude, it doesn’t help in any way.

Just jesting by throwing it back at ya :wink:

Anyway, what are the “inf” settings for acceleration and deceleration? My understanding is it’s meant to be a number.

I wanted the character to less glide and have more of an instant start/stop, so I just essentially spammed 9, but when I clicked out it just replaced it with “inf”. And it did indeed work for a bit, but when I went back in to rotate the sprite, that’s when I got the black screen.

Edit: I also tried setting the numbers to 0 at one point but it just stopped moving, so yeah.

Ah ok, it’s all good! :grin:

Can you give a screen snip of the error messages when you press ctrl + shift + i?

Already posted it here!

Please wait 1-2 seconds when you upload a file like an image, otherwise, the image isn’t visible. I fixed it in your previous post.

Did you edit the project file manually?
Did you add a JS event that you wrote?

If you can send us the file game.json, I’ll check if the project is valid because the error isn’t common.

1 Like

Lemme answer everything.
First, the image didn’t load because I forgot the ! before the image name (I think I deleted it by accident).
For the next two questions, I did neither.
For the last question, I’ll show you, also again, the JS is not modified, it would just be something wrong with the actual app (like a small bug or something)

{
  "firstLayout": "",
  "gdVersion": {
    "build": 99,
    "major": 4,
    "minor": 0,
    "revision": 0
  },
  "properties": {
    "adaptGameResolutionAtRuntime": false,
    "folderProject": false,
    "orientation": "landscape",
    "packageName": "com.example.gamename",
    "pixelsRounding": true,
    "projectUuid": "9c072d94-e233-4635-a70d-e71eb0166e4d",
    "scaleMode": "nearest",
    "sizeOnStartupMode": "adaptWidth",
    "useExternalSourceFiles": false,
    "version": "1.0.0",
    "name": "Project",
    "author": "",
    "windowWidth": 160,
    "windowHeight": 90,
    "latestCompilationDirectory": "",
    "maxFPS": 60,
    "minFPS": 20,
    "verticalSync": false,
    "platformSpecificAssets": {},
    "loadingScreen": {
      "backgroundColor": 0,
      "backgroundFadeInDuration": 0.2,
      "backgroundImageResourceName": "",
      "gdevelopLogoStyle": "light",
      "logoAndProgressFadeInDuration": 0.2,
      "logoAndProgressLogoFadeInDelay": 0.2,
      "minDuration": 1.5,
      "progressBarColor": 16777215,
      "progressBarHeight": 20,
      "progressBarMaxWidth": 200,
      "progressBarMinWidth": 40,
      "progressBarWidthPercent": 30,
      "showGDevelopSplash": true,
      "showProgressBar": true
    },
    "authorIds": [],
    "extensionProperties": [
      {
        "extension": "AdMob",
        "property": "AdMobAppIdAndroid",
        "value": ""
      }
    ],
    "platforms": [
      {
        "name": "GDevelop JS platform"
      }
    ],
    "currentPlatform": "GDevelop JS platform"
  },
  "resources": {
    "resources": [
      {
        "alwaysLoaded": false,
        "file": "road.png",
        "kind": "image",
        "metadata": "",
        "name": "road.png",
        "smoothed": false,
        "userAdded": false
      },
      {
        "alwaysLoaded": false,
        "file": "building.png",
        "kind": "image",
        "metadata": "",
        "name": "building.png",
        "smoothed": false,
        "userAdded": false
      },
      {
        "alwaysLoaded": false,
        "file": "sidewalk.png",
        "kind": "image",
        "metadata": "",
        "name": "sidewalk.png",
        "smoothed": false,
        "userAdded": false
      },
      {
        "alwaysLoaded": false,
        "file": "sidewalk2.png",
        "kind": "image",
        "metadata": "",
        "name": "sidewalk2.png",
        "smoothed": false,
        "userAdded": false
      }
    ],
    "resourceFolders": []
  },
  "objects": [],
  "objectsGroups": [],
  "variables": [],
  "layouts": [
    {
      "b": 209,
      "disableInputWhenNotFocused": true,
      "mangledName": "New_32scene",
      "name": "New scene",
      "oglFOV": 90,
      "oglZFar": 500,
      "oglZNear": 1,
      "r": 209,
      "standardSortMethod": true,
      "stopSoundsOnStartup": true,
      "title": "",
      "v": 209,
      "uiSettings": {
        "grid": false,
        "gridType": "rectangular",
        "gridWidth": 32,
        "gridHeight": 32,
        "gridOffsetX": 0,
        "gridOffsetY": 0,
        "gridColor": 10401023,
        "gridAlpha": 0.8,
        "snap": false,
        "zoomFactor": 4.419999999999997,
        "windowMask": false
      },
      "objectsGroups": [],
      "variables": [],
      "instances": [
        {
          "angle": 0,
          "customSize": true,
          "height": 90,
          "layer": "",
          "locked": false,
          "name": "NewObject",
          "persistentUuid": "75eebd05-6659-4360-adce-ad930c1467cf",
          "width": 48,
          "x": 56,
          "y": 0,
          "zOrder": 1,
          "numberProperties": [],
          "stringProperties": [],
          "initialVariables": []
        },
        {
          "angle": 0,
          "customSize": true,
          "height": 90,
          "layer": "",
          "locked": false,
          "name": "NewObject2",
          "persistentUuid": "ae9da2e4-a0f7-49fb-ab77-adb64112990f",
          "width": 42,
          "x": 118,
          "y": 0,
          "zOrder": 2,
          "numberProperties": [],
          "stringProperties": [],
          "initialVariables": []
        },
        {
          "angle": 0,
          "customSize": true,
          "height": 90,
          "layer": "",
          "locked": false,
          "name": "NewObject2",
          "persistentUuid": "34b92274-4e8a-4c5d-8178-4975c5439dc7",
          "width": 42,
          "x": 0,
          "y": 0,
          "zOrder": 2,
          "numberProperties": [],
          "stringProperties": [],
          "initialVariables": []
        }
      ],
      "objects": [
        {
          "height": 32,
          "name": "NewObject",
          "tags": "",
          "texture": "road.png",
          "type": "TiledSpriteObject::TiledSprite",
          "width": 32,
          "variables": [],
          "effects": [],
          "behaviors": []
        },
        {
          "height": 32,
          "name": "NewObject2",
          "tags": "",
          "texture": "building.png",
          "type": "TiledSpriteObject::TiledSprite",
          "width": 32,
          "variables": [],
          "effects": [],
          "behaviors": []
        }
      ],
      "events": [],
      "layers": [
        {
          "ambientLightColorB": 0,
          "ambientLightColorG": 0,
          "ambientLightColorR": -2147483600,
          "followBaseLayerCamera": false,
          "isLightingLayer": false,
          "name": "",
          "visibility": true,
          "cameras": [
            {
              "defaultSize": true,
              "defaultViewport": true,
              "height": 0,
              "viewportBottom": 1,
              "viewportLeft": 0,
              "viewportRight": 1,
              "viewportTop": 0,
              "width": 0
            }
          ],
          "effects": []
        }
      ],
      "behaviorsSharedData": []
    }
  ],
  "externalEvents": [],
  "eventsFunctionsExtensions": [],
  "externalLayouts": [],
  "externalSourceFiles": []
}

There is nothing wrong with the project you shared, it is correct.

The only way I have found to get the same error is as you said by spamming the 9 to get an inf.

By setting a reasonable number the bug disappears.
I will forward the issue to the developers.