Compare commits

..

No commits in common. "362f1f06a65c73967021328dc3f21da80a2b572c" and "44bc904ec225bd1ed1b726eaf0b7ede4c1cae712" have entirely different histories.

2 changed files with 49 additions and 74 deletions

34
todo.md
View File

@ -1,34 +0,0 @@
- [ ] rewrite event queue as a linked list
- [ ] rewrite animator stacks as linked lists
- [ ] rewrite ship/bullet collections as linked lists
- [ ] update/draw mode switching system (high-efficiency version)
- [ ] render ship shields (even for large ships)
- [ ] duplicate file -- about to split away from Tyrian features
- [ ] remove PWR meter, replace with weapon queue
- [ ] remove power mechanics from _player_ ship (only!)
- [ ] all player weapons are now ammo limited except pea shooter
- [ ] remove weapon drops
- [ ] implement fallback pea shooter
- [ ] implement turn timer (screen-height bar)
- [ ] implement extremely crude prototype for weapon select intermezzo
- [ ] implement "deck"
- [ ] implement basic weapon cards
- [ ] implement starter deck
- [ ] stabilize this with just starter deck and sample level
- [ ] implement post-encounter "get a card"
- [ ] implement deck lister
- [ ] implement more cards, mini-encounters for deck buildup
- [ ] implement card levels?
- [ ] implement card removal (shop?)
- [ ] actually design a branching encounter sequence
- [ ] map
- [ ] "minimap"/scanner on weapon picker
- [ ] high score board (difficulty x time)
- [ ] difficulty increase system
- [ ] as much more crap as I can fit in under the token limit, which
is probably not much at this point
- [ ] give up and move to TIC-80 because the token limits

View File

@ -11,16 +11,6 @@ lose = 3
debug = {}
function usplit(str)
return unpack(split(str))
end
function csv(s)
local ret=split(s,"\n")
for i,v in ipairs(ret) do
ret[i] = type(v) == "string" and split(v) or {v} end
return ret
end
function _init()
init_bullet_mt()
init_powerup_mt()
@ -35,11 +25,14 @@ end
-- health gradients for 1..5 hp
-- exactly, then all "more".
hpcols_lut = csv[[36
34, 136
34, 130, 136
34, 34, 130, 136
34, 34, 130, 130, 136]]
hpcols_lut = {
{36},
{34, 136},
{34, 130, 136},
{34, 34, 130, 136},
{34, 34, 34, 130, 136},
{34, 34, 34, 130, 130, 136}
}
-- call after any change to maxhp
-- configures health gradient
@ -183,22 +176,24 @@ function _draw()
fadescreen()
end
fadetable=csv[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1,1,129,129,129,129,129,129,129,129,0,0,0,0,0
2,2,2,130,130,130,130,130,128,128,128,128,128,0,0
3,3,3,131,131,131,131,129,129,129,129,129,0,0,0
4,4,132,132,132,132,132,132,130,128,128,128,128,0,0
5,5,133,133,133,133,130,130,128,128,128,128,128,0,0
6,6,134,13,13,13,141,5,5,5,133,130,128,128,0
7,6,6,6,134,134,134,134,5,5,5,133,130,128,0
8,8,136,136,136,136,132,132,132,130,128,128,128,128,0
9,9,9,4,4,4,4,132,132,132,128,128,128,128,0
10,10,138,138,138,4,4,4,132,132,133,128,128,128,0
11,139,139,139,139,3,3,3,3,129,129,129,0,0,0
12,12,12,140,140,140,140,131,131,131,1,129,129,129,0
13,13,141,141,5,5,5,133,133,130,129,129,128,128,0
14,14,14,134,134,141,141,2,2,133,130,130,128,128,0
15,143,143,134,134,134,134,5,5,5,133,133,128,128,0]]
local fadetable={
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{1,1,129,129,129,129,129,129,129,129,0,0,0,0,0},
{2,2,2,130,130,130,130,130,128,128,128,128,128,0,0},
{3,3,3,131,131,131,131,129,129,129,129,129,0,0,0},
{4,4,132,132,132,132,132,132,130,128,128,128,128,0,0},
{5,5,133,133,133,133,130,130,128,128,128,128,128,0,0},
{6,6,134,13,13,13,141,5,5,5,133,130,128,128,0},
{7,6,6,6,134,134,134,134,5,5,5,133,130,128,0},
{8,8,136,136,136,136,132,132,132,130,128,128,128,128,0},
{9,9,9,4,4,4,4,132,132,132,128,128,128,128,0},
{10,10,138,138,138,4,4,4,132,132,133,128,128,128,0},
{11,139,139,139,139,3,3,3,3,129,129,129,0,0,0},
{12,12,12,140,140,140,140,131,131,131,1,129,129,129,0},
{13,13,141,141,5,5,5,133,133,130,129,129,128,128,0},
{14,14,14,134,134,141,141,2,2,133,130,130,128,128,0},
{15,143,143,134,134,134,134,5,5,5,133,133,128,128,0}
}
function fadescreen()
fadelvl += 0.25
@ -245,7 +240,6 @@ function drawgame()
drawhud()
end
powcols=split"170,154,153,148,68"
function drawhud()
-- 112-and-right is hud zone
rectfill(112, 0, 127, 127,0x56)
@ -259,7 +253,7 @@ function drawhud()
dropshadow("pwr",114,59,1)
inset(114,66,125,92)
fillp(0x5a5a)
vertmeter(115,67,124,91,primary_ship.power, primary_ship.max_power, powcols)
vertmeter(115,67,124,91,primary_ship.power, primary_ship.max_power, {170,154,153,148,68})
dropshadow("h s",114,97,1)
@ -371,8 +365,8 @@ function init_ship_mt()
setmetatable(chasey, ship_t)
end
firespark = split"9, 8, 2, 5, 1"
smokespark = split"13, 13, 5, 5"
firespark = {9, 8, 2, 5, 1} -- bright spark colors
smokespark = {13, 13, 5, 5}
player = {
--shape
@ -1797,9 +1791,24 @@ blip_fx_t = {
}
function blip(obj, col, frames)
local p = {[0]=0}
obj.fx_pal = p
for i=1,15 do p[i]=col end
obj.fx_pal = {
[0] = 0,
[1] = col,
[2] = col,
[3] = col,
[4] = col,
[5] = col,
[6] = col,
[7] = col,
[8] = col,
[9] = col,
[10] = col,
[11] = col,
[12] = col,
[13] = col,
[14] = col,
[15] = col
}
if (obj.___fx_pal_event) obj.___fx_pal_event:abort()
local e = {
frames = frames,
@ -1809,7 +1818,7 @@ function blip(obj, col, frames)
add(events, e)
end
bossspark = split"7,7,10,10,9,9,9,8,8,8,2,2,5,5"
bossspark = {7, 7, 10, 10, 9, 9, 9, 8, 8, 8, 2, 2, 5, 5}
function boom(x,y,boominess,is_boss)
local sp = firespark
@ -1882,7 +1891,7 @@ powerup = {
}
-- sprite indexes for "sheen" animation
sheen8x8 = split"2,54,55,56,57,58,59,60,61"
sheen8x8 = {2, 54, 55, 56, 57, 58, 59, 60, 61}
powerup_t = {
__index = powerup