[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2023-12-19T11:55:52-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/forum/3 2023-12-19T11:55:52-05:00 2023-12-19T11:55:52-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39371#p39371 <![CDATA[News and Announcements • Re: FAX-ME: Let's write Tetris]]> Statistics: Posted by bongomeno — Tue Dec 19, 2023 11:55 am


]]>
2023-12-16T15:48:42-05:00 2023-12-16T15:48:42-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39369#p39369 <![CDATA[News and Announcements • Re: FAX-ME: Let's write Tetris]]>
Wow! This is like an early Christmas gift! Super cool!
Thanks! I should probably add some illustrations for the OR operator (XOR is used a few times but never explained, and MOD can be replaced with AND in this case, so I should probably point that out too.) I also spotted some remnants of old code that is no longer necessary (like clearRow taking an argument when the new code no longer uses it.)

Statistics: Posted by MikeHawk — Sat Dec 16, 2023 3:48 pm


]]>
2023-12-15T17:13:13-05:00 2023-12-15T17:13:13-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39364#p39364 <![CDATA[News and Announcements • Re: FAX-ME: Let's write Tetris]]> Statistics: Posted by buddpaul — Fri Dec 15, 2023 5:13 pm


]]>
2023-12-15T15:08:43-05:00 2023-12-15T15:08:43-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39363#p39363 <![CDATA[News and Announcements • FAX-ME: Let's write Tetris]]> simple black-and-white page packed with illustrations, code, and step-by-step instructions on how to build your own Tetris engine. Let me know what you think.

Statistics: Posted by MikeHawk — Fri Dec 15, 2023 3:08 pm


]]>
2023-08-16T11:06:56-05:00 2023-08-16T11:06:56-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39346#p39346 <![CDATA[News and Announcements • Re: Columns in QB - Release]]>
How's your Halloween maze game going by the way?

EDIT: added Doomed, by Rodrigo Rocha Gomes e Souza
DOOMED.ZIP

list.zip

CCLONES.RAR

Statistics: Posted by MikeHawk — Wed Aug 16, 2023 11:06 am


]]>
2023-07-19T23:52:17-05:00 2023-07-19T23:52:17-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39345#p39345 <![CDATA[News and Announcements • Re: Columns in QB - Release]]>
I stumbled across this old remake of Columns in QB from 2001. It's not bad. Yours definitely seems to play better but it's interesting to see different people's take on the same source material.

Here's a link if you haven't stumbled upon it yet: http://www.phatcode.net/downloads.php?id=117
Screenshot from 2023-07-20 00-50-18.png

Statistics: Posted by Erik — Wed Jul 19, 2023 11:52 pm


]]>
2023-06-30T01:21:28-05:00 2023-06-30T01:21:28-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39343#p39343 <![CDATA[News and Announcements • RPN scientific command line calculator]]>
FREEWARE Open Source

RPN Calc is a scientific command line calculator for x86 DOS.

Example expressions:

Code:

(18/3)^2+((13+7)*5^2)2*20/2+(3+4)*3^2-6+15(3*5^2/15)-(5-2^2)(5.9-5.3)*7.2+1.4^2(2.1^2+5.2-7.2)*7.1(18/3)^2+((13+7)*5^2)(-B+SQR(B^2-4*A*C))/(2*A)(-B-SQR(B^2-4*A*C))/(2*A)
Type help in the calculator for assistance.

Operator precedence: !, ^, %, *, /, +, -, <, >, <=, >=, =, <>, ~, &, |
Operator description: ! is NOT(), % is MOD, ~ is XOR, & is AND, | is OR

Variables are named from a to z. To negate variables, write v*-1, not -v.
# inserts the last evaluation in an expression.
Enter STO V with any variable as V to store the last evaluation.
Enter RESET to set values for the variables.
Functions: INT(), SQR(), SIN(), COS(), TAN(), ATN(), ABS(), LOG(), SGN()
Functions are unary, but have no precedence unlike not.
Enter LIST to view the variables values.
Enter CLS to erase the screen.
Enter STEPS to disable/enable printing and recording of steps.
Enter DOS to exit
Enter HELP or ? to see this text again.

