in

This site is all about the amazingly cool stuff you can do with VB.NET.

Heroic Adventure!

The [L]ook command

I actually managed to work on HA! some more this weekend while not doing "other" things (like driving almost 40 minutes each way to the airport to retrieve lost luggage... and tech-editing an upcoming VB 2008 book. (Paying gigs unfortunately must take priority over fun stuff.)

So anyway. I worked on the [L]ook command today. (Technically it's the [l]ook command since the lowercase "l" is the action key.)

Basically, the look command functions like this:

  1. Make cursor visible under Hero.
  2. Display instructions at top of screen (use movement keys to look, z or [spacebar] to exit.
  3. As player moves cursor around screen, display relevant information about location, following this order of precedence:
    • Has tile been seen before?
      • creature type (eventually add link to full description, with observed stats)
      • pile of items (There is a pile of items here.)
      • single item (show item name, eventually add link to more info.)
      • trap type (if previously discovered)
      • tile description (if nothing else is on the tile, show what type of tile it is)
    • If the tile has never been seen
      • "You don't know anything about this place."
  4. Loop until player presses z or [spacebar]
  5. Hide cursor
  6. Return control to main game loop

The tricky part about working on this is setting the order of priority and taking things like Line of Sight, Fog of War, etc into consideration.


This part is still in planning:
 

A couple of the items (creatures and items) that currently only display a type will link to a description page. The cool part behind this (as planned) is that the description page will be dynamically built based on what the Hero has observed: 

If you've never fought a Kobold, [l]ooking at a Kobold won't tell you much other than what it looks like. After you've fought a few, [l]ooking at one will tell you a lot more, such as approximate speed, how often they hit, how hard and what weapon type they use. Additional info such as how much experience they are worth, what sort of things they drop, etc might also be added.

Items would work the same way. If it's unidentified, you get nothing but the very brief item title. Once it's identified, you get a little more, and once you've used a few of that exact item type, you start getting more detailed info, averaged from usage results.

 

Comments

No Comments

About admin

Chris Williams is a Technology Evangelist for Magenic. He is the founder of several .NET User Groups on the east coast, and most recently the Twin Cities XNA User Group (www.twincitiesxnausergroup.com) in Minneapolis, MN. He is a VB.NET MVP, rabid blogger and owner of www.ILoveVB.NET. He's also a MCT, MCSD (.NET) Early Adopter, MCAD, freelance game developer, occasional author, tech editor, code camp & user group speaker, vintage arcade game collector and plays a pretty mean guitar in Rock Band.
Copyright 2008 - ILoveVB.NET
Powered by Community Server (Commercial Edition), by Telligent Systems