[Game] Minetest Defense

User avatar
Kalabasa
Member
Posts: 37
Joined: Tue Jan 06, 2015 17:36
GitHub: Kalabasa
IRC: Kalabasa
In-game: Kalabasa

[Game] Minetest Defense

by Kalabasa » Post

Warning: This is a WIP so expect unbalanced and broken gameplay! Don't expect a complete and working game.

Description of what the game would be when completed:
This is a coop (or singleplayer) game of building, surivival, and defense. Players must build and defend a fortress against waves of monsters to survive. Monsters come every night, with increasing difficulty per night. Nowhere is safe. Not even in your own fortress. During the day, monsters will disintegrate while players repair the fort and gather materials.
Spoiler
mobs
  • monkey (basic monster) [done]
  • minotaur (breaks walls) [done]
  • bat (flying) [done]
  • puffer (flying, spits caustic goo) [done]
  • an underground monster to discourage hiding in a hole
  • (need to think of more)
logic
  • give initial items (like building materials, or weapons) [done]
  • adaptive dynamic spawning [done]
  • kill monsters when morning comes [done]
  • increase difficulty per night [wip]
  • Make a respawn timer/Fix respawning
  • Restart the game to day 1 if all players died
  • (need to think of more)
other
  • make time of day faster [done]
  • music [done]
  • sound effects
  • particles
  • improve multiplayer play
  • think of a better non-generic name
Code License: GPL3
Media License: CC BY-SA
Download: https://github.com/Kalabasa/minetest_de ... master.zip

Image
During the day players build their fortress.

Image
Night is approaching! Get ready to defend. Monsters come at night.

Image
Monsters! (The wall isn't high enough, apparently)
Last edited by Kalabasa on Sat Jan 31, 2015 21:24, edited 10 times in total.
insert signature here

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Game] Minetest Defense

by maikerumine » Post

OOOOOHHHHH!!!!!! I LIKE! Great idea, I cannot wait to play this!
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Game] Minetest Defense

by maikerumine » Post

Quick notes:

I did get this error:

Code: Select all

Spawn 5 defense:unggoy at (-106.04752016478,7,-128.66747094955)
Could not open file of texture: fortress_unggoy.png
Could not open file of texture: fortress_unggoy.png
Could not open file of texture: fortress_unggoy.png
Could not open file of texture: fortress_unggoy.png
Could not open file of texture: fortress_unggoy.png
Intensity: 0.10799029143754
Spawn 1 defense:unggoy at (-138.02163507935,7,-151.45400918979)
Could not open file of texture: fortress_unggoy.png
And could not find fortress in any of the Lua's I am not sure how this came up, only when a mob would spawn.

I like it! I couldn't build a home quick enough and died, and once I died it was all over for me. LOL. You made a very difficult game here, great job!

Things I would change:

*Give initial items should include 200 cobble, just to get started. A few torches and a stone pick.
*Add sounds to monster when attacking? Maybe, maybe not, the sound might become repetitive.
*Increase the light effect to de-spawning the monster, they were sticking around a bit during the morning and day and I wasn't able to free myself.


Keep up the good work!!
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
Kalabasa
Member
Posts: 37
Joined: Tue Jan 06, 2015 17:36
GitHub: Kalabasa
IRC: Kalabasa
In-game: Kalabasa

Re: [Game] Minetest Defense

by Kalabasa » Post

Thanks for the reports! I'll add that to the todo list.

fortress was the former name of this mod. I don't know why it still looks for those files.

It's a bit too hard at the moment. Currently it spawns whole horde of monkeys.

Edit:
Right now I'm focusing on adding content. Tweaks come later.

Edit:
Apparently Minetest still searches for the textures saved in the b3d (model file), even though it replaces the texture. The b3d still wants the old fortress texture. I updated the b3d file now.
insert signature here

User avatar
Enke
Member
Posts: 469
Joined: Fri Nov 15, 2013 02:56
GitHub: NANOsoldierEnke
IRC: Enke
In-game: Enke
Location: The internet

