mob code for lua

MrElmux
Member
 
Posts: 17
Joined: Sun Dec 29, 2013 09:50

mob code for lua

by MrElmux » Thu Feb 06, 2014 11:26

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

by MrElmux » Thu Feb 06, 2014 11:27

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

by Enke » Thu Feb 06, 2014 13:53

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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Thu Feb 06, 2014 18:37

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.
 

MrElmux
Member
 
Posts: 17
Joined: Sun Dec 29, 2013 09:50

by MrElmux » Fri Feb 07, 2014 08:13

Uh oh sorry ,,,
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Fri Feb 07, 2014 11:51

It doesn't matter too much. A c(++) mob API would be nice.
 

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

by CitroPotter » Sun Feb 09, 2014 15:19

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

by MrElmux » Wed Feb 12, 2014 13:10

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: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Thu Feb 13, 2014 19:48

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

by MrElmux » Thu Feb 13, 2014 20:17

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
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 14 guests

cron