Download:
http://www.lucidapogee.com/download.php ... pncalc.zip

Statistics: Posted by bongomeno — Fri Jun 30, 2023 1:21 am


]]>
2023-01-26T23:46:24-05:00 2023-01-26T23:46:24-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39336#p39336 <![CDATA[News and Announcements • Re: FTCBASIC (Fast Tiny Compiled BASIC)]]>
I have added constants and libraries for shell execute and reading the command line.

Statistics: Posted by bongomeno — Thu Jan 26, 2023 11:46 pm


]]>
2023-01-22T09:23:15-05:00 2023-01-22T09:23:15-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39335#p39335 <![CDATA[News and Announcements • Re: New Qbasic Christmas Game: Santa's Delivery Rush]]>
By the way I found the tempo issue in PlaySfx():

Code:

CASE SPRINGSFX  PLAY "O3 T180 L64 MB CD-DE-EFG-G"
Should reset the tempo to 120 when it's done:

Code:

CASE SPRINGSFX  PLAY "O3 T180 L64 MB CD-DE-EFG-G T120"
Otherwise it carries over to other PLAY statements until the program ends... and now that I check it out, all the sound effects are indeed sped up after jumping on a spring. Turn the invisibility cloak on and off before stepping on the spring in level 5, then toggle the cloak again. Funny I had to hear the jingle to realize something was up.

I'm looking forward to the Halloween game, I'm a sucker for mazes and mansions! Cheer.

Statistics: Posted by MikeHawk — Sun Jan 22, 2023 9:23 am


]]>
2023-01-22T03:15:13-05:00 2023-01-22T03:15:13-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39334#p39334 <![CDATA[News and Announcements • Re: New Qbasic Christmas Game: Santa's Delivery Rush]]>
The level finished jingle isn't purposely a different tempo. It's the same code executed each time, it's just using the QB built in "background" playing. I'm guessing that's not entirely reliable. (MB flag on the PLAY command)

The spite drawing issue is due to the weirdness and hacky-ness I handled that code. The way that was all done was pretty nasty so there's no surprise there's issues there. This carries over to the tight and weird jumping and collision detection with enemies. I have a Halloween game I started working on back in Oct (early out of date screen shot & info: https://nediscapp.com/discussion.cgi?di ... icle=41027) that handles things a bit different that's much better at it. Your 'DEF SEG' recommendations in the sprite draw loop are immensely helpful for both games. Thank you for that!!

The tight squeeze on time in level 24 was due to me thinking the game was too easy. I guess when you're the main person testing it, you don't realize that you know all the 'tips and tricks' and what becomes hard to you is very hard to others.

Thanks again for playing it. I'll have to post my high score as well.
Hopefully at some point I'll have time to create a 1.02 that has the jump fixes, sprite fixes, DEF SEG draw fix, and level time adjustment fixes. Not sure when that will be though. :)

Thanks again!

Statistics: Posted by Erik — Sun Jan 22, 2023 3:15 am


]]>
2023-01-16T20:26:37-05:00 2023-01-16T20:26:37-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39333#p39333 <![CDATA[News and Announcements • Re: New Qbasic Christmas Game: Santa's Delivery Rush]]>
sdrush_055.png
I really think the actors' collision box should be thinner and maybe a little shorter too.

Statistics: Posted by MikeHawk — Mon Jan 16, 2023 8:26 pm


]]>
2023-01-15T20:13:07-05:00 2023-01-15T20:13:07-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39332#p39332 <![CDATA[News and Announcements • Re: New Qbasic Christmas Game: Santa's Delivery Rush]]>
sdrush_014.png
sdrush_032.png
sdrush_038.png
As a side note: the tempo for the "level completed" jingle is not always the same. I don't know if it was by design or if another sound changed the tempo and it was carried over by accident. I also noticed some objects are not always rendered as sprites when they overlap. I'm not sure why. I don't think it's necessary right now, but if you ever need some extra speed to draw sprites, you could try:
  • Move DEF SEG to the y% loop, no need to reset it for every pixel.
  • Modify the segment address for each row rather than using a LONG in the POKE statement. In short: increasing the DEF SEG value by 1 is equal to increasing the POKE offset by 16. It means that you can easily reach the whole screen using only INTEGERs if you multiply y% by 20 (20 is 320 -screen width in pixels- divided by 16 -size of a paragraph-) and add the result to &hA000. This removes the LONG multiplication from the pixel loop.
  • You can test variables against 0 by just throwing them at IF and let it figure it out. If the pixel array only contains values above or equal to 0, just go "IF variable THEN" and the test will only pass if the variable is not null.
It should look like this and it seems to be 10x faster than PSET and 5x faster than the current code:

Code:

FOR y% = 1 TO MAXSPRITEHEIGHT  DEF SEG = &HA000 + (y% + yOffset%) * 20  FOR x% = 1 TO MAXSPRITEWIDTH    IF SpriteMap(SpriteId%, x%, y%) THEN         POKE (x% + xOffset%), SpriteMap(SpriteId%, x%, y%)    END IF  NEXT x%NEXT y%DEF SEG
I swear one of these days I'll complete level 24 with the utmost prejudice.

Statistics: Posted by MikeHawk — Sun Jan 15, 2023 8:13 pm


]]>
2023-01-08T07:42:53-05:00 2023-01-08T07:42:53-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39331#p39331 <![CDATA[News and Announcements • Re: FTCBASIC (Fast Tiny Compiled BASIC)]]>
If you downloaded it already, delete and download it again!

I have added more libraries and updated the examples.

This is a major update, but I will still keep this as alpha version.

libraries added are time.inc and random.inc

Statistics: Posted by bongomeno — Sun Jan 08, 2023 7:42 am


]]>
2023-01-07T01:52:12-05:00 2023-01-07T01:52:12-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39330#p39330 <![CDATA[News and Announcements • Re: FTCBASIC (Fast Tiny Compiled BASIC)]]>
I have added a file access library.

Statistics: Posted by bongomeno — Sat Jan 07, 2023 1:52 am


]]>
2023-03-01T20:24:52-05:00 2023-01-06T01:02:50-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39329#p39329 <![CDATA[News and Announcements • FTCBASIC (Fast Tiny Compiled BASIC)]]>

FTCBASIC

Homepage: http://lucidapogee.com/index.php?page=ftcbasic

FTCBASIC means fast tiny compiled BASIC. It is a BASIC compiler for x86 DOS. The compiler is written in QuickBasic and generates FASM output. Using batch files, you may compile your source to com files instantly.

Generated com files are tiny and fast. They start at less than 50 bytes.

The compiler and language is derived from the Pebble language. Many of the great features of Pebble have been kept in translation. As a result, there's support for inline asm, include files, and more. There's even some basic 1D array and string data type support.

In all, there's integer, integer array, and string data types. Floating point is not supported, but may be implemented with libraries.

Only unsigned integers may be used in expressions. Operator precedence is *, /, +, -, <, >, <=, >=, =, <>, AND, and OR. Parenthesis override operator precedence.

** Notice: This Alpha version is fresh off the press and probably has issues. Also, the documentation is incomplete. I will be working on it, but wanted to make an early release to get some feedback. **

Examples...

Code:

