Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CSM] Second Roadmap #5394

Closed
15 of 27 tasks
nerzhul opened this issue Mar 14, 2017 · 57 comments
Closed
15 of 27 tasks

[CSM] Second Roadmap #5394

nerzhul opened this issue Mar 14, 2017 · 57 comments
Labels
@ Client Script API Roadmap The change matches an item on the current roadmap.
Milestone

Comments

@nerzhul
Copy link
Member

nerzhul commented Mar 14, 2017

Here is the main roadmap and discussion topic about CSM.

Please post your ideas here, or open a new issue linked back with it. It will permit developers to centralize requested features and priorize them.

Feature requests

Short term

Documentation is mandatory for each PR

Longer Term

Reported bugs

Other

  • Client mod store
@nerzhul nerzhul added @ Client Script API Roadmap The change matches an item on the current roadmap. labels Mar 14, 2017
@octacian
Copy link
Contributor

  • HUDs (I assume this is a given, but)
  • Ability to get node meta (or has this already been implemented?)

What I'd really love for CSM is the ability to define an API (e.g. for easier creation of HUDs, as I'm doing with my HUD Plus mod) on a server-side mod and then use that API on the client. This would allow (for example) registering an HUD using my custom API to display the description of the item in the hotbar. Another thing that could be important in relation to this is an extra API function on the server-side to check for a specific mod on the client. I'm not sure how realistic the first thing is, but just throwing it out there (that's what this issue is for, right? :P)

@nerzhul
Copy link
Member Author

nerzhul commented Mar 14, 2017

@octacian it's not easy for HUD, we could customize HUD in the near future but this should not depend on server side attributes.

@nerzhul
Copy link
Member Author

nerzhul commented Mar 14, 2017

@red-001 i picked some ideas from your comment to the main list

@sofar
Copy link
Contributor

sofar commented Mar 14, 2017

I don't think node timers are sent to the client. Node meta, yes, node timers, no.

@nerzhul
Copy link
Member Author

nerzhul commented Mar 14, 2017

@sofar yes, maybe we can have local node timers for something ? example: particles created every 1 sec on a node ?

@C1ffisme
Copy link

I'm not sure how difficult this would be to make, or even turn into a usable API, but what about being able to render certain objects for each player, such as fishing line or lightning?

@sofar
Copy link
Contributor

sofar commented Mar 14, 2017

minetest.register_on_joinplayer
minetest.register_on_leaveplayer
minetest.get_connected_players
minetest.player_exists

all reasonable CSM interfaces imho.

@nerzhul
Copy link
Member Author

nerzhul commented Mar 14, 2017

@sofar i think yes, but at this moment if i remember client doesn't know which player is connected, only server knows it. But client knows somewhere some CAO are client because it shows names everywhere

@sofar
Copy link
Contributor

sofar commented Mar 14, 2017

Timers on client nodes seems risky, the client's perspective of the world is very different and it keeps huge amounts of map in memory.

However, if the timers can be for arbitrary nodes, and we can implement some sort of "active range" to the localplayer, it could work very well to periodically loop sounds or add particles

@nerzhul
Copy link
Member Author

nerzhul commented Mar 14, 2017

@sofar sounds be more reasonable, like ABM range

@raymoo
Copy link
Contributor

raymoo commented Mar 14, 2017

What about creating CAOs that are simulated on the client, and not tied to a SAO? They could he used for visual effect, e.g. put a colored box around a selected target.

@nerzhul
Copy link
Member Author

nerzhul commented Mar 14, 2017

@raymoo i don't think it's a CAO, maybe an attached entity

@raymoo
Copy link
Contributor

raymoo commented Mar 14, 2017

It doesn't matter to me if it's technically a CAO, I just assumed something like this would be implemented as a CAO. I just want something similar to a LuaSAO that can be simulated on the client and can have its behavior specified in Lua.

I don't think it should be limited to being attached, for example if you wanted to interpolate the entity's position. You could imagine implementing this as a hard-coded flag, but you would have trouble covering every kind of similar feature someone might want to use.

@bigfoot547
Copy link
Contributor

bigfoot547 commented Mar 14, 2017

Here are some features I hope are added.

  • minetest.colorize
  • Client HUD
  • Server time of day?
  • Client particles
  • Closing formspecs of local player?
  • Get the name of local player and maybe list of players if possible?
  • Get health and breath and player attributes of local player
  • Pointed node / object ref and maybe liquid of local player
  • Set fov of local player
  • Something like core.registered_items / nodes / tools / craftitems

That is a list of intresting features that I think are worth working on and eventually adding.
Thanks!

@nerzhul
Copy link
Member Author

nerzhul commented Mar 15, 2017

@bigfoot547 i think we can have registered_items, it could be useful to have a pure client side craft guide

@nerzhul nerzhul changed the title [CSM] Roadmap, ideas [CSM] Second Roadmap Mar 15, 2017
@nerzhul
Copy link
Member Author

nerzhul commented Mar 15, 2017

I renamed it to second roadmap, to have a second patchset as a changelog to core, when this patchset will be finished, we will close this issue and re-open another issue to follow the new changes

@octacian
Copy link
Contributor

Kinda reiterating the same thing @bigfoot547 said, but figured I'd say it anyways.

IMO, minetest.colorize is very important when paired up with an API to get the name of the player. With those two things, one could make a mod (as I was hoping to do) which would notify the player whenever they received a message with their name in it.

The ability to get all the other players on the server would open the door for a custom overview formspec to be displayed with a list of all players and maybe even a search bar.

A client-side craft guide would also be so useful seeing as it'd be practically lag-free.

@nerzhul
Copy link
Member Author

nerzhul commented Mar 15, 2017

@octacian i understand what you need and i need to rewrite the chat protocol to be more intelligent to do more interesting things :)

@bigfoot547
Copy link
Contributor

bigfoot547 commented Mar 15, 2017

@octacian On servers, people refer to me as big foot, bigfoot and bf. Only when they feel like pressing tab do they call me bigfoot547.
EDIT: Fix spelling mistake

@bigfoot547
Copy link
Contributor

@nerzhul Maybe instead of a global table, maybe minetest.get_def(itemname) function.
And maybe minetest.get_def_type(itemname) returning tool, node, craftitem, or none.

@Desour
Copy link
Member

Desour commented Mar 15, 2017

(Also good would be a nice documentation. client_lua_api.md (why here .md?) nearly consists out of wrong information.)

And minetest.get_modpath is needed, too.

@nerzhul
Copy link
Member Author

nerzhul commented Mar 15, 2017 via email

@octacian
Copy link
Contributor

octacian commented Mar 16, 2017

@Desour
Copy link
Member

Desour commented Mar 16, 2017

I meant, minetest.get_modpath for clientmods. So, something like minetest.get_clientmodpath. This could be used for nice folder structures (with dofile).
I wondered about the .md because (sadly) other files, like lua_api.txt, have the .txt suffix.
I will try helping to fix the doc but I don't want to remove some things because it seems they are like it should be (a bit like a todo list) eg. minetest. instead of core.. Also I don't know everything and could "correct" to lies.

@red-001
Copy link
Contributor

red-001 commented Mar 31, 2017

#5492

@raymoo
Copy link
Contributor

raymoo commented Apr 1, 2017

Issues in the past that I've seen so far where someone has suggested waiting for client side scripting so mods can implement:
#4700

I can't think of a good way to find all of these, but I know there's at least a few more.

@raymoo
Copy link
Contributor

raymoo commented Apr 1, 2017

