Ghosts

User avatar
hdastwb
Member
Posts: 106
Joined: Tue Jan 01, 2013 18:47
GitHub: hdastwb
IRC: hdastwb
In-game: hdastwb
Location: United States

Ghosts

by hdastwb » Post

Death in Minetest isn't incredibly realistic, thus I'll propose an interesting game mechanism borrowed from the spiritual realm. That is, dead players become ghosts rather than being asked to respawn!
Image

Adding ghosts was surprisingly easy to do; servers don't actually seem to care if dead players are floating around, so pretty much all of the necessary changes are client-side. All that I needed to do was to comment out the code that launches the respawn screen and add a whole bunch of "or hp <= 0"s to the code to trick it into thinking that dead players have free_move on and most of the HUD off. I also made some tweaks to the minimal game in order to show ghost players with a semi-transparent ghost-gray texture; minetest_game (or, rather, the common default mod) shows the player laying on their back when they are dead, which looks kind of odd when they are floating around.

Anyway, my branch can be found here:
https://github.com/hdastwb/minetest/tree/ghost
source here:
https://github.com/hdastwb/minetest/archive/ghost.zip
and, for the impatient, Windows build here:
http://hdastwb.heliohost.org/minetest-ghost.zip

In this version, one can easily leave "ghost mode" by merely pressing ESC and triggering a normal respawn. However, the ability to go back out of ghost mode could be turned over to mods, thus hardcore survival games could require that a player go through a ghost portal or have the other players perform a complicated ceremony to bring them back into the mortal plane.

There are also some more interesting things that could be done with rendering ghosts. I think that a neat effect would be to not draw dead players, but slightly desaturate the area around them and majorly desaturate the view of players that are in contact with them. Ghosts could also appear as glowy orbs in screenshots (or maybe cubes might fit our artistic style more) and put out torches that they come in contact with.

Anyway, what do you guys think?

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

by 4aiman » Post

I'm violating my own decision not to post anything in topics that aren't my, but this is really awesome!
Thanks, hdastwb! THIS is the kind of features having which we can say that Minetest is better than Minecraft. THIS is smth we can be proud of. I can't express all my happiness to read smth like this was done.

Great Ideas!
Desaturation would be COOL!

I only suggest that the "ghost-time" should be limited. (if there are no rituals to revive ;) Or there should be some penalty for being ghost (like weakness when use tools/weapons or lowered Max HP or damage from too bright light) which will come to normal after some amount of time.
Otherwise this will be used for purposes of locating ores and minerals.
Also, a "respawn" button would be nice.

Do you have any ideas that can logically (or para-logically ;) explain how one can become a ghost if there are no way to kill oneself with jumping off too high place or by taking damage from mobs? Say, you're in a 4x4x4 "room" with only one exit you can't reach and you don't have any tools and materials to make one. Maybe if someone is a ghost he/she still should be able to kill others? (Maybe very slowly, but "punching ghosts" will be some kind of a poltergeist ;)
I'm curious, 'cause it's interesting to finally get rid of "I'm stuck" situation in a multiplayer, where you can't go flying every time you're stuck.

Also, maybe ghosts should be able to build things from invisible and walkable-through for normal players blocks? So ghosts will be able to build their own cities out of that blocks. Normal player should be able to place any block at the pos where "ghost block" was (just like air). And while in ghost-city time is stopped for ghosts and their penalty timer doesn't ticks.

Regards!
Last edited by 4aiman on Fri Apr 05, 2013 21:53, edited 1 time in total.

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

by Jordach » Post

I like this so much. When you die as a ghost, do you become a ghost ghost?

OR.

When you die as a ghost, you die forever!
viewtopic.php?f=10&t=19056 Solar Plains Dev Server

User avatar
CryAngel
Member
Posts: 68
Joined: Thu Apr 04, 2013 10:56

by CryAngel » Post

dead players become ghosts rather than being asked to respawn!
this remind me Ultima Online :)

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

Yeah looks like I got to make a Grave Yard in my city.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

User avatar
hdastwb
Member
Posts: 106
Joined: Tue Jan 01, 2013 18:47
GitHub: hdastwb
IRC: hdastwb
In-game: hdastwb
Location: United States

