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

Pages: 1 ... 8 9 [10] 11 12 ... 31
136
TI Z80 / Re: DT's Tic-Tac-Toe/Morpion for TI-Concours 2012
« on: March 26, 2012, 06:33:33 am »
Wow, this is the best Tic-tac-toe game i've ever seen !
Congrats !

137
TI-Nspire / Re: IRC on the Nspire
« on: March 25, 2012, 09:48:18 am »
Impressive !
This is really nice, great job...

138
TI-Nspire / Re: Some 3D with Ndless...
« on: March 24, 2012, 08:26:48 am »
It's time for a really little demo version !
You can walk on a ridiculously tiny island with a little house.
This is more a proof of concept than anything else.

If you want to try it, open the attached archive and use nCraft.tns.
WARNING : it has never been tested on a real calculator. And I don't have CX support yet.
You can go forward with a, backward with z and you can turn the camera with the arrows.
The collision detection is very simple and doesn't really work.

For the ones who want to see it but don't want to download it, there is an attached screenshot.

139
News / Re: Lua print restored in OS 3.1
« on: March 24, 2012, 07:12:11 am »
Nice work !
The RS232 port is quite fun to play with :)

140
TI Z80 / Re: Actually this is my TI-concours entry :)
« on: March 23, 2012, 02:57:18 pm »
Your snake game is awesome !
It really reminds me the nokia version... And the snake on the title screen is really nice :)

Great work !

141
This is just INCREDIBLE.
It's... it's... I can't find words to describe how amazed I am.

142
TI-Nspire / Re: Some 3D with Ndless...
« on: March 21, 2012, 07:57:49 am »
Test ALL the addresses :D
http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports

Timer 1, Timer 2, and RTC.
The choice is up to you.
Beware on the emulator, it seems that the RTC can't be modified since it is based on the system (windows) time.
Thanks !

What is RTC ? If that means Real Time Clock does that mean there is a clock on the Nspires that I never noticed ?
Yes...
A while ago, with ndless 2, I made a little program to use it, but I never finished it.

If you get minecraft to work on the CX, you win.
I hope I will :)
But don't think it will really look like the PC game : much slower, no textures, no nice physics...

143
TI-Nspire / Re: Some 3D with Ndless...
« on: March 20, 2012, 03:33:21 pm »
I just decided to resume this project.
(BTW, I also resumed GravityGuy development and nSpaint)

I don't think that it will be really fun to use, but it's a nice challenge for me. I hope that it will be playable...
Anyway, I kinda optimized the display.
I can now draw a lot of cubes with a decent speed. (~1000 cubes in 0.2 sec)

But I really need to use the timers to slow down sometimes... When there's almost nothing to draw, the camera moves incredibly fast.
Does anyone know where I could find some documentation ?

144
Lua / Re: PCspire, run Nspire lua programs nativly on your pc
« on: March 16, 2012, 03:16:56 pm »
Please try with this code, it should work...
Code: [Select]
playerImg=image.new("\020\000\000\000\020\000\000\000\000\000\000\000(\000\000\000\016\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\128\000\128\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128")

cubesX={1,5,7,6,4,6,4,1,3,2,3,7,8,9,1,2,3,4,2,6,7,1,9,1,2,3,4}
cubesY={1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8,9,9,9}
lastCube=1
player=0
speed=0.08
moving=false
dir=1
moveStart=0
menu=true
score=0
level=1
color={225,170,0}
rotation=0
lastTick=0
delay=0

function render(gc)
 drawHorizon(gc)
 local size,x,y,i,polygon
 for j=1,27 do
  i=(j+lastCube-2)%27+1
  size=100/(10-cubesY[i])
  x=(cubesX[i]-7-player)/(10-cubesY[i])*150-size/2
  y=5/(10-cubesY[i])*50-180
  polygon=rotate({x,y,x+size,y,x+size,y+size,x,y+size,x,y})
  if cubesY[i]>1 then
   gc:setColorRGB(color[1],color[2],color[3])
   gc:fillPolygon(polygon)
   gc:setColorRGB(0,0,0)
   gc:drawPolyLine(polygon)
  end
  if y+size>3 and y<17 then
   if x<6 and x+size>-6 then
    menu=true
    score=math.floor(score)
   end
  end
 end
end

function rotate(p)
 local s,c=math.sin(rotation),math.cos(rotation)
 return {p[1]*c-p[2]*s+159,p[1]*s+p[2]*c+202,p[3]*c-p[4]*s+159,p[3]*s+p[4]*c+202,p[5]*c-p[6]*s+159,p[5]*s+p[6]*c+202,p[7]*c-p[8]*s+159,p[7]*s+p[8]*c+202,p[9]*c-p[10]*s+159,p[9]*s+p[10]*c+202}
end

function updateCubes()
 local step=menu and 0.06 or speed
 for i=1,27 do
  cubesY[i]=cubesY[i]+step*delay/30
  if cubesY[i]>10 then
   if score%1000<800 then
    cubesX[i]=math.random(0,140)/10+player
   else
    cubesX[i]=math.random(0,140)/200+player+(i-1)%2*5+4.1
   end
   cubesY[i]=cubesY[i]-9
   lastCube=lastCube==1 and 27 or lastCube-1
  end
 end
end

function updateMove()
 if moving then
  player=player+0.07*dir*delay/30
  if math.abs(rotation)<0.15 or dir==rotation/math.abs(rotation) then
   rotation=rotation-0.005*dir*delay/30
  end
  if timer.getMilliSecCounter()-moveStart>=150 then
   moving=false
  end
 else
  if math.abs(rotation)>0.005 then
   rotation=rotation-0.005*rotation/math.abs(rotation)*delay/30
  end
 end
end

function drawPlayer(gc)
 if not menu then
  gc:drawImage(playerImg,149,192)
 end
end

function drawHorizon(gc)
 local s,c=math.sin(rotation),math.cos(rotation)
 gc:setColorRGB(0,0,0)
 gc:drawLine(s*142-c*200+159,202-c*142-s*200,c*200+s*142+159,s*200-c*142+202)
end

function drawMenu(gc)
 if menu then
  gc:setColorRGB(0,0,0)
  gc:setFont("sansserif","r",30)
  gc:drawString("CubeField",80,10,"top")
  gc:setFont("sansserif","b",12)
  gc:drawString("Press Enter",115,150,"top")
  local highscore=var.recall("highscore")
  if not highscore then
   var.store("highscore",0)
   highscore=0
  end
  if score>highscore then
   var.store("highscore",score)
   document.markChanged()
  end
  local str="Score : "..tostring(score).."              Highscore : "..tostring(highscore)
  gc:drawString(str,159-gc:getStringWidth(str)/2,100,"top")
 end
end

function drawScore(gc)
 if not menu then
  gc:setColorRGB(0,0,0)
  gc:setFont("sansserif","r",12)
  gc:drawString(tostring(math.floor(score)),2,0,"top")
  if score%1000>950 then
   gc:setFont("sansserif","r",30)
   gc:drawString("Speed Up !",80,10,"top")
  end
 end
end

function levelUp()
 speed=speed+0.02
 level=level+1
 if (level-1)%5==0 then
  color={225,170,0}
 elseif (level-1)%5==1 then
  color={0,0,255}
 elseif (level-1)%5==2 then
  color={100,100,100}
 elseif (level-1)%5==3 then
  color={90,255,0}
 elseif (level-1)%5==4 then
  color={255,255,255}
 end
end

function on.paint(gc)
 render(gc)
 drawPlayer(gc)
 drawMenu(gc)
 drawScore(gc)
 gc:setColorRGB(0,0,0)
 gc:setFont("sansserif","r",8)
 gc:drawString("Lua CubeField - Par Loic Pujet",10,200,"top")
 updateFPS()
 timer.start(0.01)
end

function on.timer()
 timer.stop()
 updateCubes()
 updateMove()
 if not menu then
  score=score+delay/30
  if score>level*1000 then
   levelUp()
  end
 end
 platform.window:invalidate()
end

function on.enterKey()
 if menu then
  menu=false
  speed=0.08
  moving=false
  score=0
  level=1
  color={225,170,0}
  for i=1,27 do
   cubesY[i]=cubesY[i]-5
  end
 end
end

function on.arrowLeft()
 if not menu then
  dir=-1
  moving=true
  moveStart=timer.getMilliSecCounter()
 end
end

function on.arrowRight()
 if not menu then
  dir=1
  moving=true
  moveStart=timer.getMilliSecCounter()
 end
end

function on.charIn(ch)
 if ch=="6" then
  on.arrowRight()
 elseif ch=="4" then
  on.arrowLeft()
 end
end

function updateFPS()
 delay=timer.getMilliSecCounter()-lastTick
 delay=delay<300 and delay or 0
 lastTick=timer.getMilliSecCounter()
end

145
Lua / Re: PCspire, run Nspire lua programs nativly on your pc
« on: March 16, 2012, 01:56:36 pm »
 O.O I haven't seen that !
This is really awesome, congrats !


I did have to change a speed variable though. Cubefield detects PCspire as a CX, so it set a variable to make the whole program go faster.
This will probably also be a problem in TINCS, and isn't really fixable (well, cubefield's code needs to be changed).

That's really strange, because in cubefield the cubes speed is based on timer.getMilliSecCounter()
So it works nice with TINCLS. Where did you get your version ?

146
TI-Nspire / Re: OSLauncher 3.1
« on: March 13, 2012, 12:09:43 pm »
I don't think that TI can change their mind.
We are a tiny part of all the Nspire users, and they just care about teachers.

In my opinion, they don't trust us because they think that it could "hurt" them more than it could help them...

(BTW, downrates don't exist anymore :) )

So, thank you compu for allowing us to use the CAS on non-CAS nspires !

147
nSDL / Re: SDL for the TI-Nspire
« on: March 13, 2012, 10:59:01 am »
Floating point operations work.
But floating point numbers can't be displayed with printf("%f") or sprintf("%f").

148
TI-Nspire / Re: Some 3D with Ndless...
« on: March 05, 2012, 01:47:41 pm »
@Hayleia :
Oh, I'm really sorry, I didn't see your post !
Quote
I have a stupid answer: Join the Ndless team ?
I would like to help them, but this is totally out of my programming capacities. I'm just a little programmer who makes games with a SDK. Moreover, I don't think I have enough free time.

@ExtendeD :
I understand your point.
But it's quite frustrating to create programs for the Nspire, while TI does everything to block it. I know it has always been like that, but it's sad to realise it.
Moreover, it seems that TI secures more and more their OSes, so I think that ndless 3.2 won't be here before a while, despite your amazing work.


Anyway, I thought a lot about this last night, and it would be stupid to stop calculator programming.
I might not stop this project, but it is paused for sure (for at least one week).
I still feel discouraged, but I do want to help the community, and it seems that giving up isn't the right thing to do.

149
TI-Nspire / Re: Some 3D with Ndless...
« on: March 04, 2012, 02:39:29 pm »
Well, it seems quite inferior to the Nspire...

- No CAS
- Slower
- No ABC keybord (I hate the alpha key)
- No way to program fast programs on-calc
- No mouse
- You have to find each function in the catalog/in a menu
- A huge font

Some people may prefer it, but I don't think I would.

150
It's quite easy with parametric equations...

Just use {x1(t)=2, y1(t)=t}

Pages: 1 ... 8 9 [10] 11 12 ... 31