(06-25-2023, 06:18 AM)justsomeguy Wrote: HelloIn general: The simpler the better!!
I was wanting to ask the forum on how you guys prefer to organize your code, especially on larger projects. I've posted a few of my projects on here and people had trouble getting them to work due to the way I structure my code. I want to make it as easy as possible to share across platforms, since I'm a Linux guy.
- Do you prefer a large monolithic source file, or it broken up into libraries?
- If you use "libraries", do you keep them together with your original project, or do you separate them for reuse on other projects?
- Do you put the executable in the QB folder or in the source folder?
- How do you handle assets in regards to your file structure, so that it is easier to share?
Any other tips to help me better share my projects would be appreciated.
Thanks
justsomeguy
Disclaimer: I don't expect my own taste to reflect the majority or opinions or work for everyone, but just speaking for myself...
For QB64 games: I do find it easiest to have everything in one monolithic source file, and beyond that, minimal resource files (e.g. I prefer to define sprite sheets and tile sets as text strings that can be visually edited). I just personally find it easier to only have to worry about a single file, and also I like "type-in" style programs like they used to have in computer magazines in the '80s!
For VBA: I prefer separating out different functionality into different modules (e.g. string functions, date functions, etc.)
I haven't worked with large projects in a while, but always found the bigger an application got, the bigger the headaches. I especially loathed working with solutions in Visual Studio that used multiple projects and required you to remember & manage complicated settings and source control stuff, that quickly eats up my mental processing cycles and patience before I even get to writing actual code. Keep it simple, silly!
It amazes me that most software developers are not only able to handle these complicated tool chains and code organization, they prefer & thrive in it! They must have an extra lobe or three in their brains that I'm missing, LoL! :-D
I think one very helpful application of ChatGPT or AI in the future will be to allow people with very different styles and brains to view code and work on programs in a way that suits their own style...