Search found 225 matches

by RockTheSchock
Nov 15, 2019 20:58
Forum: Beginners
Topic: Need speedup
Replies: 23
Views: 1347

Re: Need speedup

Another option is to use ASM with AVX / AVX2 instructions: Each YMM register can hold and do simultaneous operations on eight 32-bit single-precision floating point numbers. So basically if the algorithm could be optimally transformed you could gain almost 8 times the speed. Realistically it could b...
by RockTheSchock
Nov 15, 2019 20:44
Forum: Beginners
Topic: Need speedup
Replies: 23
Views: 1347

Re: Need speedup

Maybe it's faster if you change this by using less divisions df=((-1e12 /Rgquadro)/Rgquadro/Rgquadro)+.4 also you could change the select case: 'Maybe ? Dim as Double Rgquadro If Rglue >140 Then df=9512/((Rgquadro)) Else If rglue>= 10 Then df=((-1e12 /(Rgquadro*Rgquadro*Rgquadro)+.4 Else df=0 NUM_ER...
by RockTheSchock
Nov 10, 2019 13:30
Forum: Community Discussion
Topic: FreeBASIC Namespace Project
Replies: 72
Views: 7304

Re: FreeBASIC Namespace Project

Keywords like Name, Width, Color can't be used as properties or membervars in types, that's a bit annoying. That would be no problem if most keywords get out of global namespace.
by RockTheSchock
Nov 09, 2019 9:24
Forum: General
Topic: Len of udt
Replies: 7
Views: 350

Re: Len of udt

If you work with RANDOM files and Type records it's important not to use "As Integer" . Just "as Integer" could be 4 byte or 8 byte weather you compile for a 32 or 64 bit platform. . So if at some point you are changing platform, it would break file format compatibility and you c...
by RockTheSchock
Nov 04, 2019 17:15
Forum: Community Discussion
Topic: FreeBASIC Namespace Project
Replies: 72
Views: 7304

Re: FreeBASIC Namespace Project

I have been thinking for a while about the quirks and about namespaces or some sort of package system. I would introduce some sort of auto namespace mode, which reflects the directory structure. Also things like an auto include mode or a compiler project / options file would be nice to have some com...
by RockTheSchock
Oct 08, 2019 15:05
Forum: Community Discussion
Topic: retro-basic
Replies: 8
Views: 1212

Re: retro-basic

This code does the same as Joshy's but can be run from both QB and FB. So with QB you could actually write readable code.

Code: Select all

SCREEN 13
DIM x AS INTEGER
DIM y AS INTEGER
FOR Y = 0 TO 199
   FOR x = 0 TO 319
      PSET (x,y), x AND 127 * Y AND 127
   NEXT
NEXT
SLEEP
by RockTheSchock
Jun 20, 2019 15:41
Forum: General
Topic: smart code formatter
Replies: 9
Views: 1585

Re: smart code formatter

Regular expressions are very useful: search pattern: ^(\t*)[ ]{3,5} replace with: $1\t Explanation: linebeginning followed by arbitrary number of tabs followed by 3-5 spaces and replaced by preveoiusly found tabs + one tab replacing 3-5 spaces. search and replace several times with notepad++ Spaces ...
by RockTheSchock
Jun 03, 2019 16:17
Forum: Beginners
Topic: How to get and use a dictionary
Replies: 14
Views: 7123

Re: How to get and use a dictionary

https://github.com/first20hours/google- ... swears.txt

Here is another word list. Just remove all 1-2 char words with regexp and then you could manually modify the file further.

regexp search and replace with editor:
^([a-z]{1,2})\r\n
by RockTheSchock
Sep 09, 2018 18:33
Forum: Community Discussion
Topic: relocation advice
Replies: 10
Views: 1389

Re: relocation advice

1. I don't believe in work. 2. I believe in a cushy lifestyle. Good food, clean water, nice clothes. I love programming but I might love the beach even more! Hamburg is the 2nd biggest city of Germany and the biggest city in Europe which is not a capital. https://en.wikipedia.org/wiki/Hamburg It's ...
by RockTheSchock
Aug 29, 2018 11:17
Forum: Community Discussion
Topic: FreeBASIC Community produced game
Replies: 130
Views: 12198

Re: FreeBASIC Community produced game

Nanoships Strike Force one Year 2357.. The battle for the Belt seamed over. The Federation of Free Nations had lost. But a breakthrough in nanotechnology made the conventional Warships vulnarable. The future of space war begins... Sofisticated autonomous nanoship factories produce and maintaine clou...
by RockTheSchock
Aug 27, 2018 21:36
Forum: Community Discussion
Topic: FreeBASIC Community produced game
Replies: 130
Views: 12198

Re: FreeBASIC Community produced game

Clearly this project is way beyond my abilities to contribute with all the complexity you are all talking about Well, i didn't mean to make things more complex. If realtime is too complex, we just use a turn based approach. If physical correct is to hard, so be it. It's a game with its own rules. M...
by RockTheSchock
Aug 27, 2018 10:20
Forum: Community Discussion
Topic: FreeBASIC Community produced game
Replies: 130
Views: 12198

Re: FreeBASIC Community produced game

Instead of using bidirectional pipes for the exchange of messages between the simultation server and the virtual agents ( ai bots) it would be more flexible to use udp or tcp/ip. So you could easily setup an enviroment with even thousands of bots running on different machines. Or you can run each bo...
by RockTheSchock
Aug 27, 2018 7:03
Forum: Community Discussion
Topic: FreeBASIC Community produced game
Replies: 130
Views: 12198

Re: FreeBASIC Community produced game

Whenever I see a new ai programming contest framework thread, i remember RealTimeBattle . Ah, I see where you are going with this, to protect the the host computer. - a valid concern that can't be ignored, however, - it seems to me, counterproductive, to create a FB challenge that asks the entrant t...
by RockTheSchock
Aug 22, 2018 9:01
Forum: General
Topic: Simple database implementation
Replies: 5
Views: 799

Re: Simple database implementation

As you stated in your first post: Ideally, for a database one would have the definition of the data variables (type, length) independent form the code that manages the data. To create this in freebasic seems rather complex to me and probably wiser to use an actual database tool (e.g. mysql or someth...
by RockTheSchock
Jul 25, 2018 19:28
Forum: General
Topic: animal OOP try
Replies: 4
Views: 588

Re: animal OOP try

I took your idea to show some more oop features. Const CATS_AVG_WEIGHT=5.0 Const DOGS_AVG_WEIGHT=10.0 ' ### Declaration ### type tanimal extends object '' ***** protected : dim as string _name dim as double _weight public : Declare Constructor (n As String="unkown",w As Double=0.0) Declare...

Go to advanced search