Skip to main content

A simple library for loading animations made with SpriteFactory

Project description

pylcanim


pylcanim is a simple library for playing animations made with sprite factory

(https://github.com/craftworkgames/SpriteFactory)

Installation of pylcanim library


To install from pypi with pip

pip install pylcanim

Downloading SpriteFactory

You can directly download the executable(note: At this point this is windows only) From: https://craftworkgames.itch.io/sprite-factory Or build it yourself From: https://github.com/craftworkgames/SpriteFactory

Using SpriteFactory

You can see this video https://www.youtube.com/watch?v=DnWvmI1qBAs (time stamp in description) But the video is not pygame oriented(I will make one about it later)

Using the library

import the pylcanim into your project with

from pylcanim import pylcanim

Then initialize the library with

pylcanim.init('Path/To/Your/SpriteFactoryFile.sf')

In your main loop write

image=pylcanim.lcAnim(fpscount,row)

Where

fpscount is an integer which determines how fast your animation should run(0 is fastest and becomes slower increasingly)

and

row is the row number in which your sprite is situated(default=0 for single line spritesheets)

An entire Example

import pygame
from pylcanim import pylcanim as p

(width,height)=(300,200)
clock=pygame.time.Clock()
screen=pygame.display.set_mode((width,height))
pygame.display.flip()
running=True
p.init('run.sf')
while running:
    image =p.lcAnim(3,0)
    for event in pygame.event.get():
        if event.type==pygame.QUIT:

            running=False
    screen.fill((255, 255, 255))
    screen.blit(image, (0, 50))
    pygame.display.update()

    clock.tick(60)
pygame.quit()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylcanim-0.0.5.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylcanim-0.0.5-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file pylcanim-0.0.5.tar.gz.

File metadata

  • Download URL: pylcanim-0.0.5.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for pylcanim-0.0.5.tar.gz
Algorithm Hash digest
SHA256 a54046507a43001f2fa52aa3c8997600cd6e20baef70ac06bfb685b2abccfd3c
MD5 417fc4689088c63eb53a93dc1427973a
BLAKE2b-256 8e594d45b4a8832620d646f20852ccbd571f14101bf61edfaf2da3ed1702598d

See more details on using hashes here.

File details

Details for the file pylcanim-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pylcanim-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for pylcanim-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1bc2f66b85b7f9d0465a5626c4278642b8925fc9d34cc49235569e017c62ce4e
MD5 27a4edc3cad2f417b28dade3b88a81da
BLAKE2b-256 78214908cd6a7ff5dde3fc650dff65f59fa86258e64eff6c8f876463cf3de0c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page