Search found 220 matches

by RockTheSchock
Oct 08, 2019 15:05
Forum: Community Discussion
Topic: retro-basic
Replies: 8
Views: 481

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: 1289

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: 4589

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: 1171

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: 10996

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: 10996

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: 10996

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: 10996

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: 747

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: 543

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...
by RockTheSchock
Apr 09, 2018 22:43
Forum: General
Topic: Best Database practice
Replies: 6
Views: 518

Re: Best Database practice

I would LOVE to have direct MySQL support but I have no way of having "offline" support (if the database server or back office computer was switched off) as I can not run local version of MySQL on the machines I have as it would slow them down WAY to much. I wonder what is happening now, ...
by RockTheSchock
Jan 18, 2018 20:40
Forum: Community Discussion
Topic: When Implementing Classes...
Replies: 6
Views: 1123

Re: When Implementing Classes...

I would design classes for shorter and more friendly oop code. I also like Java interfaces. -members private like in C++ or maybe protected as default. -No Declare statements needed. -Define member procedures inline and virtual -2 pass compiler / parser would be needed -class extends automatically o...
by RockTheSchock
Aug 04, 2017 6:19
Forum: Beginners
Topic: Arrays
Replies: 17
Views: 1505

Re: Arrays

Allways use local integer/uinteger variable as index for small arrays. It should be safer and faster. You can also use lbound / ubound if array size is dynamic or if you change it later sometimes.

Code: Select all

Dim Buf(1 To 128) as Ubyte

For i As Integer= lbound(buf) to ubound(buf)
    Buf(i) = i
Next
by RockTheSchock
Feb 08, 2017 22:36
Forum: Beginners
Topic: Max Lines
Replies: 13
Views: 1513

Re: Max Lines

You know that you could split your code into modules? So you only need to recompile the changed ones.
by RockTheSchock
Aug 16, 2016 2:00
Forum: General
Topic: fbc plugins
Replies: 1
Views: 440

fbc plugins

I am trying to implement a plugin extension for fbc. I am successfully loading plugins and call init and visitor functions. But where should i put the callback visitor functions in the compiler? I am absolutly lost. I tried in ast-node-proc at the end of: function astAdd( byval n as ASTNODE ptr ) as...

Go to advanced search