[Game] Juanchi Game (v3.23) [NOW OpenSource]

Post Reply
User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

[Game] Juanchi Game (v3.23) [NOW OpenSource]

by runs » Post

Image

This is my private game. What I use to play Minetest.

Goals:

- Minecraft-like but not a copy, only inspiration.
- 32x32 textures.
- More ores, trees, flowers, food.
- Farming.
- Mobs.
- Armors and wielded items.
- Potion Brewing & Weapon Enchanting.
- Uranium. Mini Nuke.
- Ambient music and sound effect.
- Languages: English & Spanish.
- More shaped blocks to better construction.
- Hunger, sprint,... HUD bars.

Content Rating

Image
Sammy Rating

License
LGPL 2.1+

Code
https://github.com/runsy/juanchi_game

Script for the Windows Installer (InnoSetup OpenSource Installer)
This script install the game of the {app} folder, plus modify 'minestest.conf' to match the desktop resolution, also the path for the texture pack of my game. Also checks the DirectX version installed to set the 'driver' to opengl or directx8.

Code: Select all

;InnoSetupVersion=5.6.1

[Setup]
AppName=Juanchi Game
AppVerName=v3.18
DefaultDirName={pf64}\Juanchi Name}
DefaultGroupName=Juanchi Game
OutputBaseFilename=JuanchiGame_v3.18
Uninstallable= yes
WizardImageFile={app}\games\juanchi\menu\icon.bmp
WizardImageStretch=no
Compression=lzma
DisableDirPage=no

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"

[Files]
Source: "{app}\*.*"; DestDir: "{app}"; Components: "base"; Flags: ignoreversion recursesubdirs; AfterInstall: MyAfterInstall

[Dirs]
Name: "{app}"; 

[Components]
Name: "base"; Description: "Juanchi Game"; Types: "full compact custom";

[Icons]
Name: "{group}\{cm:PlayTo,Juanchi Game}"; Filename: "{app}\bin\minetest.exe"; Components: "base"
Name: "{group}\{cm:UninstallProgram,Juanchi Game}"; Filename: "{app}\unins000.exe"; Components: "base"
Name: "{userdesktop}\Juanchi Game"; Filename: "{app}\bin\minetest.exe"; Tasks: desktopicon

[Tasks]
Name: "desktopicon"; Description: "Crear acceso directo en el Escritorio"; GroupDescription: "Opciones";

[INI] 

[CustomMessages]
CustomMessage=Undefined //just in case (should be equal to English)
en.PlayTo=Play to
es.PlayTo=Juega a
en.InstallOptionsHeader=Install Options
es.InstallOptionsHeader=Opciones de instalación
en.InstallOptionsQuery=Who should Juanchi Game be installed for?
es.InstallOptionsQuery=¿Para quién debería instalarse Juanchi Game?
en.InstallOptionsText1=Please, select if you want to make Juanchi Game available to all users
es.InstallOptionsText1=Por favor, selecciona si deseas hacer Juanchi Game disponible para todos los usuarios
en.InstallOptionsText2=or just for you.
es.InstallOptionsText2=o sólo para ti.
en.InstallOptions1=&Whoever uses this PC
es.InstallOptions1=&Cualquiera que use este PC
en.InstallOptions2=&Just for me 
es.InstallOptions2=&Sólo para mí

[Messages]
en.BeveledLabel=English
es.BeveledLabel=Español

[Registry]

[Code]

var
  OptionPage: TInputOptionWizardPage;  
  Is_AfterInstall_Executed: Boolean; 


Const
    SM_CXSCREEN = 0; // The enum-value for getting the width of the cient area for a full-screen window on the primary display monitor, in pixels.
    SM_CYSCREEN = 1; // The enum-value for getting the height of the client area for a full-screen window on the primary display monitor, in pixels.


procedure InitializeWizard();
begin
  OptionPage :=
    CreateInputOptionPage(
      wpWelcome,
      ExpandConstant('{cm:InstallOptionsHeader}'), ExpandConstant('{cm:InstallOptionsQuery}'),
      ExpandConstant('{cm:InstallOptionsText1}') + ' ' +
      ExpandConstant('{cm:InstallOptionsText2}'),
      True, False);

  OptionPage.Add(ExpandConstant('{cm:InstallOptions1}'));
  OptionPage.Add(ExpandConstant('{cm:InstallOptions2}'));

  if IsAdminLoggedOn then
  begin
    OptionPage.Values[0] := True;
  end
    else
  begin
    OptionPage.Values[1] := True;
    OptionPage.CheckListBox.ItemEnabled[0] := False;
  end;
end;

