Some questions before purchase (graphic wise)

Everything else that doesn't fall into one of the other PB categories.
Attronach
User
User
Posts: 12
Joined: Tue Sep 19, 2023 9:41 pm

Some questions before purchase (graphic wise)

Post by Attronach »

Hello,

Past time I work with GFABasic and PowerBasic. Later under DJGPP (C) and WatcomC. Created few project (mostly games) under Atari STe, Amiga500/1200 and older PC (with Watcom C under DOS4G extender).

ATM I have Visual Studio installed and trying to find way how to create user-friendly environment to update my old programs for windows10/11.
This is very frustrating work. I'm not happy with how hard is find way to force my C# source code run in SINGLE GRAPHIC window to be able work with bitmap pictures.

My questions abour PureBasic:
1. Can I create one simple graphic application window where I can:
-display more bitmap objects (stored in memory) at any position?
-move these objects over screen w/o destroying whole window content?

Small sample what I need to move over screen (Created with GFABasic):

Image

I mean, how hard is:
1, load images from HDD to memory
2 open single window and place partial images (like subimages mages 1-15) to opened screen
3. slowly move single image (depend on user input) over screen?

Sub question:
In case whole this picture is screen...
Can i draw timer in text mode or I have to create sub-picture and then draw (put) it on screen?
Can I already loaded pictures save to disc (in binary format?


Maybe my questions are stupid :oops: , but I need to be sure I can work with screen like in old days without tons of balast code, events manipulation etc..

I will be really happy if anyone can confirm this is possible with PureBasic.

Thx&
have a nice day
BarryG
Addict
Addict
Posts: 4173
Joined: Thu Apr 18, 2019 8:17 am

Re: Some questions before purchase (graphic wise)

Post by BarryG »

Yes, you can do that easily. Here's a jigsaw puzzle app that demonstrates:

viewtopic.php?f=27&t=72217

This should work with the demo version of PureBasic because it has no API commands.
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: Some questions before purchase (graphic wise)

Post by Kuron »

Since for that type of game there are no fast moving images (sprites) you would not need to use OpenGL. You could simply use the Canvas Gadget. The Canvas Gadget is very similar to the Graphic target introduced in PowerBASIC 10.

PureBasic is more than capable of the game style you want, and more advanced 2D games if you want to use OpenGL.
Best wishes to the PB community. Thank you for the memories. ♥️
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: Some questions before purchase (graphic wise)

Post by boddhi »

Hi,
Attronach wrote: I will be really happy if anyone can confirm this is possible with PureBasic.
I agree with BarryG.

In the past, I too developed a few games and utilities on Amiga 500/4000 with BlitzBasic and Amos, then PowerBasic and RealBasic on PC.
Even though I don't really program games any more (I still have an old unfinished blackjack from more than 10 years ago), PureBasic has some very interesting instruction sets (2D and 3D) for that.

Edit : {I agree with BarryG} and Kuron
Last edited by boddhi on Tue Sep 19, 2023 11:33 pm, edited 2 times in total.
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: Some questions before purchase (graphic wise)

Post by Kuron »

boddhi wrote: Tue Sep 19, 2023 11:28 pm and RealBasic on PC.
You have my deepest sympathies.
Best wishes to the PB community. Thank you for the memories. ♥️
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: Some questions before purchase (graphic wise)

Post by boddhi »

Kuron wrote: You have my deepest sympathies.
:D Honestly, I don't regret it at all!!! :mrgreen:
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: Some questions before purchase (graphic wise)

Post by Kuron »

boddhi wrote: Tue Sep 19, 2023 11:35 pm Honestly, I don't regret it at all!!! :mrgreen:
I only remember it as being bloated beyond belief. Big difference in moving to PB. :mrgreen:
Best wishes to the PB community. Thank you for the memories. ♥️
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: Some questions before purchase (graphic wise)

Post by boddhi »

Kuron wrote: I only remember it as being bloated beyond belief. Big difference in moving to PB. :mrgreen:
The same !

I can't remember which version I stopped at (5 or 6).
At the time, a simple "Print hello" was at least 1.5 MB for barely a few dozen KB for PB. The decision to change was made quickly!
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: Some questions before purchase (graphic wise)

Post by AZJIO »

Attronach wrote: Tue Sep 19, 2023 10:06 pm -move these objects over screen w/o destroying whole window content?
You can even see how it works.
viewtopic.php?t=76759
another example
viewtopic.php?t=80565
viewtopic.php?t=81423
benubi
Enthusiast
Enthusiast
Posts: 220
Joined: Tue Mar 29, 2005 4:01 pm

Re: Some questions before purchase (graphic wise)

Post by benubi »

You would still have to redraw the screen every frame.

If you would like to carry that bitmap without a redraw, maybe with WinAPI if you convert it to a cursor sprite, perhaps with a mouse cursor or hand drawn over it to show the drag/drop action. But you can draw as you wish frame by frame using a screen/windowed screen or go through the CanvasGadget. Using the WindowOuput() for drawing often causes flickering with my tests, and when other windows get dragged over it there are drawing artifacts from the OS, it works but it can have dirty regions for a sec if other windows overlap it.

You can write good looking things with a CanvasGadget and use it's features to capture mouse and keyboard events and Draw the bitmaps. It's slower than displaying sprites in full screen or windowed mode, tho, and you might have to write your own custom drawing filter to display transparent bitmaps - or you use DrawAlphaImage() but this is a bit slow, depending on how much you draw and what "frame rate" you need. I think doing a GUI for your app should work well, tho. In screen mode the used keyboard inkey() functions aren't as responsive or intuitive, they respond only after releasing the key - and there's no stroke repetition; the CanvasGadget responds like a GUI element would, it may be more suitable. Each solution has it's merits and little deficits.
Attronach
User
User
Posts: 12
Joined: Tue Sep 19, 2023 9:41 pm

Re: Some questions before purchase (graphic wise)

Post by Attronach »

Thnx all for info and links.

I will check everything.
Attronach
User
User
Posts: 12
Joined: Tue Sep 19, 2023 9:41 pm

Re: Some questions before purchase (graphic wise)

Post by Attronach »

benubi wrote: Wed Sep 20, 2023 3:31 pm You would still have to redraw the screen every frame.

depending on how much you draw and what "frame rate" you need. I think doing a GUI for your app should work well, tho. In screen mode the used keyboard inkey() functions aren't as responsive or intuitive, they respond only after releasing the key - and there's no stroke repetition; the CanvasGadget responds like a GUI element would, it may be more suitable. Each solution has it's merits and little deficits.
Screen refresh while window moving or inactive don't bother me. There are less than 10 hotkeys necessary to handle while play both games I have plan to resurrect.
Already download PB demo version and some source files mentioned in this thread.
Over weekend I have time to explore everything :)

Have a nice day
Attronach
User
User
Posts: 12
Joined: Tue Sep 19, 2023 9:41 pm

Re: Some questions before purchase (graphic wise)

Post by Attronach »

Hello again,

I'm doing something wrong.

Can anyone tell me please, how to display simple text from string on screen?
Something like 'c' do:

Code: Select all

char string_num [7] = "123456";
printf ("%s", string_num);
:cry:
User avatar
mk-soft
Always Here
Always Here
Posts: 6246
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Some questions before purchase (graphic wise)

Post by mk-soft »

See PB-Help Console ...
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: Some questions before purchase (graphic wise)

Post by AZJIO »

Attronach wrote: Fri Sep 22, 2023 7:26 am "%s"
sprintf
Format
Str(string_num)
Post Reply