Search found 2264 matches

by badidea
Apr 10, 2021 15:54
Forum: Game Dev
Topic: a roguelike game converted from cpp to FB
Replies: 17
Views: 554

Re: a roguelike game converted from cpp to FB

Off-topic: Ron, if you have specific questions concerning OOP, why not start a topic on this forum? Answers usually come quickly, unless no one is interested
by badidea
Apr 09, 2021 17:24
Forum: Game Dev
Topic: a roguelike game converted from cpp to FB
Replies: 17
Views: 554

Re: need help coding a roguelike game

ron77 wrote:discord is highly addictive to me i spent too many hours on it more that i intended instead of actually coding...
ron77 wrote:hello it's late at night and my brain is already like jelly :( :-/
ron77 wrote:okay - i woke up early in the morning without sleeping enough

... many more posts ...

It is allowed to take a break you know :-)
by badidea
Apr 07, 2021 23:00
Forum: General
Topic: Infinite loop UBYTE For loop index problem?
Replies: 12
Views: 292

Re: Infinite loop UBYTE For loop index problem?

It seems to me that Joshy talks about cpu registers, while jj2007's benchmark tests data memory/cpu cache.
But does that assembly code mean that the 64-bit cpu is doing two 32-bit operations in one step?
by badidea
Apr 06, 2021 16:40
Forum: General
Topic: Hexagonal Grid
Replies: 14
Views: 2056

Re: Hexagonal Grid

Another way using winder method for inpolygon. Left click to locate, right click for new pattern. Your tile coordinate system is the same as I used in 'Pentacles' but different then what Richard used above. The isometric coordinate system is easier to work with I think. See the 'redblobgames' link ...
by badidea
Apr 05, 2021 23:25
Forum: Beginners
Topic: Controlling transistors via usb
Replies: 10
Views: 330

Re: Controlling transistors via usb

... Maybe I should have posted it under "Hardware Interfaces / Communication" section of the forum. I posted it on this website since the two are very much connected - the software and the hardware. In that section, there is libpruio (BB D/A - I/O fast and easy) which might be use...
by badidea
Apr 05, 2021 22:39
Forum: General
Topic: Hexagonal Grid
Replies: 14
Views: 2056

Re: Hexagonal Grid

For Richard. Your code combined with your the hexagon drawing routine from the 'Pentacles' topic. With some minor tweaking like: Ulong for color, sleep 1 in the loop, invalid mouse position detection. '-------------------------------------------------------------------- ' hexagon centres are at inte...
by badidea
Apr 04, 2021 21:49
Forum: Beginners
Topic: Screen functions
Replies: 2
Views: 130

Re: Screen functions

Hi Dinosaur, trying out the xdotool here. I run in one terminal this: sleep 5; xdotool key "A" "B" While this freebasic program is running: screen 19,8,1 dim as string key while key <> chr(27) key = inkey if key <> "" then print "Got:" & key wend And it do...
by badidea
Apr 04, 2021 15:15
Forum: Beginners
Topic: Problem adding Ulongint numbers
Replies: 30
Views: 350

Re: Problem adding Ulongint numbers

Don't use ^ with integers. The ^ operator takes 2 doubles as inputs and returns a double. When used with integers, automatic conversion to and from doubles is done. Example: Dim a As ULongInt a=18049651735527936 Print a+2^0 Sleep Prints: 1.804965173552794e+16 Interestingly fbc 32-bit behaves differe...
by badidea
Apr 04, 2021 1:14
Forum: Beginners
Topic: Problem adding Ulongint numbers
Replies: 30
Views: 350

Re: Problem adding Ulongint numbers

I cannot test at the moment, but is ^ a floating point operation that introduces a rounding error?
by badidea
Apr 02, 2021 18:14
Forum: General
Topic: Pentacles
Replies: 111
Views: 5664

Re: Pentacles

dodicat wrote:...
You have given me an idea to cook those hexagons au naturel
...

If you look long enough, you can spot the hidden Easter egg.
by badidea
Mar 29, 2021 23:12
Forum: General
Topic: Pentacles
Replies: 111
Views: 5664

Re: Pentacles

Something useless to start the week with: #define i32 long #define u32 ulong #define f64 double #define _alpha_(c) ((c shr 24) and &hff) #define _red_(c) ((c shr 16) and &hff) #define _grn_(c) ((c shr 8) and &hff) #define _blu_(c) (c and &hff) #define _min_(v1, v2) (iif(v1 < v2, v1, ...
by badidea
Mar 28, 2021 11:32
Forum: Projects
Topic: Check the forum for new posts
Replies: 2
Views: 250

Re: Check the forum for new posts

I have never seen any items under 'Active topics'. The issue with 'New posts' I think is that posts of new users (first post) does not show up. Examples recently: TwoCatsYelling and khaldrogo . I expect that this has something to do with anti-spam measures. First time posts need to be approved by an...
by badidea
Mar 25, 2021 23:04
Forum: Community Discussion
Topic: FreeBASIC 1.07 Release Discussion
Replies: 93
Views: 16753

Re: FreeBASIC 1.07 Release Discussion

Bug on fbc 1.07.2 32-bit & 64-bit linux? This 'program' segfaults: function BC (rv as string) as string BC = rv end function This also: function BC () as string return "x" end function Or: sub BC end sub (program exited with code: 139) I do not know if this bug is new or presen...
by badidea
Mar 25, 2021 22:26
Forum: General
Topic: Debug mode
Replies: 9
Views: 341

Re: Debug mode

I don't know what debug mode means, but I assume compilation with -exx.
The speed difference will depend on the program. In the extreme, this 'program' will have similar execution speed with and without the -exx option.

Code: Select all

print "wait 10 minutes (or press a key)"
sleep 1000 * 600
by badidea
Mar 25, 2021 22:02
Forum: Beginners
Topic: Embedded function calls
Replies: 22
Views: 840

Re: Embedded function calls

Got that? Not really, but what is more crazy is that this 'program' segfaults here (fbc 1.07.2 32-bit & 64-bit linux): function BC (rv as string) as string BC = rv end function (program exited with code: 139) Edit: This seems a bug only in the compiler for linux....

Go to advanced search