diff --git a/neuttower/init.fnl b/neuttower/init.fnl index 06e2c75..00ed64f 100644 --- a/neuttower/init.fnl +++ b/neuttower/init.fnl @@ -52,7 +52,7 @@ [:vm :hires :lit :level1 :load-level (vm:forever - (vm:hotswap-sync :lit :level6 :load-level) + (vm:hotswap-sync :full-redraw) :interactive-eval-checkpoint :handle-key ) diff --git a/presentation/pics/beneath-apple-prodos.png b/presentation/pics/beneath-apple-prodos.png new file mode 100644 index 0000000..f7066b4 Binary files /dev/null and b/presentation/pics/beneath-apple-prodos.png differ diff --git a/presentation/pics/bitsy.png b/presentation/pics/bitsy.png new file mode 100644 index 0000000..4a05b43 Binary files /dev/null and b/presentation/pics/bitsy.png differ diff --git a/presentation/pics/boot-tower.jpeg b/presentation/pics/boot-tower.jpeg new file mode 100644 index 0000000..948aea7 Binary files /dev/null and b/presentation/pics/boot-tower.jpeg differ diff --git a/presentation/slides.fnl b/presentation/slides.fnl index 4b0b6c1..ba67585 100644 --- a/presentation/slides.fnl +++ b/presentation/slides.fnl @@ -8,19 +8,21 @@ (local PortraitEditView (require :editor.portraitedit)) (local FontEditView (require :editor.fontedit)) (local ScreenEditView (require :editor.screenedit)) +(local files (require :game.files)) (local h {:style true - :font (renderer.font.load "presentation/font/PrintChar21.ttf" (* 64 SCALE)) + :font (renderer.font.load "presentation/font/PrintChar21.ttf" 64) :color style.caret :justify :center - :topPadding (* style.padding.y 2) + :topPadding 14 :lowerPadding 64}) (local ** {:style true - :font (renderer.font.load "presentation/font/PRNumber3.ttf" (* 32 SCALE)) + :font (renderer.font.load "presentation/font/PRNumber3.ttf" 32) :color style.text :justify :left + :lowerPadding 7 :pause-after true}) (fn p [style] (lume.merge style {:pause-after true})) (fn np [style] (lume.merge style {:pause-after false})) @@ -32,19 +34,23 @@ node (root:get_node_for_view view)] (when node (node:close_active_view root)))) -(fn split-and-open [f ?split] +(fn split-and-open [self f] (let [focused-view core.active_view focused-node (core.root_view:get_active_node) - _ (when ?split (focused-node:split ?split)) - view (f) + _ (when self.split (focused-node:split self.split)) + view (f self) node (core.root_view:get_active_node)] (when (= (core.root_view.root_node:get_node_for_view view) nil) (node:add_view view)) - (when ?split (core.set_active_view focused-view)) ; don't switch focus + (when self.split (core.set_active_view focused-view)) ; don't switch focus #(view-cleanup view))) -(fn openview [f ?extra] (lume.merge {:action #(split-and-open f $1.split)} (or ?extra {}))) +(fn openview [f ?extra] (lume.merge {:action #(split-and-open $1 f)} (or ?extra {}))) (fn openfile [filename ?extra] - (openview #(core.root_view:open_doc (core.open_doc filename)) ?extra)) + (openview #(let [ldoc (core.open_doc filename) + view (core.root_view:open_doc ldoc)] + (when $1.line (view:scroll_to_line $1.line)) + view) + ?extra)) (parse [ [h "" "" "" @@ -78,7 +84,7 @@ "* How can I leverage emulation?"] [h "Step 1: Assembler" ** "Represent instructions using Fennel data literals" - (openfile :asm/asm.fnl {:split :right}) + (openfile :neuttower/defs.fnl {:split :right :line 57}) " [:lda 0xff]" "Represent labels with Fennel strings" " :loop [:bne :loop]" @@ -119,7 +125,9 @@ "Could I rewrite it to run under LÖVE2D?" " Yes! In a weekend!"] [h "Custom Editors" - ** "14x16 tile editor" + ** "Retro game programming is just the process of writing a series of barely-usable custom paint programs." + {:action #(files.reload :neuttower/game.json)} + "14x16 tile editor" (openview #(TileEditView)) "Font editor" (openview #(FontEditView)) @@ -127,14 +135,14 @@ (openview #(PortraitEditView)) "Map editor" (openview #(MapEditView)) - "Screen editor" + "Full-screen bitmap editor" (openview #(ScreenEditView :neuttower/title.screen) {:pause-after true}) (openfile :presentation/slides.fnl {:split :right :line 133}) "Presentation viewer!?"] [h "Editing Editors With My Editor" ** "Lua provides a very dynamic environment that allows me tremendous flexibility" (openview #(MapEditView)) - (openfile :editor/mapedit.fnl {:split :right}) + (openfile :editor/mapedit.fnl {:split :right :line 235}) "Downside:" {:image "presentation/pics/bsod.png" :justify :center :pause-after true}] [h "Step 4: Emulator Integration" @@ -155,8 +163,29 @@ (openfile :asm/tape.fnl {:split :right}) " [:basic [10 :call :2061]]" "Future work: Apple Game Server fastloader"] - [h "ProDOS" - ** "Eventually we'll want a disk image for release"] - - + [(bgimg "presentation/pics/beneath-apple-prodos.png") + h "ProDOS" + ** "Disk image is a must-have for distribution" + (openfile :asm/prodos.fnl {:split :right :line 132}) + "Of course I wrote my own disk image generation code!" + "Start with a blank ProDOS disk and add to it" + "Fun bugs!" + "* Accidentally implemented undelete instead of inserting new files at first" + "* Read the free space bitmap backwards and overwrote the OS" + "* Tried to name a volume starting with a number"] + [(bgimg "presentation/pics/boot-tower.jpeg") + {:action #(files.reload :neuttower/game.json)} + h "Neu] [ower" + ** "A small puzzle adventure game!" + "--== D E M O ==--"] + [(bgimg "presentation/pics/bitsy.png") + {:action #(files.reload :bitsy/game.json)} + h "8-Bitsy" + ** "Bitsy is a popular free, accessible, web-based game-making tool" + "Spring Lisp Game Jam - 10 days to hack" + "Could I make my tools a little less... programmer-y?" + (openview #(MapEditView) {:pause-after true})] + [h "Thanks!" + (openfile :neuttower/level6.fnl {:split :right :line 153}) + ** "Questions?"] ])