Nothing but the player shows up in test play mode

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ProbablyConfused

I posted a similar problem earlier, but after it was answered the problem still hasn’t been resolved. I also determined that it isn’t just the tilemap that doesn’t show up–it’s everything but the player. I have screenshots this time, too.

The Player node

Tilemap in edit (a normal picture doesn’t show up on the test play mode either)

Test play mode on local

Test play mode on remote

Do you have collisions on you tilemap ? If yes, then go to Debug > Visible Collision Shape and see if the collision shapes are appearing. Also have you tried switching to Gles3 instead of 2.

Scavex | 2021-02-06 13:43

I do have a few collision objects in the tile set, if I remember correctly; but I placed them down and the objects nor collision shapes appear. I don’t know what Gles3 means, so I probably haven’t tried switching yet.

ProbablyConfused | 2021-02-06 19:20

See on the top right corner. You’ll see GLES2 there. Change it to GLES3. See if you see your tiles after that. It’s a just a speculation I have

Scavex | 2021-02-06 19:44

All right, I tried switching but even afterwards the tiles don’t show up.

ProbablyConfused | 2021-02-06 21:24

Alright then the person who answered your question is right. It appears you haven’t set the main scene as your default scene. You have probably set your player scene as default scene. Kindly follow his instructions to fix this.

Scavex | 2021-02-07 06:59

:bust_in_silhouette: Reply From: Good-Boi McLovin

I’m working in 3D so I could be wrong here.
But it looks like your running the wrong scene which is understandable since Godot will run the first scene you make setting it as the main. If you look when you play test its running Calla Lillies scene when it should be running MainScene.
Check under: Project > ProjectSettings > Application > Run > MainScene and make sure that the scene you want to run on playtest is selected.
Sorry if I’m wrong I hope it works for you.
(Edit for grammar love typing on phone. Heh.)

That worked! The player won’t move anymore and nothing’s centered, but at least the tilemap’s showing up now. Thank you!

ProbablyConfused | 2021-02-07 13:37

Glad to hear! The player won’t move eh?
Again I’m in 3D and I don’t have access to your workflow but gliding through your pictures, one possible issue I see is in the second image I can see that your main scene contains a tilemap and a player node, unless you changed the name for some reason, under the main scene you should have your tile node as is, but below that you should actually have your Calla Lilies scene, you put scenes inside scenes kinda like organizational units or folders.

  • TileMap (this is fine I think)
  • Player (This should be the CallaLilies Scene, or the Calla Lilies scene should be below this, unless you renamed it to Player?)
  • (Not sure about the camera being here, in 3D we attach the Camera to the character’s scene, so maybe attack a camera to Calla Lilies Scene.)

Hopefully this helped. ^-^

Good-Boi McLovin | 2021-02-08 07:31

The Calla Lilies scene is the player scene–the full thing is “Calla Lilies Child.” I moved the camera to the character’s scene, but the player still doesn’t move (the player is in the center now, though).
Screenshots since I’m able–

The main scene.

When I press play; I figured you might want to see the errors because I can’t quite make sense of them.

The normal play test screen.

ProbablyConfused | 2021-02-08 21:32

So basically the code your using for your movement is incorrect. This should be the code inside, which is attached to your character sprite. Since I’m not dealing with 2D I can’t say I can help that much, I would recommend following this tutorial, this seems like it’ll be about what you’d want:
Hopefully you can get it working.

Good-Boi McLovin | 2021-02-09 02:20

Sorry it took me a while to respond. I watched the video and copied what code I could, but I might have messed something up while deleting the previous code–I deleted apart of the code, saved, then tried to play test it, but now it’s just giving me a black screen. I added the new code but it still only shows a black screen.

ProbablyConfused | 2021-02-11 15:30

Unusual, I can only recommend posting images or files of your code and structure. It’s hard to debug someonelses project when you can’t see any of it. If I had to guess, you could maybe be running the wrong scene again? Maybe. Are there any errors under output towards the bottom of the screen? If so post them too, I assume there has to be if your just getting a black screen now. You possibly delete your camera by accident?

Good-Boi McLovin | 2021-02-14 01:02

Sorry ^.^’ I’m not extremely accustomed to asking for this kind of help. I’ll eventually learn to post screenshots regularly. I typed in the code as the video told me to, but even afterwards it doesn’t show up. The coding’s probably still wrong. Thank you for continuously helping me, though; it’s very much appreciated!

ProbablyConfused | 2021-02-14 01:24

Hey sorry for the late reply Godot emails go in my spam for some reason and I’m busy on my own 3D project. Its hard to say what’s going on here make sure you followed that tutorial deliberately. But if I had to guess a var can’t be stored like an array, maybe it should be var movement = Vector2(2,0), uhm. But thats why the game is showing a black screen is because of your error. If godot receives an unhandled error thats considered problematic it won’t let the game start.
Hope this helps a little.

Good-Boi McLovin | 2021-02-23 23:11

Can confirm that var should be a vector2(0,0), if your confused about what vector is, its how godot and many other game engines handle movement of anything in a space, vector is 3D and vector2 is 2D, a vector in simple forms represents a sort of, point in space, in vector2() the first number represents the x Coordinate which you can imagine being horizontal lines across your screen. The second number is the y Coordinate which you think of being vertical lines across your screen. In 3d its a bit more complex because of the third dimension, it uses three numbers for x,y,z. There’s a lot to be covered on vectors and vector math, but right now its important to know that if your doing movement you need a vector. I did have an image on my phone here of the tutorials code but uh. Guess I can’t upload it via phone.

Good-Boi McLovin | 2021-02-23 23:22

I can understand being busy and such; I’m completely okay with late replies. Thank you for the help; however—and I might just be a little tired or slightly dense—I still can’t get it to show up anything but a black screen. I added Vector2 before the (0,2), and tried several combinations for coordinates but the screen still shows up black.

ProbablyConfused | 2021-02-24 00:13

There must be an error elsewhere then, and it should be vector2(0,0) since you can think of that being the default position the player by moving will automatically change those numbers. At about 3:40 the tutorial i sent you shows his code snippet for movement. Post any other errors you might be getting, programming is a bit of a struggle and takes time to get used to and learn. Copy what he has exact except variable names those can be what you want. And I haven’t watched the video myself but I imagine he explains it line by line. Often adjusting one error can lead to other errors. So if you fix something wait a bit to see if anything else is highlighted red, it’ll save you time from trying to run the game over and over.

Good-Boi McLovin | 2021-02-24 00:35

I made sure the code is put in like the video guide says, and I made sure that I have it as (0,0). I had it put in right, so I didn’t change anything–there are a few errors that show up, though. Both screenshots refer to a misplaced *.

ProbablyConfused | 2021-02-24 23:54

:bust_in_silhouette: Reply From: TheEpicCoder

Hey, just press F6 instead F5… it’s works for me)))

I don’t know what problem this is meant to solve, but regardless all I see now is a black screen when I try to play test the game. I’m thinking that I majorly messed up the coding or there’s something I’m not seeing regarding something (both of which are very possible).

ProbablyConfused | 2021-02-20 17:56

This solves your original problem. F6 runs the current scene your editing. F5 runs the main scene. Keep in mind when you package and export your game it will run the main scene first.

Good-Boi McLovin | 2021-02-24 01:15