Giter VIP home page Giter VIP logo

hq's Introduction

Headquarters

Demonstration

This is an experimental mod for GZDoom that allows the player to go to another map for a while, and then return back.

Basically, this is an extension for GZDoom hub feature. This mod saves the player position and the current map name so player can return back.

What this can be used for

  • Slayer Gate analog.
  • Scroll of Town Portal for RPG-like dungeon/town game loop.
  • Injecting more levels in an existing mappack mid-level.

Features

  • works with existing maps, no map editing required.
  • works in multiplayer.
  • accessible via hotkey (see keyconf.txt), or from arbitrary ZScript code (see API).

Caveats

  • HQ map should be defined for each cluster.
  • every cluster/hub must have its own "headquarters" map. It's possible to edit the code so every map has its own HQ map.
  • for the HQ map to save its state clusters must be hubs or manually redefined as hubs in mapinfo. If player moves between hubs, the HQ map loses its state. No problems for typical Doom/Heretic/Hexen episodes, problematic for Doom 2 clusters: player may not realize that moving to the next map resets HQ map.
  • making a cluster a hub may result in savefile bloat (all maps in cluster become stored in a savefile).
  • doesn't work in LZDoom (see this bug).

API

hq_Api class has two functions:

  1. request() - requests transportation to an HQ map.
  2. requestBack() - requests transportation back to a normal map from an HQ map.

request() will do nothing if the player is already in an HQ map. requestBack() will do nothing if the player is in a normal map.

Both functions are data scope, meaning that they can be called from all all scopes, including UI. The actual code that makes the change is synchronized with network events.

Examples:

// For transportation to an HQ map:
hq_Api.request();

// For transportation back from an HQ map:
hq_Api.requestBack();

Thanks to

  • Netheritor for a question that inspired this script library.
  • Nash Muhandes for helpful thoughts.

License

GPLv3.

hq's People

Contributors

mmaulwurff avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.