function NextButtonClick(CurPageID: Integer): Boolean;
begin
  if CurPageID = OptionPage.ID then
  begin
    if OptionPage.Values[1] then
    begin
      WizardForm.DirEdit.Text := ExpandConstant('{userappdata}\Juanchi Game')
    end
      else
    begin
      WizardForm.DirEdit.Text := ExpandConstant('{pf64}\Juanchi Game');
    end;
  end;
  Result := True;
end;

function FileReplaceString(const FileName, SearchString, ReplaceString: string):boolean;
var
  MyFile : TStrings;
  MyText : string;
begin
  MyFile := TStringList.Create;

  try
    result := true;

    try
      MyFile.LoadFromFile(FileName);
      MyText := MyFile.Text;

      { Only save if text has been changed. }
      if StringChangeEx(MyText, SearchString, ReplaceString, True) > 0 then
      begin;
        MyFile.Text := MyText;
        MyFile.SaveToFile(FileName);
      end;
    except
      result := false;
    end;
  finally
    MyFile.Free;
  end;
end;

function GetSystemMetrics (nIndex: Integer): Integer;
  external 'GetSystemMetrics@User32.dll stdcall setuponly';

procedure DecodeVersion( verstr: String; var verint: array of Integer );
var
  i,p: Integer; s: string;
begin
  // initialize array
  verint := [0,0,0,0];
  i := 0;
  while ( (Length(verstr) > 0) and (i < 4) ) do
  begin
  	p := pos('.', verstr);
  	if p > 0 then
  	begin
      if p = 1 then s:= '0' else s:= Copy( verstr, 1, p - 1 );
  	  verint[i] := StrToInt(s);
  	  i := i + 1;
  	  verstr := Copy( verstr, p+1, Length(verstr));
  	end
  	else
  	begin
  	  verint[i] := StrToInt( verstr );
  	  verstr := '';
  	end;
  end;

end;

// This function compares version string
// return -1 if ver1 < ver2
// return  0 if ver1 = ver2
// return  1 if ver1 > ver2
function CompareVersion( ver1, ver2: String ) : Integer;
var
  verint1, verint2: array of Integer;
  i: integer;
begin

  SetArrayLength( verint1, 4 );
  DecodeVersion( ver1, verint1 );

  SetArrayLength( verint2, 4 );
  DecodeVersion( ver2, verint2 );

  Result := 0; i := 0;
  while ( (Result = 0) and ( i < 4 ) ) do
  begin
  	if verint1[i] > verint2[i] then
  	  Result := 1
  	else
      if verint1[i] < verint2[i] then
  	    Result := -1
  	  else
  	    Result := 0;

  	i := i + 1;
  end;

end;

// DirectX version is stored in registry as 4.majorversion.minorversion
// DirectX 8.0 is 4.8.0
// DirectX 8.1 is 4.8.1
// DirectX 9.0 is 4.9.0

function GetDirectXVersion(): String;
var
  sVersion:  String;
begin
  sVersion := '';
  RegQueryStringValue( HKLM, 'SOFTWARE\Microsoft\DirectX', 'Version', sVersion );
  Result := sVersion;
end;

procedure MyAfterInstall();
var
  xres: Integer;
  yres: Integer;
begin
  if not Is_AfterInstall_Executed then
  begin
    yres:= GetSystemMetrics(SM_CYSCREEN); //vertical resolution  
    FileReplaceString(ExpandConstant('{app}/minetest.conf'), 'language = en', 'language = '+ ActiveLanguage);
    xres:= GetSystemMetrics(SM_CXSCREEN);
    FileReplaceString(ExpandConstant('{app}/minetest.conf'), 'screen_w = 1920', 'screen_w = '+ IntToStr(xres));
    FileReplaceString(ExpandConstant('{app}/minetest.conf'), 'screen_h = 1080', 'screen_h = '+ IntToStr(yres));
    if CompareVersion( GetDirectXVersion(), '4.8.0') > 0 then
      begin
      FileReplaceString(ExpandConstant('{app}/minetest.conf'), 'driver = opengl', 'driver = '+ 'direct3d8')
      end;
    SaveStringToFile(ExpandConstant('{app}/minetest.conf'), 'texture_path='+ExpandConstant('{app}\textures\juanchi\'), True);
    Is_AfterInstall_Executed:= true;
  end;
end;
How to compile for Android
Follow this guide

Download

You must choice one of the following 3 options:

Download the game This will require a working Minetest

Download from itch.io the Windows version of Minetest with the Juanchi Game included (easy installation)

Juanchi Game [GooglePlay-Android Version]
Last edited by runs on Sat Feb 20, 2021 20:18, edited 73 times in total.
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

User avatar
Krock
Developer
Posts: 4589
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Game] Bogart

by Krock » Post

That really looks beautiful, well done :)
I've got some questions regarding the content:
  • What's the license of this game? It surely must be compatible with all mod licenses inside.
  • Where do the textures come from? What's the license of them?
  • Were the additional mods modified or were they only copied? If only copied: I'd suggest using git submodules so that updating them is a lot easier (s single command).
  • Is this game complete or can we expect more unique features soon?
