[mod] Bike for Minetest [1.2.2] [bike]

gpcf
Member
Posts: 382
Joined: Fri May 27, 2016 10:48
GitHub: gpcf
In-game: gabriel

Re: [mod] Bike for Minetest [1.1.1] [bike]

by gpcf » Post

Also, we need some tools to break open the locks, that might send you to jail if you get caught (with some random chance component).

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [mod] Bike for Minetest [1.1.1] [bike]

by Hume2 » Post

voxelproof wrote:what about improving physics of the bike movement i.e. adding gravitational acceleration/deceleration?
When I saw the code last time, i got the impression that GreenDimond has already implemented such feature. I'll look again and see what I can do.
GreenDimond wrote: Next on my todo list is bike racks/locks if Hume isn't already working on it.
After I do that I will mess around with the physics and see what I can do.
I thought, I'll work on this after I test the bikes a little and have some time. However, if you are willing to do that, you are welcome.
If you lack the reality, go on a trip or find a job.

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: [mod] Bike for Minetest [1.1.1] [bike]

by GreenXenith » Post

Hume2 wrote:
voxelproof wrote:what about improving physics of the bike movement i.e. adding gravitational acceleration/deceleration?
When I saw the code last time, i got the impression that GreenDimond has already implemented such feature. I'll look again and see what I can do.
The only thing I added physics-wise was sudden-stop detection. Which includes step-up detection to avoid glitches, but none of this is related to the physics stuff voxel wants.
GreenDimond wrote: Next on my todo list is bike racks/locks if Hume isn't already working on it.
After I do that I will mess around with the physics and see what I can do.
I thought, I'll work on this after I test the bikes a little and have some time. However, if you are willing to do that, you are welcome.
By all means, go ahead! (its your mod :P)
My ideas were: Bike rack is a singular node that can hold one bike. So you can put a few together to make a bigger rack. Bikes placed on a rack would only be able to be taken by the placer. However, there are some interaction problems (ownership, who can dig what, public racks) that I havent solved yet.
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

User avatar
Lone_Wolf
Member
Posts: 2575
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [mod] Bike for Minetest [1.1.1] [bike]

by Lone_Wolf » Post

GreenDimond wrote:
Hume2 wrote:
voxelproof wrote:what about improving physics of the bike movement i.e. adding gravitational acceleration/deceleration?
When I saw the code last time, i got the impression that GreenDimond has already implemented such feature. I'll look again and see what I can do.
The only thing I added physics-wise was sudden-stop detection. Which includes step-up detection to avoid glitches, but none of this is related to the physics stuff voxel wants.
GreenDimond wrote: Next on my todo list is bike racks/locks if Hume isn't already working on it.
After I do that I will mess around with the physics and see what I can do.
I thought, I'll work on this after I test the bikes a little and have some time. However, if you are willing to do that, you are welcome.
By all means, go ahead! (its your mod :P)
My ideas were: Bike rack is a singular node that can hold one bike. So you can put a few together to make a bigger rack. Bikes placed on a rack would only be able to be taken by the placer. However, there are some interaction problems (ownership, who can dig what, public racks) that I havent solved yet.
Do the racks like chests, locked and regular
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [mod] Bike for Minetest [1.1.1] [bike]

by voxelproof » Post

GreenDimond wrote:
Hume2 wrote:
voxelproof wrote:what about improving physics of the bike movement i.e. adding gravitational acceleration/deceleration?
When I saw the code last time, i got the impression that GreenDimond has already implemented such feature. I'll look again and see what I can do.
The only thing I added physics-wise was sudden-stop detection. Which includes step-up detection to avoid glitches, but none of this is related to the physics stuff voxel wants.
I've worked out a simple pseudo-code for skis. I think it may work also for bikes. The idea is not to make it a very realistic model of physics neither modelling the surfaces' curvature, but by simple trick simulating the behaviour of the object so that it would resemble real features of movement -- just checking whether the player's character decreased it's y coordinate and then adding about 5% to the current velocity (it should be tweaked so that the speed increases slightly in spite of friction).
To miss the joy is to miss all. Robert Louis Stevenson

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [mod] Bike for Minetest [1.1.1] [bike]

by voxelproof » Post

I've checked out the newest version. Well done :) Bike goes smoothly, it's nicely steerable, the game doesn't crash anymore. And I think that adding gravitational acceleration, however it would make the play harder and maybe more funny, isn't so important when a player can switch into auto-key "W". Thanks a lot, excellent mod, my favourite :)

