Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Different display when porting DarkBasic code into DarkBasic Professional

Author
Message
DarkMere
22
Years of Service
User Offline
Joined: 7th Aug 2003
Location:
Posted: 7th Aug 2003 18:24
Hi people

I have not used basic for about 8 years, since the days of GFA basic on my Atari STE, but I do concider myself quite versed in the lanquage, just very rusty. I found the DarkBasic site last week, downloaded the free demo, wrote a few programs, got hooked, decided to get the DarkBasic Professional version which arrived yesterday. My problem is everything I wrote using the demo version, the print characters are far larger when run/complied using the pro version and vanish off the page. Can anyone tell me whats going on?

Second question. I can't seem to find a version of the 'FILL' command that GFA used (I might not be looking hard enough). So how do you fill 2D objects with a colour? I see the the box command auto fills the box, so how do you draw an outline box without resorting to changing the ink colour and drawing the box one pixel inside the original box?

I am sure I will be placing lots of postings on the forums over the next few weeks, but thank you to anyone who can help me with these opening problems.
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 7th Aug 2003 18:54
first...have you patched to 4.1 or the 5 beta?, you can download off this website if you havent (thats this website here what you are reading , not some link I posted)

try setting your screen resolution higher or using a smaller font (check the display command set and the text command set) you can either make the screen higher resolution or the font smaller, both will give you the effect you want

draw a outline box with the line command, (see psuedocode)

function lbox(a,b,c,d)
line a,b,c,b
line c,b,d,c
line d,c,d,a
line d,a,a,b
endfunction
(this may have the ordinates wrong, but thats the general idea)

there is no paint or fill function, there was one made as a dll I think, or you could code on yourself, but it may run out of stack, use dynamic arrays to impliment it, DB is meant for games and most games involve swapping images around at high speed, most of the 2d commands are rarely used, apart from box, that gets used to make quick and dirty textures that can be grabbed off the screen, cheers.

Mentor.

DarkMere
22
Years of Service
User Offline
Joined: 7th Aug 2003
Location:
Posted: 9th Aug 2003 00:42
I do understand what you say about DB being mainly a gaming code, but I have to say that I think not having a fill command is going backwards, even Qbasic had a paint command, going further back the Sinclair QL had a FILL command back in 1985. Are there no games to be made except 3D games.
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Aug 2003 03:25
What you have to remember is that Dark Basic is a 3D programming language utilizing DirectX and although it can do 2D, it certainly isn't aimed at the 2D programmer.

As such, most of the few 2D drawing commands are very slow.

As DBP is still being developed, Lee may yet decide to add a fill command - you never know...

TDK_Man

Login to post a reply

Server time is: 2026-07-07 03:46:19
Your offset time is: 2026-07-07 03:46:19