Thanks :)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

Krock wrote:That really looks beautiful, well done :)
I've got some questions regarding the content:
  • What's the license of this game? It surely must be compatible with all mod licenses inside.
  • Where do the textures come from? What's the license of them?
  • Were the additional mods modified or were they only copied? If only copied: I'd suggest using git submodules so that updating them is a lot easier (s single command).
  • Is this game complete or can we expect more unique features soon?
Thanks :)
1. License of the game is Open Source. The mods inside have different types of license, but putting the code I think is right to use them. They are mods from here, Minetest Forums, so authors shouldn't be upset.

2. Ahem, ahem... Some privative textures. But no matter, this game is private. It shouldn't be used any more than at one's house. If you use in your home, no problem. But maybe I'm going to do a page to download it and put it in Google Play Store, opensource of course and no adds.

3. I've modified the mods. Yes, it's better being separated modules. I will do it.

4 Is a WIP game. I will improve it for sure.
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

User avatar
Krock
Developer
Posts: 4589
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Game] Bogart

by Krock » Post

runs wrote: 1. License of the game is Open Source. [...]
2. [...] But no matter, this game is private. It shouldn't be used any more than at one's house. [...]
3. I've modified the mods. Yes, it's better being separated modules. I will do it.
4 Is a WIP game. I will improve it for sure.
1. Which Open Source license, there are many of them. LGPL 2.1+ (same as MTG) would most likely fit in this case (for code only).
2. So you disallow distributing the textures? That would be something like CC-BY-NC-SA, which means that servers cannot use this game and it becomes non-free and your Open Source statement in 1. does no longer apply.
3. Oh, in this case it might not be possible to make use of git submodules.
4. That's nice to hear. I'm looking forward to the progress of this nicely textured game.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

I have to study the license issue. I have not idea how, because there are millions of them.

But licenses will not be a problem. My targeted audience will be 12-22 years old teenagers, they do not care about licenses.
Krock wrote:
runs wrote: 1. License of the game is Open Source. [...]
2. [...] But no matter, this game is private. It shouldn't be used any more than at one's house. [...]
3. I've modified the mods. Yes, it's better being separated modules. I will do it.
4 Is a WIP game. I will improve it for sure.
1. Which Open Source license, there are many of them. LGPL 2.1+ (same as MTG) would most likely fit in this case (for code only).
2. So you disallow distributing the textures? That would be something like CC-BY-NC-SA, which means that servers cannot use this game and it becomes non-free and your Open Source statement in 1. does no longer apply.
3. Oh, in this case it might not be possible to make use of git submodules.
4. That's nice to hear. I'm looking forward to the progress of this nicely textured game.
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

User avatar
Pyrollo
Developer
Posts: 385
Joined: Mon Jan 08, 2018 15:14
GitHub: pyrollo
In-game: Naj
Location: Paris

Re: [Game] Bogart

by Pyrollo » Post

runs wrote:I have to study the license issue. I have not idea how, because there are millions of them.

But licenses will not be a problem. My targeted audience will be 12-22 years old teenagers, they do not care about licenses.
Think about mod and textures authors, make sure they agree with what you are doing of their work.
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

Pyrollo wrote:
runs wrote:I have to study the license issue. I have not idea how, because there are millions of them.

But licenses will not be a problem. My targeted audience will be 12-22 years old teenagers, they do not care about licenses.
Think about mod and textures authors, make sure they agree with what you are doing of their work.
I use your wielded mod. Do you agree? :-D
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

User avatar
MHL
Member
Posts: 416
Joined: Mon Aug 20, 2018 00:44
GitHub: NOT APPLICABLE
IRC: MCL
In-game: singleplayer
Location: Somewhere in SSWZ
Contact:

Re: [Game] Bogart

by MHL » Post

runs wrote:But licenses will not be a problem. My targeted audience will be 12-22 years old teenagers, they do not care about licenses.
The ones who use Minetest usually do care...
Last edited by MHL on Thu Nov 19, 2020 18:17, edited 1 time in total.
COME SEE MY MINETEST MAP!!! FRANCAIS TRADDUCCIONS COMING SOON! ČESKY PŘEKLAD JIŽ NEDLOUHO!!!

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