by hdastwb » Post

I wasn't really thinking of being able to interact or take damage when being a ghost, but those do open up some interesting possibilities. I think ghosts should get all of the tools that wear out, burnt fuel, and the stuff that people /pulverize; I've always wondered where that really goes. Maybe flicker the ghost structures into view every now and then in the distance to keep players on edge, though that may be somewhat taxing on the engine. I'm still not sure about taking damage, though; it doesn't seem like there would be any way of hurting a ghost.

As much as being able to extinguish torches could freak still living players out, ghosts would probably need some miniscule amount of damage ability to haunt successfully. If the other players have to unghost someone, that would be one way of gently reminding them…

Oh, and maybe there could be some way to exclude ghosts from moving into certain areas; thus, people could make ghostlight mods and such to prevent their houses from becoming haunted…

User avatar
prestidigitator
Member
Posts: 640
Joined: Thu Feb 21, 2013 23:54

by prestidigitator » Post

Cool. Suggestion: instead of taking damage, some things might push the ghost violently away or freeze them in place for a short time.

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

by tinoesroho » Post

For a rudimentary version, you can write a mod that, on player death, does this:
1) Revokes interact
2) grants noclip
3) grants fly

... And voila, you have free-floating ghosts. If you combine it with the Bones Mod, the inventory gets dumped into the bones...
... and twenty minutes later, reinstate old privs and revoke fly.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/

User avatar
InfinityProject
Member
Posts: 1009
Joined: Sat Mar 17, 2012 00:52
Location: World of Infinity, US

by InfinityProject » Post

Nice! What if when you became a ghost you left a "dead" entity where you died. Then somehow you could merge back to become living again?

User avatar
fraang
Member
Posts: 10
Joined: Thu Oct 11, 2012 14:42

by fraang » Post

What's about this idea:

Players who are ghosts can see some kind of ghost structures which normal player can't see. Like old temples, ruins or fortress. Maybe someone can find ghost artefacts with a very, very small probability. These ghosts artefacts could be swords, armors and so on which have normal strength but look cool.

User avatar
rarkenin
Member
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Post

fraang wrote:What's about this idea:

Players who are ghosts can see some kind of ghost structures which normal player can't see. Like old temples, ruins or fortress. Maybe someone can find ghost artefacts with a very, very small probability. These ghosts artefacts could be swords, armors and so on which have normal strength but look cool.
With the current system of nodes, this is hard to implement.
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.

User avatar
Linxx
Member
Posts: 406
Joined: Wed May 16, 2012 00:37

by Linxx » Post

can possessing lets say a node be possible and start jumping around when doing that?

User avatar
Chinchow
Member
Posts: 684
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Post

How about when you become a ghost the players former body
(a new entity) becomes a zombie that mindlessly attacks other players and destroys blocks

sort of like heartless and nobodies
man defeated heartless is soul nobody is the shell
player defeated ghost is soul zombie is the shell
This in my opinion is better than Minecraft's oh there are zombies just around for no reason

Edit: 500th post!
Last edited by Chinchow on Sun Apr 07, 2013 21:13, edited 1 time in total.
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

I think we should try make it like, you can watch others fight when you dead and, until that team all dead, you respawn well have it like that for PvP.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

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

by 4aiman » Post

rarkenin wrote:
fraang wrote:What's about this idea:

Players who are ghosts can see some kind of ghost structures which normal player can't see. Like old temples, ruins or fortress. Maybe someone can find ghost artefacts with a very, very small probability. These ghosts artefacts could be swords, armors and so on which have normal strength but look cool.
With the current system of nodes, this is hard to implement.
On the contrary ;)
First, like I said, make new "ghostly" blocks replace-able (just like air node).
Second, make this new blocks invisible to normal players. All you need is to check some bool variable, like "is_ghost" or smth like that:

Code: Select all

If is_ghost and block.groups["ghostly"]<>0 
then 
   "render block"  or "let interact with block" or "open inventory" or "etc"
else 
   "do nothing"
end
^This is NO real code, just an example.
Third, these new "ghostly" blocks do not need to have any physics: ghosts are not the subject to the gravity ;)
Fourth, there can be ghostly chests too. Maybe /pulverize command can send items to such chests if there're any nearby. Also ghostly tools can make ghosts less transparent and add them the abilities to interact, speak, etc. And w/o special tools only ghosts should be able to hear a ghost.
Fifth, ghostly villages (TM, probably) can be placed in a huge caves or on the floating islands. They may be spawned like normal houses, but built of ghostly blocks.

Now to the things which ARE difficult...
How about being able to pass through the walls if there's a ghost nearby (a "circle" with the radius of 1-3 blocks around the ghost)? This will require to change blocks "walkable" param. While it isn't possible to change that atm, a needed function can be added.
The slow way is to register an ABM which will check for ghost and switch any node to it's ghostly substitute or other way round if there's NO ghost. For "turned" blocks ghostly group rating can be 1 and for initially ghostly - 2.
BTW, it would be nice to read ALL registered blocks and make ghostly copies after that ;)
However, to implement that the "ghost" mod should be the last loaded mod. How to make that possible w/o having to list all existing mods in the depends.txt?

So, what do you think about all above, people?
Last edited by 4aiman on Mon Apr 08, 2013 05:31, edited 1 time in total.

User avatar
Linxx
Member
Posts: 406
Joined: Wed May 16, 2012 00:37

by Linxx » Post

4aiman wrote:
rarkenin wrote:
fraang wrote:What's about this idea:

Players who are ghosts can see some kind of ghost structures which normal player can't see. Like old temples, ruins or fortress. Maybe someone can find ghost artefacts with a very, very small probability. These ghosts artefacts could be swords, armors and so on which have normal strength but look cool.
With the current system of nodes, this is hard to implement.
On the contrary ;)
First, like I said, make new "ghostly" blocks replace-able (just like air node).
Second, make this new blocks invisible to normal players. All you need is to check some bool variable, like "is_ghost" or smth like that:

Code: Select all

If is_ghost and block.groups["ghostly"]<>0 
then 
   "render block"  or "let interact with block" or "open inventory" or "etc"
else 
   "do nothing"
end
^This is NO real code, just an example.
Third, these new "ghostly" blocks do not need to have any physics: ghosts are not the subject to the gravity ;)
Fourth, there can be ghostly chests too. Maybe /pulverize command can send items to such chests if there're any nearby. Also ghostly tools can make ghosts less transparent and add them the abilities to interact, speak, etc. And w/o special tools only ghosts should be able to hear a ghost.
Fifth, ghostly villages (TM, probably) can be placed in a huge caves or on the floating islands. They may be spawned like normal houses, but built of ghostly blocks.

Now to the things which ARE difficult...
How about being able to pass through the walls if there's a ghost nearby (a "circle" with the radius of 1-3 blocks around the ghost)? This will require to change blocks "walkable" param. While it isn't possible to change that atm, a needed function can be added.
The slow way is to register an ABM which will check for ghost and switch any node to it's ghostly substitute or other way round if there's NO ghost. For "turned" blocks ghostly group rating can be 1 and for initially ghostly - 2.
BTW, it would be nice to read ALL registered blocks and make ghostly copies after that ;)
However, to implement that the "ghost" mod should be the last loaded mod. How to make that possible w/o having to list all existing mods in the depends.txt?

So, what do you think about all above, people?
what about spawning the villages under water too :D

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

by rubenwardy » Post

InfinityProject wrote:Nice! What if when you became a ghost you left a "dead" entity where you died. Then somehow you could merge back to become living again?
That would be easy, not it would not even require c++ code. Just a mod to spawn a ghost entity.

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

rubenwardy wrote:
InfinityProject wrote:Nice! What if when you became a ghost you left a "dead" entity where you died. Then somehow you could merge back to become living again?
That would be easy, not it would not even require c++ code. Just a mod to spawn a ghost entity.
But won't you need C++ to add, it to the build?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

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

by rubenwardy » Post

Likwid H-Craft wrote:
rubenwardy wrote:That would be easy, not it would not even require c++ code. Just a mod to spawn a ghost entity.
But won't you need C++ to add, it to the build?
Nope.

There is an on_death call back, and you can use that to spawn an ghost entity.

