A set of functions compatible with the TIC-80 platform

Overview

Pygame-80

pygame80

A set of functions from TIC-80 tiny computer platform ported to Pygame 2.0.1. Many of them are designed to work with the NumPy library to improve performance and per pixel access.

Some of the highlights of using this library are:

  • TIC-80 friendly
  • Highly customizable (any screen resolution, different screen modes, any number of audio channels, custom FPS)
  • Python as programming language
  • Practically no memory restrictions regarding the number of assets that can be used (code size, tilesets, spritesheets, music, sfx, color palette)
  • Expandable with the use of modules and libraries
  • Support of multiple audio and image formats

Dependencies

pip install pygame
pip install numpy

To run the demo program, you can use Thonny IDE or GNU/Linux shell or Windows shell

  • Thonny IDE: Open pygame80.py and press F5 or CTRL+R or CTRL+T
  • GNU/Linux shell:~@ python3 /path/pygame80.py
  • Windows shell: >python /path/pygame80.py

Functions

Functions available so far:

btn: use pygame.key.get_pressed
cls: use pygame.Surface.fill
circ & circb: use pygame.draw.circle
elli & ellib: use pygame.draw.elipse
exit: use pygame.quit and raise SystemExit
font: use pygame.Surface.subsurface and pygame.transform.scale
line: use pygame.draw.line
map: use pygame.Surface.subsurface and pygame.transform.scale
mget & mset: VRAM 2D array indexing, read/write
pix (!: numpy library dependant): use pygame.surfarray.pixels3d
print: use pygame.font.Font
rect & rectb: use pygame.draw.rect
sfx (!: note and speed parameters not supported by Pygame): use pygame.mixer.Sound, pygame.mixer.Channel and pygame.mixer.Sound.set_volume
spr (!: 0-255 index only): use pygame.Surface, pygame.Surface.subsurface, pygame.transform.flip, pygame.transform.scale and pygame.transform.rotate
time: use pygame.time.get_ticks
trace (!: builtins built-in module dependant): use builtins.print with ANSI escape sequences for RGB color
tstamp (!: time built-in module dependant): use time.time()
tri & trib: use pygame.draw.polygon

Some excluded functions:

TIC, SCN(n), OVR, BDR: Callbacks
peek & peek4, poke & poke4, memcpy & memset: Memory Mapping
fset & fget: Sprite flags

To do list:

  • btnp: button input
  • key & keyp: keyboard input
  • textri (!: pygame.gfxdraw library dependant): textured triangle
  • mouse: mouse input
  • TIC-80 smallfont: system font variant
  • pix (!: numpy library dependant): per pixel read or write access
  • sync: function for asset management (!: important)
  • wiki (20/23): for show examples and tutorials
Python codes for the classic Hang Man game

Python codes for the classic Hang Man game. The user will be assigned a random word to guess, one character at a time. If the user gets everything right, the program says Well Done!, but if the user

p.katekomol 1 Jan 25, 2022
An automation bot to play Myuu Discord game

Auto selfbot Myuu is a self Discordbot, meaning it will use your TOKEN to logged as your account and take commands from yourself to play the game.

6 Dec 15, 2022
My goofy little script for playing wordle

my wordle "solver" My goofy little script for playing wordle. It actually runs really slowly at first but once you've added some info (e.g. which lett

MB 3 Feb 04, 2022
Automatic game data translator for RPGMaker-MV

RPGMaker-MV Translator 🕹️ 🎮 Use AI to translate all the dialogs and texts of your RPGMaker automatically. 👊 You worked hard to make your game, now

Davide Liu 11 Dec 26, 2022
Simple game where you try to survive as long as you can on screen.

Survival Game Simple game where you try to survive as long as you can on screen. Play To run, download the code and run the survival_game.py file. Fro

Logan Morris 1 Feb 10, 2022
游戏中按TAB键查看所有玩家分数的小程序

DDNet-show-points-in-game DDRaceNetwork 游戏中按TAB键查看所有玩家分数的小程序

3 Oct 13, 2022
Algorithm to solve Wordle correctly 100% of the time within 6 attempts.

WordleSolver © Zulkarnine, 2022. Algorithm to solve Wordle 100% of the time within 6 attempts. You can go ahead and run main.py to run it for all 2315

Zulkarnine Mahmud 69 Dec 11, 2022
Sukoku-solver Python About Sudoku is one of the most popular puzzle games of all time

Sukoku-solver Python About Sudoku is one of the most popular puzzle games of all time. As a logic puzzle, Sudoku is also an excellent brain game. Bein

Harshith VH 1 Nov 20, 2021
WORDLE Helper and Solver

WORDLE Helper and Solver There is a pupular game around WORDLE The game could be hard for non-English speaking people so I started to think of a helpe

1 Jan 24, 2022
We tried to recreate this classic game using python physics libraries.

We tried to recreate this classic game using python physics libraries. The result is certainly hilarious but enjoyable. One of my very first physics application.

Delwys Glokpor 2 Dec 12, 2021
An interactive pygame implementation of quadtree spatial quantization

QuadTree-py An interactive pygame implementation of quadtree spatial quantization Contents Installation Usage API Reference TODO Installation Clone th

Ethan 1 Dec 05, 2021
Meu primeiro jogo desenvolvido em Python, usado o módulo do Pygame

📖 Sobre Esse repositório é dedicado ao meu primeiro jogo feito em Python, utilizando o módulo do pygame. O jogo foi desenvolvido seguindo o tutorial

Michael Douglas 0 May 06, 2022
Wordle Tas Tool is a terminal application for solving Wordle puzzles

Wordle Tas Tool Terminal application for solving Wordle puzzles Wordle Tas Tool (WTT) is a Python script that iterates over SCOWL95 to solve Wordle pu

1 Feb 08, 2022
An interactive pygame implementation of Conway's Game of Life

Game of Life An interactive pygame implementation of Conway's Game of Life Installation Clone the repo and navigate into it. git clone https://github.

Ethan 1 Dec 05, 2021
A simple pygame implementation of the LOGO programming language.

LOGO-py A simple pygame implementation of the LOGO programming language. Latest Version Notes Fixed a bug where penup/pendown would not work properly.

Ethan Evans 1 Dec 05, 2021
Breakout-KD - A fantastic game created in python with pygame ✌️

Breakout-KD About This Game Breakout-KD is a fantastic breakout game. It's a python based game officialy made by me on december holiday. This game wor

Keep Distance 1 Jan 01, 2022
3 Oct 22, 2021
Implementation of the Spider-Man Game

Projeto FPRO FPRO/LEIC, 2021/22 Francisco Campos (up202108735) 1LEIC08 Objetivo Criar um clone do clássico Spider-Man em Pygame... Repositório de códi

1 Dec 24, 2021
WordleHelper suggests words to help players better enjoy the hit game Wordle

WordleHelper Introduction WordleHelper suggests words to help players better enjoy the hit game Wordle. Both the general mode and the hard mode are su

Shao-Yu, Chu 5 Jun 02, 2022
A project to san the internet of all open Minecraft servers.

MC-Server-Finder A project that scans the internet to find open Minecraft servers. Install the dependencies by running pip install -r requirements.txt

drakeerv 8 Mar 12, 2022