metalbabble Posted November 4, 2017 Share Posted November 4, 2017 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? Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted November 4, 2017 Share Posted November 4, 2017 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. Quote Link to comment Share on other sites More sharing options...
metalbabble Posted November 5, 2017 Author Share Posted November 5, 2017 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. Quote Link to comment Share on other sites More sharing options...
Sprybug Posted November 5, 2017 Share Posted November 5, 2017 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? 1 Quote Link to comment Share on other sites More sharing options...
metalbabble Posted November 5, 2017 Author Share Posted November 5, 2017 There's something to be said for good note taking. By the way I played both of those and they're completely amazing!! Quote Link to comment Share on other sites More sharing options...
Sprybug Posted November 6, 2017 Share Posted November 6, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
metalbabble Posted December 17, 2017 Author Share Posted December 17, 2017 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.