[Mod] Car extension for StreetsMod (ALPHA)[cars]

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

[Mod] Car extension for StreetsMod (ALPHA)[cars]

by webdesigner97 » Fri Oct 18, 2013 09:36

Please note: This mod is abandoned. A new project ("vehicles") has been created @GitHub

Hello everyone,
although there are already some car mods, I release the indev version of my very own one. It does not base on other mods, like boats or hovercraft; it was coded completely by me.
Using melkor's car01 model, it focusses on realistic physical behaviour. Well, at least it will do this one day (it isn't perfect yet). The goal is to improve them step by step and once the mod works well, it will be added to my StreetsMod.

Spawn the car using /spawnentity streets:melcar

Licenses:
./models : CC-BY-NC-SA
Code: CC-BY-SA

Download:
Github Repo
Download zip from GitHub

Image
Two Melcars meeting at an intersection

Image
Driver's perspective

The cars:



Melcar:
Image
Maximimum speed: 35 n/s = 126 kn/h (nodes/second; kilonodes/hour)
Acceleration Factor: 6.25
Deceleration Factor: 4.5
BrakeFactor: 9
Stepheight: 0.5
Gears: automatic (N, D (R)) <- not yet available

[u]Videos[{U]


(Might not be up-to-date)
Riding a Melcar (May 19, 2014)
Rubenwardy riding a melcar (May 17, 2014)
Last edited by webdesigner97 on Thu Feb 02, 2017 19:24, edited 12 times in total.
 

User avatar
philipbenr
Member
 
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
Location: United States
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi

by philipbenr » Fri Oct 18, 2013 14:31

Testing now. :) I'm glad to see you got through with this.
“Would it save you a lot of time if I just gave up and went mad now?”

“I'd far rather be happy than right any day.”

“What, are you, crazy?" "It's a possibility I haven't ruled out yet"
 

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Fri Oct 18, 2013 15:40

philipbenr wrote:Testing now. :) I'm glad to see you got through with this.

Yes, I am very very proud. Sometimes, the car goes crazy, but at least it drives :D
 

User avatar
philipbenr
Member
 
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
Location: United States
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi

by philipbenr » Sat Oct 19, 2013 02:53

Problem: how do I enable? I have tried many different ways....
“Would it save you a lot of time if I just gave up and went mad now?”

“I'd far rather be happy than right any day.”

“What, are you, crazy?" "It's a possibility I haven't ruled out yet"
 

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Sat Oct 19, 2013 06:54

philipbenr wrote:Problem: how do I enable? I have tried many different ways....

Oops, forget to explain that... I'll add it to first post :O
 

i love minetest
Member
 
Posts: 13
Joined: Thu Nov 28, 2013 15:17
Location: uk

by i love minetest » Thu Dec 05, 2013 20:27

it won't load or run the mod what should it be named as
if you need any more information please don't hesitate to pm me or email me
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33
Location: world
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice

by hoodedice » Fri Dec 06, 2013 05:40

i love minetest wrote:it won't load or run the mod what should it be named as


This mod is indev. I wouldn't suggest you using it XD

Anyway, unzip it into the mods directory; rename it 'cars'.

Now fire up minetest, go to the mod config, enable this mod, open your world, type /spawnentity streets:melcar

If it works, gimme a high five.

---------------------------------------------------------------------------------

I checked out the code. It is the neatest code I've ever seen for a mod XD. Great work!

In https://github.com/webdesigner97/cars/blob/master/init.lua#L166 , you might want to set the deceleration rate by checking which block it is on. You could try setting a higher decel rate for stuff like sand and a lower one for asphalt.

And in here: https://github.com/webdesigner97/cars/blob/master/init.lua#L139
You could try changing the acceleration vector's angle, or add a perpendicular vector to the acceleration vector.
Last edited by hoodedice on Fri Dec 06, 2013 06:13, edited 1 time in total.
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
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Fri Dec 06, 2013 10:57

hoodedice wrote:
i love minetest wrote:it won't load or run the mod what should it be named as


This mod is indev. I wouldn't suggest you using it XD

Anyway, unzip it into the mods directory; rename it 'cars'.

Now fire up minetest, go to the mod config, enable this mod, open your world, type /spawnentity streets:melcar

If it works, gimme a high five.

---------------------------------------------------------------------------------

I checked out the code. It is the neatest code I've ever seen for a mod XD. Great work!

In https://github.com/webdesigner97/cars/blob/master/init.lua#L166 , you might want to set the deceleration rate by checking which block it is on. You could try setting a higher decel rate for stuff like sand and a lower one for asphalt.

And in here: https://github.com/webdesigner97/cars/blob/master/init.lua#L139
You could try changing the acceleration vector's angle, or add a perpendicular vector to the acceleration vector.

Yes, different decels for differetn nodes are planned. And thx for the compliment :D All this vector stuff is quite new to me and I think I need to learn a lot about it, but one day this will be a real working car mod.

Edit: The interesting part of this mod is that I can try to use what I learned in my physics class :D
Last edited by webdesigner97 on Fri Dec 06, 2013 11:02, edited 1 time in total.
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33
Location: world
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice

by hoodedice » Fri Dec 06, 2013 12:34

The interesting part of this mod is that I can try to use what I learned in my physics class :D


=D How did you guess I knew about vectors on my end? Physics ofcourse!
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
Krock
Developer
 
Posts: 4141
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

by Krock » Fri Dec 06, 2013 12:46

Wow, that's a nice car!
Would it be possible to change the yaw of a player too while pressing left or right?
Irritates me a bit when only the car turns, but not me :3
Last edited by Krock on Fri Dec 06, 2013 12:56, edited 1 time in total.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Fri Dec 06, 2013 15:31

Krock wrote:Wow, that's a nice car!
Would it be possible to change the yaw of a player too while pressing left or right?
Irritates me a bit when only the car turns, but not me :3

Sure, will be added as soon as the physics work :)
 

i love minetest
Member
 
Posts: 13
Joined: Thu Nov 28, 2013 15:17
Location: uk

by i love minetest » Fri Dec 06, 2013 20:12

webdesigner97 wrote:
hoodedice wrote:
i love minetest wrote:it won't load or run the mod what should it be named as


This mod is indev. I wouldn't suggest you using it XD

Anyway, unzip it into the mods directory; rename it 'cars'.

Now fire up minetest, go to the mod config, enable this mod, open your world, type /spawnentity streets:melcar

If it works, gimme a high five.

---------------------------------------------------------------------------------

I checked out the code. It is the neatest code I've ever seen for a mod XD. Great work!

In https://github.com/webdesigner97/cars/blob/master/init.lua#L166 , you might want to set the deceleration rate by checking which block it is on. You could try setting a higher decel rate for stuff like sand and a lower one for asphalt.

And in here: https://github.com/webdesigner97/cars/blob/master/init.lua#L139
You could try changing the acceleration vector's angle, or add a perpendicular vector to the acceleration vector.

Yes, different decels for differetn nodes are planned. And thx for the compliment :D All this vector stuff is quite new to me and I think I need to learn a lot about it, but one day this will be a real working car mod.

Edit: The interesting part of this mod is that I can try to use what I learned in my physics class :D



yay it worked ps how do I delete it
if you need any more information please don't hesitate to pm me or email me
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33
Location: world
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice

by hoodedice » Fri Dec 06, 2013 20:43

i love minetest wrote:yay it worked ps how do I delete it


The ride? Keep punching it. To see the remaining health it has, watch the debug console.
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
qwrwed
Member
 
Posts: 325
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Fri Dec 06, 2013 21:07

hoodedice wrote:To see the remaining health it has, watch the debug console.

Or press F5 (and look at the car).
 

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Sat Dec 07, 2013 07:28

As already said, this mod is not meant to be used on "real" worlds. It isn't finished ^^
 

neron
Member
 
Posts: 82
Joined: Sat Dec 22, 2012 20:22

by neron » Sat Jan 04, 2014 20:51

Any new updates to this awesome mod?
 

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Sun Jan 05, 2014 08:54

neron wrote:Any new updates to this awesome mod?

Currently not, but pls don't think it's dead. I just don't have the time to continue at the moment...
 

jacobwellz
New member
 
Posts: 8
Joined: Sat Apr 12, 2014 15:08

by jacobwellz » Sat Apr 12, 2014 19:32

Wornt work just says fails to run or load and if I change it to cars the file when it's loading it just quits me please help
 

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Sun Apr 13, 2014 08:06

Although the mod is quite unstable, crashes should not appear. Can you provide a full error message from the debug.txt?
 

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: [Mod] Car extension for StreetsMod (indev, unstable)[car

by webdesigner97 » Fri May 16, 2014 21:25

Update, Update!

The first alpha version (Download from GitHub) is available for public testing. Please don't use this in your "real playing worlds", it might cotain bugs.

What changed?
-> Rework acceleration to not use self.object:setacceleration() which caused odd behaviour
-> Remove gears and RPM
-> Tweaked Physics
-> Added a HUD

Please feel free to test it and please report bugs here or in the GitHub Repo, thanks!
 

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: [Mod] Cars for StreetsMod (TESTERS NEEDED)[cars]

by webdesigner97 » Sat May 17, 2014 06:40

Update to master: Added automatic gears (D, N). R coming soon.

Download latest Zip to check it out.
 

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by webdesigner97 » Sat May 17, 2014 12:56

Fixed car driving in wrong direction. I calculated the speed vector in a method that only works with degrees, but Minetest uses radians.

Fun fact: A melcar needs 8.5 nodes to stop from high speed.
 

User avatar
rubenwardy
Moderator
 
Posts: 5539
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
 

User avatar
Jordach
Member
 
Posts: 4518
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by Jordach » Sat May 17, 2014 17:17

I figured out something with the cars moving if you have multiple out:

Use
Code: Select all
 local variablename = "string text or number"


Once the variables are local, they will NOT ACT AND INTERFERE WITH OTHER CARS OF THE SAME COLOUR!
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

Next

Return to WIP Mods



Who is online

Users browsing this forum: gpcf, runs and 4 guests