[Road Paver] Road paving tunnel bore machine

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

[Road Paver] Road paving tunnel bore machine

by tbillion » Post

Hi yall from me in Tennessee!

I figured i would go ahead an put this out there to see what people think. I am working on a mod that will pave roads in straight lines through any terrain(including lava, and water). it uses the streets mod for the streets and paves a 3 block wide side walk on both sides of the street and then deploys one street lamp on either side at every 10 blocks. Its not done by any means but its functional. Started this thread for now just to keep track of the progress and share some screen shots.

THese first 4 screen shots are of the inventory aboard the machine @ 1000 cube depth. I ran it 5 times for a consumption of 2000 coal and earned all these resources plus paved a nice road.

Image
Image
Image
Image
Image

all of the coal minus the first 99 was mined in the process, no /giveme used. as you can see from the (pain in the butt because i had never done one before) formspec you can control the depth no matter what the amount of coal in the inventory is.

here is a picture of the pretty street

Image
Image

this code is based on all the other revisions of tbm on this site and i want to thank them for their hard work, as well as all the other modders hard work that makes this game possible!

things that are done:
Y Bores a 13x7 hole in any material in the default_game (and most other materials)
Y Emits its own light for long dark tunnels
Y stops at a preset distance
Y Huge internal inventory so you dont need to pick up all your stuff off the ground

To do :
Make bore and road size adjustable in formspec
make it lay walls and ceiling, but only when underground, or have option for stone glass exterior tunnel.
make ceiling/walls optional
add coal from inventory automatically (next)
make compatible with pipe works and embed pipe under ground to travel goods to a set place/ factory
if no pipeworks make it so with one click you can empty it into your inventory
make compatable with carts and lay track/ auto load and send cart (ambitious)
make it check that blocks are still cleared after it moves on (sweep up falling gravel or sand)(ambitious)

and i am open to more suggestions. so let me know.

Edit:11/28/2015
well i worked on a few thingws today mainly 3 additions to the fomr spec that allow you to take all the items in the inventory of the tbm or put all your items in the inventory of the tbm or delet all the items in the machine. now i am off to go and change the form so that you can control the width and height and then later ill make it so you can control the depth.

as always screen shots.

Image

after i get it to where it controls the height and width i am goint to make it so that lava doesnt invade the rodes any more.. for now i suppose i will just make it dam up the lava on the side of the road until i get it to build complete tunnels.

Image

no chance anyone would know how to node box a custom texture would they .. i have a texture but i dont know how to node box it.
Last edited by tbillion on Sat Nov 28, 2015 22:38, edited 1 time in total.

User avatar
SegFault22
Member
Posts: 872
Joined: Mon May 21, 2012 03:17
Location: NaN

Re: [Road Paver] Road paving tunnel bore machine

by SegFault22 » Post

This is awesome! This makes so much stuff possible, such as a mod like Railcraft; or even a frames mod which has block breakers and can be used to make "frame bores", "frame quarries", and the like. Now we just have to figure out how to make the bore machine into an entity that sticks to tracks properly (not like carts mod), and a way to link carts together so that they "follow" the bore machine, and a way to use connected carts for a place to input items or extract fuel/track, and possibly a way to send items through a tesseract to any other location in the world (such as a hub, where resources are stored and track/fuel is sent out)

I will most likely use a modified version of this with my server, when I get around to starting it.

User avatar
swordpaint12
Member
Posts: 191
Joined: Sat Aug 22, 2015 00:50
In-game: [swordpaint12][Belching_Balladeer]
Location: Foobass, isle of Atlantis, castle of Bardvendelle

Re: [Road Paver] Road paving tunnel bore machine

by swordpaint12 » Post

Cool! Will it eventually use different materials and different widths?
God's not dead; remember that!
Yay for MT! No MC here!
I am a human. I'm younger than 100 years old.
I've been playing Minetest since December 2014.

I'm amazed that I haven't been on here in so long! My latest minetest accomplishment was mining by hand (well, as close as you can get in a computer game) a circle 30 blocks in diameter. It took forever but it's pretty cool.

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by benrob0329 » Post

