Search found 1979 matches

by badidea
May 03, 2020 21:27
Forum: Projects
Topic: Voxl City Battle Tank Defense - OpenGL voxel engine - WIP
Replies: 3
Views: 175

Re: Voxl City Battle Tank Defense - OpenGL voxel engine - WIP

Looks good. You have been productive.
by badidea
May 03, 2020 17:44
Forum: Tips and Tricks
Topic: The Simplest debug and trace method Win+Lin 32/64 bit
Replies: 7
Views: 421

Re: The Simplest debug and trace method

A simple print is not always possible. For example in games where the whole screen is overwritten a few miliseconds later. And if page flipping is used, it is even more complicated. Sleep can also be a problem is such cases. And beep does not work linux.
by badidea
May 03, 2020 17:14
Forum: Community Discussion
Topic: invitation to an open source community discord server
Replies: 6
Views: 189

Re: invitation to an open source community discord server

hi all... i would like to invite anyone who is interested to join open source community which has a freebasic section... here is the invatetion https://discord.gg/9n4kyDr i hope it's okay to post this invitation here if not feel free to delete this post... ron77 There is also this one: FreeBasic Di...
by badidea
May 02, 2020 23:49
Forum: General
Topic: Tetris piece creation
Replies: 7
Views: 331

Re: Tetris piece creation

I had a shot at this kind of thing. (I wasn't going out anywhere) Choices 3 to 8 boxes. ... A lot faster, but not good. There are doubles (after rotation) and some missing. See the numbers for each polyomino set here: https://en.wikipedia.org/wiki/Polyomino For heptominoes it should be 196, or 108 ...
by badidea
May 02, 2020 10:04
Forum: General
Topic: Tetris piece creation
Replies: 7
Views: 331

Re: Tetris piece creation

Looks like you are on the right track using recursion. You should try using hashing in replace of your list search function. It would help a lot. Yes, there is al lot of room for speed improvement. Up to 8-square shapes (octominoes), a 64-bit integer can be used, without hashing. Also the testing g...
by badidea
May 01, 2020 21:38
Forum: General
Topic: Tetris piece creation
Replies: 7
Views: 331

Re: Tetris piece creation

It finally works. But I had hoped to create a more elegant solution, this is mostly brute-force and test. Anyway, here are all the one-sided heptominoes: const SW = 800, SH = 600 const NUM_SQUARES = 7 '------------------------------------------------------------------------------- type piece_type di...
by badidea
May 01, 2020 14:12
Forum: General
Topic: Tetris piece creation
Replies: 7
Views: 331

Tetris piece creation

A bit silly project. Creating Tetris (tetrominoes) without hard-coding them.
Change in code below (next post) NUM_SQUARES to 4.
by badidea
Apr 30, 2020 19:34
Forum: Community Discussion
Topic: What do you use FreeBASIC for?
Replies: 91
Views: 3185

Re: What do you use FreeBASIC for?

... It is interesting to me because FreeBASIC isn't even on the radar so why do we use it and other do not? https://www.youtube.com/watch?v=QyJZzq0v7Z4 I haven't watched your link yet, will do this now, but "Uncle Bob" says: No language is perfect. And that is also way there are so many. ...
by badidea
Apr 29, 2020 22:35
Forum: Community Discussion
Topic: What do you use FreeBASIC for?
Replies: 91
Views: 3185

Re: What do you use FreeBASIC for?

An interesting talk about the history and future of programming:
"Uncle" Bob Martin - "The Future of Programming"
by badidea
Apr 29, 2020 14:19
Forum: Community Discussion
Topic: Could someone make a list of FreeBASIC GUI libraries/frameworks?
Replies: 166
Views: 4959

Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?

BTW, I used to see D.J.Peters used "fltk-oop.bi" on his code snippet but I can't found it anywhere on the forum. Could someone let me know where to get it? Thanks. You mean this post: https://freebasic.net/forum/viewtopic.php?f=14&t=24547&start=165#p254486 ? I don't think he relea...
by badidea
Apr 28, 2020 21:29
Forum: Game Dev
Topic: Meteorite shooter
Replies: 9
Views: 671

Re: Meteorite shooter

Shooting click area outside the shape. You must annihilate all green pixels before they leave the shape. A single pixel might get out but you must finish it off anyway. You are a clever coder, but making games is not your best skill :-) Or I am just too stupid. I don't understand how to play it. Ed...
by badidea
Apr 28, 2020 21:05
Forum: Tips and Tricks
Topic: Wormhole effect
Replies: 34
Views: 867

Re: Wormhole effect

...it does not work properly with the 32-bit compiler. I've tested it on my Win10 PC compiled as x86 GUI and it seems to work properly! What's wrong on your side? With 32-bit fbc on linux, I only get a gray blob moving around. I'll check if I can find the problem... For the timer variables: Windows...
by badidea
Apr 28, 2020 19:51
Forum: Tips and Tricks
Topic: Wormhole effect
Replies: 34
Views: 867

Re: Wormhole effect

ShawnLG wrote:I have written a wormhole tunnel effect out of bordom. It would pair well with the Dr. Who soundtrack.

All timer related variables should be double, and it does not work properly with the 32-bit compiler.
by badidea
Apr 28, 2020 10:18
Forum: Beginners
Topic: Ubound crash? [solved]
Replies: 8
Views: 234

Re: Ubound crash?

The issue is solved. Thanks for all the replies. It was something stupid (as expected). A 0-pointer. In short: type plant_grow_list dim as plant_grow_item item(any) declare sub add(gridPos as int2d, plantId as integer) '... end type sub plant_grow_list.add(gridPos as int2d, plantId as integer) dim a...
by badidea
Apr 27, 2020 22:31
Forum: Beginners
Topic: Ubound crash? [solved]
Replies: 8
Views: 234

Ubound crash? [solved]

I ran into a weird issue. Is there a situation thinkable where dim as integer ub = ubound(item) Results in the following error:? Aborting due to runtime error 12 ("segmentation violation" signal) And why do weird errors always happen when you think you have completed a piece of code and pl...

Go to advanced search