Python Turtle - How to make your own Sprites and Backround
Before you carry on, you must know how Turtle works, if you don't either watch videos, or read articles, or read my tutorials.
Python Turtle Module Tutorial 1 - https://repl.it/talk/learn/Python-Turtle-Module-Tutorial-1/59446
Python Turtle Module Tutorial 2 -
I used to think that Turtle couldn't add sprites, turtle can even make your own bg, I will show you how to draw and insert it in your repl file and use it, it is pretty simple if turtle is easy for you.
Make a repl and import turtle, I only know how to do this in repl, I don't think it will work on python ide, so I use repl, also import turtle
First, your going to need to draw something, I use the website "Piskel.com"
It is actually a website to make gifs or animated stuff, but it can also be a picture if you just do one frame, it has all the tools.
Setting it up
Now in turtle, the width will be 800 and height will be 600, so you got to make a sprite like 50-100 pixels, but in piskel, on the resize canvas, if you put 800, 600, it will be 1600, 1200, so if your going to make a bg, do 400, 300, I will teach you how bg works later on.
In order to change the canvas size, on the very right of piskel, there are 5 boxes, click on the 2nd one starting from top, and change the width and height to 100, our character will be 200 pixels wide and high, now finish your character (Make sure to fill all the space)!
Once your finished, on the very right again, the 4th box starting from top, (called the export box), keep it on gif, and click on download, then after a few seconds, you should get a file that has been downloaded called "New Piskel.gif", next step is easy, go back to repl, and drag the piskel file on the repl files, under main.py, hold m1 on the piskel file and drag it there, now you should see a new file on your repl, now click on it, and you will see your sprite, finish setting up your code
#Import import turtle #Setup wn = turtle.Screen() wn.setup(800, 600)
also rename the piskel file you put on repl to whatever you desire, I will call it "character.gif", keep the gif there.
now you don't want to write "character.gif", everywhere, so make it shorter do
char = "character.gif"
Now, you will need to make a Char = turtle.Turtle()
but once you do
turtle won't detect that as a shape, so you got to make it a shape, before that do
Now you made it into a shape, now you can add your character, if it didn't work, ask a question in the comments.
in order to create the bg, it will be different this time, make the piskel 400 by 300, now, when you write 400, the other will be 400, so turn of "Maintain aspect ratio"
Now just draw a backround, and import it to repl, like you did with the sprite, now rename it, and all you have to do is:
wn.bgpic((Your Background .gif name)
if reader == "liked":
print("Please Upvote if you want")
if reader == "disliked":
print("Please say why")
if reader == "confused":
print("Please ask a question")