[Mod] Gears and axles [gear3d] [0.2] [WIP]
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
Indeed, my love of steampunk was my main inspiration for this. That is exactly what I meant by also exploring the early industrial revolution.sorcerykid wrote:Wait, what about steampunk? I mean heck, the mod is even called "gears and axles" :P
There are already so many automation mods catering to the cyberpunk aesthetic. Steampunk would be an excellent alternative for games that are set within a pre-industrial civilization (such as the Victorian or late Medieval ages) but could benefit from machinery. Just an idea!
You are quite right to point out that these models are relatively large in terms of polys, however, they are nothing really that far out of the ordinary for other non-voxely games. I don’t really see any impact on framerate with my pc, even with my demo setup, your gpu should be sensible enough to not render the transparent faces. I do see a slight drop on my phone but certainly no more so than a dense forest or jungle.v-rob wrote:This mod is turning out wonderfully, but, although it bypasses server-side lag with entities, it induces client-side lag due to the sheer number of polygons there are, even though they are invisible. Placing down just a few belts and gears causes noticeable framerate drop, and placing a lot causes framerates >=10 for me.
You could try enabling wireframe mode, it should look something like this:
Yeah, I realize the chains are rather awkward to line up correctly with the basic screwdriver but I also found that a reversed chain is also needed in some cases. I have just pushed a fix though because of the naming convention it will break existing builds, my own included :(ShadMOrdre wrote: One thing I've noticed is that the chain and the 90degree gears animations are a little out of synch. If you make a square chain, with 4 sprockets at the corners, you should see what I mean.
As for the backend mechanics, I think a simple pass through logic would work. What I mean here is, instead of trying to implement the depth of elepower or tubelib, simply provide an on/off kind of logic. I component A is connected to component B, and B is on, then A is on. A right click on a break switch to either allow the sail to turn in the wind or to stop it, and everything connected in between then is either on or off.
It could also be due to the fact that all repeating animations can get out of sync in MT at what appears to be mapblock and/or chunk boundaries. I seem to recall some issue for this but can’t seem to locate it, I can maybe have a shot at fixing it unless there is some reason why this may be non-trivial.
Your idea for the backend sounds like exactly the sort of thing I’m after, although I would also like to include the possibility of reversal for some items, you’ve definitely given me some ideas there, thanks!
That is even more WIP than this but I promise I will publish what I’ve got once MT 5.0.0 is finally released, just to celebrate =)ShadMOrdre wrote:PS. When do we get to see the plane available?
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
stu,
So I wrote this, based on your release from yesterday.
All this currently does, is allow a LMB punch to trigger forward motion, a RMB use to trigger reverse animation, and to stop either motion. Ideally, a sneak RMB to change direction state, and RMB to initiate action. I'm a little distracted today, but I'd like to help. On/off, but this should be with a "brake" node (the switch) somewhere, for realism.
I'm not yet sure how best to implement the power part, transferring power between nodes. Fluid_lib gives me ideas to get started, but this might be for someone else with better skills.
So I wrote this, based on your release from yesterday.
Spoiler
Code: Select all
lib_gear = {}
minetest.register_node("lib_gear:sprocket_on", {
description = "Sprocket On",
drawtype = "mesh",
mesh = "gear3d_sprocket.obj",
tiles = {
{
name = "gear3d_sprocket_fwd.png",
animation = {
type = "vertical_frames",
aspect_w = 192,
aspect_h = 30,
length = 1,
},
},
},
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.75, -0.75, -0.25, 0.75, 0.75, 0.25},
},
groups = {choppy=2, oddly_breakable_by_hand=1},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.swap_node( pos, {name = "lib_gear:sprocket_off", param1 = node.param1, param2 = node.param2} );
end,
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then
return itemstack
end
local p0 = pointed_thing.under
local p1 = pointed_thing.above
local param2 = 0
local placer_pos = placer:getpos()
if placer_pos then
local dir = {
x = p1.x - placer_pos.x,
y = p1.y - placer_pos.y,
z = p1.z - placer_pos.z
}
param2 = minetest.dir_to_facedir(dir)
end
if p0.y-1 == p1.y then
param2 = param2 + 20
if param2 == 21 then
param2 = 23
elseif param2 == 23 then
param2 = 21
end
end
return minetest.item_place(itemstack, placer, pointed_thing, param2)
end,
})
minetest.register_node("lib_gear:sprocket_on_rev", {
description = "Sprocket On Reversed",
drawtype = "mesh",
mesh = "gear3d_sprocket.obj",
tiles = {
{
name = "gear3d_sprocket_rev.png",
animation = {
type = "vertical_frames",
aspect_w = 192,
aspect_h = 30,
length = 1,
},
},
},
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.75, -0.75, -0.25, 0.75, 0.75, 0.25},
},
groups = {choppy=2, oddly_breakable_by_hand=1},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.swap_node( pos, {name = "lib_gear:sprocket_off", param1 = node.param1, param2 = node.param2} );
end,
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then
return itemstack
end
local p0 = pointed_thing.under
local p1 = pointed_thing.above
local param2 = 0
local placer_pos = placer:getpos()
if placer_pos then
local dir = {
x = p1.x - placer_pos.x,
y = p1.y - placer_pos.y,
z = p1.z - placer_pos.z
}
param2 = minetest.dir_to_facedir(dir)
end
if p0.y-1 == p1.y then
param2 = param2 + 20
if param2 == 21 then
param2 = 23
elseif param2 == 23 then
param2 = 21
end
end
return minetest.item_place(itemstack, placer, pointed_thing, param2)
end,
})
minetest.register_node("lib_gear:sprocket_off", {
description = "Sprocket Off",
drawtype = "mesh",
mesh = "gear3d_sprocket.obj",
tiles = { "gear3d_sprocket_fwd.png^[verticalframe:12:0", },
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.75, -0.75, -0.25, 0.75, 0.75, 0.25},
},
groups = {choppy=2, oddly_breakable_by_hand=1},
on_punch = function(pos, node, puncher, pointed_thing)
minetest.swap_node( pos, {name = "lib_gear:sprocket_on", param1 = node.param1, param2 = node.param2} );
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.swap_node( pos, {name = "lib_gear:sprocket_on_rev", param1 = node.param1, param2 = node.param2} );
-- if clicker:get_player_control().sneak then
-- minetest.swap_node( pos, {name = "lib_gear:sprocket_on_rev", param1 = node.param1, param2 = node.param2} );
-- else
-- minetest.swap_node( pos, {name = "lib_gear:sprocket_on", param1 = node.param1, param2 = node.param2} );
-- end
end,
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then
return itemstack
end
local p0 = pointed_thing.under
local p1 = pointed_thing.above
local param2 = 0
local placer_pos = placer:getpos()
if placer_pos then
local dir = {
x = p1.x - placer_pos.x,
y = p1.y - placer_pos.y,
z = p1.z - placer_pos.z
}
param2 = minetest.dir_to_facedir(dir)
end
if p0.y-1 == p1.y then
param2 = param2 + 20
if param2 == 21 then
param2 = 23
elseif param2 == 23 then
param2 = 21
end
end
return minetest.item_place(itemstack, placer, pointed_thing, param2)
end,
})
I'm not yet sure how best to implement the power part, transferring power between nodes. Fluid_lib gives me ideas to get started, but this might be for someone else with better skills.
- v-rob
- Developer
- Posts: 971
- Joined: Thu Mar 24, 2016 03:19
- GitHub: v-rob
- IRC: v-rob
- Location: Right behind you.
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
Well, I just realized that my laptop gives me an average of 40 fps during normal play :-o. I hadn't actually noticed that before, and it's not particularly old. Anyway, for me, if I place a 4x4 grid of millstone rollers, I will achieve a wonderful 20 fps. It drops to 10 if I stand in the middle of them. Maybe my GPU is stupid after all :-(stu wrote:You are quite right to point out that these models are relatively large in terms of polys, however, they are nothing really that far out of the ordinary for other non-voxely games. I don’t really see any impact on framerate with my pc, even with my demo setup, your gpu should be sensible enough to not render the transparent faces. I do see a slight drop on my phone but certainly no more so than a dense forest or jungle.
- Attachments
-
- screenshot_20190302_163813.png (917.95 KiB) Viewed 1407 times
- GreenXenith
- Member
- Posts: 1356
- Joined: Wed Oct 28, 2015 01:26
- GitHub: GreenXenith
- Location: UTC-8:00
- Contact:
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
Mine must be too. With a 7x7 array of mill stones I get 15FPS while standing in the middle, whilst I get ~300FPS elsewhere. I have a GeForce GT 710.v-rob wrote:Well, I just realized that my laptop gives me an average of 40 fps during normal play :-o. I hadn't actually noticed that before, and it's not particularly old. Anyway, for me, if I place a 4x4 grid of millstone rollers, I will achieve a wonderful 20 fps. It drops to 10 if I stand in the middle of them. Maybe my GPU is stupid after all :-(stu wrote:You are quite right to point out that these models are relatively large in terms of polys, however, they are nothing really that far out of the ordinary for other non-voxely games. I don’t really see any impact on framerate with my pc, even with my demo setup, your gpu should be sensible enough to not render the transparent faces. I do see a slight drop on my phone but certainly no more so than a dense forest or jungle.
Image
YouTube | Mods | Patreon | Minetest Discord @greenxenith
You should not be able to read this message.
You should not be able to read this message.
- Desour
- Member
- Posts: 1472
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
What is your fps_max setting set to?!GreenDimond wrote:whilst I get ~300FPS elsewhere
As far as I know, invisible faces are rendered, too:stu wrote:your gpu should be sensible enough to not render the transparent faces
Probably it would help if the animation was less smooth.[url=https://github.com/minetest-mods/mesecons/pull/321#issuecomment-280465587]here[/url] numberZero wrote:transparent polygons seem to affect FPS just like opaque ones.
Currently there are 24 steps per full turn and 1/12 second per step. This means for a gear with the radius of a half node (and ergo the diameter of a whole node) that the most outer part of the gear jumps pi/24 = 0.13 nodelengths twelve times in a second. Imo 3 times in a second would perhaps even be enough, it doesn't have to be so smooth.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
Thanks, that looks like a good starting point, I will try to include some basic functionality like this as soon as get I some of my older mods updated for the MT 5.0.0 release.ShadMOrdre wrote:stu,
So I wrote this, based on your release from yesterday.
All this currently does, is allow a LMB punch to trigger forward motion, a RMB use to trigger reverse animation, and to stop either motion. Ideally, a sneak RMB to change direction state, and RMB to initiate action. I'm a little distracted today, but I'd like to help. On/off, but this should be with a "brake" node (the switch) somewhere, for realism.
I'm not yet sure how best to implement the power part, transferring power between nodes. Fluid_lib gives me ideas to get started, but this might be for someone else with better skills.
I fully accept that setups like that are going to affect framerates on lower end devices, however, I do not think this is a very fair test. There are plenty of other mods/objects that can bust your fps if you go OTT with them :P Eventually, you won’t be able to place these in such close proximity, nor will you be able to clip through them as you can now.GreenDimond wrote:Mine must be too. With a 7x7 array of mill stones I get 15FPS while standing in the middle, whilst I get ~300FPS elsewhere. I have a GeForce GT 710.v-rob wrote:Well, I just realized that my laptop gives me an average of 40 fps during normal play :-o. I hadn't actually noticed that before, and it's not particularly old. Anyway, for me, if I place a 4x4 grid of millstone rollers, I will achieve a wonderful 20 fps. It drops to 10 if I stand in the middle of them. Maybe my GPU is stupid after all :-(stu wrote:You are quite right to point out that these models are relatively large in terms of polys, however, they are nothing really that far out of the ordinary for other non-voxely games. I don’t really see any impact on framerate with my pc, even with my demo setup, your gpu should be sensible enough to not render the transparent faces. I do see a slight drop on my phone but certainly no more so than a dense forest or jungle.
I would not doubt numberZero (or yourself) I was mostly just going off what I see in wireframe mode. My fps is locked to vsync so it’s hard to say exactly, my pc is really nothing that special nowadays, It was a half decent gaming pc once but is now over 7 years old!DS-minetest wrote:[url=https://github.com/minetest-mods/mesecons/pull/321#issuecomment-280465587]here[/url] numberZero wrote:transparent polygons seem to affect FPS just like opaque ones.
This is certainly an option if framerate does prove to be a genuine problem. I think I could at least half the poly-count of most objects without losing too much realism. The file sizes can be reduced significantly by using a binary format like b3d, I will do this once I clean up and release the master .blend files for them.DS-minetest wrote:Probably it would help if the animation was less smooth.
-
- Member
- Posts: 186
- Joined: Sat May 06, 2017 17:45
- GitHub: Parasitoid
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
Wow! It looks pretty cool!
But placement of all these individual elements to make a complex structure is not so easy ;)
But placement of all these individual elements to make a complex structure is not so easy ;)
-
- Member
- Posts: 48
- Joined: Fri Mar 26, 2021 02:08
- In-game: BagoCheese
- Location: why do you care?
- Contact:
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
I build a lot of steampunk-themed things, and this is perfect! Love it
You know the rules and so do I, SAY GOODBYE
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
Perhaps some conveyor belt parts?
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP
-
- Member
- Posts: 307
- Joined: Wed Apr 21, 2021 03:05
- GitHub: tigercoding56
- In-game: bm5 or bemo5 also sell_her_on55
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
maibe someone could make this techage compatible (like the gearboxes at ta2 )
this is a signature not a place to post messages also if i could change my username i would change it to sell_her_on55
- loppi
- Member
- Posts: 162
- Joined: Sat May 29, 2021 11:30
- In-game: loppi Lolstadt
- Location: Niedersachsen,Germany
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
nice mod! good for industrial decorations! :-D
"ich liebe industrie!" And yes, its a Russian Bulldozer 😁
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
Is there any progress during these last two years? I see the last commit on the github repo was on April 3rd 2019.
- loppi
- Member
- Posts: 162
- Joined: Sat May 29, 2021 11:30
- In-game: loppi Lolstadt
- Location: Niedersachsen,Germany
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
techage has it own watermill now :)
just saw it yesterday!
"ich liebe industrie!" And yes, its a Russian Bulldozer 😁
-
- Member
- Posts: 307
- Joined: Wed Apr 21, 2021 03:05
- GitHub: tigercoding56
- In-game: bm5 or bemo5 also sell_her_on55
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
yay =) after i asked you how to build it ( im bm5 on techage survival btw) i eventually figured out and it now works
this is a signature not a place to post messages also if i could change my username i would change it to sell_her_on55
- loppi
- Member
- Posts: 162
- Joined: Sat May 29, 2021 11:30
- In-game: loppi Lolstadt
- Location: Niedersachsen,Germany
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
cool,it can power a mill and you can grind wheat with it,its really nice.
"ich liebe industrie!" And yes, its a Russian Bulldozer 😁
- loppi
- Member
- Posts: 162
- Joined: Sat May 29, 2021 11:30
- In-game: loppi Lolstadt
- Location: Niedersachsen,Germany
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
"ich liebe industrie!" And yes, its a Russian Bulldozer 😁
- Midnight
- Member
- Posts: 172
- Joined: Sun Dec 19, 2021 13:56
- GitHub: MidnightPhantom
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
Well, can anyone combine this mod with a power generator mod?
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
I have started work on it, see viewtopic.php?f=9&t=28379&hilit=gear3d or https://github.com/sfence/gear3d .
But my blender skills are not good enough to make models of broken parts. I need damaged parts models and textures to work with connected gear parts turning in the opposite way.
cdb_3P0AYqjEIn68
- Midnight
- Member
- Posts: 172
- Joined: Sun Dec 19, 2021 13:56
- GitHub: MidnightPhantom
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
Well I like that it still runs today lol.
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
is this create's birthplace (minecraft heritage site
- Blockhead
- Member
- Posts: 1681
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]
No this is a forum for the C++ game Minetest, which is not related to the code of any Minecraft edition. This mod is not really related to the Craft mod for Minecraft.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
Who is online
Users browsing this forum: Google [Bot] and 20 guests