rem periodic table lookup examplerem uses carry command to perform modulusrem compile with FTCBASICdefine e = 0, i = 0, m = 0, r = 0, c = 0, q = 0dim a[1, 2, 5, 13, 57, 72, 89, 104]dim b[-1, 15, 25, 35, 72, 21, 58, 7]doclsprint "Periodic Table Lookup"crlfprint "0 to continue or 1 to quit: " \input qclsif q = 0 thengosub displaytablegosub searchtablecrlfprint "Press any key to continue..."pauseendifloop q <> 1endsub searchtableprint "Atomic number: " \input elet i = 8dolet i = i - 1loop @a[i] > elet m = e + @b[i]let r = ( m / 18 ) + 1carry clet c = c + 1cursor 19,20print "Period: " \print r \print " Group: " \print c \crlfreturnsub displaytableprint "      1   2   3   4   5   6   7   8   9   10  11  12  13  14  15  16  17  18"crlfprint "   1  H                                                                   He"crlfprint "   2  Li  Be                                          B   C   N   O   F   Ne"crlfprint "   3  Na  Mg                                          Al  Si  P   S   Cl  Ar"crlfprint "   4  K   Ca  Sc  Ti  V   Cr  Mn  Fe  Co  Ni  Cu  Zn  Ga  Ge  As  Se  Br  Kr"crlfprint "   5  Rb  Sr  Y   Zr  Nb  Mo  Tc  Ru  Rh  Pd  Ag  Cd  In  Sn  Sb  Te  I   Xe"crlfprint "   6  Cs  Ba  *   Hf  Ta  W   Re  Os  Ir  Pt  Au  Hg  Tl  Pb  Bi  Po  At  Rn"crlfprint "   7  Fr  Ra  **  Rf  Db  Sg  Bh  Hs  Mt  Ds  Rg  Cn  Nh  Fl  Mc  Lv  Ts  Og"crlfprint "   8 Lantanoidi*  La  Ce  Pr  Nd  Pm  Sm  Eu  Gd  Tb  Dy  Ho  Er  Tm  Yb  Lu"crlfprint "   9 Aktinoidi**  Ac  Th  Pa  U   Np  Pu  Am  Cm  Bk  Cf  Es  Fm  Md  No  Lr"crlfreturn

Code:

rem Nim game examplerem compile with FTCBASICdefine tokens = 12, take = 0gosub introdoprint "There are " \print tokens \print " tokens remaining."crlfprint "How many would you like to take? " \input takeif take > 3 or take < 1 thenprint "You must take between 1 to 3 tokens."endifif tokens - take < 0 thenprint "You cannot take that many."endifif take <= 3 and take >= 1 and tokens - take >= 0 thenlet tokens = tokens - takeif tokens = 0 thenbellprint "Congratulations. You got the last token."pauseendendiflet take = 4 - takeif tokens >= 15 thenlet take = 3endifif tokens <= 3 thenlet take = tokensendifprint "I will take " \print take \print " of the tokens."let tokens = tokens - takeif tokens = 0 thenprint "I got the last token. I win. Better luck next time."pauseendendifendifloopsub introclsprint "NIM game"crlfprint "Press any key to play..."clsreturn

Code:

rem bubble sort benchmark examplerem compile with FTCBASICuse time.incuse random.incdefine const size = 32000dim list[size]define sorting = 0, index = 0, elements = 0define timestamp = 0, sorttime = 0define temp1 = 0, temp2 = 0clsprint "Bubble sort benchmark test"doprint "How many elements to generate and sort (max " \print size \print ")? " \input elementsloop elements > sizegosub fillgosub sortprint "done!"print "sort time: " \print sorttimeprint "Press any key to view sorted data..."pausegosub outputpauseendsub fillprint "filling..."0 indexdogosub generaterandlet @list[index] = rand+1 indexloop index < elementsreturnsub sortprint "sorting..."gosub systemtimelet timestamp = loworderdo0 sorting0 indexdolet temp1 = index + 1if @list[index] > @list[temp1] thenlet temp2 = @list[index]let @list[index] = @list[temp1]let @list[temp1] = temp2let sorting = 1endif+1 indexloop index < elements - 1loop sorting = 1gosub systemtimelet sorttime = ( loworder - timestamp ) / 18returnsub outputprint "printing..."0 indexdoprint @list[index]+1 indexloop index < elementsreturn

Statistics: Posted by bongomeno — Fri Jan 06, 2023 1:02 am


]]>