Flame package adding a simple scrolling sprite to make it easy to repeat the same image over time.

Overview

Pub Build Status

Flame Scrolling Sprite

Flame Scrolling Sprite is a Flame package to make it easy to render sprites that scrolls and repeat itself forever given a velocity.

This can be used to create things like an scrolling background, or even create scenes, bellow you can see one example of this:

train

This package can be used by using the plain class ScrollingSprite or the ScrollingSpriteComponent, they do example the same thing, but the later can be used together with Flame component system.

Bellow you can find all the parameters that the classes receives

    //// Resource path of the sprite
    @required String spritePath,

    //// X and Y coordinate do be used to map the sprite
    double spriteX = 0.0,
    double spriteY = 0.0,

    //// Width and height of the mapped sprite
    double spriteWidth,
    double spriteHeight,

    //// Destination width and height of the sprite, in case you want to scale its original size
    double spriteDestWidth,
    double spriteDestHeight,

    //// Width and height of the total area where the sprites will scroll
    double width,
    double height,

    //// Vertical and horizontal speed of the scrolling speed in pixels per second
    this.verticalSpeed = 0.0,
    this.horizontalSpeed = 0.0,

    //// Since the sprites are scrolling on an endless manner, the sprite can be draw outside of its
    //// area, by default, the package already clips the area to prevent it from showing, use this flag to change
    //// this behaviour
    this.clipToDimensions = true,

When using the ScrollingSpriteComponent the same paramenters above apply to it, and additionally, you can inform the x and y where the area will place placed.

For a live example of this running, please refer to the example folder.

You might also like...

Warrior Runner - Game made with Flutter and Flame game engine

Warrior Runner - Game made with Flutter  and Flame game engine

Warrior Runner - Game made with Flutter Demo and Screenshot Flutter Version Used : 1.22.4 flame: 0.29.3 hive: 1.5.0-pre Learing Resources: Create a Mo

Oct 10, 2022

Team Dexters(yeah, I came out with a name .) Flame Game Jam repo

flame_game_jam_dexters Credits Image assets Flame Images: https://github.com/flame-engine/flame Ghost: https://master-blazter.itch.io/ghostspritepack

Nov 2, 2021

A game powered by Flutter and Flame

A game powered by Flutter and Flame

Flutters About Flutters is a demo game powered by Flutter and Flame. I wrote it to test out its performance and gaming capabilities and decided to ope

Jan 3, 2023

Td - FreeDefense Game with Flutter and Flame

Td - FreeDefense Game with Flutter and Flame

td from https://github.com/cloudseasail/free_defense Some change , added Bloc fo

Jun 24, 2022

Little Super Mario game developed with Flame in Flutter

First Game Generated by the Very Good CLI 🤖 A Very Good Project created by Very Good CLI. Getting Started 🚀 This project contains 3 flavors: develop

Aug 10, 2022

A Dart Tiled library. Parse your TMX files into useful representations. Compatible with Flame.

Tiled Dart A Dart Tiled library. Install from Dart Pub Repository Include the following in your pubspec.yaml: dependencies: tiled: 0.8.1 Usa

Oct 31, 2022

A Dwarf game made with Dart, Flutter and Flame

Dwart Generated by the Very Good CLI 🤖 Dwart game Getting Started 🚀 This project contains 3 flavors: development staging production To run the desir

Jun 11, 2022

🦖 🦖 🦖 Flutter 2D runner game using Flame engine.

🦖 🦖 🦖 Flutter 2D runner game using Flame engine.

t_rex_flame T-rex is the 2D game where you play as a cute little t-rex using Flame engine. All you need do it avoid being hit by enemies too many time

Dec 13, 2022

Game Flutter Using Flame.It was for the Game Jam 2022

binarymemory Memory Binary Flame Flutter Game Jam Getting Started This project is a starting point for a Flutter application. A few resources to get y

Sep 7, 2022
Comments
  • Update flame's version package

    Update flame's version package

    Could you please update flame's version on this package?

    Because every version of flame_scrolling_sprite depends on flame ^0.18.1 and aliengame depends on flame ^0.22.0, flame_scrolling_sprite is forbidden.
    So, because aliengame depends on flame_scrolling_sprite ^0.0.1, version solving failed.
    pub get failed (1; So, because aliengame depends on flame_scrolling_sprite ^0.0.1, version solving failed.)
    Process finished with exit code 1
    
    opened by d-apps 0
Owner
Flame Engine
2D game engine built on top of Flutter
Flame Engine
A simple 2D multiplayer online game built using Flutter and Flame engine

Club Penguin Introduction ?? Club Penguin A multiplayer game involving penguins and anonymous chat in a virtual 2D world Before we start, you can take

Sanjeev Madhav 67 Dec 24, 2022
Dungeon Fantasy - A simple RPG game built with Bonfire and Flame engine

dungeon_fantasy A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Nguyen Minh Dung 1 Dec 28, 2021
Break Guns Using Gems is a fast paced side-scrolling platformer with innovative controls and a gun-related twist.

BGUG Break Guns Using Gems is an open-source mobile game for Android and iOS. It's a fast paced side-scrolling platformer with innovative controls and

Fire Slime Games 86 Nov 12, 2022
Cyberpunk-inspired puzzle game prototype created with Flutter and Flame #Hack20 #FlutterHackathon

Ghost Rigger Prototype of a cyberpunk-inspired puzzle game set in a dystopian future: In the year 2078, the megacorporation Native Development Initiat

Float like a dash Sting like a dart 184 Dec 26, 2022
An awesome list that curates the best Flame games, projects, libraries, tools, tutorials, articles and more.

Awesome Flame A curated list of games, libraries, and articles related to the Flame Engine for Flutter. Flame is a minimalist 2D game engine for Flutt

Flame Engine 650 Jan 9, 2023
A game powered by Flutter and Flame

Flutters About Flutters is a demo game powered by Flutter and Flame. I wrote it to test out its performance and gaming capabilities and decided to ope

Florentin / 珞辰 184 Jan 8, 2023
Game RPG build by Flame Flutter

Darkness Dungeon Game developed for the purpose of testing the use of the Bonfire package! Download APK Used packages: Bonfire - Flame - Used sprites:

Rafael Almeida Barbosa 254 Jan 3, 2023
An example Flutter app showing how to easily integrate with Flame games

space_burger A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Erick 4 Jun 4, 2021
Mason templates for the Flame Engine

Flame Bricks ?? ?? Flame Bricks is a collection of Mason's templates to help people bootstrap classes for the Flame engine. How to use To learn more a

Flame Engine 22 Oct 9, 2022
Ember 8 is a Fantasy Console built on top of Flutter/Flame

Ember 8 Ember 8 is a Fantasy Console built on top of Flutter/Flame. It will feature an editor to create games and a console app to play the created ga

Erick 12 Oct 21, 2022