Boost_Carts is a much better version of carts, the original mod hasn't been updated in years...

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

@swordpaint12, yes i am working on the lua right now that will allow in the form spec 100x100x 100 block elimination on one abm pass (if you got the machine to handle it. however i am fighting nested tables in nested for loops and its quite frankly aggravating). but the end goal is to have direction bore size and paving material/bridge creation material all selectable within reason because formspecs are only so big, probably a side walk tile a road tile a road divider tile a light or lamp tile and a truss material(bridges) since i just started with form specs yester day, the only thing my form spec does at the moment is keep it on the map. it can move in one direction atleast 3x as fast as you can fly/fast.

hopefully i find a screen capyure program so i can show it in action. but with linux not sure i have many options.

roughly i am pretty sure i can make carts both follow and share inventory with the tbm as it is with out being an entity, it would work the same way as the tbm itself which creates a copy of itself moves all its crap and then destroys itself while the new one carries on in its place. all you do is tell the tbm to see if it has a cart behind it, and if it does store the node info and walla create and recreate as you go .. however if you seen the formspec storage is not a problem.. the only storage problem you will have is your inventory.

im not sure that telepoerting goods from this is a good idea or not. most of the mods that i haev dealt with on here that deal in teleport have issues moving items .. some people say they are great others argue they arent and im not sure im mature enough for all that.. lol. over the life of this mod though i want it to be able to interact with most of the mainstream mods.

right now i have a version that lays the mymineshaft mod.. and if you havent played with hthose blocks personally i think they are the best stand alone shaft application around together with my tbmmineshaft you can drill straigth down to 1000 in about 3 minutes and you dont have to worry about flying out of the hole.

i havent decided if i am gonna cram all the features into one mod pack or one mod. i have considered making a set and calling it Construction destruction.. lol. in the set i would put the my mineshafts tbm, the elevator tbm the paver tbm and the 3 others i have.

Image
Image

tjese screenshots are a few years old but i had originally creates a php file to manually create the offsets for the machine now i am hard coding it dynamically in lua. (and i hate lua) these screen shots arent even close to how big i made it today... but im working on it.

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

new formspec incorporating different slots for differnt material for different parts of the road/tunnel, a spot for sidewalk material tunnel wall material, cieling material, road material, road divider material, and lights. also formspec for number of blocks to excavate left and right and above below machine.. the above belo left right works .. now working on reconstructing the build part of the code

Image

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

resizeable roads and sidewalks


Image
Image

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: [Road Paver] Road paving tunnel bore machine

by DoyleChris » Post

Wonderfull

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

ok it needs a little help but i decided to take a break form putting in all the code and mess with these nodeblock deals and i used the original textures i came up with before node boxes were cool and used Rubenwardys' nodebox tool and finally i am close to what a "real" tunnel bore machine looks like in my mind, and since i grew up around caterpillar equipment of course it is going to be Cat yellow :)

Image
Image
Image
Image

the textures need to be tweaked pretty bad. when i originally put them together it was just sort of a demonstration in hopes someone would help out with better ones. but probably tommorrow i am going to start them again from scratch and line up all the images this time . that will make them work better when they come together, i have been seeing all the stuff done with mesh nodes and that seems like exactly what i need for the front cone or "drill bit" maybe in version 2 :(

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

ok heres a look at the new formspec. and a quick run through on the top left you have 6 spcaes for any type of fuel, i havent gotten to the coding for this but i think i am going to treat it like a furnace, if it "is fuel" it runs on it, but as a catch for any item that "is fuel" you only get one power for its entire consumption, coal is worth 5 and other sources yet to be added will be worth their power potential. example the power crystals in technic or a bucket of lava, or that plutonium from technic, fuel from the oil mod etc all will have different values. next to the fuel input are the materials you want to use to build after you bore the hole. first material is for the sidewalks (if any) second material is the "lane" material the third is for the "divider" (dotted line pavers) material, third is for tunnel wall material fourth is tunnel ceiling material, and the last is your illumination materials. the drop down box on the top allows you to specify where to put the lamps on the road, currently it is only configured for left right and both, but i will be adding the ability to use ceiling mounted lamps such as mesecons and glow blocks. the second drop down is the machines mode selection. currently it has the standard bore a hole mode, bridge mode tunnel mode, underwater tunnel mode, street mode, and multimode.multimode will eventually allow you to fill it up with materials and coal push the button and if it is on land it will build a street over air build a brigde and in a mountain build a tunnel all automatically. currently only street mode works. the NSEW buttons allow you to send it in a direction other than the direction it was placed when you set it down. then of course there depth height and width entry which all work. lamp spacing is one of the things that i am most proud of becasue ever since the beginning of this tool people have asked how you change the distance on the torches, alas no more need to ask :) and the final text entry allows you to change the width of the sidewalk.

Image

also i will be changing the formspec again in a little while to give it the ability to build 2 lane roads, 4 lane roads and 6 lane highways.

and a nice country road screen shot :)

Image

now i kinda want some input, should i make it so that the tbm computes the resources needed before it takes off and if it doesnt have enough tells the user or should i code it so that it uses what it has and then stops. I have already planned to reload the inventory slots from the main inventory if they are low since the main inventory is 72 slots, this will allow you to put your selection material in and then add more to the main inventory so the machine can reload itself. (i wish i had a bigger formspec :) )

just over 500 lines of code, hopeing to break 1000 by the time im done. lean nice tight code :)

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

Update:
ABM is gone, now on minetest.after method with interval set to 0, code execution is a bit faster and no more interruptions about abm took longer than 200ms so we are gonna pause that for a minute. :)

other than that i have been fighting the edge of map collision problems, sometimes it works sometimes it goes poof!

thanks to VanessaE i learned that the emerge area command emerges by map block coordinates and not node coordinates, what i get from this is before i was loading way too many map blocks taking away from my speed, so i slimmed it down, but still need to come up with an exact calculation on what mapblock i am in and what mapblock i am going to be in when mining is complete so i load only those map blocks.

picture time :) now it builds tunnels, effectively making tunnel mode functional...

Image

EDIT: now with class walled tunnels ...
Image

EDIT (again) and under water tunnels

Image
Image
Image

lighted underwater tunnel:
Image
Image
Image


im going to see if i cant fix the code to entirely remove the rest of the water form the tunnels right now it does a pretty good job but it is spotty at best.
Last edited by tbillion on Sat Dec 05, 2015 18:56, edited 1 time in total.

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Road Paver] Road paving tunnel bore machine

by twoelk » Post

this getting better and better!

btw could you add some controls to make it stop?
like if it hits a certain node such as water if I want to use a different bridge design than for the road
or some other type of road or building so nothing important gets destroyed.
Maybe one could point it at some other road and it stops when they connect.
or better even turn at a certain value to create ring-roads
or
or
droooool

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

the project road map is already in the work for radius turns, so i guess that would answer the thing about ring roads all you would need is 3 radius corners. it is also in the works to have an "auto" mode, kinda like my man ron popiel, set it and forget it that will make it auto pave a road when its on the ground a bridge when its in the air an underwater tunnel when its under water or a regular tunnel when its in a mountain.

controls to make it stop are already in the version i am using, it has the shaft depth on the form spec and since its a redneck contraption it stops when it runs out of fuel (like my truck when im broke lol)

i also had, like yourself envisioned it stopping at connecting roads. just havent gotten that far. right now im going to go code the bridge design. took an hour to fixe the stupid lamp placing algorithem, i messed it up a few days ago and just now fixed it correctly instead of my hacky patch.

bring on the suggestions though.

