![]() Some simple testing should give you an idea if this will work for you. There will be some complications of maintaining a screen between the switching of programs but i don't think it would be a show stopper. ![]() RunProgram() will allow you to execute separate programs. For instance, things such as Player names can be rendered onto a sprite and shown over and over without needing to do a separate text rendering step in each frame using StartDrawing() / StopDrawing(). If the text itself is a sprite then this doesn't apply. It would be best to group the text rendering together so that it can be done at one time instead of being interleaved with the Sprites displayed. ![]() ![]() Most text would simply be drawn/displayed after all of the underlying Sprites are drawn. You really haven't provided many details about how much text would be written or the frequency of writing or how it relates to the Sprites being shown. Inside of a StartDrawing(ScreenOuyput()) / StopDrawing() block, use DrawText(x,y, "text"). If there isn't, okay, there is no instruction to do it directly. I just can't find a Print/Write text in a graphics screen. I've done a lot of smaller things with it, since version 4 and I really like it. Lord Santos wrote: ↑ Tue 12:40 amAbout the instruction to write text on a screen in graphics mode, yes it's as old as GWBasic and I have it in all languages I use, including Visual Basic, Ghipmunk Basic etc. So simply start, make tests and get familar with PB. I can always write an external lib or write parts in assembler or. It is only a question how difficult it is. I can write every program in every language. I also alays tell our newbies, that the language doesn't matter, it is the logic behind. In general I would say: start with a small program to become familar with PB. If you want you can write a Macro named RUN which starts your procedure in the file.īut this is more complicated then directly call a procedure in an included file and it makes not really sense. If you have only one procedure in the include file, then it is like you wrote. In PB you can run procedures from other included files. So I think your example comes from an interpreter and not from a compiler. You can run executable files xxx.exe in windows xxx.app in macOS xxx in linux.īut they are standalone files and can not access the 'screen' of an other program. First do the available tutorials and join the PureBasic discord chat.Ĭheck my webpage for many PureBasic resources. If you run into any limitation with PureBasic, you will find enough people willing and able to help you to solve them. There have been projects in the past with graphics libraries and there are currently new graphics libraries in development ( RetroPixel). I would think the target platform and the installed drivers and hardware do limit you at some point, but PureBasic itself does not limit you. Windows for example can use DirectX or OpenGL. Regarding the amount of possible sprites and their size, that probably depends on the target platform. Combine the text rendering with an image into a graphics card and display it with sprites. You could for example look into the font/text rendering done by UnionBytes with their typeface project. The community is big and experienced enough and has done a lot of what you can use for your project. You can technically do what you want with PureBasic. Hello and welcome to the PureBasic forum. PureBasic Online Help/Manual (also found locally in the IDE -> Help) : Make sure to add UsePNGImageDecoder() at start of your code to support *.png files. You could combine the two methods and prerender characters with the 2D drawing commands onto a sprite. The sprite functions are fast and together with a image containing font characters and a custom drawing routine the best option. The only thing to note here is that it is not exactly fast. You can use the 2D drawing functions to draw text onto a sprite or a 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? Real problem is that I can not find a way to do simple Locate(x,y) and Print"Text" on screen. I am trying to reduce the number of sprites by adding text over them. 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).
0 Comments
Leave a Reply. |