About when will we get proper mobs in minetest?

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: About when will we get proper mobs in minetest?

by Byakuren » Wed Sep 07, 2016 00:55

CrazyDaisy wrote:Well, it's 2016. Any news on mobs in the core code? My suggestion is maybe an API in the core that mods can use to create mobs. The core needs to handle all the cpu intensive stuff and mods just handle the basics. This would allow all sorts of mobs to be created, or none created. It would allow there to be mob mods to handle passive mobs such as sheep, cows, chickens, etc. Would allow there to be mob mods to handle aggressive mobs such as zombies or whatever. Or if the player doesn't want any of it, no mods could be installed.

All it takes is a group of people with the knowledge to get together and get it done. Would probably take less than a month of part timing it. Then the mod makers can get to work putting the new API to use, which would flush out bugs that can then be fixed. A survival world without something to defend against is pretty boring. A world with a ton of farming mods but no animals to farm is also boring. Using the current lua for mobs just isn't cutting it. The majority of the mob code needs to be in the core of minetest to keep performance high and keep glitches low. If I knew how to do it, I would jump on it.


I haven't experienced significant lag from mob mods. Can you be more specific about how lua for mobs isn't cutting it? One place I can think of is pathfinding. The current pathfinding routine (minetest.find_path) gives paths with lots of right angles, which looks strange when mobs follow it directly. This might be fixed with just a better pathfinding function though, rather than a new system specifically for mobs.

What I would worry about with most code being in the engine is a lack of flexibility. Maybe a mob system in the engine could provide switchable behaviors for different things mobs do, including "custom" types that defer to a lua callback. In general, mobs should be easy to interface with and extend from mods, including mods other than the ones creating the mob.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
Mainpage
Member
 
Posts: 61
Joined: Fri Nov 13, 2015 01:12
GitHub: mainfolio
IRC: mainpage
In-game: mainpage

Re: About when will we get proper mobs in minetest?

by Mainpage » Wed Sep 07, 2016 19:08

I'm a bit late to this party but I'll offer my opinion anyway.
Someone should make a lua mob mobs that actually uses the engines pathfinding algorithm and use good 3d models that are actually consistent with the default minetest texture path (which IMHO most mob mods aren't). Or just modify Pilzadam's simple mobs to use the algorithm (which I'm pretty sure it doesn't, please correct me if I'm wrong).
I eat baby seals
 

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

Re: About when will we get proper mobs in minetest?

by cHyper » Wed Sep 07, 2016 19:44

Mainpage wrote:I'm a bit late to this party but I'll offer my opinion anyway.
Someone should make a lua mob mobs that actually uses the engines pathfinding algorithm and use good 3d models that are actually consistent with the default minetest texture path (which IMHO most mob mods aren't). Or just modify Pilzadam's simple mobs to use the algorithm (which I'm pretty sure it doesn't, please correct me if I'm wrong).


+1
thats also my opinion...
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: About when will we get proper mobs in minetest?

by Byakuren » Wed Sep 07, 2016 20:12

Mobs Redo uses the engine's pathfinding system for longer paths already and the paths are hideous.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
Novacain
Member
 
Posts: 285
Joined: Sat Aug 31, 2013 01:03
Location: Skaaro

Re: About when will we get proper mobs in minetest?

by Novacain » Wed Sep 07, 2016 23:37

well, this thread is old. One thing that is neglected massively in this thread is that we simply need an API built into the engine for handling moving entities. I say this because it would solve a large portion of the mobs problems.

The other reason I think we need it is because it's a solution that extends to many parts of the game. Mobs could still be mod based (which I think is essential to the essence of minetest), but it would also enable many other aspects to the game. We can now have projectiles, vehicles, dungeon master's fireballs, and many other moving entities that previously would just be cut to speed the game.

On the topic of mobs though, I think that a limit to the number of mobs around a player should be built-in to the mod. I have many thoughts about mobs :P
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: About when will we get proper mobs in minetest?

by Byakuren » Thu Sep 08, 2016 00:25

well, this thread is old. One thing that is neglected massively in this thread is that we simply need an API built into the engine for handling moving entities. I say this because it would solve a large portion of the mobs problems.

You need to be more specific. The current entity system already has support for movement.
The other reason I think we need it is because it's a solution that extends to many parts of the game. Mobs could still be mod based (which I think is essential to the essence of minetest), but it would also enable many other aspects to the game. We can now have projectiles, vehicles, dungeon master's fireballs, and many other moving entities that previously would just be cut to speed the game.

I guess understanding this part depends on understanding the previous part. But it looks like you are saying what we already have is adequate, because we can already have projectiles, vehicles, fireballs, etc.?
On the topic of mobs though, I think that a limit to the number of mobs around a player should be built-in to the mod. I have many thoughts about mobs :P

Built-in and configurable, hopefully.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
SegFault22
Member
 
Posts: 870
Joined: Mon May 21, 2012 03:17
Location: NaN

API Expansion -> Immersion Explosion -> More Players

by SegFault22 » Wed Sep 28, 2016 11:23

The reason we need mobs is to make the game more immersive. With mobs, you can hunt monsters and wild animals for special resources and food, and you can tame wild animals and breed them in a farm for food and other resources.

However, all mods which deal with mobs are severely lacking in performance and features, mainly because they use the Lua end of the system to compute everything. Lua would be fast enough for mobs, if the entire game were written in Lua, but that is not reasonable. The mobs systems are slow because Lua code is being run frequently and its outputs have to be translated into the C++ part of the game, which is considerably slow.

The best solution would be to create APIs for various features of mobs, such as the movement, AI, drops and so on, so that instead of having to program all of the mob system in Lua to be run frequently during the game, the mod developers only have to register a few things in the loading phase and then the C++ part of the game handles the rest. This will be significantly faster, because it only has to translate between Lua and C++ during the loading phase. When it is time for a mob to move, the process occurs in C++; when a mob is killed and items need to be dropped, the table of items and chances for that mob is looked up and then processed to decide what is dropped, and then the item-entities are spawned, all within the C++ part and not having to do anything in Lua; when a mob's AI calls for it to hit a player, the player is damaged and the entire process happens via C++.

Once such APIs are created (I suggest the Lua functions minetest.register_AI() for AI patterns including attacks, minetest.register_mobdrops() for mobs' drops-tables, and minetest.register_mob() which registers the mob and takes parameters for the registered AI pattern to use, the registered drops table to use, a model and a texture), it will be relatively easy to create new mobs which are computed quickly and efficiently.

I'm not sure whether it's best to include attacking mobs' attack damage level in the registered AI pattern, or in the registered mob entry - if it's in the mob's registry entry, different mobs can use the same AI pattern and deal different damage when they attack (such as spiders) avoiding several registry entries with only one or a few different values and the rest being identical; but if it's in the AI pattern, that is simpler because the attack condition(s) are put there.

I have seen that the topic of vehicles has come up - these suggested registry functions would be no good for vehicles, because they aren't designed for that. So, we could instead have another function, minetest.register_vehicle(), which takes care of registering vehicles - it would take parameters covering at least one "seat", possibly a player orientation to use for the seat(s) (for example, a hang glider or a parachute would look weird if the player is sitting while attached), controls assigned to the seat(s), characteristics of movement (cars slide around on flat terrain, planes go through the air, parachutes fall slowly, etc), if they can crash and what happens, and if they require fuel and what kind of fuel it is (and engine characteristics) and also some base numbers used to determine the rate of fuel consumption relative to the engine speed and the movement characteristics (if a car is falling through the air but the player isn't pressing the "gas pedal", only idle fuel consumption occurs just as if it were on the ground - instead of just consuming fuel based on movement speed, where it would run out of fuel quickly while it is falling although it is idling - a rocket consumes fuel based on the burn rate, which may stay constant). It may end up being substantially different from this, but it would still be much better than trying to run all of the computing processes within Lua and then translating everything to C++ function calls from the Lua API function calls.

Sure, we don't need vehicles or even mobs for more immersion-factor, but it would be a great start, especially since the immersion factor is like 0.1 or 10% (1 or 100% is "totally stuck to it"), since we don't have any really good power-system mods or machine-system mods. Technic is pretty good for the first power system mod unique to minetest, but it has some flaws, like the switch-block that you need in order to make any power network do anything, the slow speed of power transmission, and the limited variety of unique machines that do something more useful than automating or improving processes you could do without machines (centrifuge? electrolyzer?), and the limited variety of (or absence of) features not centered on the power network (IC2 for minecraft has a crop-tending-machine that consumes power, but they added several new crops and a really nice crop system that uses sticks and nutrients and an air-quality factor) - if the mod were expanded or revised, possibly warranting a "2" in the name, it would most likely then have more features like crop automation, a better power system (only using the switch for turning a junction on and off, like a cable that can be toggled - it shouldn't be needed to make a network), maybe even a reasonable automatic mining machine, which would increase the immersion factor substantially. The Carts mod is a pretty good attempt to make a working carts system, but it also has flaws, such as the carts sometimes flying off the rails, and the carts not turning naturally at curved rails, and the lack of a cart linking feature (trains of carts, very useful) or specialized carts that carry something other than a player (only makes sense with a cart linking feature) - if these were addressed and resolved, the carts system alone would make the game more immersive "than you can shake a stick at" (20% more orso), because then you would be able to make reasonable railways that serve reasonable purposes, such as moving large quantities of resources from a mine to the surface or from a factory to a warehouse - tracks would actually have a purpose, beyond decoration or being part of an unfinished feature idea first included a long time ago. Heck, we could maybe even get a cart-locomotive that is powered by technic electricity, consuming power from an internal buffer and having inventory slots for extra storage devices, and possibly being recharged when on track that is above or near enough to a special power-transfer node.

People really don't just want some specific feature in order to make the game better. What they want, yet seem to (commonly) never be able to put into the right words, is for the game to be more immersive, by having more cool and interesting features, which bring challenges for the players to achieve something worthwhile - such as mobs to hunt or farm, so that they have a reason to build and expand a farm, for collecting and using the products from animals (wool, food, leather); machines which process materials in ways (electrolyzer, centrifuge) previously not possible via the crafting grid or anything remotely (hand-powered grinder) like it, necessitating the need for a power infrastructure complete with generators, storage banks, distribution lines, transformers, maybe even some switches, to be expanded as the need grows; a reasonable carts system, complete with cart linking, realistic turns, maybe even switches and special tracks (item loader/unloader? just imagine...), making it possible for the first time to haul more than one inventory full of resources (outside of your actual inventory) out of a deep mine and into your base, to be processed and eventually used, while also making it reasonable to build a world-wide train network to facilitate rapid transportation between far-away cities and sites, in the absence of public teleportation mods (or just for the scenery and coolness-factor, even if there are public teleportation mods being used); exotic materials, making wonderful tools yet only occurring deep underground, where it takes a long time and lots of work to reach them, but the reward being tools which seem to never wear out (mese is the new wood) and/or decrease the block breaking time to nearly nothing, and expensive new ingots/shards to sell to other players interested in enjoying their excellent properties without having to go where you went (for a considerable fee, of course, so you can buy stuff you need and go get more of the wonderful stuff).

All of these things will make the game more immersive, bringing reason and purpose to a place once dominated by boredom and abundance of empty space. When the game is more immersive, players want to collect resources and build stuff, because it is more fun, as they overcome challenges and are rewarded for their work. When players are having fun, they usually won't stop playing the game unless they just have to for some important reason, rather than leaving because they started to feel like there's nothing to do or that it is a bore to do what they can do in the game without such features as previously mentioned (or any features like them at all). If we do this, not only will people enjoy playing the game much more, but the community will grow faster than it ever has, maybe even someday exceeding that of Minecraft (as it peaks and drops off, which is inevitable, and appears to have already begun, because they stopped publishing graphs a few years ago, which would obviously show the decline in sales increase velocity, maybe even negative velocity). From the first few mods adding so much more immersion, many more smaller mods will begin to be created, many of those being related to the "big ones" or being addons which expand them with more features or more stuff for existing features. In about half a year after these systems are fully implemented and those types of mods released, the game will become more customizable with new mods than ever before, maybe even passing minecraft mods as well. Nobody knows how far it can go, or how many niches can be filled by mods using these APIs and creating unique features.
 

Previous

Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 2 guests