as for stopping when it hits a building, i think that would be hard since buildings are made from all materials, my building is not your building. given that i could make some sort of anchor, and when it hits the anchor it stops. but that will be later. my biggest issue right now is getting it to continue with out blowing up, disappearing, or other wise not working right when it hits ungenerated map blocks. the sub version i made for mymineshafts whill drill literally to the bottom of the map in a little under 8 minutes, you cant even fast fly to the bottom of the map in under 13, so i dont know what the hang up is. well i do , in the my mineshaft version (here:http://74.226.92.65/public_html/?q=file ... n=6mE-DbMx) only deals with 50 blocks below it in a one node column, loading the map chunks fast enough for that is no problem. where i get into trouble here is running a 13 node wide by 7 node high tunnel that is 1000 nodes long or longer, the mapgen either cant load the chunks fast enough, or im doing it wrong, and truthfully the latter is more accurate. i cant come up with an idea on how to emerge the exact amount of blocks i need. so i am probably emerging way to many map blocks at once.

things get really crazy around a 150 node wide by 100 node tall by 1000 nodes long ... it goes for about 500 then you get trapped in an invisible box then it seg faults :)

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

heres some shots of the basic lighted bridge. it built this span of 300 nodes in 35 seconds.

Image
Image
Image
Image

im gonna see if i can make two more bridge types, one like this :
Image
and the other like this:
Image
and if i get those done the piest la resistance will be bothe a golden gate bridge and bay bridge replicas. (since im originally form the S.F. Bay Area :) )

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by benrob0329 » Post

Is there no download link yet?

(yes, I read the OP)

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

nope, currently working on the bridges once the typeselect is complete i will put up a link so people can try it out.

Image
Image
Image
Image

hopefully when i am done the this bridge will look something like this:

Image
Image
Image

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

so yesterday for those that dont know i taught myself blender. in about 16 hours. im not a pro or anything like that bu i think i got the hang of this. as proof of concept i am redesigning the TBM today, also i may drop calling the mod TBM at all and break its funtions down into several machines. with my new skills i can actually design real machines. if this first trial runs out i think i am going to build a road builder, a street sweeper (for falling gravel), a bull dozer (to strictly level land), and of course the tunnel machine/ auto miner.

i aslo have an idea on how to make it not glitchy to where you can walk through it becasue my machines are about 3xx3x3 and look pretty cool in the game. a mesh node cant have node boxed but a node box can, so if on place the machine spons a node box nodebehind it and the node box node encapules the machine you wouldnt be able to walk through it. thus , making a giant box. then when the machine updates itself and moves it also moves its nodebox node with it. tada!

anyway heres some prelim pix and i will get back to it :) what do you think the good and the bad :)

Image
Image

SELFIE!!!

Image

ps: it was posed to me on the irc to make the machines drivable, i may have solved how to make it drivable have a trunk and creat/destroy things... yay me ...

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by Nathan.S » Post

You can define a collision box for a mesh object, the collision box can be larger than one node, I've done it for meshes that I've created for some of my mods, never had any problems with it. The collision box uses the exact same format as a nodebox would, but you define it as collision_box rather than node_box.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

thanks nathan i seen that about 10 minutes after i posted. problem is it creates a box but i can still walk through it.. both collision and , what sthe other one where you can destroy it .. ill look it up . any way i used that nodebox editor from Rubenwardy and made a bigger box but like i say i can still walk through it.. i must have missed something . well its getting close to my final hours in this 48 hour period. but i finally got the textures done.

im not to happy about them because i didnt know you could have more than one UV unwrap per obj until about 15 minutes ago. and by then i was most of the way done. Dont get me wrong to me this looks good, its still boxy enough to be mine test but its cool ain a few different ways. after my sleep cyle i will probably get back to work on the code for it and the sign CNC, it was a good little creative break though. heres some results.

Image
Image
Image
Image

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by Nathan.S » Post

Those pictures do look really good, on small thing though, you might want to remove the lines from the UV map, not sure what method you employed to make the textures, but if you had the UV map as one layer you may just need to turn it's visibility off. A little dirt and AO could also bring a lot to the model. I've been using Blender for years, so if you have any questions don't hesitate to ask me.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

just becasue im not excatly hip to the lingo yet what is AO? i thought about dirt but im not exactly sure how to best impliment that. if you want i can put the files on git hub you could take a look and modify to show what you mean if your not too busy i know most people have real lives. :)

i didnt think about using the UV map as a layer in photo shop until i was done and filling in the little stuff. from now on though i will be doing that.

in blender is there any way to increase the area of a uv map or is it WYSIWYG?

anyone who could help with this collision box thing would be appreciated... the box shows up but its very ineffective

Image

Code: Select all

local short_pyr_cbox = {
	type = "fixed",
	fixed = {{-3.5, -0.5, -2.5, 3.5, 3.5, 2.5}}}

minetest.register_node("tbmmodeltest:bigtbm", {
	description = "CNC to make signs",
	drawtype = "mesh",
	tiles = { "tbm6.png" },
	mesh = "tbmmodeltest.obj",
	inventory_image = "default_cobble.png",
	paramtype = "light",
	groups = {choppy=2,dig_immediate=2},
	selection_box = short_pyr_cbox,
	collision_box = short_pyr_cbox
})
or is it that i have to define each box? im going to go try defining each box right now... but if that doesnt work i may need some pointing in the right direction..

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by Nathan.S » Post

Your code for the collision box seems fine, that will only effect players and mobs, you can still place other nodes within that collision area, collisions only effect entities, not nodes in the world.

AO is short for Ambient Occlusion, which is just a calculation done by Blender to determine how much light should be hitting parts of the model, so for example crevices would get shaded darker, and that parts inside of the tread, it's little stuff, but makes things look a bit more realistic.

I do have a lot of things going on, but I'm sure I could find some time to take a look at the model if you put it on Github and I could make some small changes and you could see if you like them or not. I can even send you the layer source files, though I'm not sure what format Photoshop would import that Gimp will export that will keep layers.

I'm not entirely sure what you mean about increasing the size of the UV mapping, when you create the blank texture to unwrap onto you can make that any size you want, and when you export the UV map as an image you get the options of setting the texture size to anything you want, so if that is what you mean, just scaling the entire texture size yes. If you are meaning scaling a part of the mapping larger that can be done as well.

This video I recorded will probably do a better job of explaining UV mapping than I can do trying to explain it all with words.
https://www.youtube.com/watch?v=HFir6i1M9oI
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

been away for a day or so, figure id come back with some pictures and a few thoughts.

i realize this is a game and its not a game based on realism, however in reality all of the funtions that i am trying to pack into this one machine would be done by multiple machines, therefore so i can keep the code small and tidy as well as versatile i am deciding to split this into a mod pack of construction machines. based on this i present the road paver. :)

i was going to scale it down but after finding out that my little guy fits in the cabin just nicely i think i am going to leave it this big for the eventual future that i make them driivable. and plus 1 point for realizm the machines that do this are several (humans) tall and large.

Image
Image
Image
Image


nathan : i may be jacking up the AO by aiming 8 spotlights at the model so i can see the textures huh? i didnt know that filtered down. lemme get a few more days in i want to fix the TBM now that i have a decent handle on what i am doing, learned how to merge loops and all that today, some things are trickier than others. also came up with a way to color it in photoshop without all of the little line breaks, and still use the lines as guides.

now im off to make the mine shaft machine, the bull dozer, the dump truck and elevator machine. then ill spend next few days coding them all. i think i have opened a can of worms, i love this blender (i think i like blender more than code )

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by Nathan.S » Post

I don't think lights in the scene are taken into account for the AO, but don't quote me on that. A few sun lamps might work better than spotlights. Also try changing between material and texture shading to see your textures better.
I've got to say it is looking really good, using the cat logo might be a bad idea though, as it is trademarked.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Post

i was just getting the idea across with the cat logo for now, i am going to come up with some sort of simple variation of the minetest logo... i tired the suns and they still left dark spots and when you are dealing with color by numbers that have a few hundred pieces i dont want to miss one because it was supposed to be black but actually it was empty lol.

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests