This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2d | |
2d_menu: | |
"Grab", "Drop on Ground", "Never Mind", etc. | |
Stuff you can do from your inventory | |
stuff related to using items | |
prompts | |
Chat messages for when you're sitting on things: I can't move! Outta my way! I can't get down! Phew... Very nice! | |
Wi-Fi related messages like "There's a visitor" | |
Days of the week |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import asyncio, json, websockets | |
bot_prefix = "!" | |
# .---------------------------------------------- | |
# | Command registration | |
# '---------------------------------------------- | |
protocol_handlers = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------- General protocol information ------------------- | |
cc-cc ll-ll [..] | |
Command, Length, Data | |
Command types would be represented with a 16-bit enum instead of the four character ASCII codes used here, but those codes could be shown for debug display purposes, or for talking about the protocol. | |
By default, this protocol can only work with 256 different kinds of tiles at a time. Most platforms this protocol is aimed at probably wouldn't fit more than that into video RAM anyway. | |
For instance, SNES background layers can only reference 1024 different 8x8 tiles, and 1024/4 = 256 16x16 tiles. Same for the GBA and DS, though the DS could use bitmap modes as a workaround. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Platformer demo thing | |
Copyright 2023, NovaSquirrel | |
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty, provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. | |
*/ | |
// Config | |
// Amount of ticks (0.05 seconds) to wait before stopping the game due to inactivity. 500 = 25 seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Unique 8x8 tile counter for Aseprite tilemaps | |
-- Copyright 2022, NovaSquirel | |
-- | |
-- Copying and distribution of this file, with or without modification, are permitted in any medium without royalty, provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. | |
local pc = app.pixelColor | |
local sprite = app.activeSprite | |
if not sprite then return app.alert("There is no active sprite") end | |
local frameNumber = app.activeFrame.frameNumber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import thumby | |
import math | |
import random | |
thumby.display.setFPS(60) | |
playerSprite = thumby.Sprite(8, 8, bytearray([126,129,173,225,225,173,129,126]), 0, 0, 0) | |
levelGfx = bytearray([0,0,0,0,0,0,0,0,255,129,141,177,141,177,129,255,0,0,92,244,94,116,0,0,255,153,159,153,153,249,153,255,255,129,133,213,213,157,129,255,255,129,165,153,153,165,129,255,255,129,129,129,129,129,129,255,255,255,102,102,102,102,255,255,32,80,208,80,80,208,80,32,64,160,160,160,160,160,160,64,15,9,9,9,9,9,9,15,240,144,144,144,144,144,144,240,15,11,13,11,13,11,13,15,240,176,208,176,208,176,208,240]) | |
class Tilemap: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Keep track of instance IDs | |
struct instance_to_controller { | |
SDL_JoystickID instance; | |
SDL_GameController *controller; | |
struct instance_to_controller *prev, *next; | |
}; | |
struct instance_to_controller *controllers = NULL; | |
int game_keys = 0; // Current game actions that keys are pressed for independent of different control methods, like KEY_PUSH_LEFT |