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 / Doubts, curiosities and problems

Author
Message
Helmet
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: Brazil
Posted: 19th Oct 2002 07:30
There are so many things that I go to ask that I go to put in topics.

1-Does have how to make screensavers in DarkBASIC
2-How can I change the size of a text?
3-How can I pit a image, put in a place?
4-How can I do it movement by Keyboard?
5-I took a book of BASIC and it shows an editor of BASIC with numbers of the left. Why in DarkBASIC we don´t see?
6-I have this comand
rem Adding Numbers 1.0

rem Putting the numbers
PRINT "Put the first number"
INPUT "";A
PRINT "Put the second number"
INPUT "";B
rem Adding the numbers
A+B = C
PRINT C

This program is to take two numbers and plus one to another. This comand doesn´t give wrong. but it doesn´t take on right. What´s the problem?

rem Know which number is less 1.0

rem Putting the numbers
INPUT "A=";A
INPUT "B=";B
INPUT "C=";C
rem Conditions to see which is the less
IF A =6 THEN PRINT "Aluno Aprovado!"
rem Termina o Programa
END

rem ******************Programa em Linguagem Basic***********
rem ******************Com Problemas*************************

REM TERMOS DE FIBONACCI MENORES L
REM RECEBA L
INPUT L
REM PROCESSE OS 2 PRIMEIROS TERMOS
LET A=1
IF A L THEN 160
PRINT C
LET A=B
LET B=C
GO TO 100
END

rem Como descobrir o tipo de Triângulo

rem Colocar o texto Como descobrir o tipo de Triângulo
SET CURSOR 150,50
PRINT "Como descobrir o tipo de Triângulo"
rem Colocar o 1º Valor
PRINT "Coloque o valor do 1º Lado"
INPUT "";A
rem Colocar o 2º Valor
PRINT "Coloque o valor do 2º Lado"
INPUT "";B
rem Colocar o 3º Valor
PRINT "Coloque o valor do 3º Lado"
INPUT "";C
rem Operações para descobrir o tipo de Triângulo
IF A
Helmet
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: Brazil
Posted: 19th Oct 2002 08:09
Please, help me!! And correct me If I wronged something

indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 19th Oct 2002 13:01
www.dbheaven.com is a great read if u havent already been through the newbies book.

There are so many things that I go to ask that I go to put in topics.

1-Does have how to make screensavers in DarkBASIC

make an executable that quits as you move the mouse or press a key, once compiled u may have to do a few things depending on what OS u have but change the extension to .scr and drop into the correct location.

stopping multiples loading might be an aissue to consider.

2-How can I change the size of a text?
SET TEXT SIZE FontSize

3-How can I pit a image, put in a place?
u can position images or sprites
PASTE IMAGE imgnum,X,Y,Transparency

4-How can I do it movement by Keyboard?
You can use the built in keyboard commands like :
if upkey()=1
perform movement code here
endif

if downkey()=1
perform movement code here
endif

etc...

or you can use the inkey$() command

eg:

if inkey$()="q"
print " quitting"
endif

finally its more robust to know the scancodes of a key

if SCANCODE(52)=1
perform action code here
endif

also think about combos of keys

if SCANCODE(52)=1 and SCANCODE(53)=1
perform action code here
endif

also think about combos of keys in different states

if SCANCODE(52)=1 and SCANCODE(53)=0 SCANCODE(54)=0
perform action code here
endif


5-I took a book of BASIC and it shows an editor of BASIC with numbers of the left.
Why in DarkBASIC we don´t see?

DB 1 internal editor doesnt have that feature.
Download "DARKEDIT" an alternative editor made by Guy.S.
who also makes the DBP editor.






rem usually its the left and right hand positions
rem of the variables that get messy in DB1 which has its own
rem slightly different math handling

sync rate 0
sync on

A = 140
B = 10000

C=A+B

text 10,10,"a = "+STR$(A)
text 10,30,"b = "+STR$(B)
text 10,50,"c = "+STR$(C)

sync

suspend for key
end

http://www.lunarpixel.com/ is my new site
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 19th Oct 2002 13:02
ack I missed to mention the sprite position thing.

sprite sprite_num,X,Y,sprite_img_num

http://www.lunarpixel.com/ is my new site
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 19th Oct 2002 13:04
DARKEDIT is here also

http://darkedit.nmisoftware.com/

http://www.lunarpixel.com/ is my new site
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 19th Oct 2002 14:47
When making screensavers there are command lines to worry about, when they are run by Windows it adds a command to the end of the screensaver, depending on whether you're viewing the screensaver full screen, in the little preview box or adjusting the settings. There's a topic on this somewhere.

Basic programs used to be based on line numbers, since the editors were command line interfaces, if you typed in a command without a number in front it would execute it immediately. You coulod type the lines in any order you liked, the program would always run in incrementing line order. They were also used as labels for goto and gosub commands, but are now obsolete as you can put labels into the program. However it's often useful to see at what line number errors are occurring.
Mirthin
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Land of the Rising Haggis
Posted: 19th Oct 2002 16:44
I hear you can just change to .scr and then double click to install.
Helmet
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: Brazil
Posted: 23rd Oct 2002 19:12
Thank you very much moderator. Do you have ICQ to take off doubts.
Correct if I wronged something.

Login to post a reply

Server time is: 2024-04-26 05:40:12
Your offset time is: 2024-04-26 05:40:12