[Game] Minetest TNG [v16.08] - Free for backporting!

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: [Game] Minetest TNG [v16.08]

by LNJ » Sat Sep 03, 2016 08:35

pithy wrote:I don't like getting stuck on chairs, it makes me feel old.
My furniture mod implements sitting a different way.

I know your mod and I like your mod from the player-side, but I won't add this because it registers another globalstep and globalsteps will make the server slower and slower.
Globalsteps run all the time and that is unnecessary waste of resources (at least in this case).

But I would know a compromise:
Right-click to enter a chair, shift to leave it (completely without globalsteps).

So my idea (for devs):
- a on_rightclick function for chairs that'll let the player sit onto the chair
- after that, we'll start a minetest.after-loop it'll check if the player has pressed the shift key, if so the player will stand up again.
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
function sit_up_on_shift(...)
        <check the controls>
        if shift_pressed then
                sit_up(...)
        else
                 minetest.after(.8, sit_up_on_shift, ...)
        end
end

on_rightclick = function(...)
        sit_down(...)
        sit_up_on_shift(...)
end


What do you think about that?
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

Byakuren
Member
 
Posts: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

Re: [Game] Minetest TNG [v16.08]

by Byakuren » Sat Sep 03, 2016 10:04

globalsteps make the game "slower and slower", but so do minetest.after loops, anyway.

Adding a timer to the globalstep would probably be enough to make the cost negligible. If the timer hasn't elapsed, that's just an additional index to iterate over, a function call, a comparison, an addition, and an assignment, which together will have basically no footprint. When it has elapsed, it won't be any worse than a minetest.after loop, since it will have to do the processing in either case. minetest.after might even perform worse on a small step like 0.8, because it will have to mess with the queue each time the event occurs. A good argument for minetest.after though, would be that it's conceptually simpler to do a timed loop with minetest.after than with a globalstep, and also avoids doing all the processing for all players at once, which would cause (probably small) lag spikes every 0.8 seconds. It would be possible to stagger the processing, but that would require more complicated logic that minetest.after basically already does.

I think that furniture mod needs to move the sitting logic out of ABMs and into a globalstep or minetest.after loop though, checking for each player instead of for each node. This is because the number of chairs can in general be much higher than the number of players. A timer should also be added to the globalstep, or switch to a minetest.after loop.

Whether anything is really a significant performance drain, unless it is very obvious, requires profiling. It's not worth sacrificing functionality unless you have a good reason to think it will be significant.

As a note, you can implement anything that would ordinarily use globalsteps "completely without globalsteps" using minetest.after(0) and minetest.get_gametime() (if you require dtime), so it's not a great accomplishment.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: [Game] Minetest TNG [v16.08]

by LNJ » Sat Sep 03, 2016 11:23

Byakuren wrote:globalsteps make the game "slower and slower", but so do minetest.after loops, anyway.

Yes, of course, but the minetest.after loop is ONLY called when a player is really sitting and not all the time, so even if the player is doing something else and nobody has ever built a chair.

Byakuren wrote:Adding a timer to the globalstep would probably be enough to make the cost negligible. If the timer hasn't elapsed, that's just an additional index to iterate over, a function call, a comparison, an addition, and an assignment, which together will have basically no footprint. When it has elapsed, it won't be any worse than a minetest.after loop, since it will have to do the processing in either case. minetest.after might even perform worse on a small step like 0.8, because it will have to mess with the queue each time the event occurs. A good argument for minetest.after though, would be that it's conceptually simpler to do a timed loop with minetest.after than with a globalstep, and also avoids doing all the processing for all players at once, which would cause (probably small) lag spikes every 0.8 seconds. It would be possible to stagger the processing, but that would require more complicated logic that minetest.after basically already does.

Maybe 0.01% (or even less) of the game time a player sits on a chair, so even if the minetest.after loop is worse in the time it's active than the globalstep, overall the minetest.after loop would perform much better.

Byakuren wrote:I think that furniture mod needs to move the sitting logic out of ABMs and into a globalstep or minetest.after loop though, checking for each player instead of for each node. This is because the number of chairs can in general be much higher than the number of players. A timer should also be added to the globalstep, or switch to a minetest.after loop.

Whether anything is really a significant performance drain, unless it is very obvious, requires profiling. It's not worth sacrificing functionality unless you have a good reason to think it will be significant.

As a note, you can implement anything that would ordinarily use globalsteps "completely without globalsteps" using minetest.after(0) and minetest.get_gametime() (if you require dtime), so it's not a great accomplishment.

I did not say that's a great accomplishment. I just wanted to offer a compromise, that would be ok about the performance and would not 'let the player stick in'.
But I would prefer it as it is.
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Game] Minetest TNG [v16.07]

by hajo » Fri Nov 11, 2016 11:56

Byakuren wrote:Is there any documentation?


I think this game should be listed on the wiki,
and should also get its own page on that wiki.

What should I know about playing the game, other than craft recipes?

How to use the new items (armor, bonemeal, feathers, workbench...),
how to deal with the mobs (what's the point of taming sheep ...),
and maybe general advise (to put into a guidebook, to get noobs up to speed).
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: [Game] Minetest TNG [v16.07]

by LNJ » Sun Nov 13, 2016 14:43

hajo wrote:
Byakuren wrote:Is there any documentation?


I think this game should be listed on the wiki,
and should also get its own page on that wiki.

What should I know about playing the game, other than craft recipes?

How to use the new items (armor, bonemeal, feathers, workbench...),
how to deal with the mobs (what's the point of taming sheep ...),
and maybe general advise (to put into a guidebook, to get noobs up to speed).

1. You can just craft armor and put it into the armor slots in the inventory and you will get less damage
2. Just rightclick with bonemeal wielded to let flowers, waterlilies and grass grow
3. feathers don't have any sense
4. You can use the workbench as decoration, (I thought about making the crafting field in the inventory 2x2)
5. Just give a sheep 4 wheat to tame it (4 wheat seeds to a chicken)

If you want you can create a page on the wiki, would be nice. :)

Thanks for playing. (I don't play Minetest at the moment, so I also don't update this game, but feel free to make pull requests if you updated something locally)
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Game] Minetest TNG [v16.08]

by hajo » Sun Nov 13, 2016 17:17

LNJ wrote:
hajo wrote:should also get its own page on that wiki.
If you want you can create a page on the wiki, would be nice. :)

Already done, but that page needs a description for TNG, and more text...
hajo wrote:how to deal with the mobs (what's the point of taming sheep ...),
and maybe general advise (to put into a guidebook, to get noobs up to speed).
1. You can just craft armor and put it into the armor slots in the inventory and you will get less damage
2. Just rightclick with bonemeal wielded to let flowers, waterlilies and grass grow

I found that out, but that kind of thing should be in a welcome-text / survival-guide.

LNJ wrote:3. feathers don't have any sense

Maybe add bows to the game, and make arrows with sticks+feather+(stone/steel/etc)
Setting up a shooting gallery, for sniping at zombies, might be fun :-)
I noticed some spot in my game where mobs often get stuck until morning...

LNJ wrote:5. Just give a sheep 4 wheat to tame it (4 wheat seeds to a chicken)

I can rightclick sheep while wielding wheat, the wheat vanishes, the sheep
follows me for some time, but I see no effect or message that taming was successful.
And they still die in the evening - so I might be missing something.

With debug, it always shows hp=8, but then, they die from one punch too many.
Perhaps hp for sheep are not updated correctly ?

Also, "what's the point" - how do I use all that wool, after bed and carpets are done ?
And fighting mobs doesn't give much benefit, with the current poor drops.

BTW, putting a chair or table onto a carpet looks goofy :)
Can Zombies spawn in a room of height 2 with carpets ?
Can they climb ladders ?

LNJ wrote:Thanks for playing.

I'm still in "stoneage", i.e. I haven't found ore yet.
I added a mod to get coal from wood, to make at least torches.

LNJ wrote:feel free to make pull requests if you updated something locally)

I'd need a github-account for that ?
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: [Game] Minetest TNG [v16.08]

by LNJ » Sun Nov 13, 2016 19:47

hajo wrote:Can Zombies spawn in a room of height 2 with carpets ?
Can they climb ladders ?

I'm not sure if they'll spawn, try it out. (CME was written by BlockMen, I have only made some fixes and improved it a bit)
No, they can't climb ladders.
hajo wrote:I'd need a github-account for that ?

Yes (and maybe minimal git-knowledge). Just watch a tutorial on YouTube, for that. (you won't need more than an hour to make your first PR)
It also would be great if someone would keep the game up to date, there are many things that were added in MTG, but are still missing in TNG.

As I said I don't play Minetest at the moment and I also don't have much time (school :( ), so I won't do much in the next time. It would be nice if somone would maintain this game a bit, so all my work is not "lost".
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Game] Minetest TNG [v16.08]

by hajo » Mon Nov 14, 2016 18:57

LNJ wrote:As I said I don't play Minetest at the moment and I also don't have much time (school :( ),
so I won't do much in the next time.
It would be nice if somone would maintain this game a bit, so all my work is not "lost".

Ok, I also put up a talk-page on the wiki for comments and ideas about TNG.

I found 2 different bow-mods, still testing...
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: [Game] Minetest TNG [v16.08]

by LNJ » Mon Nov 14, 2016 19:07

hajo wrote:
LNJ wrote:As I said I don't play Minetest at the moment and I also don't have much time (school :( ),
so I won't do much in the next time.
It would be nice if somone would maintain this game a bit, so all my work is not "lost".

Ok, I also put up a talk-page on the wiki for comments and ideas about TNG.

I found 2 different bow-mods, still testing...

The most bow mods are somewhat buggy.

A talk page on the wiki for ideas, is really not need. GitHub is a much better place for that. :)
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Please help to backport this game to MTG! :)

by LNJ » Fri Dec 16, 2016 14:43

This game is currently getting more and more outdated ... I have spent not little time on it, but I'm currently not maintaining it ... :(

So .. I would like to see the good features of this game not being lost. Now it's up to you! If you want to backport some features, you can ask me (under this topic) and use my code as LGPLv2.1 and merge it into MTG (or any other game, licensed under a LGPL-compatible license).

The asking is to prevent that code is used, that was written by somebody else, e.g. kilbith, BlockMen (I can't relicense that parts!) and so I and everybody else knows which PRs for which parts exist.

<ads>
I'm currently working on a jabber client in C++/QML: https://github.com/KaidanIM/Kaidan
</ads>

PS: This is the 100th post on this topic :D
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

Previous

Return to Subgame Releases

Who is online

Users browsing this forum: No registered users and 4 guests

cron