Giter VIP home page Giter VIP logo

ljvmiranda921 / sprites-as-a-service Goto Github PK

View Code? Open in Web Editor NEW
300.0 4.0 19.0 2.12 MB

Generate your personal 8-bit avatars using Cellular Automata, a mathematical model that simulates life, survival, and extinction

Home Page: https://ljvmiranda921.github.io/sprites-as-a-service

License: MIT License

Python 41.18% Makefile 2.01% Dockerfile 2.19% JavaScript 6.96% Vue 47.66%
cellular-automata avatar-generator vuejs fastapi python nuxtjs sprites pixel-art

sprites-as-a-service's Introduction

Github Pages Cloud Run Frontend CI Backend CI

Try the interactive demo here โœจโœจ

I do not authorize the use of anything generated by this project for the selling of NFTs. ๐Ÿ™…โ€โŒ

Sprites-as-a-Service is an open-source web application that allows you to generate custom 8-bit sprites using Cellular Automata, particularly Conway's Game of Life. Generate a unique sprite given a text, and control extinction and survival rates. In addition, you can also access the generator via a REST API. Use it for your chat app or games!

The frontend is made with Vue.js (with Nuxt.js) whereas the backend is done using Python and FastAPI.

You can also read my creative process and motivation for building this app in my blog

Running the development server

The easiest way to run Sprites-as-a-service locally is via docker compose. First, clone this repository:

git clone [email protected]:ljvmiranda921/sprites-as-a-service.git

then build the images:

cd sprites-as-a-service
docker-compose build

This will then build two images, sprites-backend and sprites-frontend, for the backend and frontend services of the web app. You can then run them with the command:

docker-compose -d up

You should be able to see the application running at localhost:8080. Close these services using:

docker-compose down

Production server and deployment

The frontend demo application is currently deployed in my website. I first generate a static website using Nuxt's npm run generate, then serve it on Github pages. To see the frontend deployment procedure, I encourage you to check .github/workflows/gh-pages.yml.

On the other hand, the backend service is deployed in Google Cloud Run. I first build the image found in ./backend/Dockerfile and deploy them to GCP. Check .github/workflows/cloud-run.yml for more information.

I highly-encourage you to use the Docker images published in this repository. You might not need the frontend component itself, but the backend can be deployed as a microservice.

docker pull docker.pkg.github.com/ljvmiranda921/sprites-as-a-service/sprites-backend:latest

Notable Implementations

  • @danielgjackson has a pure-Javascript port for Sprites-as-a-Service. From that he made Infinite Sprites! I encourage you to check it out and spend your hours looking at them!
  • @yurkth created Sprator, a GUI application that generates sprites using cellular automaton. Here, you can set a seed, base & background colors, and size!

License

The content of this project itself is licensed under the Creative Commons Attribution 4.0 license, and the underlying source code used to generate the sprites and build the website is licensed under the MIT license.

sprites-as-a-service's People

Contributors

deepsource-autofix[bot] avatar deepsourcebot avatar dependabot[bot] avatar ljvmiranda921 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sprites-as-a-service's Issues

Improve Hue Shifting for generated Sprites

We can improve the generated colors we some bit of Hue shifting. I'm not sure how I can implement this in matplotlib's colormap. Ideally, we shouldn't be choosing three random colors. Instead, we just generate a base color, then shift the hues 2-3 times. (One from the left and the other on the right).

This is definitely a nice-to-have, and I might do this in the future, not in POC

Fix versioning for backend and frontend

Currently you have multiple versions scattered in your

backend/**/main.py
frontend/**/package*.json

Not sure if bumpversion will work here, but maybe you can setup a script file to do a bumpversion for you

Implement code snippets via a Tablist

It may be nice to have something like this: https://cloud.google.com/bigquery/docs/quickstarts/quickstart-client-libraries#client-libraries-install-ruby

We can implement this via a Tab: https://www.w3schools.com/howto/howto_js_tabs.asp
This should definitely take the config as an input, then outputs the code snippet based on the viewed language. Our code snippets can then be: cURL, Go, Python, Javascript

Also, in our design, we planned to have it side-by-side with the explanation of each parameter. So on the left pane we have the parameter explanations, then on the right pane we have the tablist. The Issue for the parameter explanations will be covered by #24

Update README.md

  • What is this about?
  • How to deploy?
  • How to run locally?
  • How tu run tests?

Add Routes for About and API Docs

API Docs link to Redocs, About is another page that links (in the future) on your Behance writeup, postscript blog post, and a short description of your motivation and whatnot

How to use these images as avatars on websites?

Hi! The icons generated by this application are very nice ๐Ÿ˜„

I'm like to use a few of them as avatars for projects in GitLab/Codeberg (GitHub-like sites where you can associate an avatar to a repository).

I'm not sure where I should put the attribution as required by CC Attribution, can you give some hints if this is an allowed thing to do?

Create a project walkthrough on Behance

I think this may be a good entry for Behance, assuming that you get to execute and implement this properly. You can start talking about your inspiration, how you designed various components (logo, buttons, sliders) and more. The goal is to talk about your design process and how you achieved that.

Runtime warning on matplotlib

RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (matplotlib.pyplot.figure) are retained

Implement dumb components

Background

Now that we've written the meat of the website, it's now time to just add all of the text aesthetics. Sure, there might be some sort of logic in a way (e.g., pulling the latest release from Github and copying over the Changelog), but ideally these should be simple textboxes.

Todo

(Unimplemented) BaseHeader.vue

  • TheHeroHeader: "Sprite-as-a-Service"
  • SubHeader: "Generate 8-bit Avatars using Cellular Automata!"

SpriteController.vue

  • SpriteControllerCTA: "Like it, love it? Leave us a star on Github!"

SnippetDisplay.vue

  • SnippetDisplayDocs: Parameter description table
  • SnippetDisplayCTA: "Read more in the documentation"

(Unimplemented) TechnicalNotes.vue

  • TechnicalNotesLicensing.vue
  • TechnicalNotesChangelog.vue: just manually write this for now

Write content

  • Parameter Description
  • Changelog (how to do this?)
  • Code samples
  • Add URLs for parts that need to have URLs (/documentation, links to Licenses, Github links, buy me a coffee)

How to do the Changelog

Description: this is the first release v1 of Sprite-as-a-Service, notable changes:
... Still not sure how to do it

Write a personal blogpost on building Sprite as a Service

If Behance is more of a creator's way of walking through his inspiration and design process, the blogpost should be more of a postscript. It should answer the following questions:

  • Why did you decide to do this?
  • What's the motivation behind all the work?
  • What have you learned in Frontend web dev and design?
  • Any new learnings along the way? (e.g. ideas being in the adjacent possible, some sort of serendipity, meta-learning or how I learn to learn)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.