Show Posts

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 - NecroBumpist

Pages: 1 ... 7 8 [9] 10
121
Computer Usage and Setup Help / Re: Acer Aspire 5520 doesn't boot
« on: August 19, 2011, 11:17:08 am »
I've had a similar problem before.
My laptop wouldn't start into BIOS at all, but the battery light worked fine.
After a while I realized that a USB mouse I had plugged in was messing up the boot sequence (for whatever reason), and after removing that it worked.
Though if this is a long-time problem I doubt it's a peripheral acting up :\

122
TI-Nspire / Re: [Lua] RayCaster
« on: August 19, 2011, 01:08:30 am »
While I know this thread is somewhat dated, and the topic really has shifted more towards the CX's DRM, I thought I would highlight the importance of basic Lua optimizations.

I ran the code from the first page (slightly modified, included a timer call so I could get a consistent frame rate), and it ran at 4 to 5 frames per second.
I modify the code some (only localizes variables and common functions), and then I can get 6 - 7 frames per second.
This doesn't change the algorithm at all, though that could probably be improved.

Code: (minor optimizations) [Select]

local timer_stop = timer.stop;
local timer_start = timer.start;
local window = platform.window;
local invalidate = window.invalidate;
local w, h, planeX, planeY, map;


function on.timer()
timer_stop();
invalidate(window);
end

local math_abs = math.abs;
local math_floor = math.floor;
local math_cos, math_sin = math.cos, math.sin;

local function racine(a)
local x=1
local y=0.5*(1+a)
while math_abs(y-x)>0.001 do
x=y
y=0.5*(x+a/x)
end
return y
end

local function renderMap(gc,map,w,h,camera)
local math_cos, math_sin = math_cos, math_sin;
local dirX, dirY, rayPosX, rayPosY, rayDirX, rayDirY, mapX, mapY, deltaDistX,
deltaDisY, hit, stepX, sideDistX, stepY, sideDistY;
for x=0,w,2 do
dirX=math_cos(camera[3])
dirY=math_sin(camera[3])
planeX=math_cos(camera[3]-1.5707963267949)
planeY=math_sin(camera[3]-1.5707963267949)
cameraX=(x*2/w)-1
rayPosX=camera[1]
rayPosY=camera[2]
rayDirX=dirX+planeX*cameraX
rayDirY=dirY+planeY*cameraX
mapX=math_floor(rayPosX)
mapY=math_floor(rayPosY)
deltaDistX=racine(1+(rayDirY*rayDirY)/(rayDirX*rayDirX))
deltaDistY=racine(1+(rayDirX*rayDirX)/(rayDirY*rayDirY))
hit=0

if rayDirX<0 then
stepX=-1
sideDistX=(rayPosX-mapX)*deltaDistX
else
stepX = 1;
sideDistX = (mapX+1-rayPosX)*deltaDistX
end
if rayDirY<0 then
stepY=-1;
sideDistY=(rayPosY-mapY)*deltaDistY
else
stepY=1;
sideDistY=(mapY+1-rayPosY)*deltaDistY
end


while hit==0 do
if sideDistX<sideDistY then
sideDistX=sideDistX+deltaDistX
mapX=mapX+stepX
side=0
else
sideDistY=sideDistY+deltaDistY
mapY=mapY+stepY
side=1
end

if map[mapX][mapY]>0 then
hit=1
end
end

local perpWallDist;

if side==0 then
perpWallDist=math_abs((mapX-rayPosX+(1-stepX)/2)/rayDirX)
else
perpWallDist=math.abs((mapY-rayPosY+(1-stepY)/2)/rayDirY)
end
local hauteurLigne=math.abs(math_floor(h/perpWallDist))
local drawStart=math_floor(-hauteurLigne/2+h/2)
local drawEnd=math_floor(hauteurLigne/2+h/2)
if drawStart<0 then
drawStart=0
end
if drawEnd>=h then
drawEnd=h-1
end

gc:setColorRGB(10,10,10)
if side==1 then
gc:setColorRGB(100,100,100)
end
gc:fillRect(x,drawStart,2,drawEnd-drawStart)
end
end


local menu;
function on.escapeKey()
menu=1
invalidate(window);
end
on.escapeKey()

function on.enterKey()
menu=nil
--fovy=60
camera={10,10,0.05}
w=320 h=240
planeX=0 planeY=1
map={{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1},{1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1},{1,0,0,0,0,0,1,0,0,1,1,1,1,1,1,1},{1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,1},{1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1},{1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1},{1,0,0,0,0,0,1,0,0,1,0,0,1,0,0,1},{1,1,1,1,1,1,1,0,0,1,0,0,1,0,0,1},{1,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1},{1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1},{1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,1},{1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,1},{1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,1},{1,0,0,1,1,1,0,0,1,1,1,1,1,0,0,1},{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}}
invalidate(window);
end

function on.arrowKey(ar)
turn=nil
if ar=="right" then
camera[3]=camera[3]-0.1
end
if ar=="left" then
camera[3]=camera[3]+0.1
end
if ar=="up" then
if map[math_floor(camera[1]+math_cos(camera[3])/3)][math_floor(camera[2]+math_sin(camera[3])/3)]==0 then
camera[1]=camera[1]+math_cos(camera[3])/3
camera[2]=camera[2]+math_sin(camera[3])/3
end
end
if ar=="down" then
if map[math_floor(camera[1]-math_cos(camera[3])/4)][math_floor(camera[2]-math_sin(camera[3])/4)]==0 then
camera[1]=camera[1]-math_cos(camera[3])/4
camera[2]=camera[2]-math_sin(camera[3])/4
end

