mob code for lua

Post Reply
MrElmux
Member
Posts: 17
Joined: Sun Dec 29, 2013 09:50
Location: North Western Germany

mob code for lua

by MrElmux » Post

Mobs are a somewhat vital part of the minetest game and there are mods that give you some mobs ( simple mods or mobf) problem is, that mobs
are currently slowing the engine, because everything ( movement etc) is made in slow lua abm's My idea would be , that some vital parts of mob handling (movement, damage dealing ) become engine parts.

MrElmux
Member
Posts: 17
Joined: Sun Dec 29, 2013 09:50
Location: North Western Germany

by MrElmux » Post

wrong forum, can somebody move it to the feature discussion ?

User avatar
Enke
Member
Posts: 469
Joined: Fri Nov 15, 2013 02:56
GitHub: NANOsoldierEnke
IRC: Enke
In-game: Enke
Location: The internet

by Enke » Post

This idea (or various forms of it) has been suggested numerous times.
Lush8
ExtraVars for Red Eclipse

<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate

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

by rubenwardy » Post

Mobs do not use ABMs.

They use global steps or ABMs for spawning (sometimes).

They use entity.tick for mobs.
Last edited by rubenwardy on Thu Feb 06, 2014 18:38, edited 1 time in total.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

MrElmux
Member
Posts: 17
Joined: Sun Dec 29, 2013 09:50
Location: North Western Germany

by MrElmux » Post

Uh oh sorry ,,,

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

by rubenwardy » Post

It doesn't matter too much. A c(++) mob API would be nice.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

CitroPotter
Member
Posts: 50
Joined: Fri Jan 24, 2014 09:58

by CitroPotter » Post

Not a bad i dea, well i was just thinking :
what if they get in the game when the engine gets some real power?
Hi!

MrElmux
Member
Posts: 17
Joined: Sun Dec 29, 2013 09:50
Location: North Western Germany

by MrElmux » Post

When im having more time again i will propably start making it .
I would suppose those fields (in addition to the current Entity code)
(these names are preliminary )
biome ( the biome it is living in) : water air land cave
spawning = dayspawn, nightspawn, startspawn(For mobs that just spawn ones)
notice_distance = The distance to notice a player
movement = (The movement either random or following if in hear distance)
movepoints (classic rougelike-like how long something can move)
I currently only want to suppose one new function :
on_hear()

Whats your idea about it ?

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

MrElmux wrote: When im having more time again i will propably start making it .
Depending on how complex you want it to be, you may either take the existing mobf (already covers most of what you#re suggesting) or simple mobs (everything a bit more simple). Or improve one or both of them.
If you intend to get it included in the engine, by all means talk to the devs so that they'll actually at least consider taking your code!
A list of my mods can be found here.

MrElmux
Member
Posts: 17
Joined: Sun Dec 29, 2013 09:50
Location: North Western Germany

by MrElmux » Post

thats what i'm trying by posting it here in the forums
i think feature discussion ( what the users wish ) should really have been made here to reach the more
non-technical players, IRC is better for all the technical engine near development.

and i think we should pack the most of mobf into the API because it would make mob mod making a lot easier fast er and the result would run alot faster

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests