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://youtu.be/mSakKpmBjrg (time stamp in description)

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.7.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.7-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pylcanim-0.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 d3ecdff4de22a03ab375da7eeee9c64f87f1f2cb60af54c35edc41b74cb861cb
MD5 a71b2fda44664b42e4363db30ed0d59a
BLAKE2b-256 d6f6d9a6f82b6c23ba33418c85e5f2071d310c25117ce7d900b37f3f7a4005e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylcanim-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6f369fe233dfb2f68f62c852ece53601d54425d8e3bfd30438f2bc8580143a02
MD5 63c6555b3346fc30d478f90127a815f4
BLAKE2b-256 b15c7a705a47fb1445c55a9c50e2552d803965fc4c43122f42ae6cd83dd3fe64

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