Im not sure about a limit... probably depends on the memory available.1 - How many lines of source code may I have in one .PB? Hundreds of thousands? Is that possible?
I can only speak for myslef but i usually have around 10k lines in a single source file and split it up if it gets bigger.
You can use IncludeFile & XIncludeFile to include other sources in your main source file.
For games i usually have a variable that holds the state of the game.2 - I'm okay with Procedures and I can also master Logic conditions and SubRoutines, but it would be easier if I had instructions like Run and Chain, that exists in QB/PDS and allows me to jump from one program to another. (i.e. I have a program for Openning of Game, another for Introduction and Rules, another to Fase 1 of game and another 5 to Fases 2,3,4,5, and 6. All I need is a way to close Program 3 and jump to program 6.
I don't need to share variables, or procedures, just need the chance to say: IF THIS, RUN FILE1.PB ELSE RUN FILE2.PB.
Is this by any way that I didn't find, possible with PureBasic in MacOS?
A switch case is then used to change the flow of the execution -> load different levels, menues...
That mainly depends on the gfx hardware and available memory.3 - How many Sprites may I use simultaneously on a PB program? Is the memory the only limit? May I have something like 10.000 sprites? I am working with a Map of 20,000 by 5,000 position and need thousands of illustrations. That's also why I'd like to jump fron one program to another.
I highly doubt however that anyone would need more than 2-5k sprites on the screen at a given time.
The main thing is to only ever draw/process what is on the screen.
You can also greatly simplify things by prerendering for example (static layers/objects)
a floor would then only need one draw call instead of one for each tile.
You can use the 2D drawing functions to draw text onto a sprite or a screen.4- This is the last Big question for me: I'm using an OpenScreen(1680, 1050, 32, "Name of the Game") to avoid Windows, because I don't want to use windows, just a flat big LoadSprite(0,"File for Big Screen Background), with a DisplayTransparentSprite(1,"Mouse GIF (MAC is not liking PNGs)"), and then, everything is made with the use of Sprites (The reason for the 3rd question). I am trying to reduce the number of sprites by adding text over them.
Real problem is that I can not find a way to do simple Locate(x,y) and Print"Text" on screen. Is there any instruction to write text on top of a gane card sprite, or do I have to sprite characters one by one, on top of the main sprite? Do I need to create a Procedure to draw, line, by line, and plot by plot, the text I need to display?
The only thing to note here is that it is not exactly fast.
The sprite functions are fast and together with a image containing font characters and a custom drawing routine the best option.
You could combine the two methods and prerender characters with the 2D drawing commands onto a sprite.
Make sure to add UsePNGImageDecoder() at start of your code to support *.png files.
PureBaisc Reference Manual:
https://www.purebasic.com/documentation/PureBasic.pdf
PureBasic Online Help/Manual (also found locally in the IDE -> Help) :
https://www.purebasic.com/documentation/index.html
Hope this helps.