Project of a multiplatform version of FreeBasic Miner

General FreeBASIC programming questions.
Roland Chastain
Posts: 1004
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Project of a multiplatform version of FreeBasic Miner

Post by Roland Chastain »

Hello everybody!

I would like to adapt FreeBasic Miner, so that it can be compiled also for Linux.

The only big problem is to replace the MMSystem library, which is used for sounds. The game uses no sound files; all is done in the code.

If it were possible, I would like to keep the original sound, which is pretty. Would there be a possibility to produce the same sound effects with another library? Or, other idea, would it be possible to use the existing code under Windows to produce and save sound files?

Otherwise, which library would you recommend to use?

Git repository of the project: https://github.com/rchastain/freebasic-miner
Last edited by Roland Chastain on Oct 05, 2020 3:57, edited 2 times in total.
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: Project of a multiplatform version of FreeBasic Miner

Post by BasicCoder2 »

I was going to download the game out of curiosity but was greeted with,
404 Not Found
The resource requested could not be found on this server!

Download: http://games.freebasic.net/FreeBasicMiner.zip
Roland Chastain
Posts: 1004
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Re: Project of a multiplatform version of FreeBasic Miner

Post by Roland Chastain »

@BasicCoder2

Yes, I should have checked the link.

@badidea

Thank you.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: Project of a multiplatform version of FreeBasic Miner

Post by D.J.Peters »

FBSound works on Linux PC's also (32/64-bit)

Joshy
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Project of a multiplatform version of FreeBasic Miner

Post by badidea »

I know nothing of the MMSystem library, but I would try Joshy's library mentioned above or this one from angros47: https://sourceforge.net/projects/freeba ... ary/files/ with more info at: https://freebasic.net/forum/viewtopic.php?f=17&t=26256
Roland Chastain
Posts: 1004
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Re: Project of a multiplatform version of FreeBasic Miner

Post by Roland Chastain »

D.J.Peters wrote:FBSound works on Linux PC's also (32/64-bit)
Thank you. I downloaded a new copy of FBSound and will start to experiment.
Last edited by Roland Chastain on Sep 17, 2020 6:00, edited 1 time in total.
Roland Chastain
Posts: 1004
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Re: Project of a multiplatform version of FreeBasic Miner

Post by Roland Chastain »

badidea wrote:I know nothing of the MMSystem library, but I would try Joshy's library mentioned above or this one from angros47: https://sourceforge.net/projects/freeba ... ary/files/ with more info at: https://freebasic.net/forum/viewtopic.php?f=17&t=26256
Thank you. I downloaded angros47 library. It looks very interesting.

Off topic. MIDI is not easy under Linux! I am looking how I could play a poor MIDI file... I installed several sofwares but don't know how to use them. I think I should take time to learn the basics of sound and MIDI under Linux.

I made a first compilable version of FreeBasic Miner. Something seems to be broken, I don't know what. The first level doesn't look like in the Windows version. I would have liked to try a 32-bit compilation but I don't know how to install FBC 32-bit.
Last edited by Roland Chastain on Sep 24, 2020 6:58, edited 1 time in total.
Roland Chastain
Posts: 1004
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Re: Project of a multiplatform version of FreeBasic Miner

Post by Roland Chastain »

I have just tried to compile my code under Windows, to 32-bits and to 64-bits. The result confirms what I suspected. The 32-bits application works well. The 64-bits doesn't work well. When I compile to 64-bits the behaviour of the application is the same that I saw under Linux (screenshot above).

So I have to install fbc 32 bits under Linux... or to find the cause of the problem. If someone has an idea, please let me know.
Last edited by Roland Chastain on Sep 24, 2020 6:58, edited 1 time in total.
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: Project of a multiplatform version of FreeBasic Miner

Post by srvaldez »

hello Roland Chastain
one thing that is suspect when a program compiled to 64-bit has problems is Integer variables, Integer is 32-bit on FB 32-bit and 64-bit on FB 64-bit
I suggest you try search and replace Integer with either Long or Integer<32>
Roland Chastain
Posts: 1004
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Re: Project of a multiplatform version of FreeBasic Miner

Post by Roland Chastain »

srvaldez wrote:I suggest you try search and replace Integer with either Long or Integer<32>
Thank you for your suggestion. I have just tried to replace all "Integer" with "Integer<32>". The result is not very good. Now it is impossible to start a game: the main menu no longer works.

I will continue to study the code, and maybe try to install a 32-bits compiler.
SARG
Posts: 1766
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Project of a multiplatform version of FreeBasic Miner

Post by SARG »

Avast is not very happy when downloading. It reports a malware
Maybe a false positive.
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: Project of a multiplatform version of FreeBasic Miner

Post by Tourist Trap »

SARG wrote:
Avast is not very happy when downloading. It reports a malware
Maybe a false positive.
Hi SARG,

I've just downloaded the zip file and used Kaspersky on it (which I have a running licence for, up to date). Nothing being detected here. Moreover, as far as I can see, the source files are provided, which I think would let you make some further check before you ompile and run it.

Is it a clone a clone of Manic Minner we are talking about? I loved this game when young :)

Oups, no, seems to be mixed up with boulderdash. Don't know what's the result of that recipe.
SARG
Posts: 1766
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Project of a multiplatform version of FreeBasic Miner

Post by SARG »

Hi T.T,
Avast doesn't let me download the file. I just see that freebasicminer.exe causes the problem --> Win32:Malware-gen.
It seems to be generic so surely a false positive...
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: Project of a multiplatform version of FreeBasic Miner

Post by Tourist Trap »

SARG wrote:Hi T.T,
Avast doesn't let me download the file. I just see that freebasicminer.exe causes the problem --> Win32:Malware-gen.
It seems to be generic so surely a false positive...
I've throwed the exe away from the zip and put the result there:
http://ge.tt/6dGXwF73

Maybe it can help for this time for this little game. But in general that would be better not to pack the sources and some exe together.
Post Reply