Skip to content

Instantly share code, notes, and snippets.

// Infinite runner!
import "sounds"
clear
display(5).mode = displayMode.tile
td = display(5)
td.extent = [150, 10]
td.tileSet = file.loadImage("/sys/pics/SimplePlatformTiles.png")
td.tileSetTileSize = [64,64]
@JoeStrout
JoeStrout / wolfenstein-test.ms
Created March 18, 2022 04:20
Test of a Wolfenstein3D-style rendering engine for Mini Micro. Use arrow keys to move forward/backward/turn; alt+left/right to strafe. You can move right through walls, so... try not to.
// 3D-ish rendering of walls, decorationss, and entities,
// using stretched sprites.
import "qa"
import "mathUtil"
clear
display(2).mode = displayMode.pixel
debugDisp = display(2)
debugDisp.clear
Point={}
Point.make = function(x,y)
p = new Point
p.x = x; p.y = y
return p
end function
Point.zero = Point.make(0, 0)
current = null
Map.getDrawInfo = function(display, x, y, renderOffset)
//if self.isEntityAt(point.make(x, y)) then return
rx = renderOffset.x + x
ry = renderOffset.y + y
if not math.isInRange(rx, 0, SCREEN_MAX_X) or not math.isInRange(ry, 0, SCREEN_MAX_Y) then
clear
print "ERROR: getDrawInfo called out of range"
exit
////
// Weird experiment to see what Rust-style traits might look like in MiniScript.
////
import "listUtil"
import "stringUtil"
PartialEq = {}
PartialEq.eq = function(other)
return refEquals(self, other)
{
"data_type": "float32",
"num_channels": 1,
"scales": [
{
"chunk_sizes": [
[
1024,
1024,
1
#SRC_PATH: "assets/inputs/fafb_v15_img_128_128_40-2048-3072_2000-2050_float32"
//#DST_PATH: "output/float32_copy"
#DST_PATH: "gs://tmp_2w/joe_nodst"
#BBOX: {
"@type": "BBox3D.from_coords"
start_coord: [64 * 1024, 64 * 1024, 2000]
end_coord: [96 * 1024, 96 * 1024, 2005]
resolution: [4, 4, 40]
}