[Mod] Soccer [0.1.0] [soccer]

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

[Mod] Soccer [0.1.0] [soccer]

by kaeza » Post

Play soccer on Minetest!

This currently only provides the ball; the actual logic for implementing a match will be implemented in the future. For now, you can use Mesecons Wooden Pressure Plates along with some logic to at least handle scoring. Goals are also provided but have no functionality.

You can push the ball by standing near it, and kick it by holding the "sneak" key (by default "Shift"). The ball will get pushed/kicked in the direction the player is facing (you can center-on the ball by looking up).

License:
Code: BSD 2 Clause (see here).
Media: CC-BY-SA (see here).

Dependencies:
default, wool (for textures)

Links:
Download - ZIP Archive, Tarball
Browse code on Github

REMEMBER to RENAME the directory to just 'soccer'!

Please post bugs, suggestions, or compliments (!) here!

Screenshot:
Image

Also, here's a demo video (older version): http://www.youtube.com/watch?v=LczR71gc6TY

Items:
Image Soccer Ball (soccer:ball_item)
Alias: ball
A roundy thing you can kick.

Code: Select all

+------------+-------------------+------------+
|            | wool:white        |            |
+------------+-------------------+------------+
| wool:white | default:coal_lump | wool:white |
+------------+-------------------+------------+
|            | wool:white        |            |
+------------+-------------------+------------+
Image Straight Line (soccer:line_i)
Used for marking the field. (Note: line_i, lowercase I)
(uncraftable)

Image L Line (soccer:line_l)
Used for marking the field. (Note: line_l, lowercase L)
(uncraftable)

Image T Line (soccer:line_t)
Used for marking the field.
(uncraftable)

Image + Line (soccer:line_p)
Used for marking the field.
(uncraftable)

Image Diagonal Line (soccer:line_d)
Used for marking the field.
(uncraftable)

Image Point (soccer:line_point)
Used for marking the field.
(uncraftable)

Image Corner (soccer:line_corner)
Used for marking the field.
(uncraftable)

Image Soccer Goal (soccer:goal)
Used for decoration (non functional, collision is buggy).
(uncraftable)

Image Soccer Goal Mark (soccer:goal_mark)
Detects balls on it, and activates adjacent Mesecons. Not functional currently.
(uncraftable)
Last edited by kaeza on Mon May 27, 2013 14:06, edited 1 time in total.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

User avatar
ecube
Member
Posts: 33
Joined: Thu May 10, 2012 03:01
Location: I forgot....

by ecube » Post

+1
This is a test

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Noooooooooooooooooo!
No soccer!

User avatar
ecube
Member
Posts: 33
Joined: Thu May 10, 2012 03:01
Location: I forgot....

by ecube » Post

Yes, you're not the only one who's afraid of balls (points at self)

Image
https://dl.dropboxusercontent.com/u/547 ... r_ball.png
^ Whipped up a (very horrible) texture for the ball, you could use it for now
Last edited by ecube on Mon May 27, 2013 00:59, edited 1 time in total.
This is a test

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

I got a mod error when I placed the ball. Debug:

Code: Select all

21:29:06: ERROR[main]: ServerError: LuaError: error running function 'on_step': ...Evergreen/Desktop/Minetest/bin/../mods/soccer/init.lua:30: attempt to call field 'get_objects_inside_radius' (a nil value)
21:29:06: ERROR[main]: stack traceback:
Back from the dead!

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

Evergreen wrote:I got a mod error when I placed the ball. Debug:

Code: Select all

21:29:06: ERROR[main]: ServerError: LuaError: error running function 'on_step': ...Evergreen/Desktop/Minetest/bin/../mods/soccer/init.lua:30: attempt to call field 'get_objects_inside_radius' (a nil value)
21:29:06: ERROR[main]: stack traceback:
I didn't see that error because I use latest git (it should be minetest.env:get_objects_inside_radius instead of the new minetest.get_objects_inside_radius).
Fixed in git. Please download again.
Thanks for reporting.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

User avatar
cornellius
Member
Posts: 82
Joined: Sat Dec 01, 2012 05:08
Location: South East Asian

by cornellius » Post

damn it this mod!!!! really freakin awesome!!!
All Humans Need Is Forgiveness, God Is The First One Who Forgive All Humans So Humans Must Forgive Other Humans

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

by 12Me21 » Post

Cool mod, the crafting recipe could be:
c = coal lump
w = white wool
x = empty

xwx
wcw
xwx
Shoutouts to Simpleflips

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

Update!
  • Cleaned up code.
  • Ball now bounces on floor (still buggy).
  • Added new line decals to draw the field (not craftable ATM).
  • Added new texture for the ball (thanks ecube!).
  • Added crafting recipe for ball (thanks 12Me21!).
See first post for download links and a new screenshot!
Last edited by kaeza on Mon May 27, 2013 14:00, edited 1 time in total.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

User avatar
Mossmanikin
Member
Posts: 599
Joined: Sun May 19, 2013 16:26
Location: where we don't speak english.

by Mossmanikin » Post

While in general I don't like soccer at all... love this idea :D

Noob 4 life!
My stuff

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

Mossmanikin wrote:While in general I don't like soccer at all... love this idea :D
Thanks!
I also don't like *real* soccer, but I'm trying to make new minigames for servers that want to adopt them.
Actually, this started as a silly test to implement friction in entities (the ball gradually stops while on ground).
Last edited by kaeza on Mon May 27, 2013 14:17, edited 1 time in total.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

User avatar
Mossmanikin
Member
Posts: 599
Joined: Sun May 19, 2013 16:26
Location: where we don't speak english.

by Mossmanikin » Post

Just tested it a bit;
surprised how well shooting/pushing the ball works.
No bugs found (minetest-0.4.6-ab43377-win32, creative).
Like it so far.
I think this could be really fun in multiplayer.

Noob 4 life!
My stuff

User avatar
cornellius
Member
Posts: 82
Joined: Sat Dec 01, 2012 05:08
Location: South East Asian

by cornellius » Post

Yep Me Too And This Mod Really Nice
All Humans Need Is Forgiveness, God Is The First One Who Forgive All Humans So Humans Must Forgive Other Humans

Xmster4334
New member
Posts: 1
Joined: Wed Jun 19, 2013 22:10

by Xmster4334 » Post

It will not work for me why???

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

Xmster4334 wrote:It will not work for me why???
Try renaming the folder to just 'soccer'.

If that fails, follow these instructions: http://forum.minetest.net/viewtopic.php?id=5073
But instead of creating a new topic, post here.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

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

by rubenwardy » Post

Americans :S

it is football!!
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

rubenwardy wrote:Americans :S

it is football!!
He can't rename it to football, because there is another sport called "Football" in the united states. It would cause confusion.
Back from the dead!

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

Evergreen wrote:
rubenwardy wrote:Americans :S

it is football!!
He can't rename it to football, because there is another sport called "Football" in the united states. It would cause confusion.
We call it 'fútbol' here (sounds like "football"), but as Evergreen said, "football" means another sport in the US (which is kind of silly I should add; most of the game is played with the ball in hands).
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

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

by rubenwardy » Post

kaeza wrote:
Evergreen wrote:
rubenwardy wrote:Americans :S

it is football!!
He can't rename it to football, because there is another sport called "Football" in the united states. It would cause confusion.
We call it 'fútbol' here (sounds like "football"), but as Evergreen said, "football" means another sport in the US (which is kind of silly I should add; most of the game is played with the ball in hands).
That is what I was thinking :P
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
xavier108
Member
Posts: 227
Joined: Sat Nov 24, 2012 06:05
IRC: Ezlif
Location: Black Mesa Facility

by xavier108 » Post

I like this mod
I also like soccer!!
+10
Ezlif :D

xiug
New member
Posts: 2
Joined: Fri Aug 23, 2013 19:55

by xiug » Post

I changed your mod
Each ball has its customization
I changed to the Francophone server steinheim
I use google translation
Screen:
Image

xiug
New member
Posts: 2
Joined: Fri Aug 23, 2013 19:55

by xiug » Post


User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

xiug: Changed code a bit and merged it. Thanks for the contribution.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

HalloHallo
New member
Posts: 5
Joined: Sat Feb 20, 2016 15:49
In-game: hallohallo_MeseShlampe

Re: [Mod] Soccer [0.1.0] [soccer]

by HalloHallo » Post

Nice mod !

Now I only need some players and a refree to play with me haha

Here is a video of this mod:
https://youtu.be/WdGzQqIhzFY

danholli123
New member
Posts: 2
Joined: Sat Jun 18, 2016 15:08
In-game: DanHolli DanHolli123

Re: [Mod] Soccer [0.1.0] [soccer]

by danholli123 » Post

You should add recipes using white dye or wool

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 31 guests