Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Organization Suggestion

Author
Message
The CGman
20
Years of Service
User Offline
Joined: 6th Apr 2006
Location:
Posted: 13th Sep 2014 10:38
I would like the idea of being able to place folders within the main project folder in the Solution Explorer. It'll help a lot with work flow when I can organize my files better.

Such as when I want a certain group of files not to be altered. It'd help with putting them into a folder. Yes, I could just make sure I don't open the ones I don't want to alter but it'd be far more efficient if they were put off to the side in a separate folder. That's just one idea.

Just being able to place specific files into categories will allow better organization which will ultimately increase work efficiency. This becomes even more important when there are many, many files within the project folder.

So, basically, the idea is to have folder trees.

I've made a visual example below:
Legend:
numeric are major folders
Alphabet are sub-folders in major folders.

(Project Folder)
- 1 (Core)
--- a (Player)
--- b (Collision)
- 2 (Triggers)
--- a (healing)
- 3 (Menu)
Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 16th Sep 2014 00:27
Which IDE are you currently using? I can highly recommend Indigo. I asked for a feature called "Relative Directories" which allows you to have a relative workspace for a directory structure, similar to what you're posting.

Relative Directories are useful for when you sync projects across a couple of computers that use slightly different directories, or, if you move a bunch of old projects to a different storage drive, they'll still compile without having to re-associate the project entries to point to the new addresses.

Also, when you say "many files", I'm also assuming you're talking about the many .DBA files that your project uses, such as, your --- a(Player) example, is that referring to a .DBA file which contains "player" subroutines & functions?

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
The CGman
20
Years of Service
User Offline
Joined: 6th Apr 2006
Location:
Posted: 20th Sep 2014 20:58
I am currently using the default new IDE for Darkbasic Pro. I've tried Indigo but it messed up my project. So I am weary about Indigo. I'll have to figure out what the error is that caused the problem.

You have the right idea of what I am suggesting. Its function is as a 'tree' directory. So - yeah - Player.dba is under Core folder; which is under Project folder in the Solution Explorer.
Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 21st Sep 2014 03:18
Yes, Indigo creates a new type of DBPro Project file, and at a guess I'd assume that it's only compatible with the Indigo editor. If only using Indigo, it certainly doesn't mess up projects, but adds lots of cool functionality, such as relative directories. I know that some features are donate unlocked though, so perhaps what I'm talking about doesn't come in the free version.

Back on topic,

Here's a screenshot which shows how I structure my DBPro projects;



When I was new to creating projects, I used to try to develop "libraries" where I'd have, for example, my Mouse.DBA file being accessed by multiple projects, but eventually, as I became more advanced in my coding technique and I would update Mouse.DBA, my older projects would stop working with my newer library mouse code.

So to get around this problem I changed my workflow. I now date stamp my .DBA file names, and if I get bored of what I'm working on and wanna start up a new different project, I just have to duplicate the entire previous project, rename the duplicated files, and off I go. I found this much easier than trawling through old code and figuring out why it doesn't work with my new code.

So now if I add a new feature to my mouse code, that I think other older projects could eventually use, usually it's a simple case of copy & paste the new feature from the new Mouse.DBA into the old Mouse.DBA. The old project will continue to work as per the last time I worked on it, and thus adding a new feature is WAY more easier, fun & stimulating, than trying to bandaid old code to only then kick off your new feature... and further to this, if you're wasting time on fixing old code, well, chances are you'll burn out before even having a crack at your new idea/feature.

Also note that in my project example that I've never once called the #INCLUDE command, as it's simply not needed. All that's required, is for me to think;

"Hey, I need XBOX 360 controller commands in my new DBPro project... and I know I've coded this in a .DBA file before... ah, here it is! Now to copy the XBOX_old.DBA file, name the copy to today's date, and then add the new Xbox_new.DBA file to my project using the DBPro IDE "add" button."

Then, a quick check that there's no double up on variables or functions etc, usually it'll integrate without any problems. An example of my .DBA layout;



As you can see, nothing but Sub Routines & Functions, with the guts tucked away within.

Sub Routines;
`Usually a one off process, but not limited to being called only once. Not too worried about optimisation.
Setting up #Constants
Creating Globals
Declaring User Defined Types
Dim Arrays
Preparing DLL files
Pre-filling data into variables & arrays.

Functions;
`I like to think of my functions as something that my program will run lots of times. I always re-work functions to make them quicker, faster, better.
Defined #local variables
Manipulating & updating Arrays
Calling of DLL files
Parsing & processing data

It's important to also note that I'm an amateur at this stuff! But, what I've been doing here works. Some will argue for & against, I'm actually hoping someone here will chime in and say "oi, BFM, you're doing it wrong, do it this way instead!", as that's the only way I tend to learn.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
The CGman
20
Years of Service
User Offline
Joined: 6th Apr 2006
Location:
Posted: 21st Sep 2014 18:59
I'll take another look at Indigo. Although, what I am hoping for is that TheGameCreators to add the suggested functionality to their IDE. Not sure if it's likely at all, though. Hoping.

Thanks for the suggestion. I'll give Indigo another go.

Login to post a reply

Server time is: 2026-07-18 09:24:50
Your offset time is: 2026-07-18 09:24:50