Jump to content

Photo

Handling large or multiple .bas files

batari ide

6 replies to this topic

#1 metalbabble OFFLINE  

metalbabble

    Space Invader

  • 25 posts
  • Location:Rhode Island, USA

Posted Sat Nov 4, 2017 5:20 PM

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?



#2 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,779 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sat Nov 4, 2017 5:56 PM

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.



#3 metalbabble OFFLINE  

metalbabble

    Space Invader

  • Topic Starter
  • 25 posts
  • Location:Rhode Island, USA

Posted Sat Nov 4, 2017 7:10 PM

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.



#4 Sprybug OFFLINE  

Sprybug

    Dragonstomper

  • 563 posts

Posted Sun Nov 5, 2017 5:14 AM

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?



#5 metalbabble OFFLINE  

metalbabble

    Space Invader

  • Topic Starter
  • 25 posts
  • Location:Rhode Island, USA

Posted Sun Nov 5, 2017 6:44 AM

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



#6 Sprybug OFFLINE  

Sprybug

    Dragonstomper

  • 563 posts

Posted Mon Nov 6, 2017 4:27 PM

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.



#7 metalbabble OFFLINE  

metalbabble

    Space Invader

  • Topic Starter
  • 25 posts
  • Location:Rhode Island, USA

Posted Sat Dec 16, 2017 9:07 PM

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/m...babble/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!







Also tagged with one or more of these keywords: batari, ide

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users