Re: [Game] Minetest Defense

by Enke » Post

Looks really neat! I think I'll check this out tomorrow, if I get the chance.

EDIT: Well, I couldn't find too many problems here, other than the fact that monsters not only spawned in the day time, but also spawned immediately. Other than that, I had a blast with this game!
Lush8
ExtraVars for Red Eclipse

<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Game] Minetest Defense

by Napiophelios » Post

Enke wrote:Well, I couldn't find too many problems here, other than the fact that monsters not only spawned in the day time, but also spawned immediately. Other than that, I had a blast with this game!
Same here...but it didnt matter, its just too much fun!
Those monkeys are relentless!!

Its not bad as just a mod either :)
I added it to a really minimal subgame and it still works great

This is the first game I have played where mobs dont completely bog me down,
I mean virtually no lag whatsoever.

Please Keep up the good work

User avatar
Kalabasa
Member
Posts: 37
Joined: Tue Jan 06, 2015 17:36
GitHub: Kalabasa
IRC: Kalabasa
In-game: Kalabasa

Re: [Game] Minetest Defense

by Kalabasa » Post

Added a new monster "Sarangay" (or minotaur)
Image
It can break your walls by charging.

Added a new monster "Paniki" (or bat), which is still a wip. They're flying squares at the moment.

It's good to read that mobs weren't eating resources (at least, in your case). There's about 50-70 mobs at a time. (I should control/reduce that since Minetest can't handle more than 49 mobs in one map chunk)
insert signature here

Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: [Game] Minetest Defense

by Minetestforfun » Post

Thank you for your work and your subgame !

Im very interresting about your work on mobs, the "Sarangay" (or minotaur) is awesome ! (maybe i will add it in my server)

User avatar
Kalabasa
Member
Posts: 37
Joined: Tue Jan 06, 2015 17:36
GitHub: Kalabasa
IRC: Kalabasa
In-game: Kalabasa

Re: [Game] Minetest Defense

by Kalabasa » Post

I don't know if it's compatible with other mods.

1. I did not use any of the existing mob libraries/frameworks.
2. It breaks blocks! You may not want your server griefed by some mob.
3. It does not spawn automatically/independently. In this subgame, mobs are spawned by the Director. You should write your own spawning procedure (like ABMs) if you're going to take some mobs.
insert signature here

Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: [Game] Minetest Defense

by Minetestforfun » Post

1) It's adaptable
2) It's a good feature ! =) (but tweaked for choose the destructible blocks)
3) The API can add spawn ABM

I repeat, your ideas and work are very interresting :)

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Game] Minetest Defense

by maikerumine » Post

Real quick, I downloaded the latest but the throwing mod folder is empty.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
Kalabasa
Member
Posts: 37
Joined: Tue Jan 06, 2015 17:36
GitHub: Kalabasa
IRC: Kalabasa
In-game: Kalabasa

Re: [Game] Minetest Defense

by Kalabasa » Post

Thanks for the feedback!
maikerumine wrote:Real quick, I downloaded the latest but the throwing mod folder is empty.
The throwing mod is a git submodule in the repository. Submodules aren't downloaded by default in git, iirc. You should do a git submodule update.

If you used the ZIP option from GitHub... I don't know.

For now, remove the throwing folder. It isn't being used currently anyway (But I plan to include it sometime).
insert signature here

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Game] Minetest Defense

by maikerumine » Post

QUICK REVIEW TIME!!

I spent some time at lunch on this game and found it to be incredible. Typically with mobs either elevation or a secure box of cobble does the trick, not this time!

Day one:

Grab some dirt, saplings, and wood. Make a 1x1 tower 18 nodes tall and extend a platform out in a square. Plant a tree and craft a ladder to get down after the monsters leave. First wave, they came in a swarm, I was tense, continued to craft some things... I started seeing red! I was getting attacked?! They were climbing on each others backs to reach the bottom of the platform! WTF!!?? I died, then was lost in the dark only to die a few times over again.

