Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

Nesbox

446
Posts
9
Topics
1,388
Followers
56
Following
A member registered Sep 06, 2016 · View creator page →

Creator of

Recent community posts

TIC-80 community · Posted in TAB

Unfortunately, you can't change tab size, but it's planned https://github.com/nesbox/TIC-80/issues/1521

Just copypasted, fixed tabs near `cls 0` and got this


fixed code

-- title:  game title
-- author: game developer
-- desc:   short description
-- script: moon
ticks = 1
cur =
 x: 2
 y: 0
 rot: 1
 piece: 1
 color: 1
PIECES = {
 {
  {{0,1,0,0}, {0,1,0,0}, {0,0,0,0}, {0,1,0,0}},
  {{1,1,1,0}, {0,1,1,0}, {1,1,1,0}, {1,1,0,0}},
  {{0,0,0,0}, {0,1,0,0}, {0,1,0,0}, {0,1,0,0}},
  {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}},
 },
}
export TIC=->
 cls 0
 for i = 0,11
  for j = 0,16
   spr mget(i, j), 72+i*8, j*8
 for i = 1,4
  for j = 1,4
   if PIECES[cur.piece][j][1][i] == 1
    spr cur.color, 72+(cur.x + i)*8, (cur.y + j)*8
 if ticks % 15 == 1
  if collide(cur.x, cur.y+1)
   for i = 1,4
    for j = 1,4
     if PIECES[cur.piece][j][1][i] == 1
      mset i+cur.x, j+cur.y, cur.color
  cur.y = 1
 else
  cur.y += 1
 ticks += 1
export collide = (x, y) -> 
 for i = 1,4
  for j = 1,4
   if PIECES[cur.piece][j][1][i] == 1
    if mget(x+i, y+j) > 1
     return true
 return false

TIC-80 community · Posted in Guide

Hi,

try to use math.random() https://www.lua.org/manual/5.3/manual.html#pdf-math.random to generate random numbers

As for line collision, it's not TIC-80 specific question, pls google it.

Yes, it's not compatible with 0.90 but I saw the author reported he successfully setup it with the new version.

Have you seen TSC-80 - TypeScript for the TIC-80 https://github.com/scambier/tic80-typescript

Seems it does all the things you want

Hmm, hard to say, I think this question is more to the Duktape implementation

Hmm, I forgot to update exported version, will try to fix it tomorrow.

Thank you.

You can mark lines in your code (CTRL+F1) and jump between them using SHIFT+F1 hotkey

(1 edit)

Pls fill metadata in the source header

-- title:  game title
-- author: game developer -- desc:   short description -- script: lua

then you have to assign a cover image to the cart, press F7 while the game is running, and save, or another variant, use `import cover image.png` command

Don't know what to say, please show your code.

Hi,

because you trigger the music() function every TIC() and music starts playing every frame from the beginning.

Please add something like 

music_started=false
function TIC()
    if not music_started then        
        music(0)
        music_started=true
    end
end

Hi,

we have to investigate this, could you pls add an issue to the Github https://github.com/nesbox/TIC-80/issues/new and describe your problem in detail, also pls provide the freezing cart.

Thank you.

Pls look at the Wiki https://github.com/nesbox/TIC-80/wiki/fget

It is up to you to decide for what purpose you want to use the flags, one of the possible purposes - for example, to define solid objects on the map.

Maybe you sprites area is empty and you have to export tiles, pls try 'export tiles ...' instead.

@atsxp

pls use `export sprite sprites.png bank=1`

So, if I understand you correctly you have to scan your map with `tile=mget(x,y)` function, find the tile you want to replace with a sprite, and draw the sprite in this position.

I updated all the macos builds, thank you for the help.

Hi,

could you pls provide an example of a meta-tag function?

Thank you

Please use `import sprite logo.png bank=1`

Thank you

I tried to change the minimum version to 10.13, could someone check it?

https://nightly.link/nesbox/TIC-80/workflows/build/check-mac/tic80-macos-sdl-dmg

Thank you

We build TIC-80 on the Github Actions server and which uses 10.15 to build the app by default, I'll check if we can change the minimum supported OS version.

Thank you.

hmm, it's a problem, pls create an issue on github

You can download  tic80-v0.90-winxp here https://github.com/nesbox/TIC-80/releases/tag/v0.90.1706

https://github.com/nesbox/TIC-80/releases/download/v0.90.1706/tic80-v0.90-winxp....

Yes, you can, but only on 0.90 dev pro version (it's not released yet)

Use 'export win game.exe alone=1' command for example

Hmm, interesting, what OS do you use?

You can select and copy text console on 0.90 dev branch

https://twitter.com/i/status/1384904757710573568

Hi

Try to use "export html game.zip" command to export-ready to upload package.

(2 edits)

Hi, try to add `<PALETTE>` tag to the .lua file, it should look like this one

-- title:  game title
-- author: game developer
-- desc:   short description
-- script: lua
t=0
x=96
y=24
function TIC()
if btn(0) then y=y-1 end
if btn(1) then y=y+1 end
if btn(2) then x=x-1 end
if btn(3) then x=x+1 end
cls(13)
spr(1+t%60//30*2,x,y,14,3,0,0,2,2)
print("HELLO WORLD!",84,84)
t=t+1
end
-- <PALETTE>
-- 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57
-- </PALETTE>


Thanks.

Hi, TIC-80 doesn't support such a function but you can implement it yourself, try to look at the tutorials section 

https://github.com/nesbox/TIC-80/wiki/tutorials

https://github.com/nesbox/TIC-80/wiki/Simple-Platformer-tutorial

Thanks.

It's free, only Pro version is paid.

Hi, try to llok at the tutorials section https://github.com/nesbox/TIC-80/wiki/tutorials

Yes, we can distribute it as a zip, pls add isuue to github to not forget.

Thanks.

Hi,

I created an issue https://github.com/nesbox/TIC-80/issues/1389

Hi, I have investigated the problem, the game just freezes in init() -> random_location() function, pls press and hold ESC button to exit.

https://github.com/nesbox/TIC-80/issues/1338#issuecomment-786565346

Sorry for the delay with the response.

Created an issue here https://github.com/nesbox/TIC-80/issues/1338

It works via webserver only, please upload gotten .zip (to itch.io for example)

Pls provide the cart, I'll try to reproduce it.

Thanks.

Yes, something like that, maybe even without the console.

Nope, working on this :)

No, only integers.