🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles


A topic by OlivierSchyns created 213 days ago Views: 372 Replies: 9
Viewing posts 1 to 5

Would it be a good idea to implement moonscript as an alternative Language for TIC ?

moonscript compiles into LUA, it implements classes and shorthand operators. And moonscript code require overall less characters than LUA code.


By that I mean I think it would be more interesting to implement moonscript into TIC rather than implementing shorthands into LUA like how it was done with PICO-8.

What do you think ?


I haven't had any experience with moonscript before but it looks very laconically.

Great idea, I'll try to investigate it.



Both LUA and moonscript use ' -- ' as single line comment so maybe a way to allow the use of moonscript would be to use a special tag like "--[moonscript]".

- If the first line of the script as the exact tag "--[moonscript]" then all the code is in moonscript,

- otherwise it is in LUA

x = 10
if something
  local x
  x = 12
print x -- prints 10

seems to be a good idea

Developer (Edited 1 time)

made an issue https://github.com/nesbox/tic.computer/issues/8

If moonscript would be included, can we make it optional? (a function on the beginning: include moonscript or sth)

A big draw to pico8 and/or TIC for me as a new programmer is lua, because it is pretty simple, well documented and popular enough that I can google problems with relative ease.

Moonscript seems a bit more complex from what I see.

Of course moonscript would be optional. TIC like PICO-8 rely on LUA to work.

moonscript is a language that gets converted into LUA to work. (similar to typescript -> javascript or coffeescript -> javascript or Scala -> Java, ...). As such all functions defined in LUA can be used in moonscript (no additional implementation work on that side). However you cannot do an include("moonscript") because the syntax is different than LUA. We should define a comment tag to specify the use of moonscript instead.

Moonscript as it is more complex than LUA shouldn't be the default choice, I agree. But moonscript is also interresting for TIC (and PICO-8) because it requires less lines to do the same things as LUA. And since the screen size is limited, it would help a lot on big project for advanced programmers.


Moonscript is working in 0.15.0


This is amazing !

PICO-8 is dead to me !

Long live the TIC !

Wonderful news... Switch Statement will be 1000% more easy... nice job!