+1 vote

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.
enter image description here

The Player node
enter image description here

Tilemap in edit (a normal picture doesn't show up on the test play mode either)
enter image description here
Test play mode on local

enter image description here

Test play mode on remote

Godot version 3.2.3
in Engine by (18 points)

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.

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.

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

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

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.

2 Answers

0 votes
Best answer

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.)

by (59 points)
selected by

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

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.
Example:
Node2D
- 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. ^-^

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--
enter image description here

The main scene.
enter image description here

When I press play; I figured you might want to see the errors because I can't quite make sense of them.
enter image description here

The normal play test screen.

So basically the code your using for your movement is incorrect. This should be the code inside KinematicBody2D.gd, 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:
https://youtu.be/SUZpVd18IMM
Hopefully you can get it working.

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.

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?

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!
enter image description here

enter image description here

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.

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.

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.

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.

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 *.

enter image description here

enter image description here

0 votes

Hey, just press F6 instead F5... it's works for me)))

by (14 points)

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).

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.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories