Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hello. I've tried to script the "Squashy" game written in PICO-8 zine 1 and it didn't work. 

It looks that the same code don't work here.

(+1)

yes, TIC has a bit different API

I'm not a programmer, I'm just an English teacher in Brazil. When I'd discovered Pico-8 I had the idea to teach games' programming to my students that are very demotivated. I'm using any tutorial I find starting with the "Squashy" game. It is in Pico-zine #1 and in a series of videos called Pico-8 Hero. 

So. I bought Pico-8 and installed on the school's computers. The students loved the first class! It was magical!

They are so pumped that are researching alternatives to keep programming at home. Believe me: To research on their own is an enormous step!

I managed to convert the first step of Squashy (drawing the background and making the moving paddle). They are so happy.!

Any tutorials on TIC-80 (pointing the differences between it and Pico-8) are welcome.

(+2)

I made a TIC-80 port of Squashy for you

-- title:  Squashy port
-- author: Nesbox
-- desc:   port of Squashy game from picozine
-- script: lua
-- input:  gamepad -- paddle
padx=108
pady=122
padw=24
padh=4 -- ball
ballx=120
bally=68
ballsize=3
ballxdir=2
ballydir=-2 score=0
lives=3

function movepaddle()
 if btn(2) then
padx=padx-3
 elseif btn(3) then
  padx=padx+3
 end
end function moveball()
 ballx=ballx+ballxdir
 bally=bally+ballydir
end function bounceball()
 -- left
 if ballx < ballsize then
  ballxdir=-ballxdir
sfx(0)
 end  -- right
 if ballx > 240-ballsize then
ballxdir=-ballxdir
  sfx(0)
 end  -- top
 if bally < ballsize then
ballydir=-ballydir
  sfx(0)
 end
end -- bounce the ball off the paddle
function bouncepaddle()
 if ballx>=padx and
ballx<=padx+padw and
  bally>pady then
sfx(0)
  score=score+10 -- increase the score on a hit!
ballydir=-ballydir
 end
end function losedeadball()
 if bally>136-ballsize then
  if lives>0 then
  -- next life
sfx(3)
  bally=24
  lives=lives-1
else
  -- game over
ballydir=0
ballxdir=0
  bally=68
end
 end
end

function update()
 movepaddle()
bounceball()
bouncepaddle()
moveball()
losedeadball()
end function TIC()
update()

 -- clear the screen
 cls(3)

-- draw the lives
 for i=1,lives do
  spr(4,200+i*8,4,0)
 end

-- draw the score
print(score, 12, 6, 15)

 -- draw the paddle
 rect(padx,pady,padw,padh, 15)

-- draw the ball
circ(ballx,bally,ballsize,15)
end

and uploaded cart to website https://tic.computer/play?cart...

try to learn and find the difference

Thank you so much!

> They are so pumped that are researching alternatives to keep programming at home. Believe me: To research on their own is an enormous step!

You could show TIC-80 to your students and say "It's almost the same, but a little bit different in some spots so not all programs work... maybe you can figure it out?"

They might just be motivated enough to work on this as a team if you do!

Like Sugata Mitra says:

https://www.ted.com/talks/suga...