Hey guys, finally I've uploaded 'Bogart Game' to itch.io, a platform for and to indie games!!!

:-)

https://runs.itch.io/bogart-game
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

User avatar
cHyper
Member
Posts: 1014
Joined: Fri May 06, 2011 08:49
GitHub: cHyper-0815OL
IRC: cHyper cHyper_de
In-game: cHyper
Location: Austria
Contact:

Re: [Game] Bogart

by cHyper » Post

after install the windows setup.exe the link on the desktop do not function, because it do not belong to minetest.exe !!!

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

cHyper wrote:after install the windows setup.exe the link on the desktop do not function, because it do not belong to minetest.exe !!!
Thank you. Now it is fixed ;-)
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

User avatar
cHyper
Member
Posts: 1014
Joined: Fri May 06, 2011 08:49
GitHub: cHyper-0815OL
IRC: cHyper cHyper_de
In-game: cHyper
Location: Austria
Contact:

Re: [Game] Bogart

by cHyper » Post

runs wrote:
cHyper wrote:after install the windows setup.exe the link on the desktop do not function, because it do not belong to minetest.exe !!!
Thank you. Now it is fixed ;-)
thank you for fixing the issue!

OSS: set resolution for the game!

Image
Attachments
bogart-game-set-resolution-of-game.png
(77.65 KiB) Not downloaded yet

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

cHyper wrote:
runs wrote:
cHyper wrote:after install the windows setup.exe the link on the desktop do not function, because it do not belong to minetest.exe !!!
Thank you. Now it is fixed ;-)
thank you for fixing the issue!

OSS: set resolution for the game!

Image
Yes, the installer gets and then puts the Windows desktop resolution.
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

v1.0.0
-Updated to the 5.x branch.
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

Version for Android and in Google Play released too.

Bogart Game [GooglePlay]
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

CalebJ
Member
Posts: 339
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: [Game] Bogart

by CalebJ » Post

I've just tested this. Its extremely playable, the textures give MTG some life. I'd like this, IMO, to be a game packed with Minetest in the near future.
If you want realism, you're in the wrong place. Get off your mobile.

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

CalebJ wrote:I've just tested this. Its extremely playable, the textures give MTG some life. I'd like this, IMO, to be a game packed with Minetest in the near future.
Thanx. :-)
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

v1.0.1 [Windows]

- Fixed: No 32x32 textures, but a mix of base with 32x32 textures. Now with a simple installation the textures are set correctly.
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

v1.0.2 [Windows]
- Fixed: In v1.0.1 the installer put in 'minetest.conf' the 'texture_path' multiple times, one by file (more than 5000 lines) :-(

I've put in the main first post the script for the installer.
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

gsbhasin123
Member
Posts: 32
Joined: Sun Jul 14, 2019 00:30
GitHub: gsbhasin123
In-game: codic

Re: [Game] Bogart

by gsbhasin123 » Post

Hey,
I'm trying to install this on both my OS X and Manjaro Linux computers from source. However, I get an error saying that there isn't a init.lua in the cool_trees mod dir, and I can confirm that. Getting the code from Github... also cant find a mod called cool_trees

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

gsbhasin123 wrote:Hey,
I'm trying to install this on both my OS X and Manjaro Linux computers from source. However, I get an error saying that there isn't a init.lua in the cool_trees mod dir, and I can confirm that. Getting the code from Github... also cant find a mod called cool_trees
The code is obsolete I have to update it, sorry. In one day or two I will do it.
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

gsbhasin123
Member
Posts: 32
Joined: Sun Jul 14, 2019 00:30
GitHub: gsbhasin123
In-game: codic

Re: [Game] Bogart

by gsbhasin123 » Post

Thanks!

gsbhasin123
Member
Posts: 32
Joined: Sun Jul 14, 2019 00:30
GitHub: gsbhasin123
In-game: codic

Re: [Game] Bogart

by gsbhasin123 » Post

Also can you post some screenshots of the inventory etc?
is this compatible with creative?

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Game] Bogart

by runs » Post

Updated the code!

The inventory is sfinv not touched and of cource compatible.
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

gsbhasin123
Member
Posts: 32
Joined: Sun Jul 14, 2019 00:30
GitHub: gsbhasin123
In-game: codic

Re: [Game] Bogart

by gsbhasin123 » Post

Thanks for updating the code!
However, the cool_trees mod is still unavailable(folder empty), GitHub shows it as a submodule: https://github.com/runsy/bogart/commit/ ... b180c9cf80 and scroll down to cool_trees.
The same error is thrown (I did clone the repo again).
Also you should consider migrating code to git.minetest.land - it runs Gitea, is free, and is meant for Minetest related stuff

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests