Persistent portals weapon idea

3 replies [Last post]
KIRA
User offline. Last seen 2 days 12 hours ago. Offline
Joined: 2014-09-23
Posts: 14

I was thinking at this: A portal gun that has only 2 ammunition, one green portal and one purple portal. These portals stay trough all the duration of the match and if one is destroyed the other will do the same. For avoiding an infinite cycle of falling hogs or graves my friend that is already trying to write the code for this weapon suggested to let the portals disappear at the end of the turn and let them reappear at the start of the next one. I think that unlike what it seems this little change leads to a big difference between the normal portal gun and this new one. This new weapon would not be overpowered, on the contrary i think the existing one is way more powerful but still i think this would be a nice addition to the game.
Sorry for my english.

nemo
nemo's picture
User offline. Last seen 2 hours 29 min ago. Offline
Joined: 2009-01-28
Posts: 1744

There is already cycle breaking in existing portal code, which is why hogs don't fall endlessly when you trap them in a loop. It's not that they reach the edge ☺. sheepluva did experiment with small nudges to break loops long ago, but unfortunately wasn't an approach that worked with rolling objects.

You can certainly make very very long creative cycles with ice slides and rubber with portals at top and bottom however that could be a bit annoying in-game. But eh, if people allow 'em to be built, they probably wanted it ☺

The loop breaking counter is PortalCounter and is reset in EndTurnCleanup (and a few other special cases).

As for persisting beyond end of turn, yeah, have thought it could be a neat option to the portal gun. We might want to number/colour them to make it easier to tell apart if there were a lot of guns active. I think it was the overall chaos issues that made us clean it up. Things like... does the portal trap enemy hogs in impossible situations? does it cause semi-loops? But we could certainly fiddle with it.

Just not something anyone has fiddled with. Want to come by IRC/Live Chat to discuss implementation? I've also wanted to add an option to control what a portal can move. Right now portal was removed from Default as OP, but with a filter that restricted what could be moved to [non-hogs|non-hogs+allied|all] it might be more usable in different situations.

You could probably script up a fake persistent portal gun in lua though. Just by respawning it after end of turn ☺ That might be a good test case to see how much it screws up.

Another thing you could do in lua right now btw is increasing size of portal. The capture range is controlled by Radius and you could scale up the sprite.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

nemo
nemo's picture
User offline. Last seen 2 hours 29 min ago. Offline
Joined: 2009-01-28
Posts: 1744

Bit of followup from channel discussion. If you wanna see just how nuts it can get with 16 active portals (pretend one pair per team) just set infinite time, switches and portal guns, and use 1 pair per hog on your team. It's pretty confusing.

A big concern for me would be using permanent portal pair to setup a trap an enemy hog could never escape because the portal loop counter would get reset at beginning of turn and he'd begin falling again.

Was thinking one way to make a permanent portal would be resurrect structures. Structures had been a proposal to make map permanents that provided effects, like rearming, healing, shielding. or... being a stargate - effect would be chosen when building. Could activate one when in proximity and link it to another structure of same type elsewhere on map, it would have to be reactivated once per turn so no trapping. Could add other effects like using it as a remote bomb when blowing up one of a linked pair or something.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KIRA
User offline. Last seen 2 days 12 hours ago. Offline
Joined: 2014-09-23
Posts: 14

Alright, sounds good.

Copyright © 2004-2017 Hedgewars Project. All rights reserved. [ contact ]