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 - Jim Bauwens
Pages: 1 ... 39 40 [41] 42 43 ... 125
601
« on: April 14, 2012, 12:54:32 pm »
Ah, I see
602
« on: April 13, 2012, 08:52:57 pm »
Nice voice epic!
603
« on: April 13, 2012, 07:22:07 pm »
Thanks for the answer compu ExtendeD, maybe nspireio could be eventually be integrated into Ndless? Then it would come closer to TIGCC, as their lib includes something like this.
604
« on: April 13, 2012, 03:34:33 pm »
Yeah, I get the same result in PCspire. But I guess he is still busy on it, so I'm patient
605
« on: April 13, 2012, 03:33:34 pm »
Thanks A nice thing too is that I have special widgets that can acts like a screenmanager, they can include other widgets. This way you can create simple widgets and combine them to create advanced widgets.
606
« on: April 13, 2012, 11:05:23 am »
To me it looks like the entire program is black and white. It should be fine
607
« on: April 13, 2012, 11:02:36 am »
The prettying is not a last priority. It is a coding style that will help you a great deal. Trust me, your code will be a lot more clear and easy to work with. Normally you use indentation while programming Another thing you should know is that LuaCS is still a bit buggy, and might not be suitable for development. Anyway, good luck!
608
« on: April 13, 2012, 12:12:25 am »
There are many things that can be changed, but the most important thing right now is identation. Getting used to it will be a very great help. Do not under estimate it You will also see your bugs much clearer.
609
« on: April 12, 2012, 09:55:59 pm »
Extremely nice and useful!
610
« on: April 12, 2012, 09:36:47 pm »
The graphical libs are Global Library/screen.lua and Global Library/widgets.lua. Right now I do not have so many widgets, but it is easy to add more. The part I am mainly focusing on is the structure. Take a look at http://tiplanet.org/forum/archives_voir.php?id=4177, you can see how a very basic program works. (If you ignore the library code)
611
« on: April 12, 2012, 08:32:12 pm »
Linuxgeek, I have a little request. Could you please please use indentation for your code? I almost get a hard attack looking through it I've been indenting it manually until a point where there are syntax errors (I think). function create(mode) t=1/2 timer.start(t) sprites={image.new("\007\000\000\000\007\000\000\000\000\000\000\000\014\000\000\000\016\000\001\000\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128\031\252\224\131\031\128")} inventory={current=1,{type=0,amount=0},{type=0,amount=0},{type=0,amount=0},{type=0,amount=0},{type=0,amount=0},{type=0,amount=0},{type=0,amount=0},{type=0,amount=0}} i=0 view=0 position={1,1,1} pause=0 w=316 h=210 xlen=math.floor(w/j) ylen=math.floor(h/j) color={} for x=1,xlen do color[x]={} for y=1,xlen do color[x][y]={} for z=1,xlen do color[x][y][z]={visited=false,type=0} if y==xlen then color[x][y][z].type=-1 elseif y<=8 then color[x][y][z].visited=true elseif mode=="clear" then elseif math.random()>0.3 then color[x][y][z].type=1 elseif math.random()>0.3 then color[x][y][z].type=2 end end end end reloadMenu() end
function reloadMenu() menu={{"Functions",{"Reset",reset},{"Clear",clear}}} toolpalette.register(menu) end
function clear() create("clear") end
function reset() create("reset") end
function on.arrowLeft() c="4" end
function left() if (position[1]~=1 and view~=1) then position[1]=position[1]-1 elseif (position[2]~=1 and view==1) then position[2]=position[2]-1 end end
function on.arrowRight() c="6" end
function right() if (position[1]~=xlen and view~=1) then position[1]=position[1]+1 elseif (position[2]~=xlen and view==1) then position[2]=position[2]+1 end end
function on.arrowDown() c="2" end
function down() if (position[3]~=ylen and view~=2) then position[3]=position[3]+1 elseif (position[2]~=ylen and view==2) then position[2]=position[2]+1 end end
function on.arrowUp() c="8" end
function up() if (position[3]~=1 and view~=2) then position[3]=position[3]-1 elseif (position[2]~=1 and view==2) then position[2]=position[2]-1 end end
function on.charIn(ch) c=ch end
function on.timer() platform.window:invalidate() end
function on.paint(gc) --BG gc:setColorRGB(0,0,64) gc:fillRect(0,0,316,210)
if j==nil then j=8 create("clear") end
--Keypresses and d-pad if c=="." then if view==2 then view = 0 else view=view+1 end elseif c=="1" then down() left() elseif c=="2" then down() elseif c=="3" then down() right() elseif c=="4" then left() elseif c=="6" then right() elseif c=="7" then up() left() elseif c=="8" then up() elseif c=="9" then up() right() end
if c then c="" end
--Gravity i=1-i if i==1 and color[position[1]][position[2]+1][position[3]].type==0 then position[2]=position[2]+1 end
--Lighting / shroud for x=-1,1 do for y=-1,1 do for z=-1,1 do if not ((x==-1 and position[1]==1) or (y==-1 and position[2]==1) or (z==-1 and position[3]==1) or (x==1 and position[1]==xlen) or (y==1 and position[2]==xlen) or (z==1 and position[3]==xlen)) then color[position[1]+x][position[2]+y][position[3]+z].visited=true end end end end
--Inventory/mining if color[position[1]][position[2]][position[3]].type>0 then local slot=-1 for i=1,8 do if inventory[1].type==color[position[1]][position[2]][position[3]].type then end if not inventory[color[position[1]][position[2]][position[3]].type] then inventory[color[position[1]][position[2]][position[3]].type]=1 else inventory[color[position[1]][position[2]][position[3]].type]=inventory[color[position[1]][position[2]][position[3]].type]+1 end color[position[1]][position[2]][position[3]].type=0 end
--Draw tiles if view==0 then for x=1,xlen do for z=1,ylen do top=1 for y=position[2]+1,ylen do if top==1 and color[x][y][z] then top=y end end if x==position[1] and z==position[3] then gc:drawImage(sprites[1],x*j-j*0.5-1,z*j-j*0.5-1) else --Lighting/fog if color[x][top][z].visited==false then d = (math.sqrt((x-position[1])*(x-position[1])+(top-position[2])*(top-position[2])+(z-position[3])*(z-position[3]))) d=1-(d/ylen) if d<0 then d=0 elseif d>1 then d=1 end else d=1 end --Color picker top=color[x][top][z].type if top==0 then gc:setColorRGB(255*d,255*d,255*d) elseif top==1 then gc:setColorRGB(150*d,100*d,50*d) elseif top==2 then gc:setColorRGB(150*d,150*d,150*d) elseif top==3 then gc:setColorRGB(200*d,200*d,200*d) end gc:fillRect(x*j-j*0.5-1,z*j-j*0.5-1,j-1,j-1) end end end elseif view==1 then for y=1,xlen do for z=1,ylen do top=position[1] --for x=position[1]+1,ylen do --if top==1 and color[x][y][z] then --top=x --end --end if y==position[2] and z==position[3] then gc:drawImage(sprites[1],y*j-j*0.5-1,z*j-j*0.5-1) else --Lighting/fog if not color[top][y][z].visited then d = (math.sqrt((top-position[1])*(top-position[1])+(y-position[2])*(y-position[2])+(z-position[3])*(z-position[3]))) d=1-(d/ylen*3) if d<0 then d=0 elseif d>1 then d=1 end else d=1 end --Color picker top=color[top][y][z].type if top==0 then gc:setColorRGB(255*d,255*d,255*d) elseif top==1 then gc:setColorRGB(150*d,100*d,50*d) elseif top==2 then gc:setColorRGB(150*d,150*d,150*d) elseif top==3 then gc:setColorRGB(200*d,200*d,200*d) end gc:fillRect(y*j-j*0.5-1,z*j-j*0.5-1,j-1,j-1) end end end elseif view==2 then for x=1,xlen do for y=1,ylen do top=position[3] --for z=position[1]+1,ylen do --if top==1 and color[x][y][z] then --top=z --end --end if x==position[1] and y==position[2] then gc:drawImage(sprites[1],x*j-j*0.5-1,y*j-j*0.5-1) else --Lighting/fog if color[x][y][top].visited==false then d = (math.sqrt((x-position[1])*(x-position[1])+(y-position[2])*(y-position[2])+(top-position[3])*(top-position[3]))) d=1-(d/ylen*3) if d<0 then d=0 elseif d>1 then d=1 end else d=1 end --Color picker top=color[x][y][top].type if top==0 then gc:setColorRGB(255*d,255*d,255*d) elseif top==1 then gc:setColorRGB(150*d,100*d,50*d) elseif top==2 then gc:setColorRGB(150*d,150*d,150*d) elseif top==3 then gc:setColorRGB(200*d,200*d,200*d) end gc:fillRect(x*j-j*0.5-1,y*j-j*0.5-1,j-1,j-1) end end end end end function on.mouseDown(x,y) local coords={position[1],position[2],position[3]} if view==0 then coords[1]=math.ceil(x/j) coords[3]=math.ceil(y/j) elseif view==1 then coords[2]=math.ceil(x/j) coords[3]=math.ceil(y/j) elseif view==2 then coords[1]=math.ceil(x/j) coords[2]=math.ceil(y/j) end if color[coords[1]][coords[2]][coords[3]].type==0 then color[coords[1]][coords[2]][coords[3]].type=1 end end
612
« on: April 12, 2012, 08:07:58 pm »
Very nice work I'm also working on a similar library for EEPro. But my structure is a bit different than yours, it's closer to an actual graphical toolkit like gtk. Your's will be much more lighter though, so that's also very good.
613
« on: April 12, 2012, 04:42:36 pm »
Several people Anyway, I hope the problem goes away.
614
« on: April 12, 2012, 04:36:54 pm »
I started with Ubuntu years ago and I still use it. It always was the most stable for me and supported most hardware.
I have used these distro's: Fedora, Open Suse, Linux Mint, Linux Mint Debian, Debian, Watt OS, Xubuntu, Kubuntu, some others I forgot the name of.
615
« on: April 12, 2012, 01:27:54 pm »
I just noted that the websites metatag contains several references to gaming. Maybe this causes the software to add it to a blacklist.
Pages: 1 ... 39 40 [41] 42 43 ... 125
|