Day two:

Make a underground fort, that will stop them. Made a fort under an island with water access and blocked all but one 1x1 hole to see the mobs. Bad idea, the pressure and amount of monsters eventually popped one through the hole and he got in, I killed him with the sword provided, THANK YOU, and blocked the hole again.

Skip time to a large number, edited the environment parameter to see full force...

Another bad Idea.

This time I had the minotaur bust through and totally let dozens into the fort, I was done!!

So I decided to noclip and fly up through the ground to see the masses...

BATS!! I was getting attacked in the air too!!!


In summary, it was such a white knuckling experience, like pure terror. Knowing you were never going to escape or survive! In hind sight I would gather much more resources and build higher and enclose the fort. I'd like to see a minotaur climb 50 nodes!

Good Game, you did very well with this idea, keep it up!!
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
Kalabasa
Member
Posts: 37
Joined: Tue Jan 06, 2015 17:36
GitHub: Kalabasa
IRC: Kalabasa
In-game: Kalabasa

Re: [Game] Minetest Defense

by Kalabasa » Post

Implemented two new features:

Music
This is intended to bring suspense to situations, and generally give some life to the game. Incidental music will play at certain events in the game.

The music depends on the tension of the player. I haven't tested this on a network, so the timing may be bad on networks. I haven't tested this on multiplayer too. Currently the same music plays for every player, which is not good, because each player has different tension levels.

Pathfinding
(Some selected) Mobs now find a path to you, instead of running into a wall between you. This may add some CPU usage a bit, especially when you are constantly moving or in an open space. I haven't tested this on multiplayer, but I think processing will increase if players are spread apart. If they are huddled in some place, CPU usage will be as if there is only one player.


Looks like I'm focusing on singleplayer experience for now. Coop play may be unbalanced (too easy), broken (laggggg), or totally unsupported (BSOD (just kidding, just crash)).
insert signature here

Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: [Game] Minetest Defense

by Minetestforfun » Post

Your work on mobs are very impressive, i've never see pathfinding on others mobs mod !
It's a very great improve :)

(maybe you can improve the actual mobs API if you work with other mods mobs creator)
Last edited by Minetestforfun on Wed Feb 04, 2015 16:34, edited 1 time in total.

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Game] Minetest Defense

by maikerumine » Post

Minetestforfun wrote:You work on mobs are very impressive, i've never see pathfinding on others mobs mod !
It's a very great improve :)

(maybe you can improve the actual mobs API if you work with other mods mobs creator)
+1
I second this note. Your mobs are very ruthless, the best I have seen yet. keep up the good work!!!
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Game] Minetest Defense

by ExeterDad » Post

We had a blast with your game tonight. I started the server with your game instead of our usual map. I didn't tell the wife and kids and insisted we log in at the same moment.
At first they were stunned to see some items in their inventories. I told them we need to work together to build a shelter NOW. So we did. it was a simple cobble box with two windows and a door.
Then dark hit and the kids saw monkey hell running up the mountain at top speed. We were hit a ton of times before we got inside and the door shut.
Noticed monkey heads coming through the door like ghosts, but they didn't seem to come in. Then we noticed green slime covering a window and then the roof started coming apart.
There were five of us trapped inside this cobble box as bats monkey's and God knows what else flooded the inside. All of us complaining how our screens were solid red as we died one by one.
Awesome!
Daylight hit and it was over. So we dug into a mountain as fast as possible and survived the next night huddling together like cowards. Not being able to see what was going on outside was torture as we could hear all kinds of action out there and our laptops were playing eerie music. Surely death was upon us?
We played four hours straight having a blast the whole time.
Our server is a old Core Dual Quad with 4 gigs ram. It is on our LAN. We honestly didn't notice any lag ever running the subgame with no extra mods. That is saying a lot as two of the five laptops were netbooks.
Your models look great! Or what I could see of them. Mostly monkeys and bats. All the mobs were interesting and just crazy! It's hard to kill them as they are moving around so much. But so fun!
Thanks for your work so far, really looking forward to seeing how this one turns out.

User avatar
Wayward_One
Member
Posts: 108
Joined: Tue Jun 10, 2014 18:44
GitHub: Wayward1
IRC: Wayward_One Wayward1
In-game: Wayward_One
Location: Kolene, Corellia
Contact:

Re: [Game] Minetest Defense

by Wayward_One » Post

Awesome game, I haven't played singleplayer this much since before joining my first server! :D

User avatar
Mg
Member
Posts: 86
Joined: Sun Mar 02, 2014 20:49
GitHub: LeMagnesium
IRC: ElectronLibre Mg
In-game: Mg
Location: Periodic Table

Re: [Game] Minetest Defense

by Mg » Post

Could you please add your .blend files to the git repository?
It would be great if people need to modify the objects. :)

User avatar
Mg
Member
Posts: 86
Joined: Sun Mar 02, 2014 20:49
GitHub: LeMagnesium
IRC: ElectronLibre Mg
In-game: Mg
Location: Periodic Table

Re: [Game] Minetest Defense

by Mg » Post

Oups double post, thanks to my computer disconnected half the way (any moderator feel free to remove this one).
So, your game is great, and path finding for mobs is a very helpful feature in AI designs.

User avatar
Kalabasa
Member
Posts: 37
Joined: Tue Jan 06, 2015 17:36
GitHub: Kalabasa
IRC: Kalabasa
In-game: Kalabasa

Re: [Game] Minetest Defense

by Kalabasa » Post

Hi

I wasn't able to update this game because of schoolwork (I'm doing my undergraduate thesis right now).

I uploaded the blend files to the repository.

Also, I (accidentally) added the still-incomplete spider enemy "Aranay". It may be buggy.

License is as it is in the license file. (This means you have to put appropriate credit when using the file and use the same license when sharing your version of the file)
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) http://creativecommons.org/licenses/by-sa/3.0/
insert signature here

trainwrecktony
Member
Posts: 67
Joined: Sun Jun 08, 2014 05:24
In-game: trainwrecktony
Location: NJ USA

Re: [Game] Minetest Defense

by trainwrecktony » Post

i've been running a stripped down version of just the bats on my server but been having server crash problems.
i prefer the more natural way your bats fly and attack vs the simple mobs api but i have also converted your ape and minotaur models to run on simple mobs api to better control spawn location and population. awesome models love their animation!

i compile and run dev version of server so that maybe that is issue i'm also running your newest code. i have also added drop on death to the mob.lua that seems to work fine and have also omitted the code line 162
minetest.chat_send_all("dir:" .. minetest.pos_to_string(direction))

here is crash info

Code: Select all

2015-07-06 01:46:06: ERROR[main]: UNRECOVERABLE error occurred. Stopping server. Please fix the following error:
2015-07-06 01:46:06: ERROR[main]: C:\minetest\bin\..\games\twt\mods\defense/pathfinder.lua:274: attempt to index local 'node' (a nil value)
2015-07-06 01:46:06: ERROR[main]: stack traceback:
2015-07-06 01:46:06: ERROR[main]: 	C:\minetest\bin\..\games\twt\mods\defense/pathfinder.lua:274: in function 'cost_method'
2015-07-06 01:46:06: ERROR[main]: 	C:\minetest\bin\..\games\twt\mods\defense/pathfinder.lua:196: in function 'update'
2015-07-06 01:46:06: ERROR[main]: 	C:\minetest\bin\..\games\twt\mods\defense/pathfinder.lua:284: in function <C:\minetest\bin\..\games\twt\mods\defense/pathfinder.lua:283>
2015-07-06 01:46:06: ERROR[main]: 	C:\minetest\bin\..\builtin\game\register.lua:341: in function <C:\minetest\bin\..\builtin\game\register.lua:329>