This one (#4366) is related to CSM, specifically the part about custom physics models for entities.

@raymoo
Copy link
Contributor

raymoo commented Apr 4, 2017

What about client side lua active objects? Things that are meant to be visual effects or UI elements.

Sample ideas (both require client<=>server communication to be useful):

  • Display a heart above allies in some faction system
  • Player uses magic activator. A magic circle expands around the player, with nodes around the rim representing options. The player can walk into an option, which sends a message to the server that the player chose a particular option (and the server can handle the choice at that point).

Both of these could be implemented alternatively with selective visibility of server objects, but since these are only displayed to one client and have minimal interaction with other elements of the server, they could be client-local to reduce display lag. An arguable benefit is that it offloads some processing to the client, but some might argue that that is bad for lower-end machines. But it's something that would have been simulated in singleplayer anyway, and my impression is that most people agree that mods targeting singleplayer and computers that can process it are fine, so I don't see why a mod can't target multiplayer clients that are good enough for this. Not to mention that the two particular examples I gave probably wouldn't be very expensive to run.

EDIT: I might have mentioned this suggestion in the original CSM pull or issue but I don't think I have since then.

@nerzhul
Copy link
Member Author

nerzhul commented Apr 4, 2017

display informations on CAO is a nice CSM behaviour we should have, for the other point it's more server responsiblity

@cdqwertz
Copy link

cdqwertz commented Apr 8, 2017

My ideas:

minetest.set_controls({<...>})
minetest.select_hotbar_slot(<n>)
minetest.take_screenshot(<file_name>)

I think that a graphics API would be really useful too. E.g.:

local my_line = minetest.draw_line(<from (x, y, z)>, <to (x, y, z)>, <color>)
...
my_line.remove()
minetest.draw_sprite(<name>, <pos (x, y, z)>, <scale (x, y)>)

@red-001
Copy link
Contributor

red-001 commented Apr 8, 2017

#5532

@bigfoot547
Copy link
Contributor

#5569

@sofar
Copy link
Contributor

sofar commented Apr 12, 2017

As noted in the particle PR, it seems that CSM assets are not loaded. This makes it impossible for CSM mods to ship their own textures.

This is a fundamental issue that will affect sounds as well.

@nerzhul @red-001

@nerzhul
Copy link
Member Author

nerzhul commented Apr 12, 2017

@sofar loadMedia is only done by server sent packet atm, we should add same feature at mod loading from client side

@sofar
Copy link
Contributor

sofar commented Apr 12, 2017

Yup, I figured - add it to the worklist above? it's pretty crucial.

@nerzhul
Copy link
Member Author

nerzhul commented Apr 12, 2017

we can add it, but i don't if i will have time myself to manage this, as i have many PR which are crucial outside CSM and should be merged

@bigfoot547
Copy link
Contributor

#5609

@red-001
Copy link
Contributor

red-001 commented Apr 22, 2017

if a way to send mods form the server is added we should also send back error messages to the server, so server admins can debug mod crashes.

@Desour
Copy link
Member

Desour commented Apr 30, 2017

What about a per-world store?

@HybridDog
Copy link
Contributor

rendeko wrote something about allowing custom huds: https://forum.minetest.net/viewtopic.php?p=269253#p269253
How about adding a function register_on_formspec_show(function(spec)) which makes it possible to adjust a formspec (e.g. change background) before showing it to the player?

@CasimirKaPazi
Copy link
Contributor

Would it be also possible to override item descriptions? That would be an easy way to get client side item translations.

@HybridDog
Copy link
Contributor

You could change the "description" meta field of an item client-side.

@nerzhul
Copy link
Member Author

nerzhul commented May 17, 2017

This roadmap will be closed on feature freeze, on 21st may. A new will be opened after releasing MT

@nerzhul
Copy link
Member Author

nerzhul commented May 20, 2017

I'm closing this roadmap as the feature freeze occurs this evening. Thanks all for your participation

@nerzhul nerzhul closed this as completed May 20, 2017
@nerzhul nerzhul moved this from Requests to Done in Minetest 0.4.16 May 20, 2017
@nerzhul nerzhul moved this from In Progress to Done in Server-sent Client Side Modding May 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client Script API Roadmap The change matches an item on the current roadmap.
Projects
Development

No branches or pull requests