(06-25-2023, 06:18 AM)justsomeguy Wrote: Hello
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
Hi @justsomeguy
I've got to check out your pool game, looks very good. Just from screenshot I see you offer an option of putting English on cue ball. I assume that IS what that white circle is for in lower left corner, I am sure.
About libraries, I don't have much of opinion, I use to use them in old QB4.5 work my own commonly used subs and functions but now with QB64, so many Subs and Functions more than 95% of code would go unused for projects. It's a pain to always have to include and explain with every post I make here at forum.
I would read what Terry has about libraries and coordinate with him about style issues from his Game Programming tut here: https://www.qb64tutorial.com/games
this work is most likely to get all newbies started on same page.
Now I would most definitely recommend storing all files related to project in a Folder of it's own for easy zip and extract sharing with he rest of us at forum just remove exe before zipping. I don't like sub-paths for assets but that is purely opinion if you have allot of files to go with project it makes sense to keep them organized in sub folders.
I have my Run's geared to save Exe's in same folder as source code the only exception might be for a library if QB64pe can find them without a bunch of monkey business to get paths correct and find the bi and bm.
b = b + ...