Among Us Character Animation In Python With Source Code !


If you are familiar with the Python Programming Language then You would know surely know about the Turtle module in Python. Turtle is a amazing module in Python using which we can create amazing animations. Turtle module is usually used to make the kids interested in learning  the Python Language. But it is not only restricted to the kids even we can use the turtle module and create some good animation. 

I have created the animation of the famous Among Us video game character. Below is the source code for creating the animation of the character. You can copy the code and try the animation.


ANIMATION:



SOURCE CODE:

import turtle

BODY_COLOR = 'skyblue'
BODY_SHADOW = ''
GLASS_COLOR = '#9acedc'
GLASS_SHADOW = ''

s = turtle.getscreen()
t = turtle.Turtle()

# it can move forward backward left right
def body():
""" draws the body """
t.pensize(20)
#t.speed(15)

t.fillcolor(BODY_COLOR)
t.begin_fill()

# right side
t.right(90)
t.forward(50)
t.right(180)
t.circle(40, -180)
t.right(180)
t.forward(200)

# head curve
t.right(180)
t.circle(100, -180)

# left side
t.backward(20)
t.left(15)
t.circle(500, -20)
t.backward(20)

#t.backward(200)
t.circle(40, -180)
#t.right(90)
t.left(7)
t.backward(50)

# hip
t.up()
t.left(90)
t.forward(10)
t.right(90)
t.down()
#t.right(180)
#t.circle(25, -180)
t.right(240)
t.circle(50, -70)

t.end_fill()


def glass():
t.up()
#t.right(180)
t.right(230)
t.forward(100)
t.left(90)
t.forward(20)
t.right(90)

t.down()
t.fillcolor(GLASS_COLOR)
t.begin_fill()

t.right(150)
t.circle(90, -55)

t.right(180)
t.forward(1)
t.right(180)
t.circle(10, -65)
t.right(180)
t.forward(110)
t.right(180)

#t.right(180)
t.circle(50, -190)
t.right(170)
t.forward(80)

t.right(180)
t.circle(45, -30)

t.end_fill()

def backpack():
t.up()
t.right(60)
t.forward(100)
t.right(90)
t.forward(75)

t.fillcolor(BODY_COLOR)
t.begin_fill()

t.down()
t.forward(30)
t.right(255)

t.circle(300, -30)
t.right(260)
t.forward(30)

t.end_fill()


body()
glass()
backpack()

t.screen.exitonclick()

You can also check out my YouTube channel  where you will find more amazing videos related to the Turtle module in Python.

Feel free to contact us if you have any queries regarding the content.

Post a Comment

Feel free to contact us if you have any queries regarding the content.

Post a Comment (0)

Previous Post Next Post