EDIT: and most importantly, now the bike can be picked up from the bottom of a stream :D

Image
Attachments
bike.jpg
bike.jpg (62.97 KiB) Viewed 1435 times
To miss the joy is to miss all. Robert Louis Stevenson

User avatar
maxx
Member
Posts: 44
Joined: Thu Feb 15, 2018 15:24
GitHub: maxhipp
In-game: maxx or max
Location: Germany | Bavaria

Re: [mod] Bike for Minetest [1.1.1] [bike]

by maxx » Post

What about an extension?
Roadbikes run faster on ground like stone but not that fast on dirt.
Mountainbikes run faster on dirt, gravel and sand but are slower on stone.
Stay safe! | Don't forget the planet

neoh4x0r
Member
Posts: 82
Joined: Wed Aug 29, 2018 20:16
GitHub: neoh4x0r

Re: [mod] Bike for Minetest [1.1.1] [bike]

by neoh4x0r » Post

GreenDimond wrote:The latest update now includes a "bike painter" tool.
This allows you to choose any of 4.2 billion colors to paint your bikes :D
Actually the alpha value is the opacity of the color (how transparent or opaque the color is).
There are actually only 17 million possible color combinations (RGB).

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

Re: [mod] Bike for Minetest [1.1.1] [bike]

by Lord_Vlad » Post

Goes really well with [the_lower_road]

Gibeinumo
Member
Posts: 30
Joined: Tue Oct 23, 2018 07:19

Re: [mod] Bike for Minetest [1.1.1] [bike]

by Gibeinumo » Post

I really like the bike and made textures to make it fit to my texture pack. I noticed that you don't use "bike_" as a prefix for all textures of this mod. I created a merge request with changed names on gitlab.

rgspro
Member
Posts: 99
Joined: Fri Jan 27, 2017 07:13

Re: [mod] Bike for Minetest [1.1.1] [bike]

by rgspro » Post

Love this Mod! However, I tried the unstable version with the painter option and get the following errors,

2018-12-13 15:41:19: INFO[Main]: Irrlicht: Loaded mesh: bike.b3d
2018-12-13 15:41:19: ERROR[Main]: Invalid color: ""
2018-12-13 15:41:19: ERROR[Main]: generateImage(): Failed to generate "[colorize::"
2018-12-13 15:41:19: INFO[Main]: GenericCAO: Got init data
2018-12-13 15:41:19: INFO[Main]: ClientEnvironment::addActiveObject(): added (id=176)


These errors only happen when the Bike mod is used with Dreambuilder Mod. I have tried to narrow down the conflicting mod in Dreambuilder but have not found it yet. The only errors in the debug file are above. The Bike mod does work great as long as Dreambuilder is not active. The form for the paint tool opens and the sliders move but the values do not change. The stable Bike mod works great with Dreambuilder active.

My question is has anyone else run into this and what did anyone find to correct it?

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [mod] Bike for Minetest [1.1.1] [bike]

by Fixer » Post

Can I go up with it? (full block up)

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [mod] Bike for Minetest [1.1.1] [bike]

by Sokomine » Post

I've seen this mod in action on the Gallifrey server. The mod works very nice, and the bike has a very good animation. Well done!
A list of my mods can be found here.

User avatar
AleksSyntek
Member
Posts: 30
Joined: Sat Jun 17, 2017 18:01
GitHub: AleksSyntek
IRC: Aleks
In-game: Aleks
Location: Argentina
Contact:

Re: [mod] Bike for Minetest [1.1.1] [bike]

by AleksSyntek » Post

Yeah! Now I can do a bicycle race! (viewtopic.php?p=311476#p311476)

Thanks Hume2, GreenDimond an gpcf for this mod!!!
Crash happens.

saif2008
New member
Posts: 1
Joined: Fri Feb 28, 2020 11:47

Re: [mod] Bike for Minetest [1.1.1] [bike]

by saif2008 » Post

Hume2 wrote:Hello everyone!
Image

I created a mod that adds bikes. Bikes are about 25 km/h fast but have one disadvantage: Bikes can climb 0.5 blocks maximum and don't ride fast on dirt and sand, so you have to build a road first and then you can ride.

Click the bike to get on, sneak to get off. W/D to accelerate/deccelerate, A/D to turn left/right. Press space to wheely. As you might know, bikes usually don't ride backwards. This bike doesn't ride backwards too. And it rides slowly on crumbly materials and very slowly in water. You can carry up to one bike at once. If you try to pick up another bike, you get 6 steel ingots instead.

Crafting:
Spoiler
W = wood, I = iron
Bike wheels:
...W...
W I W
...W...
If you have the mod "technic" installed, use rubber instead of wood.

Bike handles:
W = wood, I = iron
I . I . I
W...W

Bike
W = wood, I = iron, h = handles, w = wheel
h ...W
I . I . I
w ... w
The mod is derived from MTG's boat mod.
License: MIT
Dependencies: default

changelog:
Spoiler
Version 1.1.1
  • 3D Armour mod is now supported correctly.
  • Bikes are now always placed to the player's position, not the pointed position. Former behaviour allowed the players to get to places normally unaccessible because of his long hands.
Version 1.1
  • Bikes are dismounted by sneak key.
  • Added bike and player animation.
  • Bikes ride slowly on crumbly materials.
  • Bikes can be now picked up unless the player already has one bike in his inventory.
  • Press jump to wheely.
  • Limit speed to approximately 25 km/h.
Version 1.0 is initial version.
Special thanks to:
  • GreenDimond for bike animation and many other improvements
  • gpcf for testing and good ideas
Download:

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [mod] Bike for Minetest [1.1.1] [bike]

by Hume2 » Post

maxx wrote:
Sun Nov 18, 2018 19:02
What about an extension?
Roadbikes run faster on ground like stone but not that fast on dirt.
Mountainbikes run faster on dirt, gravel and sand but are slower on stone.
It would be nice to create an API to register arbitrary bikes but it's a lot of annoying work. Maybe I will do it in the future.
rgspro wrote:
Fri Dec 14, 2018 01:55
Love this Mod! However, I tried the unstable version with the painter option and get the following errors,
I can't reproduce it in the latest version. Maybe I've already fixed it.
Fixer wrote:
Sat Jan 05, 2019 18:37
Can I go up with it? (full block up)
You can go only a half block up. So put there stairs or slabs. I recomend using the slopes from the mod moreblocks.

I noticed that I didn't release the bike painter in any stable release yet. So I made release 1.1.2.
If you lack the reality, go on a trip or find a job.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [mod] Bike for Minetest [1.2.1] [bike]

by runs » Post

Hi, your mod collision with Petz. When Minetest shutdown, an error.

It is cause:

Code: Select all

-- Dismount all players on server shutdown
minetest.register_on_shutdown(function()
	for _, e in pairs(minetest.luaentities) do
		if (e.driver ~= nil) then
			dismount_player(e, true)
		end
	end
end)
You should not search for all the "driver" coincidences in all the entities of the game, only for bikes:

Code: Select all

-- Dismount all players on server shutdown
minetest.register_on_shutdown(function()
	for _, e in pairs(minetest.luaentities) do
		if (e.name =="bike:bike") and (e.driver ~= nil) then
			dismount_player(e, true)
		end
	end
end)

Petz use the driver property "driver" in its entities, so your mod acts over the petz mobs.

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [mod] Bike for Minetest [1.2.1] [bike]

by Hume2 » Post

runs wrote:
Tue Jul 20, 2021 17:13
Hi, your mod collision with Petz. When Minetest shutdown, an error.
Do you have the latest version 1.2.1?
If you lack the reality, go on a trip or find a job.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [mod] Bike for Minetest [1.2.1] [bike]

by runs » Post

Hume2 wrote:
Fri Jul 23, 2021 18:01
runs wrote:
Tue Jul 20, 2021 17:13
Hi, your mod collision with Petz. When Minetest shutdown, an error.
Do you have the latest version 1.2.1?
I don't know :-/ I will check.

deelite
Member
Posts: 12
Joined: Sun Feb 20, 2022 12:43

Re: [mod] Bike for Minetest [1.2.1] [bike]

by deelite » Post

A great mod for us as bike fans. But: how to get off the bike?

User avatar
Blockhead
Member
Posts: 1602
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [mod] Bike for Minetest [1.2.1] [bike]

by Blockhead » Post

deelite wrote:
Sat Mar 12, 2022 16:00
A great mod for us as bike fans. But: how to get off the bike?
Hold Sneak (default: Shift). Also, when falling six nodes or more you will stack the bike and take fall damage for any further distance fallen, but not the first six nodes, since both you and your bike will have your speed reset to 0. This info should definitely be in the manual, it's confusing to most new players.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests