[Game] Inside The Box [insidethebox]

sofar
Developer
 
Posts: 1747
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

[Game] Inside The Box [insidethebox]

by sofar » Sun Oct 28, 2018 06:32

It's been a long time coming, but, as of now, Inside The Box is Open Source!

All documentation is kept in the github project. This thread is a place to discuss the game code, not to discuss the server. For that purpose, please visit The ITB Server Thread instead.

For credits, please visit the official server. Many, many, many thanks to Nore for making this. I've taken too long to finish open sourcing this.

Image

Want more screenshots? Visit: https://minetest.foo-projects.org/gallery.html

Description: puzzle game. Create and share puzzle boxes (mazes) with other players.
Authors: sofar, Nore.
License: LGPLv2.1+ for code, CC-BY-SA-4.0 for media, other derivative media present with CC0/CC-BY/CC-BY-SA licensed items.

Download
... Browse the code

Requirements



- minetest 0.4.16. 0.4.17 and 0.4.17.1 are untested atm
- lsqlite3

Network and disk space requirements of this game are minimal. The Official ITB server uses a map that is ~300MB and total disk space usage is under 1gb.

You may need to additionally deploy modules to maintain and operate the server. These are not maintained as part of the ITB tree and are maintained elsewhere.
 

User avatar
texmex
Member
 
Posts: 1011
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Game]Inside The Box[insidethebox]

by texmex » Sun Oct 28, 2018 09:37

That is great! Personally, I’ll have a lot of fun learning from this code.
 

User avatar
Wuzzy
Member
 
Posts: 3232
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Sorry that I'm the one that ruins it, but …

by Wuzzy » Sun Oct 28, 2018 13:56

Aaaaand it crashed:
Code: Select all
2018-10-28 14:45:36: ERROR[Main]: ModError: Failed to load and run script from ~/.minetest/games/Inside The Box/mods/db/init.lua:
2018-10-28 14:45:36: ERROR[Main]: ~/.minetest/games/Inside The Box/mods/db/init.lua:59: attempt to index local 'insecure_env' (a nil value)
2018-10-28 14:45:36: ERROR[Main]: stack traceback:
2018-10-28 14:45:36: ERROR[Main]:    ~/.minetest/games/Inside The Box/mods/db/init.lua:59: in main chunk


It crashes right on start.
Both in 0.4.17.1 and 0.5.0-dev (b6adb7f09e4375f145c3ddb592527c1dd0b026a2).
It does not matter if I start as singleplayer or as server. It does not matter if I delete and re-create the world.

lsqlite version: lua-lsqlite3 0.9.4
ITB version: af3f8c1b

PS: Your thread should comply to the guidelines like everyone else does. Thanks. :P
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
rubenwardy
Moderator
 
Posts: 5499
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Sorry that I'm the one that ruins it, but …

by rubenwardy » Sun Oct 28, 2018 17:52

Wuzzy wrote:Aaaaand it crashed:
Code: Select all
2018-10-28 14:45:36: ERROR[Main]: ModError: Failed to load and run script from ~/.minetest/games/Inside The Box/mods/db/init.lua:
2018-10-28 14:45:36: ERROR[Main]: ~/.minetest/games/Inside The Box/mods/db/init.lua:59: attempt to index local 'insecure_env' (a nil value)
2018-10-28 14:45:36: ERROR[Main]: stack traceback:
2018-10-28 14:45:36: ERROR[Main]:    ~/.minetest/games/Inside The Box/mods/db/init.lua:59: in main chunk


It crashes right on start.
Both in 0.4.17.1 and 0.5.0-dev (b6adb7f09e4375f145c3ddb592527c1dd0b026a2).
It does not matter if I start as singleplayer or as server. It does not matter if I delete and re-create the world.


you need to add `db` to secure.trusted_mods
 

sofar
Developer
 
Posts: 1747
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Sorry that I'm the one that ruins it, but …

by sofar » Sun Oct 28, 2018 18:34

Wuzzy wrote: Your thread should comply to the guidelines like everyone else does. Thanks. :P


I'll fix this up later today, thanks
 

sofar
Developer
 
Posts: 1747
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Sorry that I'm the one that ruins it, but …

by sofar » Sun Oct 28, 2018 18:41

rubenwardy wrote:you need to add `db` to secure.trusted_mods


I've added some assert()s to hopefully better explain this here, instead of a cryptic lua stack trace.
 

User avatar
Peppy
Member
 
Posts: 32
Joined: Sun Nov 06, 2016 07:34
Location: France
IRC: Peppy
In-game: Peppy

Re: [Game] Inside The Box [insidethebox]

by Peppy » Sun Oct 28, 2018 21:59

This is a huge amount of work, thanks a lot for making it OSS !
I really hope that people will contribute and make this game even better.