The player would not be able to control the ghost entity, unless a hacky cancel respawn system.
Last edited by rubenwardy on Mon Apr 08, 2013 12:47, edited 1 time in total.

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

by 4aiman » Post

Linxx wrote:what about spawning the villages under water too :D
Underwater you say...
Well, if there would be a node which will be drawn as a water node for alive and as any other node for dead, then maybe.

Also I really want to hear either "yes" or "no" concidering my suggestions above from the one who will continue developing ghosts ;)

User avatar
faraway
Member
Posts: 36
Joined: Thu Dec 08, 2011 00:17

by faraway » Post

fraang wrote:What's about this idea:

Players who are ghosts can see some kind of ghost structures which normal player can't see. Like old temples, ruins or fortress. Maybe someone can find ghost artefacts with a very, very small probability. These ghosts artefacts could be swords, armors and so on which have normal strength but look cool.
In the old ruins, you could find an artifact which can bring the targeted player (or yourself) back to life. So many possibilities with the "ghost" idea.

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

by 4aiman » Post

Any progress with this? The most awesome features can't wait ;)

User avatar
doyousketch2
Member
Posts: 115
Joined: Tue Feb 05, 2013 16:06
GitHub: doyousketch2
In-game: Sketch2
Location: Ohio
Contact:

by doyousketch2 » Post

Just saw this ghost mod and thought the skeleton mod I'm making kinda fits in.

Image

Maybe when you die, your body decays into a skeleton, then you float away as a ghost...
Last edited by doyousketch2 on Thu Apr 11, 2013 23:41, edited 1 time in total.

User avatar
hdastwb
Member
Posts: 106
Joined: Tue Jan 01, 2013 18:47
GitHub: hdastwb
IRC: hdastwb
In-game: hdastwb
Location: United States

by hdastwb » Post

I'm going to be really busy with my schoolwork for at least a month or two until my summer break; it will probably be a while until I get very much other free time. I'm also not sure that I have the familiarity with the engine that is needed to make such a big change without majorly messing something up for someone, though I have read through a good amount of the code and understand the basic structure. Thus, if someone else is willing to step up and try their hand at implementing this stuff in my absence, I would very much welcome the work.

Honestly, I'm glad that this has received such a positive following; my experiences so far with code contribution have been demoralizing to say the least:
  • I posted a patch to make furnaces honor replacements and to make burning lava buckets not waste the buckets; it received a positive following on the forums and then when I posted the pull request (https://github.com/minetest/minetest_game/pull/105), nothing happened for a couple months, some shortcomings that didn't really apply to what it aimed at combating were pointed out, and it was eventually added to the game seemingly as an afterthought
  • I like to use some of the newer features from C++ in my code (ranged-for and initializer lists in particular) that make the code much cleaner and easier to follow; it seems to me that most modern compilers these days support some of the more basic features of C++11 and so I made a pull request that would make Minetest compile with those features (https://github.com/minetest/minetest/pull/596), but that was picked apart and brutally struck down within a day because none of the compilers used with Minetest are fully compliant with the entire standard and some of the developers still use somewhat ancient compilers and can't upgrade for some reason
  • I was reading a thread (http://forum.minetest.net/viewtopic.php?pid=81266) that brought up a logical way of generalizing the shared mod system implied by the new grouping of all of the minetest_game mods into a separate "common" folder; I took that up and put in a pull request (https://github.com/minetest/minetest/pull/599), and though it received some support in the thread it seems to be all but rejected in GitHub
I can't say I hold any of this against the Minetest community or the main developers; I just don't trust myself to do anything to their liking and I am not apt to put much work into anything more involved than the smallest, most obvious bug fix until I am convinced that I am actually on the same page as everyone else involved in the engine work. I also may still be a bit bitter about all of this, so I might feel better after taking a bit of a break…

That said, kwolekr, PilzAdam, and c55, if you could post your opinions of this ghost stuff it would be greatly appreciated; to me, it's a much more major change than allowing some language features or a generalized shared mod system, thus I fell like it would get absolutely no support if it were ever up for being integrated into the engine.

User avatar
Linxx
Member
Posts: 406
Joined: Wed May 16, 2012 00:37

by Linxx » Post

they look like the grim fandango skeletons lol :D looks nice

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest