on_collide

Post Reply
User avatar
webdesigner97
Member
Posts: 1328
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
Location: Cologne, Germany
Contact:

on_collide

by webdesigner97 » Post

This is just a very little idea I'd like to share, nothing more:

What about having the possibility to add "on_collide" to an entity definition? I could look somthing like:

Code: Select all

minetest.register_entity("mod:entity",{
    (...),
    on_collide = function(self,pos,collider)
         -- Code goes here
    end
})
This would allow a car (maybe I'll create one if Melkor shares his mesh) to hurt players it touches if it's fast or to destroy walls if it crashes into them... What do you think?

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

I guess this would slow the collision detection down. So its not going to happen.

User avatar
Topywo
Member
Posts: 1721
Joined: Fri May 18, 2012 20:27

by Topywo » Post

It would be great if that was possible. It will create a lot of new possibilities.

User avatar
webdesigner97
Member
Posts: 1328
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
Location: Cologne, Germany
Contact:

by webdesigner97 » Post

PilzAdam wrote:I guess this would slow the collision detection down. So its not going to happen.
This might happen :/

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

PilzAdam wrote:I guess this would slow the collision detection down. So its not going to happen.
This is a game engine not a god damn C++ game.

WE NEED things like THIS.

When someone thinks of a really good idea, you just swat it down saying it "doesn't fit the blocky style", or "too complicated to code", which we know for a fact is bullshit.
Last edited by Jordach on Wed Jul 24, 2013 20:32, edited 1 time in total.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Jordach wrote:
PilzAdam wrote:I guess this would slow the collision detection down. So its not going to happen.
This is a game engine not a god damn C++ game.

WE NEED things like THIS.

When someone thinks of a really good idea, you just swat it down saying it "doesn't fit the blocky style", or "too complicated to code", which we know for a fact is bullshit.
Ummmm..... where did I say that this idea is bad? Of course we will merge it in if someone implements it in a sane way.
In the post above I just said what I think about the problems that might occur while trying to implement it (as a core dev who knows the existing code).

It would be best if you think about my post before copy and pasting your standard "PilzAdam rejects an idea" text.

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

PilzAdam wrote:
Jordach wrote:
PilzAdam wrote:I guess this would slow the collision detection down. So its not going to happen.
This is a game engine not a god damn C++ game.

WE NEED things like THIS.

When someone thinks of a really good idea, you just swat it down saying it "doesn't fit the blocky style", or "too complicated to code", which we know for a fact is bullshit.
Ummmm..... where did I say that this idea is bad? Of course we will merge it in if someone implements it in a sane way.
In the post above I just said what I think about the problems that might occur while trying to implement it (as a core dev who knows the existing code).

It would be best if you think about my post before copy and pasting your standard "PilzAdam rejects an idea" text.
You should implement things that people want in a early Alpha, revise them further in the beta, and kill all the bugs in the RC's, then a FULL release with little / no bugs. And for once, rather than crow about these features, make proof of concept code. Show that it CAN BE DONE.
Last edited by Jordach on Wed Jul 24, 2013 21:57, edited 1 time in total.

tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

by tinoesroho » Post

'tis a do-ocracy.

Want something done?
Just do it.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

tinoesroho wrote:'tis a do-ocracy.

Want something done?
Just do it.
+1

Jordach. I'm not taking this in a bad way, but I guess the best way for you to continue is to fork minetest. Or, if you don't want to do that, maybe you could take the source code, add the features, take some screen-shots/make a video, post to the forum, gather support, and then make a pull request. That way, even if the request is denied, you will have some kind of support.

PilzAdam. I think the next best thing to do is what Jordach said here. I think there should be two branches for minetest. One will be stable, the other experimental, where all the good ideas, like those of Jordach go. And in this branch, anything that isn't buggy is allowed to be implemented.

If we all sit and discuss nicely, I don't think anyone will brawl over 'pull requests'.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

hoodedice wrote:
tinoesroho wrote:'tis a do-ocracy.

Want something done?
Just do it.
+1

Jordach. I'm not taking this in a bad way, but I guess the best way for you to continue is to fork minetest. Or, if you don't want to do that, maybe you could take the source code, add the features, take some screen-shots/make a video, post to the forum, gather support, and then make a pull request. That way, even if the request is denied, you will have some kind of support.

PilzAdam. I think the next best thing to do is what Jordach said here. I think there should be two branches for minetest. One will be stable, the other experimental, where all the good ideas, like those of Jordach go. And in this branch, anything that isn't buggy is allowed to be implemented.

If we all sit and discuss nicely, I don't think anyone will brawl over 'pull requests'.
This is a better way to do things than getting into fights.

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

Hybrid Dog wrote:I would need a "on_walk_on" for walkable nodes...
You could probably do that in a lua on_step, and then get it to call self:on_walkon()
Will not be as accurate as a cpp version, but will still be good for purpose.
Last edited by rubenwardy on Fri Jul 26, 2013 16:07, edited 1 time in total.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests