From 4a5e3b7d3594056d297f09d3e33aa6e2133124f1 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Sun, 2 Feb 2025 01:04:13 -0600 Subject: Redo all the blender assets --- Makefile | 142 ++++++++++++++++---------------- data_src/models/green_outline.blend | Bin 479788 -> 623616 bytes data_src/models/icon_battery.blend | Bin 420780 -> 603736 bytes data_src/models/icon_engine.blend | Bin 430124 -> 591552 bytes data_src/models/icon_fueltank.blend | Bin 466724 -> 595168 bytes data_src/models/icon_generator.blend | Bin 462212 -> 624216 bytes data_src/models/icon_high_voltage.blend | Bin 464712 -> 621208 bytes data_src/models/icon_hv_source.blend | Bin 428212 -> 588040 bytes data_src/models/icon_ionthrust.blend | Bin 466932 -> 624992 bytes data_src/models/icon_laser_turret.blend | Bin 428124 -> 583280 bytes data_src/models/icon_wire.blend | Bin 426856 -> 581032 bytes data_src/models/layer_electric.blend | Bin 470936 -> 676384 bytes data_src/models/layer_fuel.blend | Bin 489780 -> 672400 bytes data_src/models/layer_hv.blend | Bin 480008 -> 678376 bytes data_src/models/level_1.blend | Bin 468212 -> 592688 bytes data_src/models/level_10.blend | Bin 439832 -> 590800 bytes data_src/models/level_11.blend | Bin 631168 -> 1025208 bytes data_src/models/level_12.blend | Bin 487332 -> 666008 bytes data_src/models/level_2.blend | Bin 471764 -> 627424 bytes data_src/models/level_3.blend | Bin 468956 -> 621432 bytes data_src/models/level_3p2.blend | Bin 476340 -> 640904 bytes data_src/models/level_4.blend | Bin 460484 -> 615976 bytes data_src/models/level_5.blend | Bin 463708 -> 619392 bytes data_src/models/level_6.blend | Bin 468988 -> 623424 bytes data_src/models/level_7.blend | Bin 471700 -> 629736 bytes data_src/models/level_8.blend | Bin 523668 -> 674060 bytes data_src/models/level_9.blend | Bin 428188 -> 590184 bytes data_src/models/manage_chatbox.blend | Bin 482684 -> 668388 bytes data_src/models/manage_portrait.blend | Bin 7270428 -> 7090389 bytes data_src/models/money_background.blend | Bin 478384 -> 603860 bytes data_src/models/ph_start_screen.blend | Bin 462676 -> 617964 bytes data_src/models/pipe1111.blend | Bin 483752 -> 611560 bytes data_src/models/pipe1111_hint.blend | Bin 488276 -> 610592 bytes data_src/models/star1.blend | Bin 465016 -> 619672 bytes data_src/models/star2.blend | Bin 460492 -> 627168 bytes data_src/models/star3.blend | Bin 464580 -> 585168 bytes data_src/models/test_ship.blend | Bin 479668 -> 629808 bytes src/level7.moon | 112 ++++++++++++------------- 38 files changed, 127 insertions(+), 127 deletions(-) diff --git a/Makefile b/Makefile index e59c443..c2fae8c 100644 --- a/Makefile +++ b/Makefile @@ -1,71 +1,71 @@ - -#Binaries -BLENDER = "C:\Program Files\Blender Foundation\Blender\blender.exe" -CONVERT = convert -MOONC = moonc.bat -CP = cp -CAT = cat -CD = cd -AMULET = amulet-console -LUA = lua -MV = mv -UNZIP = unzip -o #overwrite without asking -HTTP_SERVER = python -m http.server #STL -OPEN_BROWSER = rundll32 url.dll,FileProtocolHandler http://localhost:8000 -ECHO=echo - -moon_files = $(shell ls src/*.moon) -lua_files = $(shell ls src/*.lua) -build_moon_files = $(moon_files:src/%.moon=build/%.lua) -debug_moon_files = $(moon_files:src/%.moon=debug/%.lua.X) -build_lua_files = $(lua_files:src/%.lua=build/%.lua) - -#Sprites from models -model_files = $(shell sh -c "find data_src/models/*.blend") -raw_imgs = $(model_files:data_src/models/%.blend=data_src/img_raw/%_raw.png) -static_files = $(shell ls data_src/*.jpg) $(shell ls data_src/*.png) -static_imgs = $(static_files:data_src/%=build/data/%) -sprites = $(raw_imgs:data_src/img_raw/%_raw.png=build/data/%.png) -all_files = $(build_moon_files) $(build_lua_files) $(debug_moon_files) $(sprites) - -all ggj20-1.0.0-html.zip : $(build_lua_files) $(build_moon_files) $(sprites) $(static_imgs) - $(AMULET) export -r -windows -mac -linux -html build - -serve: ggj20-1.0.0-html.zip - $(UNZIP) $^ - $(OPEN_BROWSER) - $(CD) ggj20 && $(HTTP_SERVER) - -dev: $(build_lua_files) $(build_moon_files) $(debug_moon_files) $(sprites) $(static_imgs) - $(CD) build && $(AMULET) 2> err.log || true - $(CAT) build/err.log | $(LUA) rewrite.lua - -$(build_moon_files) : build/%.lua : src/%.moon - $(MOONC) -o $@ $< - -$(debug_moon_files) : debug/%.lua.X : src/%.moon - $(MOONC) -X $< > $@ - -$(build_lua_files) : build/%.lua : src/%.lua - $(CP) $< $@ - -#Convert images to our reduce 64 colors -$(sprites) : build/data/%.png : data_src/img_raw/%_raw.png - $(CONVERT) $^ +dither -remap aap-64-1x.png $@ - -$(raw_imgs) : data_src/img_raw/%_raw.png : data_src/models/%.blend - $(BLENDER) -b $^ -o //../../$(@:%_raw.png=%_raw_) -f 1 - $(MV) $(@:%_raw.png=%_raw_0001.png) $@ - -$(static_imgs) : build/data/% : data_src/% - $(CP) $^ $@ - -clean: - $(RM) -f debug/* - $(RM) -f build/*.lua - $(RM) -f build/data/*.png - $(RM) -f data_src/img_raw/*.png - $(RM) -f build/out.log - $(RM) -f build/err.log - $(RM) -f *.zip - $(RM) -rf ggj20 + +#Binaries +BLENDER?="$(shell where blender | head -n 1)" +MOONC?="$(shell where moonc | head -n 1)" +CONVERT?="$(shell where magick | head -n 1)" +CP = cp +CAT = cat +CD = cd +AMULET?="$(shell where amulet | head -n 1)" +LUA = lua +MV = mv +UNZIP = unzip -o #overwrite without asking +HTTP_SERVER = python -m http.server #STL +OPEN_BROWSER = rundll32 url.dll,FileProtocolHandler http://localhost:8000 +ECHO=echo + +moon_files = $(wildcard src/*.moon) +lua_files = $(wildcard src/*.lua) +build_moon_files = $(moon_files:src/%.moon=build/%.lua) +debug_moon_files = $(moon_files:src/%.moon=debug/%.lua.X) +build_lua_files = $(lua_files:src/%.lua=build/%.lua) + +#Sprites from models +model_files = $(wildcard data_src/models/*.blend) +raw_imgs = $(model_files:data_src/models/%.blend=data_src/img_raw/%_raw.png) +static_files = $(wildcard data_src/*.jpg) $(wildcard data_src/*.png) +static_imgs = $(static_files:data_src/%=build/data/%) +sprites = $(raw_imgs:data_src/img_raw/%_raw.png=build/data/%.png) +all_files = $(build_moon_files) $(build_lua_files) $(debug_moon_files) $(sprites) + +all ggj20-1.0.0-html.zip : $(build_lua_files) $(build_moon_files) $(sprites) $(static_imgs) + $(AMULET) export -r -windows -mac -linux -html build + +serve: ggj20-1.0.0-html.zip + $(UNZIP) $^ + $(OPEN_BROWSER) + $(CD) ggj20 && $(HTTP_SERVER) + +dev: $(build_lua_files) $(build_moon_files) $(debug_moon_files) $(sprites) $(static_imgs) + $(CD) build && $(AMULET) 2> err.log || true + $(CAT) build/err.log | $(LUA) rewrite.lua + +$(build_moon_files) : build/%.lua : src/%.moon + $(MOONC) -o $@ $< + +$(debug_moon_files) : debug/%.lua.X : src/%.moon + $(MOONC) -X $< > $@ + +$(build_lua_files) : build/%.lua : src/%.lua + $(CP) $< $@ + +#Convert images to our reduce 64 colors +$(sprites) : build/data/%.png : data_src/img_raw/%_raw.png + $(CONVERT) $^ +dither -remap aap-64-1x.png $@ + +$(raw_imgs) : data_src/img_raw/%_raw.png : data_src/models/%.blend + $(BLENDER) -b $^ -o //../../$(@:%_raw.png=%_raw_) -f 1 + $(MV) $(@:%_raw.png=%_raw_0001.png) $@ + +$(static_imgs) : build/data/% : data_src/% + $(CP) $^ $@ + +clean: + $(RM) -f debug/* + $(RM) -f build/*.lua + $(RM) -f build/data/*.png + $(RM) -f data_src/img_raw/*.png + $(RM) -f build/out.log + $(RM) -f build/err.log + $(RM) -f *.zip + $(RM) -rf ggj20 diff --git a/data_src/models/green_outline.blend b/data_src/models/green_outline.blend index ac470ed..fc12e1f 100644 Binary files a/data_src/models/green_outline.blend and b/data_src/models/green_outline.blend differ diff --git a/data_src/models/icon_battery.blend b/data_src/models/icon_battery.blend index 6bba30c..5240a64 100644 Binary files a/data_src/models/icon_battery.blend and b/data_src/models/icon_battery.blend differ diff --git a/data_src/models/icon_engine.blend b/data_src/models/icon_engine.blend index 8976da1..c8cde34 100644 Binary files a/data_src/models/icon_engine.blend and b/data_src/models/icon_engine.blend differ diff --git a/data_src/models/icon_fueltank.blend b/data_src/models/icon_fueltank.blend index 7963afb..3eb897d 100644 Binary files a/data_src/models/icon_fueltank.blend and b/data_src/models/icon_fueltank.blend differ diff --git a/data_src/models/icon_generator.blend b/data_src/models/icon_generator.blend index 9efd0ba..7c3bfc9 100644 Binary files a/data_src/models/icon_generator.blend and b/data_src/models/icon_generator.blend differ diff --git a/data_src/models/icon_high_voltage.blend b/data_src/models/icon_high_voltage.blend index 508d34d..536627e 100644 Binary files a/data_src/models/icon_high_voltage.blend and b/data_src/models/icon_high_voltage.blend differ diff --git a/data_src/models/icon_hv_source.blend b/data_src/models/icon_hv_source.blend index ed17e53..7830e31 100644 Binary files a/data_src/models/icon_hv_source.blend and b/data_src/models/icon_hv_source.blend differ diff --git a/data_src/models/icon_ionthrust.blend b/data_src/models/icon_ionthrust.blend index f18aefd..445ade5 100644 Binary files a/data_src/models/icon_ionthrust.blend and b/data_src/models/icon_ionthrust.blend differ diff --git a/data_src/models/icon_laser_turret.blend b/data_src/models/icon_laser_turret.blend index d533caf..417b4b8 100644 Binary files a/data_src/models/icon_laser_turret.blend and b/data_src/models/icon_laser_turret.blend differ diff --git a/data_src/models/icon_wire.blend b/data_src/models/icon_wire.blend index d68db38..e4c589e 100644 Binary files a/data_src/models/icon_wire.blend and b/data_src/models/icon_wire.blend differ diff --git a/data_src/models/layer_electric.blend b/data_src/models/layer_electric.blend index 8cd5332..c3123aa 100644 Binary files a/data_src/models/layer_electric.blend and b/data_src/models/layer_electric.blend differ diff --git a/data_src/models/layer_fuel.blend b/data_src/models/layer_fuel.blend index a987af1..b773999 100644 Binary files a/data_src/models/layer_fuel.blend and b/data_src/models/layer_fuel.blend differ diff --git a/data_src/models/layer_hv.blend b/data_src/models/layer_hv.blend index ed25fa8..50a5e7a 100644 Binary files a/data_src/models/layer_hv.blend and b/data_src/models/layer_hv.blend differ diff --git a/data_src/models/level_1.blend b/data_src/models/level_1.blend index e3623bf..41ae96a 100644 Binary files a/data_src/models/level_1.blend and b/data_src/models/level_1.blend differ diff --git a/data_src/models/level_10.blend b/data_src/models/level_10.blend index 480363f..6efb91c 100644 Binary files a/data_src/models/level_10.blend and b/data_src/models/level_10.blend differ diff --git a/data_src/models/level_11.blend b/data_src/models/level_11.blend index db99249..afdf74f 100644 Binary files a/data_src/models/level_11.blend and b/data_src/models/level_11.blend differ diff --git a/data_src/models/level_12.blend b/data_src/models/level_12.blend index 9e57015..064a7b5 100644 Binary files a/data_src/models/level_12.blend and b/data_src/models/level_12.blend differ diff --git a/data_src/models/level_2.blend b/data_src/models/level_2.blend index e5057e6..3d561d3 100644 Binary files a/data_src/models/level_2.blend and b/data_src/models/level_2.blend differ diff --git a/data_src/models/level_3.blend b/data_src/models/level_3.blend index 3c38d43..6feaff6 100644 Binary files a/data_src/models/level_3.blend and b/data_src/models/level_3.blend differ diff --git a/data_src/models/level_3p2.blend b/data_src/models/level_3p2.blend index 77f0df4..ffba63c 100644 Binary files a/data_src/models/level_3p2.blend and b/data_src/models/level_3p2.blend differ diff --git a/data_src/models/level_4.blend b/data_src/models/level_4.blend index c9c0279..5fdb367 100644 Binary files a/data_src/models/level_4.blend and b/data_src/models/level_4.blend differ diff --git a/data_src/models/level_5.blend b/data_src/models/level_5.blend index c2ae60e..bd667b6 100644 Binary files a/data_src/models/level_5.blend and b/data_src/models/level_5.blend differ diff --git a/data_src/models/level_6.blend b/data_src/models/level_6.blend index eb09e14..e2972c0 100644 Binary files a/data_src/models/level_6.blend and b/data_src/models/level_6.blend differ diff --git a/data_src/models/level_7.blend b/data_src/models/level_7.blend index 9e89325..421d64e 100644 Binary files a/data_src/models/level_7.blend and b/data_src/models/level_7.blend differ diff --git a/data_src/models/level_8.blend b/data_src/models/level_8.blend index caa04c4..663f8b7 100644 Binary files a/data_src/models/level_8.blend and b/data_src/models/level_8.blend differ diff --git a/data_src/models/level_9.blend b/data_src/models/level_9.blend index efbd437..aa90a02 100644 Binary files a/data_src/models/level_9.blend and b/data_src/models/level_9.blend differ diff --git a/data_src/models/manage_chatbox.blend b/data_src/models/manage_chatbox.blend index a0f8a39..6acbe6e 100644 Binary files a/data_src/models/manage_chatbox.blend and b/data_src/models/manage_chatbox.blend differ diff --git a/data_src/models/manage_portrait.blend b/data_src/models/manage_portrait.blend index 46af79a..cade138 100644 Binary files a/data_src/models/manage_portrait.blend and b/data_src/models/manage_portrait.blend differ diff --git a/data_src/models/money_background.blend b/data_src/models/money_background.blend index 3d7d095..7184316 100644 Binary files a/data_src/models/money_background.blend and b/data_src/models/money_background.blend differ diff --git a/data_src/models/ph_start_screen.blend b/data_src/models/ph_start_screen.blend index caaa87d..7c087b9 100644 Binary files a/data_src/models/ph_start_screen.blend and b/data_src/models/ph_start_screen.blend differ diff --git a/data_src/models/pipe1111.blend b/data_src/models/pipe1111.blend index 9749e14..e1f9213 100644 Binary files a/data_src/models/pipe1111.blend and b/data_src/models/pipe1111.blend differ diff --git a/data_src/models/pipe1111_hint.blend b/data_src/models/pipe1111_hint.blend index ab77f59..b70263d 100644 Binary files a/data_src/models/pipe1111_hint.blend and b/data_src/models/pipe1111_hint.blend differ diff --git a/data_src/models/star1.blend b/data_src/models/star1.blend index c1bbeee..1aa7ea4 100644 Binary files a/data_src/models/star1.blend and b/data_src/models/star1.blend differ diff --git a/data_src/models/star2.blend b/data_src/models/star2.blend index 04e0107..3c05642 100644 Binary files a/data_src/models/star2.blend and b/data_src/models/star2.blend differ diff --git a/data_src/models/star3.blend b/data_src/models/star3.blend index 3a77529..0d3e49f 100644 Binary files a/data_src/models/star3.blend and b/data_src/models/star3.blend differ diff --git a/data_src/models/test_ship.blend b/data_src/models/test_ship.blend index 104dfa8..35805ee 100644 Binary files a/data_src/models/test_ship.blend and b/data_src/models/test_ship.blend differ diff --git a/src/level7.moon b/src/level7.moon index 14a3dc3..6027b10 100644 --- a/src/level7.moon +++ b/src/level7.moon @@ -1,56 +1,56 @@ -layer = require "layers" -game = require "game" -state = require "global" -graph = require "graph" -import Layer from layer -ui = require "ui" - -mod = ... - -mod.setup_level = () -> - state.current_level = 7 - --ret = am.group! - state.move_out_done = false - state.clear_layers! - flayer = Layer("fuel","fuel pipe",50,"data/layer_fuel.png") - elayer = Layer("electric","electric wire",10,"data/layer_electric.png") - state.add_layer(flayer) - state.add_layer(elayer) - state.money = 190 - state.ship("position").x = 800 - state.ship\action(coroutine.create(game.ship_move_in_co)) - state.ship("sprite").source = "data/level_7.png" - t1 = flayer\mark_square(15,4,"liquid fuel thruster") - flayer\mark_square(14,4,"fuel pipe") - t2 = flayer\mark_square(15,6,"liquid fuel thruster") - flayer\mark_square(14,6,"fuel pipe") - t3 = flayer\mark_square(15,9,"liquid fuel thruster") - flayer\mark_square(14,9,"fuel pipe") - t4 = flayer\mark_square(15,11,"liquid fuel thruster") - flayer\mark_square(14,11,"fuel pipe") - p1 = flayer\mark_square(7,8,"liquid fuel tank") - for i = 4,11 do - flayer\mark_square(13,i,"fuel pipe") - - t5 = elayer\mark_square(11,6,"ion thruster") - t6 = elayer\mark_square(11,9,"ion thruster") - p2 = elayer\mark_square(3,7,"battery") - - elayer.node.hidden = true - state.selected_layer = flayer - state.update = () -> - flat_tiles = flayer\flat_tiles! - flat_tiles2 = elayer\flat_tiles! - path1 = graph.path(t1,p1,flat_tiles,true,flayer.tiles_adjacent) - path2 = graph.path(t2,p1,flat_tiles,true,flayer.tiles_adjacent) - path3 = graph.path(t3,p1,flat_tiles,true,flayer.tiles_adjacent) - path4 = graph.path(t4,p1,flat_tiles,true,flayer.tiles_adjacent) - - path5 = graph.path(t5,p2,flat_tiles2,true,flayer.tiles_adjacent) - path6 = graph.path(t6,p2,flat_tiles2,true,flayer.tiles_adjacent) - if path1 and path2 and path3 and path4 and path5 and path6 - state.ship\action(coroutine.create(game.ship_move_out_co)) - - ui.reload_ui_layers! - -mod +layer = require "layers" +game = require "game" +state = require "global" +graph = require "graph" +import Layer from layer +ui = require "ui" + +mod = ... + +mod.setup_level = () -> + state.current_level = 7 + --ret = am.group! + state.move_out_done = false + state.clear_layers! + flayer = Layer("fuel","fuel pipe",50,"data/layer_fuel.png") + elayer = Layer("electric","electric wire",10,"data/layer_electric.png") + state.add_layer(flayer) + state.add_layer(elayer) + state.money = 190 + state.ship("position").x = 800 + state.ship\action(coroutine.create(game.ship_move_in_co)) + state.ship("sprite").source = "data/level_7.png" + t1 = flayer\mark_square(15,4,"liquid fuel thruster") + flayer\mark_square(14,4,"fuel pipe") + t2 = flayer\mark_square(15,6,"liquid fuel thruster") + flayer\mark_square(14,6,"fuel pipe") + t3 = flayer\mark_square(15,9,"liquid fuel thruster") + flayer\mark_square(14,9,"fuel pipe") + t4 = flayer\mark_square(15,11,"liquid fuel thruster") + flayer\mark_square(14,11,"fuel pipe") + p1 = flayer\mark_square(7,8,"liquid fuel tank") + for i = 4,11 do + flayer\mark_square(13,i,"fuel pipe") + + t5 = elayer\mark_square(11,6,"ion thruster") + t6 = elayer\mark_square(11,9,"ion thruster") + p2 = elayer\mark_square(3,7,"battery") + + elayer.node.hidden = true + state.selected_layer = flayer + state.update = () -> + flat_tiles = flayer\flat_tiles! + flat_tiles2 = elayer\flat_tiles! + path1 = graph.path(t1,p1,flat_tiles,true,flayer.tiles_adjacent) + path2 = graph.path(t2,p1,flat_tiles,true,flayer.tiles_adjacent) + path3 = graph.path(t3,p1,flat_tiles,true,flayer.tiles_adjacent) + path4 = graph.path(t4,p1,flat_tiles,true,flayer.tiles_adjacent) + + path5 = graph.path(t5,p2,flat_tiles2,true,flayer.tiles_adjacent) + path6 = graph.path(t6,p2,flat_tiles2,true,flayer.tiles_adjacent) + if path1 and path2 and path3 and path4 and path5 and path6 + state.ship\action(coroutine.create(game.ship_move_out_co)) + + ui.reload_ui_layers! + +mod -- cgit v1.2.3-70-g09d2