Search found 1984 matches

by badidea
May 30, 2020 11:50
Forum: Beginners
Topic: how to print a whole text file as a movie ending titles (from bottom to top)
Replies: 10
Views: 137

Re: how to print a whole text file as a movie ending titles (from bottom to top)

dodicat wrote:You use screen 19, then draw string.

I would have expected a Star Wars style credits scrolling form you :-)
Never mind, that has been done before: Another star wars like intro
by badidea
May 30, 2020 10:43
Forum: Beginners
Topic: how to print a whole text file as a movie ending titles (from bottom to top)
Replies: 10
Views: 137

Re: how to print a whole text file as a movie ending titles (from bottom to top)

The easy way is to let the console do the scrolling up: 'append to the string array the string item sub sAppend (arr() as string, item as string) redim preserve arr(lbound(arr) to ubound(arr) + 1) arr(ubound(arr)) = item end sub sub readfile(f as string, lines() as string) dim fline as string open f...
by badidea
May 30, 2020 9:49
Forum: Beginners
Topic: how to print a whole text file as a movie ending titles (from bottom to top)
Replies: 10
Views: 137

Re: how to print a whole text file as a movie ending titles (from bottom to top)

Works fine: 'append to the string array the string item SUB sAppend (arr() AS STRING, item AS STRING) REDIM Preserve arr(LBOUND(arr) TO UBOUND(arr) + 1) AS STRING '<-- as string not needed arr(UBOUND(arr)) = item end sub redim lines() as string '<--- not lines(0) sAppend lines(), "aaaaaaaa"...
by badidea
May 29, 2020 20:51
Forum: Game Dev
Topic: Yet Another Connect Four
Replies: 9
Views: 329

Re: Yet Another Connect Four

Although I dislike the monopoly of google I must confess I use it all the time. So you don't use any search engine? Although I used to gain all my knowledge through books Amazon has destroyed the ability of physical outlets to stock the technical books I used to buy and limited Australians access t...
by badidea
May 29, 2020 14:43
Forum: Game Dev
Topic: Yet Another Connect Four
Replies: 9
Views: 329

Re: Yet Another Connect Four

I don't google. But anyway, the recursive minimax algorithm only requires an evaluation of the board status (which is relative simple for connect 4) and should find the best move of all possible moves for a given depth. No further knowledge like strategies needed. For a search depth of ~8 or more th...
by badidea
May 27, 2020 18:05
Forum: Community Discussion
Topic: 15 years of freeBASIC forum?
Replies: 7
Views: 231

15 years of freeBASIC forum?

It seems that today this forum exists 15 years. Based on the sysop account created on 27 May 2005, 01:11 (memberlist.php)
That was when most of us were running Windows XP on a Pentium-4 or an Athlon XP computer. Ubuntu existed for only 1 year and I had no grey hair yet.
by badidea
May 27, 2020 0:24
Forum: Game Dev
Topic: Yet Another Connect Four
Replies: 9
Views: 329

Re: Yet Another Connect Four

minimax algorithm working better now, but still not right. MAX_DEPTH must be even (2, 4, 6), but then still random acts of sagacity (<- WHAT IS going on? What is sagacity? I write stupidity_!). #include "simple_logger.bi" '-------------------------------------------------------------------...
by badidea
May 26, 2020 19:09
Forum: Beginners
Topic: smoking calculator
Replies: 6
Views: 209

Re: smoking calculator

It might be "common knowledge", but most smokers don't want to know these numbers and don't do the calculation. They are even more likely to light up another cigarette if they do because of the stressful thought.
by badidea
May 26, 2020 18:45
Forum: Beginners
Topic: smoking calculator
Replies: 6
Views: 209

Re: smoking calculator

I don't think that the point of the program is to determine the exact number of cigarettes and cost, but to send a message like: "You smoked nearly a hundred-thousand cigarettes worth a nice car and lost one year of life because of it".
by badidea
May 26, 2020 17:48
Forum: Beginners
Topic: smoking calculator
Replies: 6
Views: 209

Re: smoking calculator

I think that the advice should be different if totalCigarettes = 0
by badidea
May 26, 2020 12:52
Forum: Community Discussion
Topic: Why did you choose FreeBASIC?
Replies: 34
Views: 1683

Re: Why did you choose FreeBASIC?

If you are collection ages, here are previous topics: [offtopic]I'm old :-) (2014) and How old are you ? (2011) . I hope that all are still healthy and alive. What I wonder is, has there ever been a female member in the 15 years (-1 day) that the forum exists? About BASIC, maybe some day the youth d...
by badidea
May 26, 2020 12:34
Forum: Game Dev
Topic: Maze 2D and 3D
Replies: 6
Views: 232

Re: Maze 2D and 3D

Maze 2d With -exx compile: Aborting due to runtime error 6 (out of bounds array access) at line 123 of test.bas::BUSCA_HUECOS() Press any key to continue . . . Variables c,f,g,h,i,j,r,t,x,y,a ? It is a good thing that they a commented. Now I only need to learn Spanish. More 2d mazes...
by badidea
May 24, 2020 17:37
Forum: Community Discussion
Topic: real need for a freebasic package for atom ide
Replies: 6
Views: 206

Re: real need for a freebasic package for atom ide

You can maybe ask on the Atom forum?
(howto make a package for linking a compiler)
by badidea
May 23, 2020 22:40
Forum: Linux
Topic: Strange behavior of input and line input
Replies: 8
Views: 241

Re: Strange behavior of input and line input

Done some more testing (on Ubuntu Mate 18.04). The problems here occurs when I keep a button pressed (for several seconds) and then try other keys. Tested with 4 different terminals: * MATE terminal: Not good * XFCE terminal: Not good * byobu: Good (I cannot remember installing this one) * xterm: Go...
by badidea
May 23, 2020 21:38
Forum: Linux
Topic: Strange behavior of input and line input
Replies: 8
Views: 241

Re: Strange behavior of input and line input

First thought: Try running it with a sleep 1 in the loop. Sorry, same behavior here, sleep 1 does not help. It could be a bug, the linux terminal in freeBASIC can work very slow in other cases as well. If I switch to graphic screen (e.g. screenres 800, 600) it works as expected here. Custom input h...

Go to advanced search