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
A Game Engine Made in Python with the Pygame Module

MandawEngine A Game Engine Made in Python with the Pygame Module Discord: https://discord.gg/MPPqj9PNt3 Installation To Get The Latest Version of Mand

Mandaw 14 Jun 24, 2022
Minecraft - Online Players Overlay Generator

Minecraft - Online Players Overlay Generator Contents About Quick Start Download Pre-Built Binary Run from Source Configuration Command-Line Options F

4 Sep 12, 2022
Ghdl-interactive-sim - Interactive GHDL simulation of a VHDL adder using Python, Cocotb, and pygame

GHDL Interactive Simulation This is an interactive test bench for a simple VHDL adder. It uses GHDL to elaborate/run the simulation. It is coded in Py

Chuck Benedict 2 Aug 11, 2022
a simple keyboard game

Maxwell-Demon-Game Powered by Taichi. a simple keyboard game This is hw2 of Taichi course, as a basic exercise of class. Rigid 2d bodies and resolve c

8 Feb 01, 2022
Logo hitting the corner == best feeling ever!

Bouncing DVD logo - Pygame A little ride back to the 90s. Ah good ol' time! Didn't we all wait for the logo to hit the corners? Best feeling ever!! I

Hoang Nguyen 3 May 25, 2022
Chess turnament organizer (short construct concept)

Turnament Organizer Chess turnament organizer (short construct concept). It is my hobby app I want to write to support lightweight tool for smart roun

kkuba91 3 Dec 16, 2022
MCTS (among other things) for 2048

2048 Created by Chad Palmer for CPSC 474, Fall 2021 Overview: This is an application which can play 2048 and simulate games of 2048 with a variety of

Chad Palmer 1 Dec 16, 2021
A python program for playing rock-paper-scissors with computer .

Rock_Paper_Scissors_Cut A time passing famous hand game known as rock paper scissors cut game. Starting from children to adults everyone plays this ga

Arghya Banerjee 1 Dec 16, 2021
A Tetris game made using PyGame as renderer only, for a school project.

Tetris_Python A Tetris game made using PyGame as renderer only, for a school project. Twist in the Game Blocks can pentrate through right and left bou

Ravi Arora 2 Jan 31, 2022
An implementation of John Conway's Game of Life.

This is an implementation of John Conway's Game of Life in Python, and a very basic and straightforward one at that.

Mae 3 Feb 11, 2022
A Pygame game made in 48 hours

Flappuccino Flappuccino is a game created in 48 hours for the PyGame Community New Years Jam using Python with Pygame. Screenshots Background Informat

PolyMars 242 Jan 02, 2023
The DOS game from the 80s re-written in Python from Scratch!

Drugwars The DOS game from the 80s re-written in Python from Scratch! Play in your browser Here Installation Recommended: Using pip pip3 install drugw

Max Bridgland 45 Jan 03, 2023
A playable version of Chess – classic two-player, various AI levels, and the crazyhouse variant! Written in Python 3

A playable version of Chess – classic two-player, various AI levels, and the crazyhouse variant! Written in Python 3. Requires the installation of PIL/Pillow and Requests

1 Dec 24, 2021
Utility to find games owned by all (or at least some) of the passed players.

SteamCommonGameFinder Utility to find games that are owned by all (or at least some) of the players you pass into this programm. You can already find

Daniel O'Grady 4 Jan 04, 2022
Tool for Path of Exile game to automatically scan Archemesis inventory and display related information

poe-archnemesis-scanner Tool for Path of Exile game to automatically scan Archemesis inventory and display related information Features Controls When

70 Nov 10, 2022
PyGame-Tutorial - Refrence for building games in pygame

PyGame-Tutorial How to build games using the python library PyGame End result Ho

St. Mark's Computer Science Club 2 Jan 09, 2022
An all-inclusive Python framework for the Riot Games League of Legends API. We focus on making the data easy and fun to work with, while providing all the tools necessary to create a website or do data analysis.

Cassiopeia A Python adaptation of the Riot Games League of Legends API (https://developer.riotgames.com/). Cassiopeia is the sister library to Orianna

Meraki Analytics 473 Jan 07, 2023
A very simple 3D maze game with ray tracing.

PytracingMaze MOST RECENT VERSION: Pytracing Maze.py Also, executable for Windows available on itch.io Simple ray tracing game in Python, based on my

FinFET 15 Dec 20, 2022
A sprite ripper and converter for Com2uS' 2007 game Music World.

Music World Sprite Dumper This repository contains a python script reads an UNCOMPRESSED Music World pxo file and attempts to dump sprites from it. Th

Buu342 1 Mar 16, 2022
This is game 2048 created with moudle of python tkinter and OOP.

Game 2048 This is game 2048 created with moudle of python tkinter and OOP. This game build on classes. For start this game run: If you have python ver

0 Nov 02, 2021