Giter Club home page Giter Club logo

pico-8-highscores's Introduction

Pico-8 High Scores

How to Use

Demo

↑ - Cycle characters up/Submit score

↓ - Cycle characters down

← - Increase score/Select next initial

→ - Decrease score/Select previous initial

z - Submit initials

x - Submit score


high_score_table.update()

  • Keeps track of ↑, ↓ ←, →, z, x keyboard inputs for cycling characters and entering scores.
  • Accumulates and is applied to sin() during draw() for animation effect.

high_score_table.draw()

  • Draws high score table and initial entry.

Library

add_current_score(_value)

  • Accumulates bit shifted value in high_score_table.current_score

submit_score()

  • Inserts high score into list. For the demo this also starts initial entry state and initializes character list to default values.
  • This function likely needs to be tailored specifically for the project it is included in.

load_scores()

  • Loads high score data saved in Pico-8.
  • If no data is found, initializes high score list with default values.

save_scores()

  • Saves high score to persitant data using dset()

reset_high_scores()

  • Resets persistant high score data to default values.

get_score_text(_score_value)

  • _score_value is a scores[i].score entry in high_score_table.
  • Converts score value to string.
  • Pads score with leading zeroes.

array_to_string(_array) char_to_int(_char) int_to_char(_int)

About

This is a fork of Persistent High Score Table Demo by Grumpydev.

The original can be found at https://www.lexaloffle.com/bbs/?tid=31901

pico-8-highscores's People

Contributors

caseynord avatar

Watchers

 avatar

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.