In thread 668:
/cygdrive/d/DEV/minetest/minetest/src/server.cpp:505: step: A fatal error occurred: C:\minetest\bin\..\games\twt\mods\defense/pathfinder.lua:274: attempt to index local 'node' (a nil value)
stack traceback:
	C:\minetest\bin\..\games\twt\mods\defense/pathfinder.lua:274: in function 'cost_method'
	C:\minetest\bin\..\games\twt\mods\defense/pathfinder.lua:196: in function 'update'
	C:\minetest\bin\..\games\twt\mods\defense/pathfinder.lua:284: in function <C:\minetest\bin\..\games\twt\mods\defense/pathfinder.lua:283>
	C:\minetest\bin\..\builtin\game\register.lua:341: in function <C:\minetest\bin\..\builtin\game\register.lua:329>
Debug stacks:
DEBUG STACK FOR THREAD 394:
#0  Thread
DEBUG STACK FOR THREAD 48c:
#0  Thread
#1  Receive
(Leftover data: #2  SendBlocks)
(Leftover data: #3  GetNextBlocks)
(Leftover data: #4  serialize)
(Leftover data: #5  loadBlock)
DEBUG STACK FOR THREAD 668:
#0  main
#1  Dedicated server branch
#2  dedicated_server_loop
#3  step
DEBUG STACK FOR THREAD 970:
#0  Thread
(Leftover data: #1  loadBlock)
(Leftover data: #2  loadBlock)
(Leftover data: #3  deSerialize)
DEBUG STACK FOR THREAD bd4:
#0  Thread
(Leftover data: #1  loadBlock)
(Leftover data: #2  loadBlock)
(Leftover data: #3  deSerialize)
bravo on your work, again i love the way the bats fly and hunt. a feature i'd like to see is bat avoiding water or at least taking water damage.

lastly can you explain the code used to spawn and which variables can be modified to reduce number of mobs
defense.director = {}
local director = defense.director
director.call_interval = 1.0
director.intensity_decay = 0.93
director.max_entities = 50
director.spawn_list = {
{
description = "Unggoy group",
name = "defense:unggoy",
intensity_min = 0.0,
intensity_max = 0.6,
group_min = 1,
group_max = 4,
probability = 0.4,
day_start = 0,
spawn_time = 14.0,
spawn_location = "ground",
},
Server Owner trainwrecktony.serveminecraft.net:30000 irc.freenode.net ##minetest-trainwrecktony

DoubledNebula51
New member
Posts: 5
Joined: Thu Aug 06, 2015 19:00
In-game: DoubledNebula51

Re: [Game] Minetest Defense

by DoubledNebula51 » Post

This sounds like a mod with full potential. Maybe I should try it out? Only one problem though. I don't know how to download mods. Just reading this topic gets me pumped up. I would like to try out this mod. How do I download mods?
I can be an Angle or your worst nightmare! It all depends on you! However, I'm nice by default.

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Game] Minetest Defense

by twoelk » Post

This is a subgame which among other things includes a collection of mods. It is more than simply a mod.
Simply download the zip-archive linked in the first post and unpack it on your system. Delete the added suffix -"master" from the folder name and drop the folder into the games folder in your Minetest installation. On the next start there should be a new icon on the bottom of the main menu that loads a list of worlds that use that subgame. You may have to create a new world - and the fun can start.

There are threads on the forum about installing subgames and you may want to also visit the Minetest Wiki to learn more about subgames.

User avatar
linushsao
Member
Posts: 418
Joined: Mon Jan 27, 2014 12:56
IRC: linushsao
In-game: linus
Location: Taipei,Taiwan(R.O.C)
Contact:

Re: [Game] Minetest Defense

by linushsao » Post

God bless me,after die and die,i finally know the first step is digging a cave, step2 is waitting for sunshine...>_<

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests