Jump to content
IGNORED

Handling large or multiple .bas files


metalbabble

Recommended Posts

I was curious what peoples' strategies were for managing large .bas source files. (Maybe there's a super-obvious solution I missed, I am kind of a noob at this.) I bring it up because one of the biggest challenges I've encountered so far has been working with really large multi-bank games, where you have thousands of lines of code. I guess I'm just spoiled by OOP and modern IDEs!

 

I've tried Visual bB - which is really slick, and I've heard there's some sort of bookmarking feature, but I didn't dig to deeply into that.

 

What I've actually been doing is using Visual Studio Code and splitting up my source file into several .bas files. (bank1.bas, bank2.bas, etc) Then, I have a build action run a script that merges these parts into one large master .bas file that gets sent to the batari compiler and then the emulator. It actually made things a little easier for me.... I'd be happy to post that if it's useful to anyone. Or maybe there's an easier way you know of?

Link to comment
Share on other sites

The VbB Bookmarks make working on a large program much easier, but they were always randomly getting out of order when I used them, so I had to constantly fix them, which added more frustration.

 

They stayed in order long enough to be worth using, but just barely. Since the creator of VbB is too busy to work on it anymore, it would be nice if somebody came along and made a fresh version with the best of the VbB tools without the frustrating parts.

Link to comment
Share on other sites

Yeah, I hear you. That Visual bB is a great start, it would be cool if it kept going with updates. On that note, I was kind of thinking it might be neat to develop an extension for VS Code to support batari development. Something with snippets, syntax checking/highlighting, etc. (Hmmm...) For now, all I've got is that build script.

Link to comment
Share on other sites

I should start using that. The way I've done it over the years is keep a lot of hand written notes handy! XD

I still have all my old Princess Rescue and Zippy the Porcupine notes.

I wonder if anyone would be curious in seeing them. I can always scan them in.

Nothing really special to see, but maybe someone would be curious?

  • Like 1
Link to comment
Share on other sites

There's something to be said for good note taking. By the way I played both of those and they're completely amazing!!

 

Thanks and thanks guys for making me aware of the VbB's Bookmarks. I'm gonna take a look into that. There are so many times in my large code where I have to hunt when I need to fix or add things. The time I waste doing that let you me tell ya.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

FWIW, I wanted to share an example of a project that splits up the source files in the fashion I was referring to. I think this makes things a million times easier to work with, but I suppose it's ultimately a matter of preference. I also favor Visual Studio Code as an editor and have build tasks set up for that. Anyhow, here's an example I put together - it's a version of Conway's game of life for the 2600... I'm sure 50 versions already exist for batari basic, but honestly I was just bored on an airplane, lol.

 

https://github.com/metalbabble/life2600

 

The key thing to point out is the build.sh and build.bat which merge the files and pass them to the compiler. Otherwise, working with the numbered files it's pretty easy to navigate. Hope this helps somebody out there!

 

Happy holidays, all!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...