<commit_before># Hippyman's Pico-8 Starter Project
This is a good generic starting point for any Pico-8 game project.

Usage:
Open Pico-8 and type "folder" and press enter. Drag "starter.p8" and "starter_example.p8" into your projects folder. Type "load starter" into Pico-8 and press enter. Type "save 'gamename'" where 'gamename' is whatever you want. You can now begin working on your game.
You can also type "load starter_example" and then "run" to test out the example project which shows you how to instantiate an actor and create some animations.





API:

game:new_actor(x,y) - Creates a new actor instance. Returns ActorID

game:update() - Updates any existing actor instance animations

game:render() - Renders any existing actors instances to the screen

game.background_color - Sets the color of the screens background

new_anim(start,length) - Creates an animation to store in actor anims table

index_from_2d(x,y,row) - Finds index in 1D array from 2D coordinates. row is the width of the 2D area

x_from_index(index,row) - Finds x position from index. row is the width of 2D area

y_from_index(index,row) - Finds y position from index. row is the width of 2D area

insert(list,pos,value) - inserts a value into a table and shifts values where necessary

actor.x,actor.y - Actor position

actor.img - Actors current sprite

actor.imgspd - Speed of animation

actor.depth - Handles what is in front and what is behind actor. Lower values are drawn last

actor.flipx,actor.flipy - Booleans that handle which way sprite is flipped

actor.anim - index of current animation

actor.anims - table that holds all actor animations

actor:update() - Called automatically in game:update. This updates the animations

actor:draw() - Called automatically in game:render. This renders the actor to the screen<commit_msg>add documentation for game.mouse<commit_after># Hippyman's Pico-8 Starter Project
This is a good generic starting point for any Pico-8 game project.

Usage:
Open Pico-8 and type "folder" and press enter. Drag "starter.p8" and "starter_example.p8" into your projects folder. Type "load starter" into Pico-8 and press enter. Type "save 'gamename'" where 'gamename' is whatever you want. You can now begin working on your game.
You can also type "load starter_example" and then "run" to test out the example project which shows you how to instantiate an actor and create some animations.





API:

game:new_actor(x,y) - Creates a new actor instance. Returns ActorID

game:update() - Updates any existing actor instance animations

game:render() - Renders any existing actors instances to the screen

game.background_color - Sets the color of the screens background

game.mouse.enabled - Turn mouse support off/on

game.mouse.x,game.mouse.y - Mouse position

game.mouse.lmbp - Left mouse pressed

game.mouse.lmb - Left mouse held

game.mouse.lmbr - Left mouse released

game.mouse.mmbp - Middle mouse pressed

game.mouse.mmb - Middle mouse held

game.mouse.mmbr - Middle mouse released

game.mouse.rmbp - Right mouse pressed

game.mouse.rmb - Right mouse held

game.mouse.rmbr - Right mouse released

new_anim(start,length) - Creates an animation to store in actor anims table

index_from_2d(x,y,row) - Finds index in 1D array from 2D coordinates. row is the width of the 2D area

x_from_index(index,row) - Finds x position from index. row is the width of 2D area

y_from_index(index,row) - Finds y position from index. row is the width of 2D area

insert(list,pos,value) - inserts a value into a table and shifts values where necessary

actor.x,actor.y - Actor position

actor.img - Actors current sprite

actor.imgspd - Speed of animation

actor.depth - Handles what is in front and what is behind actor. Lower values are drawn last

actor.flipx,actor.flipy - Booleans that handle which way sprite is flipped

actor.anim - index of current animation

actor.anims - table that holds all actor animations

actor:update() - Called automatically in game:update. This updates the animations

actor:draw() - Called automatically in game:render. This renders the actor to the screen
{'fraction_non_alphanumeric': 0.063003663003663, 'fraction_numerical': 0.005860805860805861, 'mean_word_length': 4.178255372945639, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3241834', 'n_tokens_mistral': 1210, 'n_tokens_neox': 1147, 'n_words': 552}