Hi Raoul, Thanks for testing the "Inverse Pyramid" level. Since I got your email I have been trying to get the level to crash Enigma. So far I have had as many as 5 OXYDs in some state of open at one time without crashing. Once two pairs and an odd one. I don't know how to get a backtrace but if it helps I am running Enigma 1.20 on the following machine: DELL Studio XPS 9100 Intel i7 CPU @2.8 GHs 18.0 GB RAM 64-bit Windows 7 Professional The only anomaly I found was that when the last two pairs of OXYDs were on top of each other the level could complete prematurely. I think the Enigma program detects that the "last" pair of OXYDs (the pair on top) are matched and ends the game. In the short time the Enigma program is winding down the level writes the last two OXYDs (the pair on the bottom) to the world showing them as the game completes. I think placing an extra pair of OXYDs outside of the playing field has solved this problem. The level counts the pairs as they are matched and when all the pairs on the playing field have matched it triggers a laser to open the pair outside the playing field thus preventing any premature ending. I am attaching the updated level in case you want to test it. Thanks again, Ray. - Sentfrom Ray Wick without any free advertisement for any companies.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <el:level xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://enigma-game.org/schema/level/1 level.xsd" xmlns:el="http://enigma-game.org/schema/level/1"> <el:protected> <el:info el:type="level"> <el:identity el:title="Inverse Pyramid" el:subtitle=" -----> This level has OXYDs beneath other OXYDs." el:id="RayWick023"/> <el:version el:score="1" el:release="1" el:revision="0" el:status="stable"/> <el:author el:name="Ray Wick" el:email="rayrw...@aol.com" el:homepage="www.rayrwick.net/raywick/"/> <el:copyright>Copyright © Ray Wick</el:copyright> <el:license el:type="Donated to Enigma under the projects license" el:open="true"/> <el:compatibility el:enigma="1.20"> <el:dependency el:path="lib/liblua" el:id="lib/liblua" el:release="1" el:preload="true"/> <el:dependency el:path="lib/libmath" el:id="lib/libmath" el:release="1" el:preload="true"/> </el:compatibility> <el:modes el:easy="true" el:single="true" el:network="false"/> <el:comments> <el:code>Home File Name raywick023_1-0_1-20.xml</el:code> </el:comments> <el:score el:easy="03:16" el:difficult="05:06"/> </el:info> <el:luamain><![CDATA[ -- == == == == == == == == == == == == == == == == == == == == == == == == == == -- ### Global Definitions ############################################################################ -- === World ========================================================================================== wo["ConserveLevel"] = true wo["AllowSingleOxyds"] = true -- === Tile Definitions =============================================================================== ti["@"] = {"#ac_marble_black"} ti[" "] = {"fl_hay"} ti[","] = {"fl_water", "spot_L1#"} ti["#"] = {"st_brownpyramid"} ti["F"] = {"st_fake_oxydd"} ti["L"] = {"st_laser_w", "laser_1"} ti["M"] = {"st_mirror", flavor="triangle", state = EAST, transparent = false, movable = false} ti["O"] = {"st_oxyd", flavor = "a", oxydcolor = OXYD_BLACK} ti["Z"] = {"st_knight"} ti["~"] = {"fl_water"} ti[";"] = ti["~"] .. {"st_oxyd_d", oxydcolor = OXYD_BLACK, target = "oxyd_callback"} ti["a"] = {"st_oxyd", flavor = "a", oxydcolor = OXYD_WHITE, target = "oxyd_callback"} ti["A"] = {"st_oxyd", flavor = "a", oxydcolor = OXYD_BLACK, target = "oxyd_callback"} ti["X"] = {"st_oxyd", flavor = "b", oxydcolor = OXYD_BLACK, target = "oxyd_callback"} ti["b"] = {"st_oxyd", flavor = "b", oxydcolor = OXYD_WHITE, target = "oxyd_callback"} ti["C"] = {"st_oxyd", flavor = "c", oxydcolor = OXYD_BLACK, target = "oxyd_callback"} -- === Level Mode Definitions ========================================================================= if wo["IsDifficult"] then ti[":"] = {"it_seed", _tree = true} bgn = 1 prc = 44 else ti[":"] = {"it_seed_hay", _tree = true} bgn = 2 prc = 42 end w, h = wo(ti, " ", { -- 01234567890123456789 "#################### ", "# # ", "# # ", "# ,,,,,,, # ", "# ,,,,,,, # ", "# ,,,,,,, # ", "# @ ,,,F,,, #ML", "# ,,,,,,, # ", "# ,,,,,,, # ", "# ,,,,,,, # ", "# # ", "# # ", "#################### " }) -- === Table Definitions ============================================================================== oxyds_L1 = {OXYD_PURPLE, OXYD_GRAY, OXYD_CYAN, OXYD_BLUE, OXYD_GREEN, OXYD_PINE} for j = 1, #oxyds_L1 do ti["O" .. oxyds_L1[j]] = ti{"fl_water"} .. {"st_oxyd_d", oxydcolor = oxyds_L1[j], target = "oxyd_callback", flavor = "d"} end local col_L2 = { [1] = OXYD_ORANGE, [2] = OXYD_BROWN, [3] = OXYD_YELLOW, [4] = OXYD_RED, [5] = OXYD_ORANGE, [6] = OXYD_BROWN, [7] = OXYD_YELLOW, [8] = OXYD_RED, [9] = OXYD_ORANGE, [10] = OXYD_BROWN, [11] = OXYD_YELLOW, [12] = OXYD_RED, [13] = OXYD_ORANGE, [14] = OXYD_BROWN, [15] = OXYD_YELLOW, [16] = OXYD_RED, [17] = OXYD_ORANGE, [18] = OXYD_BROWN, [19] = OXYD_YELLOW, [20] = OXYD_RED, [21] = OXYD_ORANGE, [22] = OXYD_BROWN, [23] = OXYD_YELLOW, [24] = OXYD_RED, [25] = OXYD_RED, [26] = OXYD_RED, } col_L2 = lib.lua.shuffle(col_L2) spots_L1 = po(no["spot_L1#*"]:shuffle()) colors_L1 = lib.math.permutation(#spots_L1) for j = 1, (#spots_L1) do local color_L1 = oxyds_L1[colors_L1[j] % (#oxyds_L1) + 1] wo[spots_L1[j]] = ti["O" .. color_L1] end -- ### Function Definitions ########################################################################## last_oxyd = 0 cnt_L2 = 0 pair_count = 0 function oxyd_callback(is_on, sender) if bgn == 1 then cnt_L2 = cnt_L2 + 1 wo[{10, 6}] = ti{"fl_water"} .. {"st_oxyd", flavor = "d", oxydcolor = col_L2[cnt_L2], target = "oxyd_callback"} wo[{20, 5}] = ti["O"] wo[{20, 7}] = ti["O"] bgn = 0 end if bgn == 2 then wo[{10, 6}] = ti[";"] wo[{20, 5}] = ti["O"] wo[{20, 7}] = ti["O"] bgn = 0 end if sender.state == OXYDPAIR then pair_count = pair_count + 1 if pair_count == prc then Fin_Level() end oxyds = grp(sender, last_oxyd) if sender.flavor == "d" then Do_d(sender, "s") end if sender.flavor == "c" then Do_c(sender, "s") end if sender.flavor == "b" then Do_b(sender, "s") end if sender.flavor == "a" then makefloor(sender) end if last_oxyd.flavor == "d" then Do_d(last_oxyd, "l") end if last_oxyd.flavor == "c" then Do_c(last_oxyd, "l") end if last_oxyd.flavor == "b" then Do_b(last_oxyd, "l") end if last_oxyd.flavor == "a" then makefloor(last_oxyd) end it(oxyds):grow() elseif sender.state == OPEN then last_oxyd = sender end end function Do_d(where, which) if five_by(where) == true then makeoxyd(where, where.flavor) else if gard(where) == true then if ((wo["IsDifficult"]) and (which == "s")) then makeoxyd(where, "Z") else makefloor(where) end else makefloor(where) end end return end function Do_c(where, which) if corner(where) == true then if wo["IsDifficult"] then if where.oxydcolor == OXYD_BLACK then makefloor(where) else makeoxyd(where, "C") end else makefloor(where) end else if three_by(where) == true then if wo["IsDifficult"] then if center(where) == true then makeoxyd(where, "X") else makeoxyd(where, where.flavor) end else makeoxyd(where, where.flavor) end else makefloor(where) end end return end function Do_b(where, which) if center(where) == true then if wo["IsDifficult"] then makeoxyd(where, "A") else makeoxyd(where, where.flavor) end else makefloor(where) end return end function makefloor(whareat) wo[whareat] = ti[":"] fl(whareat)._tree = true return end function five_by(cell) return (((cell.y == 4) or (cell.y == 5) or (cell.y == 6) or (cell.y == 7) or (cell.y == 8)) and ((cell.x == 8) or (cell.x == 9) or (cell.x == 10) or (cell.x == 11) or (cell.x == 12))) end function three_by(cell) return (((cell.y == 5) or (cell.y == 6) or (cell.y == 7)) and ((cell.x == 9) or (cell.x == 10) or (cell.x == 11))) end function gard(cell) return (((cell.y == 3) or (cell.y == 9)) and ((cell.x == 7) or (cell.x == 13))) end function corner(cell) return (((cell.y == 4) or (cell.y == 8)) and ((cell.x == 8) or (cell.x == 12))) end function center(cell) return ((cell.y == 6) and (cell.x == 10)) end function makeoxyd(whareat, flav) if flav == "Z" then wo[whareat] = ti["Z"] end if flav == "X" then wo[whareat] = ti["X"] end if flav == "A" then wo[whareat] = ti["A"] end if flav == "C" then wo[whareat] = ti["C"] end if flav == "b" then wo[whareat] = ti["a"] end if flav == "c" then wo[whareat] = ti["b"] end if flav == "d" then if wo["IsDifficult"] then cnt_L2 = cnt_L2 + 1 wo[whareat] = {"st_oxyd", flavor = "c", oxydcolor = col_L2[cnt_L2], target = "oxyd_callback"} else wo[whareat] = ti["C"] end end return end function Fin_Level() no["laser_1"]:on() end -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- wo:shuffleOxyd() -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ]]></el:luamain> <el:i18n> <el:string el:key="title"> <el:english el:translate="false"/> </el:string> <el:string el:key="subtitle"> <el:english el:translate="true"/> </el:string> </el:i18n> </el:protected> </el:level>
_______________________________________________ Enigma-devel mailing list Enigma-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/enigma-devel