MinetestForFun / server-minetestforfun-hungry_games

Repository of the subgame and mods of "MinetestForFun Hunger Games" server
https://www.xorhub.com
3 stars 1 forks source link

Several arenas #87

Open ObaniGemini opened 8 years ago

ObaniGemini commented 8 years ago

I think we should support to have several arenas. That would mean to have a random set of spawn for each arena. The arena would be chosen randomly at the beginning of the match.

Also, maybe add a vote system to allow changing the map during the game (to avoid trolls, >79% yes needed IMO)

Some vote system can be found here https://github.com/rubenwardy/capturetheflag/tree/master/mods/vote

BetterToAutomateTheWorld commented 8 years ago

Forget the vote system for the moment, the main goal is to teleport players to more than 1 arena

Lymkwi commented 8 years ago

Considering how Hg is designed this is not possible without breaking all the code in hungry_games/engines.lua. It is not made to support multiple games at once... However, trying to make it do so would surely result in terrifying instability or quirks... We could have multiple arenas with spawn points but there couldn't more than 1 game at once. Honestly I don't want to do that... We're fine the way we are now...

ObaniGemini commented 8 years ago

@LeMagnesium : it is not about having several games at once, it's still about having one game but in a choice of some arenas. The game would be played in one arena chosen randomly. Anyway the arenas aren't even made yet so it's low priority for now.

BetterToAutomateTheWorld commented 8 years ago

small drawing : drawing

ghost commented 8 years ago

c'est vrai que ça va casser quelques truc, il faudrait séparer les chest en plusieurs tables correspondant au arènes pour le refill et pareil pour les spawnpoint. du genre

num = random(#arenes)
table[num].chest
table[num].spawn

avec tout le bordel derrière pour charger tout ça.

ObaniGemini commented 8 years ago

I don't understand the point. If there's only one game at once, why should we refill only the chests of one arena ? It will make more work for only a little lag dicrease.

@Ombridride : your drawing is not clear enough. Are the games played at the same time or one after the other ?

(EDIT @Ombridride : Drawing improved)

ghost commented 8 years ago

@ObaniGemini je ne comprend pas/ou j'ai pas compris le principe, mais tu veut refill 4000 chest dont la plupart seront déchargés? Et avoir un seul fichier de chest pour tous. avec ce que j'ai dit le jour ou tu veut désactiver une arène tu peut.

BetterToAutomateTheWorld commented 8 years ago

Oui @crabman77 ta solution est celle à adopter

@ObaniGemini I found this : https://forum.minetest.net/viewtopic.php?f=12&t=13836&view=unread#p203613 Pretty beautiful medieval town, will be great as an arena ?

ObaniGemini commented 8 years ago

@Ombridride : nice idea ! I think we should tweak the castle to make a HG map :)

Lymkwi commented 8 years ago

Okay, so, first, there is the spawn issue. For now hg stores spawn positions with the name player_n, n being a randing integer. If we create multiple arenas, the only way we could guarantee that all players are in the same arena is by changing the naming convention to use something like player_arenaID_n. That would only solve the spawn issue ; we would still need to solve the following points :

Lymkwi commented 8 years ago

With this commit we should be able to set multiple arenas in the world. (little warning though, I'm not 100% the chest file will be converted. Just in case, you should move random_chests.chests to random_chests_0.chests or have a backup.)

BetterToAutomateTheWorld commented 8 years ago

Yes, a backup is a good idea :)

So, the next time I will merge + reboot, multiple arena are "activated" and i need to also re-set the spawn points ?

Lymkwi commented 8 years ago

So, the next time I will merge + reboot, multiple arena are "activated" and i need to also re-set the spawn points ?

Technically, you can avoid all of this :

I think that's it. If everything goes according to my plans and you modified the files, it shouldn't even be noticable that we changed something for players in the game.

BetterToAutomateTheWorld commented 8 years ago

Ok, spawn file modified, here is the new one :

