This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - flyingfisch
Pages: 1 ... 26 27 [28] 29 30 ... 119
406
« on: October 30, 2012, 06:47:06 pm »
Huh, well it only just started happening and i have been using linux since 2yr ago, so i dont think i am infected.
how do i get off the blacklist?
408
« on: October 30, 2012, 02:16:43 pm »
OK, that turned out to be a problem with luazm, not my code. Anyway, I released this. Blog post
409
« on: October 29, 2012, 05:05:46 pm »
... Also, I noticed you have
--[[-- and --]]-- If you simply want to uncomment a block of code, just change the --[[ into ---[[. That's all that's required, and you can comment it as easy later
What do you mean? I want that section of code commented out. EDIT: For some reason this works... print("Chess timer starting...") --function variables local drawRectFill = zmg.drawRectFill local fastCopy = zmg.fastCopy local makeColor = zmg.makeColor local drawPoint = zmg.drawPoint local keyMenuFast = zmg.keyMenuFast local clear = zmg.clear local drawText = zmg.drawText local keyDirectPoll = zmg.keyDirectPoll local keyDirect = zmg.keyDirect local floor = math.floor local random = math.random local time = zmg.time local ticks = zmg.ticks
--screen vars local SCREEN_WIDTH = 384 local SCREEN_HEIGHT = 216 local exit = 0
--game variables local key = {F1=79, F2=69, F3=59, F4=49, F5=39, F6=29, Alpha=77, Exit=47, Optn=68, Up=28, Down=37, Left=38, Right=27, EXE=31} local chesstimer = {timerStart=60, add=0, turn="White", turnNum=1} local color = {bg=makeColor("white"), fg=makeColor("black"), dbfg=makeColor("red"), dbbg=makeColor("black")} local continue = 0 local intro = 1 local buffer = 0 local timers = {}
local start=0 local timeElapsedSinceTurn = 0
--first poll and first start timer keyDirectPoll() local startTime = ticks()
--functions
local function timeElapsed() return floor((ticks()-startTime)/128) end
local function convertTime(t, format) min = floor(t/60) sec = t-(min*60) if format=="m" then return min elseif format=="s" then return sec end end
local function wait(timeToWait) local start = timeElapsed() while timeElapsed() - start < timeToWait do end end
local function waitForKey(key) while keyDirect(key) == 0 do keyDirectPoll() end end
local function toggleTurn() fastCopy() timers[chesstimer.turnNum + 2] = (timers[chesstimer.turnNum + 2] - timeElapsedSinceTurn) + chesstimer.add if chesstimer.turn == "White" then chesstimer.turn = "Black" chesstimer.turnNum = 2 else chesstimer.turn = "White" chesstimer.turnNum = 1 end start = timeElapsed() end --[[-- local function outOfTime(message) clear() drawText(floor(SCREEN_WIDTH/2),floor(SCREEN_HEIGHT/2),message,makeColor("black"), makeColor("red")) fastCopy() waitForKey(key.Exit) end --]]--
local function introScreen() clear() continue = 0 drawText(1, 1, "WAIT...", color.fg, color.bg) fastCopy() min = 1 wait(1) while continue==0 do clear() keyDirectPoll() if keyDirect(key.Up)>0 and min<15 then while keyDirect(key.Up) > 0 do keyDirectPoll() end min = min+1 elseif keyDirect(key.Down)>0 and min>0 then while keyDirect(key.Down) > 0 do keyDirectPoll() end min = min-1 end if keyDirect(key.EXE)>0 then continue = 1 end drawText(1, 1, "Press [EXE] to continue", color.fg, color.bg) drawText(1, 20, "minutes: " .. min, color.fg, color.bg) fastCopy() end chesstimer.timerStart = min*60 timers[1] = chesstimer.timerStart timers[2] = chesstimer.timerStart timers[3] = chesstimer.timerStart timers[4] = chesstimer.timerStart intro = 0 end
local function chessTimerScreen() clear() start = timeElapsed() while exit ~= 1 do clear() if keyDirect(key.Exit) > 0 then exit = 1 elseif keyDirect(key.F1) > 0 then while keyDirect(key.F1) > 0 do keyDirectPoll() end toggleTurn() end --drawing drawText(1, SCREEN_HEIGHT - 20, "Next Player", color.fg, color.bg) drawText(1, 1, "Turn: " .. chesstimer.turn, color.fg, color.bg) drawText(1, 20, "White: " .. convertTime(timers[1],"m") .. ":" .. convertTime(timers[1],"s"), color.fg, color.bg) drawText(1, 40, "Black: " .. convertTime(timers[2],"m") .. ":" .. convertTime(timers[2],"s"), color.bg, color.fg) fastCopy() --math timeElapsedSinceTurn = timeElapsed() - start timers[chesstimer.turnNum] = timers[chesstimer.turnNum + 2] - timeElapsedSinceTurn if timers[chesstimer.turnNum] < 0 then clear() drawText(1,1,chesstimer.turn .. " ran out of time!",makeColor("black"), makeColor("red")) fastCopy() waitForKey(key.Exit) exit = 1 end --[[-- debug drawText(1, 70, "DEBUG: " .. timers[1], color.dbfg, color.dbbg) --]]-- keyDirectPoll() end end
--main loop while exit~=1 do clear() --intro screen if intro == 1 then fastCopy() introScreen() end --wait screen clear() drawText(1, 1, "Press F1 when ready", color.fg, color.bg) drawText(1, SCREEN_HEIGHT - 20, "Next Player", color.fg, color.bg) fastCopy() --wait waitForKey(key.F1) --chesstimer screen chessTimerScreen() --refresh screen fastCopy() --keypoll keyDirectPoll() end
print("done.") print("")
EDIT2: Now its freezing at "WAIT..." print("Chess timer starting...") --function variables local drawRectFill = zmg.drawRectFill local drawRect = zmg.drawRect local fastCopy = zmg.fastCopy local makeColor = zmg.makeColor local drawPoint = zmg.drawPoint local keyMenuFast = zmg.keyMenuFast local clear = zmg.clear local drawText = zmg.drawText local keyDirectPoll = zmg.keyDirectPoll local keyDirect = zmg.keyDirect local floor = math.floor local random = math.random local time = zmg.time local ticks = zmg.ticks local copySprite = zmg.copySprite
--screen vars local SCREEN_WIDTH = 384 local SCREEN_HEIGHT = 216 local exit = 0
--game variables local key = {F1=79, F2=69, F3=59, F4=49, F5=39, F6=29, Alpha=77, Exit=47, Optn=68, Up=28, Down=37, Left=38, Right=27, EXE=31} local chesstimer = {timerStart=60, add=0, turn="White", turnNum=1, selected=1} local color = {bg=makeColor("white"), fg=makeColor("black"), dbfg=makeColor("red"), dbbg=makeColor("black")} local continue = 0 local intro = 1 local buffer = 0 local timers = {} local playerColor = {makeColor("white"), makeColor("black")} local start=0 local timeElapsedSinceTurn = 0 local add = 0
--first poll and first start timer keyDirectPoll() local startTime = ticks()
--functions
local function timeElapsed() return floor((ticks()-startTime)/128) end
local function convertTime(t, format) min = floor(t/60) sec = t-(min*60) if format=="m" then return min elseif format=="s" then return sec end end
local function wait(timeToWait) local start = timeElapsed() while timeElapsed() - start < timeToWait do end end
local function waitForKey(key) while keyDirect(key) == 0 do keyDirectPoll() end end
local function toggleTurn() fastCopy() timers[chesstimer.turnNum + 2] = (timers[chesstimer.turnNum + 2] - timeElapsedSinceTurn) if timers[chesstimer.turnNum + 2] < chesstimer.timerStart then timers[chesstimer.turnNum + 2] = timers[chesstimer.turnNum + 2] + chesstimer.add end if chesstimer.turn == "White" then chesstimer.turn = "Black" chesstimer.turnNum = 2 chesstimer.selected = 2 else chesstimer.turn = "White" chesstimer.turnNum = 1 chesstimer.selected = 1 end start = timeElapsed() end --[[-- local function outOfTime(message) clear() drawText(floor(SCREEN_WIDTH/2),floor(SCREEN_HEIGHT/2),message,makeColor("black"), makeColor("red")) fastCopy() waitForKey(key.Exit) end --]]--
local function introScreen() clear() continue = 0 drawText(1, 1, "WAIT...", color.fg, color.bg) fastCopy() min = 1 wait(1) while continue==0 do clear() drawText(1, 1, "Press [EXE] to continue", color.fg, color.bg) drawText(1, 20, "Minutes (change with UP/DN): " .. min, color.fg, color.bg) drawText(1, 20, "Time to add after each turn (change with LT/RT): " .. add, color.fg, color.bg) fastCopy() keyDirectPoll() if keyDirect(key.Up)>0 and min<60 then while keyDirect(key.Up) > 0 do keyDirectPoll() end min = min+1 elseif keyDirect(key.Down)>0 and min>1 then while keyDirect(key.Down) > 0 do keyDirectPoll() end min = min-1 end if keyDirect(key.Left)>0 and add<60 then while keyDirect(key.Left) > 0 do keyDirectPoll() end add = add+1 elseif keyDirect(key.Right)>0 and add>0 then while keyDirect(key.Right) > 0 do keyDirectPoll() end add = add-1 end if keyDirect(key.EXE)>0 then continue = 1 end end chesstimer.timerStart = min*60 timers[1] = chesstimer.timerStart timers[2] = chesstimer.timerStart timers[3] = chesstimer.timerStart timers[4] = chesstimer.timerStart chesstimer.add = add intro = 0 end
local function chessTimerScreen() clear() start = timeElapsed() while exit ~= 1 do if keyDirect(key.Exit) > 0 then exit = 1 elseif keyDirect(key.F1) > 0 then while keyDirect(key.F1) > 0 do keyDirectPoll() end toggleTurn() end --drawing clear() drawRectFill(85, (chesstimer.selected * 20) + 43, 10, 10, makeColor("darkblue")) drawText(1, SCREEN_HEIGHT - 20, "Next Player", color.fg, color.bg) drawText(1, 1, "Turn: " .. chesstimer.turn, color.fg, color.bg) drawText(100, 60, "White: " .. convertTime(timers[1],"m") .. ":" .. convertTime(timers[1],"s"), color.fg, color.bg) drawText(100, 80, "Black: " .. convertTime(timers[2],"m") .. ":" .. convertTime(timers[2],"s"), color.fg, color.bg) drawRect(1, 115, SCREEN_WIDTH - 3, 30, color.fg) drawRect(1, 150, SCREEN_WIDTH - 3, 30, color.fg) drawRect(1, 115, (timers[1]*(SCREEN_WIDTH-3))/chesstimer.timerStart, 30, color.fg) drawRectFill(1, 151, (timers[2]*(SCREEN_WIDTH-3))/chesstimer.timerStart, 29, color.fg) fastCopy() --math timeElapsedSinceTurn = timeElapsed() - start timers[chesstimer.turnNum] = timers[chesstimer.turnNum + 2] - timeElapsedSinceTurn if timers[chesstimer.turnNum] < 0 then drawText(1,1,chesstimer.turn .. " ran out of time!",makeColor("black"), makeColor("red")) fastCopy() waitForKey(key.Exit) exit = 1 end --[[-- debug drawText(1, 70, "DEBUG: " .. timers[1], color.dbfg, color.dbbg) --]]-- keyDirectPoll() end end
--main loop while exit~=1 do clear() --intro screen if intro == 1 then fastCopy() introScreen() end --wait screen clear() drawText(1, 1, "Press F1 when ready", color.fg, color.bg) drawText(1, SCREEN_HEIGHT - 20, "Next Player", color.fg, color.bg) fastCopy() --wait waitForKey(key.F1) --chesstimer screen chessTimerScreen() --refresh screen fastCopy() --keypoll keyDirectPoll() end
print("done.") print("")
410
« on: October 29, 2012, 04:00:39 pm »
if you put code after "drawText(1, 1, "Press [EXE] to continue", color.fg, color.bg)", like another drawText, does it get executed ? Also, is line 95 intentional ?
Actually, i forgot to update this thread but I got past that problem and now have another. when a timer runs out of time the calc freezes instead of showing the out of time message: print("Chess timer starting...") --function variables local drawRectFill = zmg.drawRectFill local fastCopy = zmg.fastCopy local makeColor = zmg.makeColor local drawPoint = zmg.drawPoint local keyMenuFast = zmg.keyMenuFast local clear = zmg.clear local drawText = zmg.drawText local keyDirectPoll = zmg.keyDirectPoll local keyDirect = zmg.keyDirect local floor = math.floor local random = math.random local time = zmg.time local ticks = zmg.ticks
--screen vars local SCREEN_WIDTH = 384 local SCREEN_HEIGHT = 216 local exit = 0
--game variables local key = {F1=79, F2=69, F3=59, F4=49, F5=39, F6=29, Alpha=77, Exit=47, Optn=68, Up=28, Down=37, Left=38, Right=27, EXE=31} local chesstimer = {timerStart=60, add=0, turn="White", turnNum=1} local color = {bg=makeColor("white"), fg=makeColor("black"), dbfg=makeColor("red"), dbbg=makeColor("black")} local continue = 0 local intro = 1 local buffer = 0 local timers = {}
local start=0 local timeElapsedSinceTurn = 0
--first poll and first start timer keyDirectPoll() local startTime = ticks()
--functions
local function timeElapsed() return floor((ticks()-startTime)/128) end
local function convertTime(t, format) min = floor(t/60) sec = t-(min*60) if format=="m" then return min elseif format=="s" then return sec end end
local function wait(timeToWait) local start = timeElapsed() while timeElapsed() - start < timeToWait do end end
local function waitForKey(key) while keyDirect(key) == 0 do keyDirectPoll() end end
local function toggleTurn() fastCopy() timers[chesstimer.turnNum + 2] = (timers[chesstimer.turnNum + 2] - timeElapsedSinceTurn) + chesstimer.add if chesstimer.turn == "White" then chesstimer.turn = "Black" chesstimer.turnNum = 2 else chesstimer.turn = "White" chesstimer.turnNum = 1 end start = timeElapsed() end
local function outOfTime(message) clear() drawText(floor(SCREEN_WIDTH/2),floor(SCREEN_HEIGHT/2),message,makeColor("black"), makeColor("red")) fastCopy() waitForKey(key.Exit) end
local function introScreen() clear() continue = 0 drawText(1, 1, "WAIT...", color.fg, color.bg) fastCopy() min = 1 wait(1) while continue==0 do clear() keyDirectPoll() if keyDirect(key.Up)>0 and min<15 then while keyDirect(key.Up) > 0 do keyDirectPoll() end min = min+1 elseif keyDirect(key.Down)>0 and min>0 then while keyDirect(key.Down) > 0 do keyDirectPoll() end min = min-1 end if keyDirect(key.EXE)>0 then continue = 1 end drawText(1, 1, "Press [EXE] to continue", color.fg, color.bg) drawText(1, 20, "minutes: " .. min, color.fg, color.bg) fastCopy() end chesstimer.timerStart = min*60 timers[1] = chesstimer.timerStart timers[2] = chesstimer.timerStart timers[3] = chesstimer.timerStart timers[4] = chesstimer.timerStart intro = 0 end
local function chessTimerScreen() clear() start = timeElapsed() while exit ~= 1 do clear() if keyDirect(key.Exit) > 0 then exit = 1 elseif keyDirect(key.F1) > 0 then while keyDirect(key.F1) > 0 do keyDirectPoll() end toggleTurn() end --drawing drawText(1, SCREEN_HEIGHT - 20, "Next Player", color.fg, color.bg) drawText(1, 1, "Turn: " .. chesstimer.turn, color.fg, color.bg) drawText(1, 20, "White: " .. convertTime(timers[1],"m") .. ":" .. convertTime(timers[1],"s"), color.fg, color.bg) drawText(1, 40, "Black: " .. convertTime(timers[2],"m") .. ":" .. convertTime(timers[2],"s"), color.bg, color.fg) fastCopy() --math timeElapsedSinceTurn = timeElapsed() - start timers[chesstimer.turnNum] = timers[chesstimer.turnNum + 2] - timeElapsedSinceTurn if timers[chesstimer.turnNum] < 0 then outOfTime(chesstimer.turn .. " ran out of time!") end --[[-- debug drawText(1, 70, "DEBUG: " .. timers[1], color.dbfg, color.dbbg) --]]-- keyDirectPoll() end end
--main loop while exit~=1 do clear() --intro screen if intro == 1 then fastCopy() introScreen() end --wait screen clear() drawText(1, 1, "Press F1 when ready", color.fg, color.bg) drawText(1, SCREEN_HEIGHT - 20, "Next Player", color.fg, color.bg) fastCopy() --wait waitForKey(key.F1) --chesstimer screen chessTimerScreen() --refresh screen fastCopy() --keypoll keyDirectPoll() end
print("done.") print("")
411
« on: October 28, 2012, 07:22:54 pm »
OK, here's my chess timer:
print("Chess timer starting...") --function variables local drawRectFill = zmg.drawRectFill local fastCopy = zmg.fastCopy local makeColor = zmg.makeColor local drawPoint = zmg.drawPoint local keyMenuFast = zmg.keyMenuFast local clear = zmg.clear local drawText = zmg.drawText local keyDirectPoll = zmg.keyDirectPoll local keyDirect = zmg.keyDirect local floor = math.floor local random = math.random local time = zmg.time local ticks = zmg.ticks
--screen vars local SCREEN_WIDTH = 384 local SCREEN_HEIGHT = 216 local exit = 0
--game variables local key = {F1=79, F2=69, F3=59, F4=49, F5=39, F6=29, Alpha=77, Exit=47, Optn=68, Up=28, Down=37, Left=38, Right=27, EXE=31} local chesstimer = {timerStart=60, add=0, turn="White", turnNum=1} local color = {bg=makeColor("white"), fg=makeColor("black")} local continue = 0 local intro = 1 local buffer = 0 local timers = {white=chesstimer.timerStart, black=chesstimer.timerStart} local start=0
--first poll and first start timer keyDirectPoll() local startTime = ticks()
--functions
local function timeElapsed() return floor((ticks()-startTime)/100) end
local function wait(timeToWait) local start = timeElapsed() while timeElapsed() - start < timeToWait do end end
local function waitForKey(key) while keyDirect(key) == 0 do keyDirectPoll() end end
local function toggleTurn() if chesstimer.turn == "White" then chesstimer.turn = "Black" chesstimer.turnNum = 2 else chesstimer.turn = "White" chesstimer.turnNum = 1 end start = timeElapsed() end
local function introScreen() continue = 0 drawText(1, 1, "WAIT...", color.fg, color.bg) fastCopy() wait(3) drawText(1, 1, "Press [EXE] to continue", color.fg, color.bg) fastCopy() waitForKey(key.EXE) intro = 0 end
local function chessTimerScreen() start = timeElapsed() while exit ~= 1 do if keyDirect(key.Exit) > 0 then exit = 1 elseif keyDirect(key.F1) > 0 then toggleTurn() end --drawing drawText(1, SCREEN_HEIGHT - 10, "Next Player", color.fg, color.bg) drawText(1, 1, "Turn: " .. chesstimer.turn, color.fg, color.bg) drawText(1, 10, "White: " .. timers.white, color.fg, color.bg) drawText(1, 20, "Black: " .. timers.black, color.bg, color.fg) --math timeElapsedSinceTurn = timeElapsed - start timers[chesstimer.turnNum] = chesstimer.timerStart - timeElapsedSinceTurn keyDirectPoll() end exit=0 intro=1 end
--main loop while exit~=1 do clear() --intro screen if intro == 1 then fastCopy() introScreen() end --wait screen drawText(1, 1, "Press F1 when ready", color.fg, color.bg) drawText(1, SCREEN_HEIGHT - 10, "Next Player", color.fg, color.bg) --wait waitForKey(key.F1) --chesstimer screen chessTimerScreen() --refresh screen fastCopy() --keypoll keyDirectPoll() end
print("done.") print("")
For some reason it freezes at "Press [EXE] to continue". I've been debugging it for a half an hour with no results so maybe someone with a fresh brain can help me see where my problem is?
412
« on: October 24, 2012, 04:11:55 pm »
Oh ok I didn't think about that, and wow I didn't realize pixel test would be that slow. On the 83+ it's like the fastest way to do collision detection in BASIC.
Really? It seems to have always been popular wisdom not to use pixeltest in the casio communities.
413
« on: October 21, 2012, 02:21:57 pm »
DJ: Well, I have gotten pretty busy lately and I didn't realize this thread was getting attention. I am planning on getting back to it sometime within the next few weeks
414
« on: October 12, 2012, 08:56:41 pm »
* shmibs panics. that movie just did not do the books justice (although i doubt any movie could have) yay for arch, though!
What icon set do you have? I think I've seen it somewhere but I can't find it.
415
« on: October 07, 2012, 12:36:54 pm »
That's pretty nice flyingfisch.
Thanks. I am using guake terminal, and I really like it. It emulates quake's in-game terminal thing, and can be activated with f12. Its awesome.
416
« on: October 06, 2012, 10:01:19 pm »
Wait, so the ones who made the add-on advertises in people code when people inspect it?
It reminds me of those forum mods that also adds stuff like Powered by EzPortal at the end of every page when installed, but sneakier.
No, probably you would see the ads normally, but I have adblock installed so you only see it in an element inspector.
417
« on: October 06, 2012, 03:04:40 pm »
Yeah, I am pretty bad at anything besides flight sims. Maybe its cuz I don't spend all my time trying to get better at playing games... I spend my time making better games!
418
« on: October 06, 2012, 02:59:30 pm »
How does your 3D routine work?
I thought I would do it like this:
1. draw lines. 2. draw circles. 3. draw obstacles. 4. collision detection
I would not be making it really 3D, it would be pseudo 3D.
419
« on: October 06, 2012, 01:17:32 pm »
The only addon I have is adblock, so i dont know.
EDIT:
Well of all things... personas interactive was doing it. It was the only thing besides adblock and I didn't even know I had it.
420
« on: October 06, 2012, 12:33:42 pm »
Hi, I was just using Firefox's built-in inspect element tool and at the bottom of every page it shows this:
<iframe style="width: 330px; height: 0px; border: 0px none; position: fixed; bottom: 0px; right: 0px; padding: 0px; line-height: 1em; z-index: 2147483647; margin-right: 10px;" name="prestosavings-ifrm-01" id="prestosavings-ifrm-01" src="https://savecdn.com/addon/coupontool2/iframe.php"></iframe>
That scared me at first because I thought maybe my site was hacked or something but I checked other sites and found the same thing. If I use another browser, or view source, it is not there. So I guess it has to do with the inspector? Just wondering if anyone else had this happen to them.
Pages: 1 ... 26 27 [28] 29 30 ... 119
|