Functions Used

  • draw_text(): This function is used to draw text to the screen using Pyglet’s label.

Syntax: arcade.draw_text(text, x, y, color, size, width, align, font_name)

Parameters:

text: Text we want to display

x : x coordinate

y : y coordinate

color : color of the text

size : Size of the font

width : Width of the text

align : Alignment of the text

font_name : Name of the font

  • Camera(): The Camera class is used for controlling the visible viewport.

Syntax: arcade.Camera( width , height, window)

Parameters:

width: width of the viewport

height: height of the viewport

window: Window to associate with this camera

  • Scene(): A class that represents a scene object.

Syntax: arcade.Scene(sprite_lists , name_mapping)

Parameters:

sprite_lists: A list of SpriteList objects

name_mapping: A dictionary of SpriteList objects

  • PhysicsEnginePlatformer(): Simplistic physics engine, used for platform.

Syntax: arcade.PhysicsEnginePlatformer( player_sprite , platforms, gravity, ladders)

Parameters:

player_sprite: sprite of the player

platforms: The sprites it can’t move through

gravity: Downward acceleration per frame

ladders: Ladders the user can climb on

Python Arcade – Adding Enemies

In this article, we will learn How we can add enemies in arcade.

Similar Reads

Adding Enemies

To add enemy to our game we are going to follow the below steps:...

Functions Used:

draw_text(): This function is used to draw text to the screen using Pyglet’s label....

Sprites Used:

...

Killing the Enemy

...

Contact Us