• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Designing a warp system

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,338
Hi,

In most RPGs I can think of, they do not place the game in a single map but rather separate maps/cells which are reached by using doors/warps.

My understanding is that a warp is a relation from a Door/Warp to a point. That is, a door/warp at point A moves things at to point B.

My dilemma is, are warps a relation between types (unique warps) or between tokens (instances of a warp type).

E.g., suppose I have a building called "Ferry" that acts as a warp between two islands, and suppose I have three islands which I need to link by using "Ferry."

Type approach
1. I make a custom object/building for each possible pairing of Ferries.
2. This gives me 6 objects to make: AB, AC, BA, BC, CA, CB
(where A, B, C are islands, and XY is a warp from X to Y).

Token approach
1. I make a single custom object called "Ferry."
2. I place six of these (two per island).
3. I then have to create variables for each instance of "Ferry" and map it to the appropriate other instance of "Ferry."

The former approach gives my code portability and modularity, since warp is a property that holds between two custom objects, but it comes at a cost of having a lot of custom objects--if I have N warps I'll need at least 2N unique buildings (assuming symmetry holds).

The latter approach only requires a single warp building (if I were lazy I could use "Ferry" for every possible warp), but it's ugly in that it has to be hardcoded by picking out unit variables.

So, what is the best approach to solving this?

I have been using a Type to Token approach but I have misgivings now...
 
Level 12
Joined
Nov 3, 2013
Messages
989
Can't you just have one ferry and when you "enter" it a list of dialog buttons are presented, each button representing a destination?

Edit: I might be that I don't understand the question actually. u.u
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
Yes I've already done that for a different system. These are strictly single valued (only one destination) and thus I am not using a dialog...
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
I don't get why you say first method has more portability and mobiity.

You have a Ferry object
Ferry Object has a destination

With second method you can go wherever you want.
 
Level 12
Joined
Nov 3, 2013
Messages
989
So it's that you have several ferries at different locations with only one destination and you're asking if you should have several rooms acting as ferries or if every ferry should be the same room?

Edit: If I now understand the question right it's not about it being practical but rather you want to be Stylish; I.E have several different looking ferries? But then I don't understand why you would be asking others about it... u.u
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
I don't get why you say first method has more portability and mobiity.

You have a Ferry object
Ferry Object has a destination

With second method you can go wherever you want.

The second method requires individually picking out unit variables--where as the first does not.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Use waygates for warps where possible as WC3 pathing system will try and route through them making navigating large maps with complex section maps considerably easier (no having to navigate individual sections to get from section A to section B through the map).
 
Level 12
Joined
Nov 3, 2013
Messages
989
Use waygates for warps where possible as WC3 pathing system will try and route through them making navigating large maps with complex section maps considerably easier (no having to navigate individual sections to get from section A to section B through the map).

Oh if it's just simple teleportation between points he should use waypoints, I were under the impression that there would be ferries acting as lobbies or something however.

Having characters standing in boat looking rooms with a nice scenery out the window might just have been wishful thinking though :c
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
Use waygates for warps where possible as WC3 pathing system will try and route through them making navigating large maps with complex section maps considerably easier (no having to navigate individual sections to get from section A to section B through the map).

Out of partial ignorance I avoided warp gates for a few reasons, probably which are all unfounded:

1. in all the major roleplaying game maps (SOTDRP, etc.) mass use of warpgate ability causes the selection bug

2. computer units with wander ability can use warpgates

3. computer units can follow players through warpgates (e.g. attacking them)

4. warpgates cannot be locked down for a particular player, e.g. either everyone can use them, or nobody can.

If these are wrong then perhaps I will re-consider a warpgate approach.
 
Level 28
Joined
Oct 28, 2011
Messages
4,759
I'm just gonna drop here the way how I make Door/Warp system on my map.

  • Interact Doors
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to (==) Interact
    • Actions
      • Set Temp_Unit[(Player number of (Triggering player))] = (Buying unit)
      • Set EP_Rect[0] = Mine Entrance <gen>
      • Set EP_Rect[1] = Outside Mine <gen>
      • Trigger - Run Camera Reset <gen> (ignoring conditions)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Selling unit) Equal to (==) Door 0023 <gen>
          • Then - Actions
            • Unit - Move Temp_Unit[(Player number of (Triggering player))] instantly to (Center of EP_Rect[0]), facing 180.00 degrees
          • Else - Actions
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Selling unit) Equal to (==) Door 0027 <gen>
          • Then - Actions
            • Unit - Move Temp_Unit[(Player number of (Triggering player))] instantly to (Center of EP_Rect[1]), facing 180.00 degrees
          • Else - Actions
Object data:
1 Unit = Door
1 Item = Interact
2 Variables = EP_Rect (Rect), Temp_Unit (Unit)
 
Status
Not open for further replies.
Top