[Mod] Sprint [sprint]

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

[Mod] Sprint [sprint]

by GunshipPenguin » Tue Jul 01, 2014 04:03

Allows the player to sprint by either double tapping w or pressing e. By default, sprinting will make the player travel 80% faster and allow him/her to jump 10% higher. Also adds a stamina bar that goes down when the player sprints and goes up when he/she isn't sprinting.

This mod is compatible with the HUD bars [hudbars] mod, but does not depend on it. In this care, a green HUD bar will be displayed, also showing a number. If this mod is not present, a standard statbar with 0-20 “half-arrows” is shown, which is a bit more coarse than the HUD bar version.

Speed while sprinting, jump height while sprinting, and other things can be configured. See README.md for details.

Licence: CC0
Dependencies: None

GitHub: https://github.com/GunshipPenguin/sprint
Last edited by GunshipPenguin on Mon Feb 23, 2015 22:01, edited 6 times in total.
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: [Mod] Sprint [sprint]

by philipbenr » Tue Jul 01, 2014 04:57

Very nice. With this, I can look for a way to tune down the default run speed. This helps a lot.
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Sprint [sprint]

by Wuzzy » Tue Jul 01, 2014 14:03

For the future, I post a copy of sprint.tar.gz as an attachment here, just in case Sendspace deletes the file at some point in time.

Edit: OK, now since this mod is on GitHub, I recommend downloading it from GitHub instead. My copy is probably outdated now. ;-)
Attachments
sprint.tar.gz
(1.16 KiB) Downloaded 232 times
Last edited by Wuzzy on Mon Feb 09, 2015 19:27, edited 1 time in total.
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

Re: [Mod] Sprint [sprint]

by Bas080 » Tue Jul 01, 2014 15:40

Good mod! I changed movement_speed_walk to 2.7 so Sam happily walks down stairs instead of dropping. And changed the SPRINT_SPEED to 2.5 for a quick sprint.
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: [Mod] Sprint [sprint]

by philipbenr » Tue Jul 01, 2014 17:04

I suggest using GitHub or some better online hosting service.
 

User avatar
Vazon
Member
 
Posts: 191
Joined: Sat Aug 17, 2013 17:20
IRC: Vazon
In-game: Vazon

Re: [Mod] Sprint [sprint]

by Vazon » Tue Jul 01, 2014 20:35

There is a way to adjust the player running speed already in the minetest.config. Unless I misunderstand this mod is kind of pointless in the matter
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: [Mod] Sprint [sprint]

by BrandonReese » Tue Jul 01, 2014 20:38

Vazon wrote:There is a way to adjust the player running speed already in the minetest.config. Unless I misunderstand this mod is kind of pointless in the matter


He uses set_physics_override to to increase the player's speed when they double tap 'w'.

Very clever mod, I will probably adapt this into Adventuretest so players can sprint without a fast priv, and the fast priv can be reserved for very fast movement for admins/moderators.
 

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

Re: [Mod] Sprint [sprint]

by GunshipPenguin » Wed Jul 02, 2014 02:07

Thanks for all the feedback everybody.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: [Mod] Sprint [sprint]

by Calinou » Wed Jul 02, 2014 19:19

Double-tap is annoying and hurts fingers; it'd be a better idea to use the “special” key, which is available for players without the “fast” privilege (which is what this mod is intended for).

This way, players with “fast” privilege can still go very fast if needed.

For hosting, I suggest learning some Git (very useful for mod development, it's often used in here) and using Gitorious.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: [Mod] Sprint [sprint]

by Evergreen » Wed Jul 02, 2014 20:57

Calinou wrote:Double-tap is annoying and hurts fingers; it'd be a better idea to use the “special” key, which is available for players without the “fast” privilege (which is what this mod is intended for).

This way, players with “fast” privilege can still go very fast if needed.

For hosting, I suggest learning some Git (very useful for mod development, it's often used in here) and using Gitorious.

Or Github. Calinou doesn't use it because technically it is proprietary, but choose whichever one you want.
Last edited by Jordach on Thu Jul 03, 2014 14:23, edited 1 time in total.
Reason: spell check next time (there isn't supposed to be two "it")
 

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

Re: [Mod] Sprint [sprint]

by GunshipPenguin » Thu Jul 03, 2014 07:15

Took your guys's advice, project is now on GitHub.
 

trainwrecktony
Member
 
Posts: 44
Joined: Sun Jun 08, 2014 05:24
In-game: trainwrecktony

Re: [Mod] Sprint [sprint]

by trainwrecktony » Thu Jul 03, 2014 13:34

worked for a while but i did get crash .... minetest git with gsmapper

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
ERROR[main]: ERROR: An unhandled exception occurred: C:\minetestdev\bin\..\games\twt\mods\sprint\init.lua:18: attempt to index global 'player' (a nil value)
23:07:38: ERROR[main]: stack traceback:
23:07:38: ERROR[main]:    C:\minetestdev\bin\..\games\twt\mods\sprint\init.lua:18: in function <C:\minetestdev\bin\..\games\twt\mods\sprint\init.lua:12>
23:07:38: ERROR[main]:    C:\minetestdev\bin\..\builtin\game\register.lua:348: in function <C:\minetestdev\bin\..\builtin\game\register.lua:336>

Server Owner trainwrecktony.serveminecraft.net:30000
Server Specs: i5-3570, 16gb, 1tb 7200rpm 64mb cache, Win 2012 r2 x64, Dev mingw x64 minetest build, redis db
Gaming: Clevo W150HNQ, i7-2820, 16gb 1866 hyperx, 256gb Samsung 840 PRO SSD, Nvidia GT 540M, Win 7 Pro x64, Dev mingw x64 minetest build
 

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

Re: [Mod] Sprint [sprint]

by GunshipPenguin » Thu Jul 03, 2014 22:49

trainwrecktony wrote:worked for a while but i did get crash .... minetest git with gsmapper

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
ERROR[main]: ERROR: An unhandled exception occurred: C:\minetestdev\bin\..\games\twt\mods\sprint\init.lua:18: attempt to index global 'player' (a nil value)
23:07:38: ERROR[main]: stack traceback:
23:07:38: ERROR[main]:    C:\minetestdev\bin\..\games\twt\mods\sprint\init.lua:18: in function <C:\minetestdev\bin\..\games\twt\mods\sprint\init.lua:12>
23:07:38: ERROR[main]:    C:\minetestdev\bin\..\builtin\game\register.lua:348: in function <C:\minetestdev\bin\..\builtin\game\register.lua:336>



I think I know what's causing this. Did this happen when you were playing with multiple people, or just singleplayer?

EDIT: Just made a commit that I think should fix this, try it out.
 

trainwrecktony
Member
 
Posts: 44
Joined: Sun Jun 08, 2014 05:24
In-game: trainwrecktony

Re: [Mod] Sprint [sprint]

by trainwrecktony » Fri Jul 04, 2014 03:48

Was playing on my server , 3 players online, just me using the feature
New commit seems to be working so far no crash will update if happens
Server Owner trainwrecktony.serveminecraft.net:30000
Server Specs: i5-3570, 16gb, 1tb 7200rpm 64mb cache, Win 2012 r2 x64, Dev mingw x64 minetest build, redis db
Gaming: Clevo W150HNQ, i7-2820, 16gb 1866 hyperx, 256gb Samsung 840 PRO SSD, Nvidia GT 540M, Win 7 Pro x64, Dev mingw x64 minetest build
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Sprint [sprint]

by Minetestforfun » Thu Aug 28, 2014 17:30

Very good mod, i haven't crash yet :)

Can you add a stop sprint when a player do a mouse click ?
Can you add a sprint effect for the first player view and the model, like a fast movment effect ? (like Mine****t ... ?)
 

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

Re: [Mod] Sprint [sprint]

by GunshipPenguin » Sun Aug 31, 2014 22:22

Minetestforfun wrote:Very good mod, i haven't crash yet :)

Can you add a stop sprint when a player do a mouse click ?
Can you add a sprint effect for the first player view and the model, like a fast movment effect ? (like Mine****t ... ?)


Hi, Thanks for the feedback.

I modified the code so the player will stop sprinting when the right mouse button is pressed. I'm not sure that I want it to be included in the Github repo though, so I uploaded it to Sendspace for you. Let me know if you find any bugs and I'll do my best to fix them.

https://www.sendspace.com/file/nh3xoh

You can toggle stop on sprint by changing the STOP_ON_CLICK variable and you can toggle which mouse button stops the player with the STOP_KEY variable (Set it to "RMB" for right mouse button and "LMB" for left mouse button, by default it is "RMB").

As for a sprint effect like Minecraft, I wanted to do that, however, I couldn't find a way to increase the player's FOV while sprinting and I'm not sure how I would go about creating sprint particles behind the player's feet like in Minecraft. If I figure out how to do that, I'll include it in the mod.
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Sprint [sprint]

by Minetestforfun » Mon Sep 01, 2014 00:09

Thank you for your work, i try soon your modified code !

EDIT : it doesn't work with the stop_key define like that :
STOP_ON_CLICK = true
STOP_KEY = "RMB", "LMB"
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Sprint [sprint]

by 4aiman » Mon Sep 01, 2014 05:16

So.. the old sprinting was abandoned?
Does the new one considers there maybe other mods that change physics?
What about stop sprinting if a player has touched a wall?
 

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

Re: [Mod] Sprint [sprint]

by GunshipPenguin » Mon Sep 01, 2014 06:16

Minetestforfun wrote:Thank you for your work, i try soon your modified code !

EDIT : it doesn't work with the stop_key define like that :
STOP_ON_CLICK = true
STOP_KEY = "RMB", "LMB"


The way I've written it, you can't use both mouse keys to stop the player from sprinting. I made another modified version where the player will stop sprinting if either the left mouse button or the right mouse button is pressed. It's also hosted on sendspace: https://www.sendspace.com/file/co5ccd

4aiman wrote:So.. the old sprinting was abandoned?
Does the new one considers there maybe other mods that change physics?
What about stop sprinting if a player has touched a wall?


I don't get what you're trying to say. I didn't change any code in the repo on Github, I just made a modified version and uploaded it to sendspace for Minetestforfun.
Also, I'll look into stopping sprinting if the player hits a wall.
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Sprint [sprint]

by Minetestforfun » Mon Sep 01, 2014 12:26

@4aiman
Very good idea !
Maybe it is an future feature that would promotes creating jumping-levels [subgame/mod]

@GunshipPenguin
Ok, thank you, i try it soon

EDIT : it works perfectly, thank you
Last edited by Minetestforfun on Mon Sep 01, 2014 22:32, edited 1 time in total.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Sprint [sprint]

by 4aiman » Mon Sep 01, 2014 20:27

@GunshipPenguin
You, probably, won't get it at all, since you have only 6 messages which, in turn, means you're probably rather new here.
The old sprinting mod is buried somewhere @forum.minetest.net and I can't seem to find it.
So, nevermind the prelude. You got the question quite right.
Regards!
 

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

Re: [Mod] Sprint [sprint]

by GunshipPenguin » Wed Sep 03, 2014 03:10

4aiman wrote:@GunshipPenguin
You, probably, won't get it at all, since you have only 6 messages which, in turn, means you're probably rather new here.
The old sprinting mod is buried somewhere @forum.minetest.net and I can't seem to find it.
So, nevermind the prelude. You got the question quite right.
Regards!


Ah, I see. Sorry for any confusion.
 

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

Re: [Mod] Sprint [sprint]

by GunshipPenguin » Tue Sep 30, 2014 05:06

Added particle effect while sprinting and made sprinting a bit smoother.
 

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

Re: [Mod] Sprint [sprint]

by GunshipPenguin » Sat Nov 08, 2014 08:40

Cleaned up the code, updated the readme, and added the ablility to limit how much players can sprint via the SPRINT_STAMINA variable.
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Sprint [sprint]

by Don » Sat Nov 08, 2014 16:56

Nice work!
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

Re: [Mod] Sprint [sprint]

by GunshipPenguin » Sun Nov 09, 2014 21:39

Don wrote:Nice work!

Thanks :)
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Sprint [sprint]

by Minetestforfun » Sun Nov 09, 2014 23:30

Wow, very good update, thank you !
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Sprint [sprint]

by Minetestforfun » Thu Nov 13, 2014 01:05

i tried your new amazing update on my server and... i wonder if it's possible to add a "graphical bar" (like in the stamina of adventure test) for your mod ? maybe be inspired of adventuretest for this bar ? (or something like in the hud ?)

What do you think about my ideas ?
 

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

Re: [Mod] Sprint [sprint]

by GunshipPenguin » Thu Nov 13, 2014 03:21

Minetestforfun wrote:i tried your new amazing update on my server and... i wonder if it's possible to add a "graphical bar" (like in the stamina of adventure test) for your mod ? maybe be inspired of adventuretest for this bar ? (or something like in the hud ?)

What do you think about my ideas ?


Hi, Thanks for the posive feedback!

In response to your question, maybe. I'm not too experienced with the minetest modding API yet, but there may be a way to do it. If there is, I'll try to get a commit up sometime soon to add a stamina bar similar to the food bar in Minecraft.
 

User avatar
GunshipPenguin
Member
 
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin

Re: [Mod] Sprint [sprint]

by GunshipPenguin » Fri Nov 14, 2014 01:25

Added sprint stamina bar. Changed licence to CC0.
 

Next

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 12 guests

cron