nesbox / TIC-80

TIC-80 is a fantasy computer for making, playing and sharing tiny games.
https://tic80.com
MIT License
4.93k stars 479 forks source link

Separate tabs in code editor #569

Open trelemar opened 6 years ago

trelemar commented 6 years ago

The idea is you could keep your code better organized with different tabs to switch between within the editor. Another solution MonstersGoBoom had was to add "tags" users could easily navigate to.

Fubuki, MGB, and myself all think this would be very useful.

hseiken commented 6 years ago

Any options that allow quick jumping to parts of code is a good idea, implementation isn't really a concern, as long as it's within a key or mouse click to jump to functions and such.

+1 for this idea.

ambyra commented 6 years ago

How does the bank switching work currently? Can a bank access code from another bank? Can variables store functions from other banks?

StinkerB06 commented 6 years ago

Yeah, in the latest PICO-8 version, there are tabs at the top in the code editor.

AnastasiaDunbar commented 6 years ago

Other than Lua, will it support for JavaScript too (and Wren)?

carlsmith commented 6 years ago

Support for MoonScript, JavaScript, Wren and Fennel has been added already.

AnastasiaDunbar commented 6 years ago

I meant if these tabs would work the same for other languages (if all of them are executed).

AnastasiaDunbar commented 6 years ago

When this gets added, can we put the shader in a tab instead of a bank if it's possible? (And also, again, if all of the tabs aren't executed on runtime (as in that the shader shouldn't be read as game code).)

nesbox commented 6 years ago

I'm thinking to remove banks for code and make it works like tabs, because it generates a lot of problems with error handling, code loading and etc. And yes, we can put shader to the second tab in this case.

ambyra commented 5 years ago

Great idea! In Qbasic for DOS, you could put new functions in their own tab. So instead of tab numbers (1,2,3,4) you could have a drop down box with assignable function names (main, TVshader, physics, animation, etc). Tab 1 would be hardcoded with name Main, and must have TIC() function in it. Tab 2 would be named Shader, must have screen shader. The rest would take the name of the outermost function that was put in them.

carlsmith commented 5 years ago

Just a reminder: Any solution has to work with the supported languages, and ideally, future language additions.

StinkerB06 commented 5 years ago

@nesbox Were you concatenating all of the code banks together with a newline separating each bank?

It would've been better if you implemented each code bank as 8 text banks concatenated together before compiling the code.

ghost commented 3 years ago

Any update on this?

nesbox commented 3 years ago

not yet, only bookmarks have been added in the latest version :)

sedyh commented 8 months ago

Hello, is there any update on this?