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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pylcanim-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 7ef4331ee86cd762d4e9bc289f444512551c27c091921cc8fe9c7f6f1dc61fd6
MD5 11bf4ad81df757e4a131c950eeae02d9
BLAKE2b-256 ead88a538ed0dc384405d3be5e955bf8ffd11fe67bb930931b658a317ea6991b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylcanim-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 05f05129a2a3dcbb662734813789d2d5405bfabc1fa8098c6d7611e1812694f0
MD5 17360ecf4c978bc6bfe890e341c8e202
BLAKE2b-256 a2cdcb41a0ebf200e1a85f18d7ba39f96ea4bee4c0208bb520af7a712e3f9806

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