Page 1 of 2

[Mod][Experimental] Doors (minecraftlike) 0.0.3

PostPosted: Fri Dec 23, 2011 21:59
by sapier
I've tried to create created doors similar the ones used in minecraft.

By now this was only possible by adding small patches to minetest, don't know if they make it to master as they break the "a block is a block" rule ;-)

Use crowbar to increase removal speed of door by factor five
crowbar reciep:
. . steel_ingot
. steel_ingot .
steel_ingot . .


Working (>0.0.2):
-placing doors relative to player position and position of door (4 possibilitys)
-opening/closing doors
-removing doors
-doors are as slim as their collision box and smaller than block size -> fixed by minetest patch "cube_disorted"
-transparency does work (->github/sapier/minetest branch sapier_experimental)
-doors can't be walked through if closed (->github/sapier/minetest branch sapier_experimental)


Problems:
nothing known

Changes:
Version 0.0.3
-Iron door added
-switched from 2 entities per door to 1 entitie
-fixed dig door bug
-switched to left click door opening



Screenshots:
-closed door
Image

-opened door (you can see the thin black line of the collision box around the frame)
Image

-all in one
Image

Minetest Patches
transparency patch is not mandatory and may have side effects to other parts of minetest, haven't checked this
http://www.mediafire.com/?8xxzdcvxs56ze3z

cube_disorted patch adds another visual style to entitys using their collision box for drawing the mesh, beware collision box HAS TO BE MinEdge,MaxEdge to get reasonable drawing results!
http://www.mediafire.com/?i0zqkntbnzt7jog

Mod:
http://www.mediafire.com/?khcvdbcq1abzwvx (Version 0.0.1)
http://www.mediafire.com/?0peyua24rdc6mia (Version 0.0.2)
http://www.mediafire.com/?4e8of77m8ah602x(Version 0.0.3)

PostPosted: Fri Dec 23, 2011 22:33
by bwog
You don't need to make us download the screenshots, just upload them to TinyPic or another image hosting site.

PostPosted: Fri Dec 23, 2011 23:59
by RAPHAEL
bwog wrote:You don't need to make us download the screenshots, just upload them to TinyPic or another image hosting site.

I just clicked the mediafire links and they loaded. No "download" needed. Sorry but I don't know how to help you with this mod. But great idea.

PostPosted: Sat Dec 24, 2011 01:06
by randomproof
sapier wrote:1) My doors don't stop anyone, you can walk straight through

Entities can be walked through, which is why I made my door mod with nodes, that and I wanted big and shaped doors. Your doors look a lot better though. You might take a look at the hatches mod. Just turn them on the side?

PostPosted: Sat Dec 24, 2011 01:19
by dannydark
I'm not able to test atm but I'm guessing this is an issue with the way that the cube visual stuff is rendered, as the textures themselves do contain an alpha channel and work if you assign them to a sprite or node with glasslike visual style.

I and No-Half-Measures had a similar problem ages ago trying to get stained glass to work, the problem was with the material setting which didn't allow transparent materials iirc we had to change the setting to something else to get it to work.

So basically what I'm saying is maybe the material setting for cube visual style doesn't allow transparent materials.

I can't confirm this though as I don't have access to the C++ source on this system.

EDIT: Might be worth asking on the minetest-delta IRC channel to see if anyone can confirm this.

PostPosted: Sat Dec 24, 2011 05:15
by sapier
thanks dannydark, you've been right. confirmed and fixed it in c code by myself

PostPosted: Sat Dec 24, 2011 05:17
by sapier
@randomproof
I started with hatches mod changed this and that and finaly discovered nothing was left of hatches ;-)

PostPosted: Sat Dec 24, 2011 15:00
by Zarberman
when i try to download the transparecy patch, it says that there was a problem with the dowoad. please help

PostPosted: Sat Dec 24, 2011 17:06
by sapier
Works for me, but as mediafire heavyly relies on google apis and other scripts you have to disable scriptblocker addons in your browser

PostPosted: Fri Jan 06, 2012 11:08
by sycam
when i place the door i cant see it and the thing says ''cannot create image from data received from texture thumbs.db''

PostPosted: Fri Jan 06, 2012 11:11
by sapier
This error message isn't related to your problem it just tells there's a file called thumbs.db within one of your texture folders. As this ain't a texture it can't be loaded as texture.

I assume you didn't build minetest yourself after adding the patches ... did you?

PostPosted: Tue Jan 10, 2012 19:22
by robin
Did your patches went upstream meanwhile?

PostPosted: Tue Jan 10, 2012 21:12
by sapier
no and as someone is workling on steps (half block's) I don't think they will as those patches are most likely to collide (but i haven't really checked that)

PostPosted: Sat Jan 14, 2012 12:13
by Staffs
Why would you need this mod if you can walk through. I need doors for protection not design

PostPosted: Sat Jan 14, 2012 12:55
by sdzen
maybe if when it was hit it didn't just change position but changed into a different node one thats solid :) just a suggestion

PostPosted: Sat Jan 14, 2012 13:58
by sapier
problem is the door needs to store data about it's orientation that can't be done with nodes. It isn't handled during server reboots by now either, but that could be added without need to change c++ code. This isn't trivial and i didn't want to do it for a mod not usefull by now ;-).

PostPosted: Sun Jan 22, 2012 23:00
by rahonejm
question: where i need to paste the patches?

PostPosted: Mon Feb 13, 2012 16:48
by MirceaKitsune
Looking good, going to try it now. I don't believe the crowbar is really necessary, but doors themselves are very welcome to Minetest at this stage.

PostPosted: Mon Feb 13, 2012 18:18
by sapier
The doors do work now as a door should work, at least if you do use my minetest branch.

Relevant patches for doors mod are:
-entity collision handling
-entity disorted_cube drawmode

PostPosted: Tue Feb 14, 2012 04:39
by sycam
cool my internets down so i cant say much
(im on a libary one)

PostPosted: Wed Feb 15, 2012 02:53
by Temperest
This is great! Are there any plans to merge the changes in your branch into upstream?

PostPosted: Wed Feb 15, 2012 11:23
by Jordach
Its supposed to be Minetest core, NOT upstream, celeron ("hates") people who say upstream.

PostPosted: Wed Feb 15, 2012 11:44
by sapier
I don't see any problems why the features shouldn't be added but there are so much features about to add to core I can't really predict when it's time.

I need to do some changes too if it's added e.g. two entities for one door isn't needed at all, mesecon support ...

btw there's a bad bug that still is a problem for this doors. the ...

PostPosted: Wed Feb 15, 2012 11:59
by kahrl
Because code from my collision_allow_stairs(_v2) is involved, performance is a problem (especially on older computers or when a really large number of entities are moving). I'll fix that some time soon.

PostPosted: Wed Feb 15, 2012 12:18
by Jordach
sapier wrote:I don't see any problems why the features shouldn't be added but there are so much features about to add to core I can't really predict when it's time.

I need to do some changes too if it's added e.g. two entities for one door isn't needed at all, mesecon support ...

btw there's a bad bug that still is a problem for this doors. the


Erm, truncated post?