CSGP : Moon Lander...

User projects written in or related to FreeBASIC.
Dr_D
Posts: 2451
Joined: May 27, 2005 4:59
Contact:

Re: CSGP : Moon Lander...

Post by Dr_D »

This is still one of my favorite FB games man. Nice to hear from you! :)
redcrab
Posts: 623
Joined: Feb 07, 2006 15:29
Location: France / Luxemburg
Contact:

Re: CSGP : Moon Lander...

Post by redcrab »

h4tt3n wrote:This is awesome! I remember when you posted this many years ago. When I compile the lander.bas file in WIn 10 64 bit, I get a dos window saying initializing, and a small black window.
Yes, you're right ... Oops

The provided link point to a modified version dedicated for DOS ...

To get the right code for windows , you may try this URL

http://games.freebasic.net/startdownloa ... &gameID=59

You may have also to make sure that NO_SOUND is selected (comment out) at line 9 in lander.bas
You might find that execution is slower than expected, then you can remove the "sleep 1,1" at line 2638 in lander.bas
KLBear
Posts: 113
Joined: Jul 23, 2008 9:32

Re: CSGP : Moon Lander...

Post by KLBear »

recrab I have Version 1.4.1 it works on Linux Mint 20. Even the sound works with FBSOUND v1.2. I had to include the "fbsound_dynamic.bi". What's really surprising it works on the Raspberry Pi even on the slower single core 700mhz model. I did not even have to run X Windows it ran fine fullscreen from the command line it ran real smooth, I could not not get the sound for the Raspberry Pi working because FreeBasic would not compile ASM code for the FBSOUND library because the raspberry Pi is an arm device. They said they may support compiling ASM code for the arm in the future. I mainly play Lander on the Linux Mint PC anyways. Thanks for a great game. Do you have any more updates ? or was updates for DOS only. Not sure the version I have has all the updates. Thanks
redcrab
Posts: 623
Joined: Feb 07, 2006 15:29
Location: France / Luxemburg
Contact:

Re: CSGP : Moon Lander...

Post by redcrab »

KLBear wrote:recrab I have Version 1.4.1 it works on Linux Mint 20. Even the sound works with FBSOUND v1.2. I had to include the "fbsound_dynamic.bi". What's really surprising it works on the Raspberry Pi even on the slower single core 700mhz model. I did not even have to run X Windows it ran fine fullscreen from the command line it ran real smooth, I could not not get the sound for the Raspberry Pi working because FreeBasic would not compile ASM code for the FBSOUND library because the raspberry Pi is an arm device. They said they may support compiling ASM code for the arm in the future. I mainly play Lander on the Linux Mint PC anyways. Thanks for a great game. Do you have any more updates ? or was updates for DOS only. Not sure the version I have has all the updates. Thanks
Thanks.

The update purpose was to adapt for DOS in order to tests it on a EmScripten Dosbox (Dosbox on a web page) but it was not conclusive.
Meanwhile you know that if you would like to update or create your own level, you can : a level editor is embedded ( not very easy to use but fonctional)
(as precised in viewtopic.php?p=73282#p73282 )
redcrab wrote:New updates... v 1.3

- Embeded Level Editor !

the purpose is if a levelFile for a particular level exist then the level is loaded otherwise the land generator is used

To edit or create a level execute lander with -edit parameter
C:\>lander -edit
-Press F10 key to enter into editor mode during game
you will edit the current level
so you may edit the level as you play with it
and change the current level by the editor

-During edition press F1 to get more details on available editor command

shorthing the commands allow you to
- Edit lanscape
- Place Land pad
- Place/Remove Energy sucker
- Place / rotate the Lander
- Save/Load/Edit current or any level
- Set G (gravity)
- Set Lander Energy quantity
- Edit the Level text message

NB if you want to share your level files:
Level files should be at lander working directory and the file name has to respect the file name structure : for example level 10 is named level10.lvl
These file are higly compressable because it's only text

Currently a do not provide any level file yet (I'm not really a good levellord) , you may create your own levels, otherwise you'll get the lanscape generator by default(as v 1.2).

But I gonna to release a level-set zip file soon .. Will try to have a complete story better than the default story. ;P
Other update will be more on "portage" on other languages.
After the migration in Unity game engine (C#), I 've currently, as an exercice for a friend, the code migration planned for Python3 with pygame.

I'm glad that little game pleased you.
KLBear
Posts: 113
Joined: Jul 23, 2008 9:32

Re: CSGP : Moon Lander...

Post by KLBear »

Thanks redcrab I will try the level editor. I am also trying to write a simpler version of moon lander. Just trying to improve my programming skills.
Dr_D
Posts: 2451
Joined: May 27, 2005 4:59
Contact:

Re: CSGP : Moon Lander...

Post by Dr_D »

redcrab wrote: ...cropped most text...

After the migration in Unity game engine (C#), I 've currently, as an exercice for a friend, the code migration planned for Python3 with pygame.

I'm glad that little game pleased you.

I would be interested in seeing the Unity version as well, if you want to share. I've ported a few things myself and I'd like to see how well yours worked out. ;)
redcrab
Posts: 623
Joined: Feb 07, 2006 15:29
Location: France / Luxemburg
Contact:

Re: CSGP : Moon Lander...

Post by redcrab »

Dr_D wrote:
redcrab wrote: ...cropped most text...

After the migration in Unity game engine (C#), I 've currently, as an exercice for a friend, the code migration planned for Python3 with pygame.

I'm glad that little game pleased you.

I would be interested in seeing the Unity version as well, if you want to share. I've ported a few things myself and I'd like to see how well yours worked out. ;)
As showed earlier in the thread, the mono C# code for Unity is available.. (see at the end of the following self-quote...)
redcrab wrote:More than 11 years after ...
That's incredible how fast the time is running

This necromancer post
Just a notice regarding this Redcrab Moon Lander

I tried to make it working in a browsers (mainly on Chrome and Firefox)
Mmm ... there are 2 tries

#1 : emscripten dosbox with project compiled with FB on DOS
http://roki.zone/lander
it works but ... it's ugly ... and so slow ....
Image

#2 : translate the lander.bas code into C# code in Unity

http://roki.zone/unity

and little bonus ... made a variant (in color) for Collegues that are developpers (DEVOPS) and working with ITIL guide lines
http://roki.zone/DAPI


The two last are not in FB language ... but I guess it is fun to know what is happening to this small project...

Just hoping there is a final release of FB with emscripten enabled with all support ... Audio , openGL , 2D gfx ...

Have Fun
====== Resources
source code for Moon Lander for FB (DOS version)
http://roki.zone/lander/LANDER.zip

FB to C# translation of lander.bas (for Unity, to set as script inside a Camera for those interested)
http://roki.zone/lander/DrawLines.cs
redcrab
Posts: 623
Joined: Feb 07, 2006 15:29
Location: France / Luxemburg
Contact:

Re: CSGP : Moon Lander...

Post by redcrab »

For who are interested, here the portage of Lander in Python3 with Pygame library

https://github.com/redcrab2016/Captain-Lander

Enjoy
Post Reply