end
invalidate(window);
end

local milli = timer.getMilliSecCounter;
local last = 0;

function on.paint(gc)
if menu then
gc:setColorRGB(0,0,255)
gc:setFont("sansserif","r",30)
gc:drawString("RayCaster Demo",30,0,"top")
gc:setFont("serif","b",10)
gc:drawString("Press Enter to start",100,100,"top")
else
gc:setColorRGB(200,200,200)
gc:fillRect(0,0,platform.window:width(),platform.window:height())
renderMap(gc,map,platform.window:width(),platform.window:height(),camera)
end
gc:setColorRGB(0,0,0)
gc:setFont("sansserif","r",8)
gc:drawString("FPS: " .. tostring(1000/(milli()-last)),10,200,"top")
last = milli();
timer_start(0.01);
end

123
Introduce Yourself! / Re: Greetings Omnimaga!
« on: August 19, 2011, 12:22:38 am »
Does TI still sell 83/84 calculators ? Which is more powerful (processor wise) ?

124
Introduce Yourself! / Re: Greetings Omnimaga!
« on: August 19, 2011, 12:13:17 am »
The thing about axe is it compiles to z80 asm, which is ndless to say different from ARM asm.
i c what u did there

So in the meantime, without NDless, is Lua the fastest alternative on the NSpire ?

125
Introduce Yourself! / Re: Greetings Omnimaga!
« on: August 19, 2011, 12:07:23 am »
Axe is for the 83+ and 84, so z80.

Ahh, thought so :\
I wonder if it will be ported to ARM9 if NDless 3 comes out :)

126
Lua / Re: Lua Q&A
« on: August 19, 2011, 12:05:21 am »
I'm actually not too sure that its your fault, as usually, the program doesn't crash the calulator, it just tells you about the syntax error.

Oh I'm pretty sure it was my fault.
While doing some ... exploring, I found a __gc() function in the 'val' table, and called that with the table as an arguments, and then my calculator crashed :)

127
Introduce Yourself! / Re: Greetings Omnimaga!
« on: August 19, 2011, 12:03:33 am »
If you're wondering about me, then check my sig. ;)  That's where I keep all of my such info. :)

Oh, okay lol. Detonate looks pretty fun, but it's written in Axe.
I've been seeing that a lot, and I've gathered that it's a custom language, but is it for the z80 or ARM9 processor ?

Great to see yet another Luaist :D

Heh, Lua is my favorite language! (Mainly because I haven't gotten far enough into C++ or x86 ASM to love them more)
I'll have to start being creative for once so I can write cool games for the NSpire :)


128
Introduce Yourself! / Re: Greetings Omnimaga!
« on: August 18, 2011, 11:14:59 pm »
A Lua/Java/Brainf*ck/KSL interpreter for Prizm.

Wow.
Lua and Java are both compiled to bytecode and than ran on a VM AFIAK, so are you just working on the VM or are you writing a compiler as well ?

129
Introduce Yourself! / Re: Greetings Omnimaga!
« on: August 18, 2011, 10:27:12 pm »
Thanks everyone :)

What kind of projects are you all working on right now :D?

130
Lua / Re: Lua Q&A
« on: August 18, 2011, 08:21:56 pm »
When you run a script, and then your calculator immediately reboots itself starting from the Loading OS screen, does that mean you did something wrong  :P ?

131
Introduce Yourself! / Re: Greetings Omnimaga!
« on: August 18, 2011, 05:13:30 pm »
I have an NSpire Touchpad I just updated to OS v3.
I'd like to get the colored one (Prism?) in the future, but that probably won't happen any time soon.

I'm exploring the API right now, looking for something fun to try :D

132
Introduce Yourself! / Greetings Omnimaga!
« on: August 18, 2011, 05:02:17 pm »
Hello everyone!

I'm so excited to finally join this forum.
I've always been crazy for Lua, and when I read that TI now allows Lua on the NSpire I knew I just had to join!
I'm a total optimization freak, so in other games I would even go so far as to program time critical subroutines in Lua assembly, something I'm eager to test on the NSpire.

I can't wait to see what great things come of Omnimaga :)

(P.S. How is omnimaga pronounced?)

133
Lua / Re: Lua Q&A
« on: August 18, 2011, 04:36:56 pm »
Wow, this is great! Thanks again for all the help, Lionel and Jimbauwens!
I can't wait to begin exploring some of the API!

134
Lua / Re: Lua Q&A
« on: August 18, 2011, 11:59:59 am »
On calc Lua editing ? Absolutely epic.

Except for TNOC just crashed twice when I tried to patch my OS. Are the final output files supposed to be TNO_WOB2SA files ?
Anyway, after *trying* to remove the boot2 and examples, I get a file that is 7,672KB large, and with an md5 hash of c76b06af603692518b3e2c30131a5380
Is this the right output ?

Edit: I got it to work without crashing, and it produced a .TNO_WOB2SA file, should I just rename this to a .tno file so TI's student software will see it and install it on my calc ?

135
Lua / Re: Lua Q&A
« on: August 18, 2011, 11:44:03 am »
Thanks for the tip, I'm downloading TNOC now.
I also managed to find what I believe is the original cable :D This time my computer recognized the device.
Welp, once I get this on I'll be working on trying out Lua assembly and a few lua bugs on my calc :)

Thanks for the help Lionel and Jimbauwens

Pages: 1 ... 7 8 [9] 10