Search found 227 matches

by RockTheSchock
Feb 26, 2014 22:13
Forum: Tips and Tricks
Topic: Using Python as a database (in-memory and on disk) package
Replies: 5
Views: 1753

Re: Using Python as a database (in-memory and on disk) packa

a little example #Include once "Lua/lua.bi" #include once "Lua/lauxlib.bi" #include once "Lua/lualib.bi" Sub iterateLuaTable(L As Lua_State Ptr, index As Integer=-1,depth As Integer=0) Dim As String key,value sleep lua_pushvalue(L, index) 'stack now contains: -1 => tabl...
by RockTheSchock
Feb 10, 2014 23:47
Forum: General
Topic: Pick from selection and then another
Replies: 26
Views: 2596

Re: Pick from selection and then another

Perhaps you should do more general aproach. You could use some sort of tree structure. If it looks like this you can add several languages to your software. ENG\country.txt "England" "de","England" "it","Inghilterra" "fr","Angleterre&q...
by RockTheSchock
Feb 04, 2014 14:21
Forum: Tips and Tricks
Topic: Using Python as a database (in-memory and on disk) package
Replies: 5
Views: 1753

Re: Using Python as a database (in-memory and on disk) packa

If you need something lighter and perhaps faster you could also use lua which has a nice and easy syntax. A blueprint file(lua syntax) for a unit could look like this one for the game forged alliance. You embed a lua interpreter with only 130kb of overhead. https://bitbucket.org/thepilot/forged-alli...
by RockTheSchock
Feb 04, 2014 7:48
Forum: General
Topic: Pick from selection and then another
Replies: 26
Views: 2596

Re: Pick from selection and then another

Why dont you change all your if statements to

Code: Select all

   L=Int(Rnd*32)+1 'Number between 1 and 33
   D=80
   
   Draw String(216,D+(L-1)*8),txt(L),&HFFFF00
by RockTheSchock
Sep 27, 2013 8:05
Forum: DOS
Topic: SOUND freq, duration
Replies: 26
Views: 21350

Re: SOUND freq, duration

Perhaps an OPL3 / OPL2 emulator like this one could be a good base:
http://opl3.cozendey.com/
by RockTheSchock
Sep 25, 2013 12:37
Forum: Community Discussion
Topic: "OOP Isn't a Fundamental Particle of Computing"
Replies: 3
Views: 760

Re: "OOP Isn't a Fundamental Particle of Computing"

For me OOP is an abstraction layer which extends a procedural language with syntactical sugar. You can use data and code together in a more convinient way because there are clear relations between code and data. Without OOP you have to keep track of the relations yourself through comments and though...
by RockTheSchock
Aug 27, 2013 13:44
Forum: Community Discussion
Topic: Allegro5 & SDL2 support?
Replies: 3
Views: 1296

Re: Allegro5 & SDL2 support?

Allegro 5 doesnt support DOS anymore. The last version supporting DOS is the older Allegro 4.2 . I thibnk its great that Freebasic support Win, Linux and DOS. So please take that in to account. It would be nice to have a new allegro.bi and separate from that allegro42.bi for legacy support. Other li...
by RockTheSchock
Aug 23, 2013 5:58
Forum: Beginners
Topic: noobie
Replies: 1
Views: 248

Re: noobie

First of all there is the Sticky Post New to FreeBASIC?.

There you will find many useful links e.g.
FBWiki : CommunityTutorials

Read some of that and start your first very simple game e.g. Yahtzee or some sort of Lottery. Without graphical interface.
by RockTheSchock
Aug 21, 2013 8:56
Forum: Libraries
Topic: Static Libs
Replies: 1
Views: 763

Static Libs

The Libraries from http://sourceforge.net/projects/fbc/files/Binaries%20-%20Windows/Libraries/ seem to lack the static lib version. So you need all dll's with the right version. It would be nice to have all libs as static and dynamic version. In the DOS Tree I miss allegro and CGUI http://sourceforg...
by RockTheSchock
Aug 13, 2013 13:57
Forum: General
Topic: Deallocate not freeing memory?
Replies: 7
Views: 1005

Re: Deallocate not freeing memory?

The memory used by Strings is managed allready by freebasic. A string consists of a string descriptor which is basically a 12 byte udt with a pointer to the data an integer for the size and another integer field. fb hides that from you. If you want to manage your string memory use ZString PTR or byt...
by RockTheSchock
Aug 08, 2013 8:33
Forum: DOS
Topic: Large fonts in text mode
Replies: 7
Views: 2783

Re: Large fonts in text mode

Propably the graphics library gfxlib2 is compiled with -march=i686 ? Perhaps you could try to compile it on your own with
-march=i486 -mtune=generic
by RockTheSchock
Aug 07, 2013 7:57
Forum: General
Topic: NT3.51 and Win95 InterlockedCompareExchange
Replies: 1
Views: 766

NT3.51 and Win95 InterlockedCompareExchange

the newer versions of fbc define InterlockedCompareExchange. In the german forum there was a little complain that fbc cant be used with older windows versions like nt 3.51. If it's only this point perhaps there could be made a patch based on this suggestion for gcc: http://sourceforge.net/mailarchiv...
by RockTheSchock
Jun 24, 2013 6:15
Forum: General
Topic: Program goes haywire randomly - help!!
Replies: 52
Views: 5280

Re: Program goes haywire randomly - help!!

perhaps you need to put some sleep commands between print and input.

Code: Select all

cls
for a = 1 to 100000
print a
sleep 1 'Return for a little moment to OS
next a
input "", test$
sleep 1 'Return for a little moment to OS
print test$
end
by RockTheSchock
Jun 17, 2013 12:28
Forum: Libraries
Topic: ISAM library
Replies: 8
Views: 2423

Re: ISAM library

Perhaps you could use SQlite
by RockTheSchock
Jun 17, 2013 10:37
Forum: Beginners
Topic: How can I create an rtf file?
Replies: 25
Views: 3110

Re: How can I create an rtf file?

I dont know what your problem with html is. What you can do with simple rtf you can do with simple html/css. Make all your size parameters with mm/cm/inch or whatever. You can page-break-before / page-break-after to control page breaks. The only thing that is not implemented in older browsers and ie...

Go to advanced search