Time |
Nick |
Message |
00:37 |
|
Miner_48er joined #minetest-mods |
03:12 |
|
phantombeta joined #minetest-mods |
03:30 |
|
phantombeta joined #minetest-mods |
06:51 |
|
wolf__ joined #minetest-mods |
06:51 |
wolf__ |
hello |
09:07 |
|
jin_xi joined #minetest-mods |
10:35 |
|
PilzAdam joined #minetest-mods |
14:23 |
|
rubenwardy joined #minetest-mods |
15:31 |
|
rubenwardy joined #minetest-mods |
16:13 |
|
LazyJ joined #minetest-mods |
17:43 |
|
rubenwardy joined #minetest-mods |
19:03 |
|
thoughtjigs joined #minetest-mods |
19:03 |
thoughtjigs |
test |
19:03 |
thoughtjigs |
have a question about changing a nodes textures on the fly (in game) |
19:03 |
thoughtjigs |
Is that possible? |
19:11 |
PilzAdam |
no |
19:16 |
thoughtjigs |
I am working on a cpp mod where I can access directories on my hd from in game and browse images (for now) in something like a book case |
19:16 |
thoughtjigs |
I would like to create nodes on the fly to represent the images in the directories |
19:17 |
thoughtjigs |
or change textures on existing nodes |
19:17 |
thoughtjigs |
I have added lfs to lua to do the directory scanning |
19:17 |
thoughtjigs |
and I understand the security risks |
19:17 |
thoughtjigs |
this is proof of concept only not intended for general release |
19:18 |
thoughtjigs |
I have managed to get register_node to work on the fly with some hacks and can use giveme to give me a new node but the textures don't appear |
19:19 |
thoughtjigs |
looking for some insight on why it doesn't work and where in the code to start looking to possibly make the change to allow it |
19:20 |
PilzAdam |
at startup the server sends all textures to the client |
19:20 |
PilzAdam |
maybe it's possible to send texture at runtime |
19:22 |
thoughtjigs |
what I am running now is single player |
19:22 |
thoughtjigs |
not creating a remote server for obvious reasons |
19:23 |
thoughtjigs |
so what you are saying is that register_node stoers the textures at game start and only sends them to the client once when the game first starts. |
19:23 |
thoughtjigs |
where in the code is this handled? server.cpp? |
19:25 |
PilzAdam |
I guess clientiface.cpp/.h |
19:27 |
thoughtjigs |
do you have time or can you point me to a discussion on how the register_node process works in the context of the server/client? |
19:29 |
PilzAdam |
hmm... I don't remember any resource on that |
19:30 |
PilzAdam |
heh, http://dev.minetest.net/Core_Architecture it's under "TODO" in this page |
19:30 |
thoughtjigs |
trying to get pidgen to connect to irc |
19:30 |
thoughtjigs |
what is the url for mintest |
19:31 |
PilzAdam |
hm? |
19:32 |
thoughtjigs |
like irc.ubuntu.net |
19:33 |
PilzAdam |
chat.freenode.net |
19:35 |
|
thoughtjigs1 joined #minetest-mods |
19:35 |
thoughtjigs1 |
much beter |
19:35 |
thoughtjigs1 |
better |
19:36 |
thoughtjigs1 |
thanks for the url pilzadam |
19:36 |
thoughtjigs1 |
so how does the register_node work with server clients? |
19:36 |
thoughtjigs1 |
I would be happy to update the wiki after I get a fuller understanding |
19:38 |
thoughtjigs1 |
also, I can move this to minetest-dev if it is more appropriate |
19:42 |
PilzAdam |
well, at startup the server runs the Lua scripts, which register a bunch of nodes |
19:42 |
thoughtjigs1 |
this is on the server side? |
19:42 |
PilzAdam |
sure, there are no clients yet |
19:42 |
thoughtjigs1 |
oh sorry |
19:42 |
thoughtjigs1 |
yup |
19:42 |
PilzAdam |
when a client connects, the server sends the (then in c++ stored definitions) to the client |
19:42 |
thoughtjigs1 |
I will read more carefully ;-) |
19:43 |
PilzAdam |
the client then goes through the textures and requests the ones that aren't cached in the client yet |
19:43 |
thoughtjigs1 |
where are they cached? |
19:43 |
thoughtjigs1 |
memory? |
19:43 |
PilzAdam |
in $user_dir/cache/media/ |
19:44 |
thoughtjigs1 |
ahh |
19:44 |
thoughtjigs1 |
so an inplace run it would be the build_dir/cached |
19:44 |
thoughtjigs1 |
cache |
19:44 |
PilzAdam |
yep |
19:45 |
PilzAdam |
according to the comment in clientiface.hpp, media (i.e. textures) can only be send to clients at startup when they request it |
19:45 |
thoughtjigs1 |
cpp? |
19:45 |
thoughtjigs1 |
I assume |
19:46 |
PilzAdam |
I meant the header, clientiface.h |
19:46 |
PilzAdam |
sorry |
19:46 |
thoughtjigs1 |
ahh just opened the file |
19:46 |
thoughtjigs1 |
looks like some good comments there |
19:47 |
PilzAdam |
so I guess you need to modifiy the server, to send a changed texture to the client (after startup, when the client is "Active") |
19:47 |
thoughtjigs1 |
or new nodedef |
19:47 |
PilzAdam |
and you need to modify the client, to receive the updated textures and use them instead of the old ones |
19:48 |
PilzAdam |
yeah, the same goes for nodedef |
19:48 |
thoughtjigs1 |
do you think this would be something generally useful? I can create a branch and add it if you think people would want it |
19:49 |
PilzAdam |
there are several problems if you want to do that in stable upstream |
19:49 |
PilzAdam |
e.g. how are these things saved? |
19:49 |
thoughtjigs1 |
hmmm, good question |
19:50 |
PilzAdam |
I guess it would be best for you if you just quickly hack it together for your usecaase ;-) |
19:51 |
thoughtjigs1 |
what about having the client request a new nodedef when it finds a node in a block it doesn't recognize? |
19:51 |
thoughtjigs1 |
might speed up client connection |
19:51 |
thoughtjigs1 |
nodedefs wouldn't be sent until encountered in the workd |
19:51 |
thoughtjigs1 |
world |
19:52 |
PilzAdam |
that would lead to noticeable lag while playing, though |
19:52 |
thoughtjigs1 |
ahh, good point |
19:53 |
thoughtjigs1 |
I appreciate your help. I will create a patch and once I have a working build I will post it on the forums for discussion about possible other use cases. |
19:54 |
thoughtjigs1 |
post the patch that is |
19:54 |
thoughtjigs1 |
oh |
19:54 |
thoughtjigs1 |
any reason to or not to include lfs with lua in default build? |
19:54 |
PilzAdam |
lfs? |
19:54 |
thoughtjigs1 |
there is a security by obscurity advantage with it not being there |
19:54 |
thoughtjigs1 |
lua fs module |
19:55 |
thoughtjigs1 |
filesystem |
19:55 |
thoughtjigs1 |
just two files lfs.cpp/.h |
19:55 |
thoughtjigs1 |
pretty easy to integrate |
19:55 |
thoughtjigs1 |
provides agnostic fs commands to lua |
19:55 |
PilzAdam |
there are plans to restrict mods to not be able to call any io or os functions |
19:56 |
PilzAdam |
for security reasons |
19:56 |
thoughtjigs1 |
good idea |
19:56 |
thoughtjigs1 |
wondered about that |
19:56 |
PilzAdam |
so this is kinda going in the exactly opposite direction ;-) |
19:57 |
thoughtjigs1 |
yeah, sure is. What I am exploring is a different kind of desktop for my linux box. ... a MT house with bookshelves representing folders. |
19:57 |
thoughtjigs1 |
in the beginning stages though |
19:58 |
thoughtjigs1 |
as I am not sure how it would all fit together ... one idea was that it would be interesting to see what a port analyzer would look like in minetest ... a series of pipes maybe with packets represented by blocks |
19:59 |
PilzAdam |
thats interesting |
19:59 |
thoughtjigs1 |
connecting different "app blocks" |
19:59 |
thoughtjigs1 |
packet info would be stored as metadata |
20:00 |
thoughtjigs1 |
anyway, you can see why I might want to be able to define nodes on the fly ;-) |
20:01 |
thoughtjigs1 |
oh, one other thing. I would like to contribute back to the project ,,, are there any high priority bugs that need a cpp developer to work on? |
20:02 |
thoughtjigs1 |
would be happy to take on a few as I have time |
20:02 |
PilzAdam |
there are 77 open issues, labeled as "bug" https://github.com/minetest/minetest/issues?q=is%3Aopen+is%3Aissue+label%3Abug |
20:03 |
thoughtjigs1 |
thanks, I will take a look |
21:07 |
|
jin_xi joined #minetest-mods |