(btw : hopefully, i'll finish my curent box on ITB server, a promise is a promise)
 

User avatar
Wuzzy
Member
 
Posts: 3232
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Game] Inside The Box [insidethebox]

by Wuzzy » Mon Oct 29, 2018 00:14

Do I need a special version of lsqlite3?

Because that alone doesn't work:
2018-10-29 01:12:28: ERROR[Main]: ModError: Failed to load and run script from ~/.minetest/games/Inside The Box/mods/db/init.lua:
2018-10-29 01:12:28: ERROR[Main]: ~/.minetest/games/Inside The Box/mods/db/init.lua:60: module 'lsqlite3' not found:
2018-10-29 01:12:28: ERROR[Main]: no field package.preload['lsqlite3']
2018-10-29 01:12:28: ERROR[Main]: no file './lsqlite3.lua'
2018-10-29 01:12:28: ERROR[Main]: no file '/usr/share/luajit-2.0.5/lsqlite3.lua'
2018-10-29 01:12:28: ERROR[Main]: no file '/usr/local/share/lua/5.1/lsqlite3.lua'
2018-10-29 01:12:28: ERROR[Main]: no file '/usr/local/share/lua/5.1/lsqlite3/init.lua'
2018-10-29 01:12:28: ERROR[Main]: no file '/usr/share/lua/5.1/lsqlite3.lua'
2018-10-29 01:12:28: ERROR[Main]: no file '/usr/share/lua/5.1/lsqlite3/init.lua'
2018-10-29 01:12:28: ERROR[Main]: no file './lsqlite3.so'
2018-10-29 01:12:28: ERROR[Main]: no file '/usr/local/lib/lua/5.1/lsqlite3.so'
2018-10-29 01:12:28: ERROR[Main]: no file '/usr/lib/lua/5.1/lsqlite3.so'
2018-10-29 01:12:28: ERROR[Main]: no file '/usr/local/lib/lua/5.1/loadall.so'
2018-10-29 01:12:28: ERROR[Main]: stack traceback:
2018-10-29 01:12:28: ERROR[Main]: [C]: in function 'require'
2018-10-29 01:12:28: ERROR[Main]: ~/.minetest/games/Inside The Box/mods/db/init.lua:60: in main chunk
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

sofar
Developer
 
Posts: 1747
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Game] Inside The Box [insidethebox]

by sofar » Mon Oct 29, 2018 02:12

Wuzzy wrote:Do I need a special version of lsqlite3?


Check that your `lsqlite3.so` file (I'm assuming you use linux) is in the listed paths above. If it isn't, minetest will likely not find it. From the error message above, it looks like it simply can't be found.
 

Christian_Soldier
Member
 
Posts: 127
Joined: Thu Feb 08, 2018 17:36
In-game: Christian_Soldier

Re: [Game] Inside The Box [insidethebox]

by Christian_Soldier » Mon Oct 29, 2018 10:18

I can't wait to try this! I have a few ideas I want to try out. :)
plz see my map from The Stanley Parable. https://forum.minetest.net/viewtopic.php?f=12&t=19944&p=0&e=0
 

User avatar
Wuzzy
Member
 
Posts: 3232
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Game] Inside The Box [insidethebox]

by Wuzzy » Mon Oct 29, 2018 11:47

I just copied lsqlite3.so to the working directory of Minetest, but that didn't help either:

2018-10-29 12:42:15: ERROR[Main]: ModError: Failed to load and run script from ~/.minetest/games/Inside The Box/mods/db/init.lua:
2018-10-29 12:42:15: ERROR[Main]: error loading module 'lsqlite3' from file './lsqlite3.so':
2018-10-29 12:42:15: ERROR[Main]: ./lsqlite3.so: undefined symbol: luaL_setfuncs
2018-10-29 12:42:15: ERROR[Main]: stack traceback:
2018-10-29 12:42:15: ERROR[Main]: [C]: at 0x7fb9f38b28b0
2018-10-29 12:42:15: ERROR[Main]: [C]: in function 'require'
2018-10-29 12:42:15: ERROR[Main]: ~/.minetest/games/Inside The Box/mods/db/init.lua:60: in main chunk


I use lua-lsqlite3 0.9.4-2 from Arch Linux. What is your version?
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

sofar
Developer
 
Posts: 1747
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Game] Inside The Box [insidethebox]

by sofar » Mon Oct 29, 2018 17:29

Wuzzy wrote:I use lua-lsqlite3 0.9.4-2 from Arch Linux. What is your version?


I used luarocks to build/install mine. Note that if you're building minetest with luajit, or the non luajit version, you probably want to manually build it, because MT embeds lua and it may not know anything about how or where arch builds lua, since that's separate. From your error message, it may just be that you've got a version built for lua 5.3, but MT uses 5.1, and they are not compatible.

maybe make a separate thread for this problem? Others will appreciate that most likely, there are quite a few mods that depend on lslqite3.
 

User avatar
TumeniNodes
Member
 
Posts: 2510
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Game] Inside The Box [insidethebox]

by TumeniNodes » Tue Oct 30, 2018 16:00

lsqlite3 is installed ( I used luarocks)
I get the same on 5.0, what am I missing?

Code: Select all
2018-10-30 11:58:32: ERROR[Main]: mod "boxes" has unsatisfied dependencies:  "music"
2018-10-30 11:58:32: ERROR[Main]: mod "creative" has unsatisfied dependencies:  "boxes"
2018-10-30 11:58:32: ERROR[Main]: mod "doors" has unsatisfied dependencies:  "mech"
2018-10-30 11:58:32: ERROR[Main]: mod "inspector" has unsatisfied dependencies:  "boxes"
2018-10-30 11:58:32: ERROR[Main]: mod "irc_whereis" has unsatisfied dependencies:  "boxes"
2018-10-30 11:58:32: ERROR[Main]: mod "mech" has unsatisfied dependencies:  "boxes"
2018-10-30 11:58:32: ERROR[Main]: mod "menu" has unsatisfied dependencies:  "boxes" "music"
2018-10-30 11:58:32: ERROR[Main]: mod "music" has unsatisfied dependencies:  "localmusic"
2018-10-30 11:58:32: ERROR[Main]: mod "nodes" has unsatisfied dependencies:  "mech"
2018-10-30 11:58:32: ERROR[Main]: mod "player" has unsatisfied dependencies:  "menu"
2018-10-30 11:58:32: ERROR[Main]: mod "signs" has unsatisfied dependencies:  "boxes"
2018-10-30 11:58:32: ERROR[Main]: mod "terminal" has unsatisfied dependencies:  "mech"
2018-10-30 11:58:32: ERROR[Main]: mod "tools" has unsatisfied dependencies:  "nodes"
2018-10-30 11:58:32: ERROR[Main]: mod "xpanes" has unsatisfied dependencies:  "nodes"
2018-10-30 11:58:32: WARNING[Main]: NodeDefManager: Ignoring CONTENT_IGNORE redefinition
2018-10-30 11:58:32: ACTION[Main]:          _|_|_|                      _|        _|
2018-10-30 11:58:32: ACTION[Main]:            _|    _|_|_|      _|_|_|        _|_|_|    _|_|
2018-10-30 11:58:32: ACTION[Main]:            _|    _|    _|  _|_|      _|  _|    _|  _|_|_|_|
2018-10-30 11:58:32: ACTION[Main]:            _|    _|    _|      _|_|  _|  _|    _|  _|
2018-10-30 11:58:32: ACTION[Main]:          _|_|_|  _|    _|  _|_|_|    _|    _|_|_|    _|_|_|
2018-10-30 11:58:32: ACTION[Main]:
2018-10-30 11:58:32: ACTION[Main]:    _|      _|                          _|
2018-10-30 11:58:32: ACTION[Main]:  _|_|_|_|  _|_|_|      _|_|            _|_|_|      _|_|    _|    _|
2018-10-30 11:58:32: ACTION[Main]:    _|      _|    _|  _|_|_|_|          _|    _|  _|    _|    _|_|
2018-10-30 11:58:32: ACTION[Main]:    _|      _|    _|  _|                _|    _|  _|    _|  _|    _|
2018-10-30 11:58:32: ACTION[Main]:      _|_|  _|    _|    _|_|_|          _|_|_|      _|_|    _|    _|
2018-10-30 11:58:33: ERROR[Main]: NodeResolver: failed to resolve node name 'mapgen_stone'.
2018-10-30 11:58:33: ERROR[Main]: NodeResolver: failed to resolve node name 'mapgen_stone'.
2018-10-30 11:58:33: ERROR[Main]: NodeResolver: failed to resolve node name 'mapgen_stone'.
2018-10-30 11:58:33: ERROR[Main]: NodeResolver: failed to resolve node name 'mapgen_water_source'.
2018-10-30 11:58:33: ERROR[Main]: NodeResolver: failed to resolve node name 'mapgen_water_source'.
2018-10-30 11:58:33: ERROR[Main]: NodeResolver: failed to resolve node name 'mapgen_river_water_source'.
2018-10-30 11:58:33: ERROR[Main]: NodeResolver: failed to resolve node name 'mapgen_stone'.
2018-10-30 11:58:33: ACTION[Main]:         .__               __                   __   
2018-10-30 11:58:33: ACTION[Main]:   _____ |__| ____   _____/  |_  ____   _______/  |_
2018-10-30 11:58:33: ACTION[Main]:  /     \|  |/    \_/ __ \   __\/ __ \ /  ___/\   __\
2018-10-30 11:58:33: ACTION[Main]: |  Y Y  \  |   |  \  ___/|  | \  ___/ \___ \  |  | 
2018-10-30 11:58:33: ACTION[Main]: |__|_|  /__|___|  /\___  >__|  \___  >____  > |__| 
2018-10-30 11:58:33: ACTION[Main]:       \/        \/     \/          \/     \/       
2018-10-30 11:58:33: ACTION[Main]: World at [/home/paul/Minetest 04.16/recipe/bin/../worlds/first ITB world 30 10 2018]
2018-10-30 11:58:33: ACTION[Main]: Server for gameid="insidethebox" listening on 0.0.0.0:52056.
2018-10-30 11:58:35: ERROR[Main]: generateImage(): Could not load image "itb_blank.png" while building texture; Creating a dummy image
2018-10-30 11:58:35: ACTION[Server]: singleplayer [127.0.0.1] joins game.
2018-10-30 11:58:35: ACTION[Server]: singleplayer joins game. List of players: singleplayer
2018-10-30 11:58:35: ERROR[Main]: generateImage(): Could not load image "crack_anylength.png" while building texture; Creating a dummy image
2018-10-30 11:58:35: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'sfinv' in callback environment_Step(): ...4.16/recipe/bin/../games/insidethebox/mods/sfinv/api.lua:129: [sfinv] Invalid homepage
2018-10-30 11:58:35: ERROR[Main]: stack traceback:
2018-10-30 11:58:35: ERROR[Main]:    [C]: in function 'assert'
2018-10-30 11:58:35: ERROR[Main]:    ...4.16/recipe/bin/../games/insidethebox/mods/sfinv/api.lua:129: in function 'get_formspec'
2018-10-30 11:58:35: ERROR[Main]:    ...4.16/recipe/bin/../games/insidethebox/mods/sfinv/api.lua:152: in function 'set_player_inventory_formspec'
2018-10-30 11:58:35: ERROR[Main]:    ...4.16/recipe/bin/../games/insidethebox/mods/sfinv/api.lua:174: in function 'func'
2018-10-30 11:58:35: ERROR[Main]:    ...ul/Minetest 04.16/recipe/bin/../builtin/common/after.lua:18: in function <...ul/Minetest 04.16/recipe/bin/../builtin/common/after.lua:4>
2018-10-30 11:58:35: ERROR[Main]:    ...l/Minetest 04.16/recipe/bin/../builtin/game/register.lua:412: in function <...l/Minetest 04.16/recipe/bin/../builtin/game/register.lua:392>
2018-10-30 11:58:35: ERROR[Main]: stack traceback:
2018-10-30 11:58:35: ACTION[Server]: singleplayer leaves game. List of players:
I'm not your buddy, guy...
 

User avatar
Peppy
Member
 
Posts: 32
Joined: Sun Nov 06, 2016 07:34
Location: France
IRC: Peppy
In-game: Peppy

Re: [Game] Inside The Box [insidethebox]

by Peppy » Tue Oct 30, 2018 19:33

I had the same issue with mods not loading.

I had to copy the localmusic folder from the music mod to a worldmods folder in the world directory.

This fixed the issue in 0.4.17.1 :)
 

sofar
Developer
 
Posts: 1747
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Game] Inside The Box [insidethebox]

by sofar » Tue Oct 30, 2018 20:23

Peppy wrote:I had the same issue with mods not loading.

I had to copy the localmusic folder from the music mod to a worldmods folder in the world directory.

This fixed the issue in 0.4.17.1 :)


I'll add an `assert` for that as well. Yes, this is required. It helps to keep music tracks out of git and allows the server operator to have custom per-server music.
 

sofar
Developer
 
Posts: 1747
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Game] Inside The Box [insidethebox]

by sofar » Tue Oct 30, 2018 20:27

sofar wrote:I'll add an `assert` for that as well. Yes, this is required. It helps to keep music tracks out of git and allows the server operator to have custom per-server music.


euh, the assert is already in place and should show a clear message.

Maybe Tumeninodes cut off the most important error message from his logs? :P
 

User avatar
TumeniNodes
Member
 
Posts: 2510
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Game] Inside The Box [insidethebox]

by TumeniNodes » Tue Oct 30, 2018 20:44

I cut off the what, at the what what?

Peppy wrote:I had the same issue with mods not loading.

I had to copy the localmusic folder from the music mod to a worldmods folder in the world directory.

This fixed the issue in 0.4.17.1 :)



I did manage to overlook this...
All is well now
Fixes for 5.0 as well... I'm going in
I'm not your buddy, guy...
 

User avatar
Fixer
Member
 
Posts: 866
Joined: Sun Jul 31, 2011 11:23
Location: Ukraine
IRC: Fixer
In-game: Fixer
 


Return to Game Releases



Who is online

Users browsing this forum: No registered users and 4 guests