player_0_6 -64.127006530762 11.5 -51.975002288818
player_0_18 104.98101043701 18.5 2.9379999637604
player_0_4 104.95000457764 18.5 -1.0460000038147
player_0_10 97.127006530762 17.5 12.01100063324
player_0_15 7.9400000572205 21.5 82.737998962402
player_0_8 -1.027999997139 21.5 79.968002319336
player_0_19 -0.086000002920628 21.5 70.099998474121
player_0_14 90.037002563477 18.5 -1.9299999475479
player_0_11 13.78600025177 21.5 75.952003479004
player_0_13 -58.950000762939 12.5 -39.016002655029
player_0_20 -58.082000732422 11.5 -51.048000335693
player_0_17 -65.948997497559 11.5 -37.982002258301
player_0_12 -69.036003112793 12.5 -40.930999755859
player_0_16 -69.068000793457 12.5 -48.90299987793
player_0_7 97.98900604248 17.5 -9.9569997787476
player_0_2 3.220999956131 21.5 82.775001525879
player_0_5 6.0240001678467 21.5 68.403007507324
player_0_1 89.971000671387 18.5 3.0030000209808
player_0_9 -56.005001068115 12.5 -45.064002990723
player_0_3 -61.887001037598 11.5 -38.200000762939
lobby 0 30000.5 0
spawn 0 30000.5 0
Lymkwi commented 8 years ago

Have you merged the multiple arena code yet? If you haven't, it's time now. The spawn name modification doesn't work if you use the old code, and the old naming convention of spawns will not work with the code currently in the repository.

BetterToAutomateTheWorld commented 8 years ago

Yes, it's merged.

BetterToAutomateTheWorld commented 8 years ago

Up, is the code for adding some arena areas (spawns, chests, random arena choice) ready ?

Lymkwi commented 8 years ago

Up, is the code for adding some arena areas (spawns, chests, random arena choice) ready ?

Everything is ready, as far as I know. For now the system only has one arena. (I cannot say that every little detail will work perfectly but things will be okay when you merge)

BetterToAutomateTheWorld commented 8 years ago

Ok perfect, I will add soon two arenas imported from this 2 maps :

(Link @ObaniGemini)

Lymkwi commented 8 years ago

I think you should install signs in the lobby to give credits for the maps. It's just an idea, but I think it would be great.

BetterToAutomateTheWorld commented 8 years ago

Yes you're right, it's a good idea

BetterToAutomateTheWorld commented 8 years ago

I will try to add 1 or 2 more arenas this week, it's a huge work (because of chests, secrets, spawn, terraforming, maps improvments, etc...)

In this way, if you want to help me, do not hesitate to inform me and I will give you the necessar privileges :)

ObaniGemini commented 8 years ago

When would you plan to do it ?

EDIT : sorry for not having been there at this time I couldn't come for personal reasons.

BetterToAutomateTheWorld commented 8 years ago

I will activate the "maintenance mod" of the HG server as soon as im home this night, i will disable it only when it's over

BetterToAutomateTheWorld commented 8 years ago

After some problems about the schematics saving, the maintenance and the arenas addition are reported...

I need to export the needed schematics and then import them to the HG server before the beginning of the creative/maintenance mod

BetterToAutomateTheWorld commented 8 years ago

post-it here :

Sent 21 hours and 25 minutes ago: Il faut installer avec pip3, pardon (ou python3 -m pip install --editable . ; pour si tu as python3-pip d'installé)

BetterToAutomateTheWorld commented 8 years ago

UP, someone can export the maps we need ?

Lymkwi commented 8 years ago

I've sent you a link to the quartz palace already, and I'm waiting to export the second map. EDIT: In case you lost it : https://up1.ca/#2nxf5VmqWxvvfRTPXsls-A EDIT2: Here's medieval https://up1.ca/#ZA3bX-8-SYJtxD_GYNHpQQ Also I'm gonna have to figure out a way to have different sizes of arenas

Lymkwi commented 8 years ago

Up. I'm waiting for the system to be put in place, meaning that we have to decide where to place the other arena, and import those maps. That's most likely @Darcidride's job.

BetterToAutomateTheWorld commented 8 years ago

Yes, I need to schedule this task Thank you for the assignment