Learning BYOND, Day 3: Armed and Dangerous

Today, I found that my brushing up on the fundamentals helped quite a bit. BYOND’s differences from the programming languages I’m comfortable with are beginning to melt away. I’m able to define classes of objects and place them intelligently in the game, as well as allow players to pick up and drop things. Some interesting things learned today include:

  1. Defining the name of an object enables the right-click menu interaction with verbs. This only seems to work if the verb’s access is set to a list of things (src in *list*) and not a single user (src = *specific user*).
  2. The interpreter won’t ask you which one you mean if you’re activating the same verb on identical objects. This caused me no end of confusion when I couldn’t figure out why it kept grabbing the nearest one (when access was set to “src in *list*”) or the sequentially first one (when access was set to “src = *specific user*”) without asking me which I want.
  3. When referring to turfs, think of them as containing the mobs and objects in them, and as though the turf literally is the location of the mob. Thus, if Mob is standing in Turf, Mob.loc equals Turf, *not* Mob.loc Equals Turf.loc. (I would guess this works the same way for items in a player inventory: item.loc Equals player, not item.loc Equals player.loc.)
  4. A good spot to initialize global variables is on the world’s New() procedure. Seems self-evident enough now, but prior to this I wasn’t sure the world even had a New() procedure. (This refers to initialization, the definition should be done at the root of the code.)
  5. I found out about “image” objects which, as far as I can tell, are completely missing from the guide. The details using them are still beyond me, but discovering this object is great news. Prior to this, I had the problem that everything displayed to a users’ client would actually be a part of the game world. Now, a custom GUI seems possible.

By the end of the day, I figured out a way to allow users to materialize new objects into their inventories or onto the game world. This is a major part of my game design, which involves a Mercenaries-like capacity to call in equipment and reinforcements in battle.

The players are now armed and dangerous — at least, able to pick up things and use them. They aren’t the only ones: now that I have these basics under my control, I know just enough to be dangerous to my fledging virtual world. Consequently, designing the working model on paper is becoming more important than before.

My current immediate technical challenges to overcome:

  1. Find better way to present the user with a selectable list of objects to be summoned.

    I could do so with just a bunch of separate verbs, but that’s sloppy. I could do so with an image overlay… this would probably be the best choice – but also one of the more technically challenging.

  2. Find a way for the player to cue way points to be executed by certain the mobs in the game.

    This core functionality would be useful both to set a balanced speed on players’ avatars – by default they run around as quickly as the players can hammer the keys and their connection allows and that’s unbalanced – and also for vital mob automation. At my disposal is some pre-created movement procedures, but they do not implicitly have waypoints built in… I think.

If I can get those two things out of the way, the biggest technical hurdles (besides the interface) are out of the way, and I can get down to actual game mechanic implementation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: