Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Several arenas #87

Open
ObaniGemini opened this issue Mar 1, 2016 · 30 comments
Open

Several arenas #87

ObaniGemini opened this issue Mar 1, 2016 · 30 comments

Comments

@ObaniGemini
Copy link
Member

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
Copy link
Member

BetterToAutomateTheWorld commented Mar 1, 2016

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

@Lymkwi
Copy link
Member

Lymkwi commented Mar 1, 2016

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
Copy link
Member Author

@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
Copy link
Member

small drawing :
drawing

@ghost
Copy link

ghost commented Mar 1, 2016

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
Copy link
Member Author

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
Copy link

ghost commented Mar 2, 2016

@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
Copy link
Member

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
Copy link
Member Author

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

@Lymkwi
Copy link
Member

Lymkwi commented Mar 2, 2016

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 :

  • Storing the arena's data throughout the game
  • Generating and maintaining multiple sets of glass walls (with multiple arena centers)
  • Refilling only chests present in an arena (can be done by hacking the chest filler to check if each chest is inside the arena's limit coordonates)

@Lymkwi
Copy link
Member

Lymkwi commented Mar 25, 2016

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
Copy link
Member

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
Copy link
Member

Lymkwi commented Mar 25, 2016

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 :

  • The code I pushed declares only one arena at (0,0), which is the currently generated and operating one
  • Chests should be stored in their own file, but eventually you'll have to remove random_chests.chests or the server will perpetually load its data at boot
  • Random spawnpoints can (and will have to) be changed in their save file quite easily. For each currently set spawnpoint, add "_0" between "player" and "_n" where n is the number of the spawnpoint. Later on, when you set other spawnpoint, the syntax of the command will not change, for you'll not need to input the arena's ID, it'll be automatically added by hg.

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
Copy link
Member

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
Copy link
Member

Lymkwi commented Apr 1, 2016

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
Copy link
Member

BetterToAutomateTheWorld commented Apr 2, 2016

Yes, it's merged.

@BetterToAutomateTheWorld
Copy link
Member

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

@Lymkwi
Copy link
Member

Lymkwi commented May 15, 2016

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
Copy link
Member

BetterToAutomateTheWorld commented May 15, 2016

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

(Link @ObaniGemini)

@Lymkwi
Copy link
Member

Lymkwi commented May 16, 2016

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
Copy link
Member

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

@BetterToAutomateTheWorld
Copy link
Member

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
Copy link
Member Author

ObaniGemini commented May 20, 2016

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

UP, someone can export the maps we need ?

@Lymkwi
Copy link
Member

Lymkwi commented Jun 19, 2016

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
Copy link
Member

Lymkwi commented Aug 18, 2016

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
Copy link
Member

BetterToAutomateTheWorld commented Aug 18, 2016

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants