on_collide

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

on_collide

by webdesigner97 » Wed Jul 24, 2013 20:15

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:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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

by PilzAdam » Wed Jul 24, 2013 20:19

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

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

by Topywo » Wed Jul 24, 2013 20:20

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

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Wed Jul 24, 2013 20:22

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

This might happen :/
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Jul 24, 2013 20:31

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.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

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

by PilzAdam » Wed Jul 24, 2013 21:22

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.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Jul 24, 2013 21:57

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.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

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

by tinoesroho » Wed Jul 24, 2013 22:56

'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: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Thu Jul 25, 2013 19:03

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: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Thu Jul 25, 2013 20:47

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

by rubenwardy » Fri Jul 26, 2013 16:06

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.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 2 guests

cron