War of Wizards: Plan

From RogueBasin
Revision as of 01:33, 7 February 2007 by Icey (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Introduction

This page has the draft details for how my entry in the 2007 7DRL Challenge will work. Changes and suggestions are very welcome. Feel free to just edit them in and I'll keep anything I like.

A better name would be most appreciated!

Concept

Duelling Wizards is a two player roguelike game. Each player controls a wizard in a small dungeon. The wizards cast spells at each other until one of them is killed.

Language

The game will be written in Visual Basic 6, so it'll be Windows only. It'll be open source.

Play

Each wizard starts with 5 hit points. A random player takes the first move.

Each turn a player can move their wizard 0 to 5 squares in any direction (diagonal + adjacent)

Then they either cast one of three randomly given spells for that turn, use an item, pick up an item or press the 'end turn' key. There are no weapons or hand-to-hand combat.

Then the opponent does their move.

Controller

The computer connected to is designated as the controller. That computer is responsible for generating stuff and setting game options.

The controller can release control between games.

Data Sending

At the start of the game, the following things are generated on the controller computer:

  • Random dungeon layout
  • Random item locations
  • Random potion appearances
  • Random starting positions

This data is then sent to the other player.

After each turn, the following things are sent:

  • Magic effects locations
  • Messages (via an id number)
  • Dungeon layout
  • Player positions
  • Dungeon item locations
  • Lost/Win flag (only if necessary)

Chat messages are sent immediately.

Before sending, data needs to be compressed. A lot.

Data Compression

No Compression Needed

Messages are sent as very short id numbers.

Chat mesages are sent seperately.

Lost/win flag is just one character.

Dungeon Layout

Assume dungeon layout is 25 by 25 squares. This means 625 characters of uncompressed data.

How could this be quickly compressed?

Convert 0's (walls)

  • [...]
  • 000 to c
  • 00 to b
  • 0 to a

Convert 2's (rooms)

  • [...]
  • 111 to C
  • 11 to B
  • 1 to A

1's are for corridors, so not much point compressing those.

After this, see what patterns are regularly left and convert those to other characters.

This will significantly reduce the data size.

Compressing Locations

Some spells (ray of cold, etc) can be worked out on the opponents computer from just the starting location. This method should be used if available.

To send a location, convert the X coords to letters (0=a,1=b, etc), keep the Y coord as a number, then add the ID of the item/spell/effect (letters). Example:

ab13f

ab = X coord (26+2 = 28) 13 = Y coord (13) f = ID of Item/Spell/Effect ('f' could be fire spell effect, for example)

Multiple locations are combined using a non-number non-alpha character.

Letters are always lowercase, for locations.

Dungeon layout

  • Generate random perfect maze to fill the dungeon.
    • Wall squares are 0
    • Empty squares are 1
  • Overlay at least 1 room. Rooms are never connected to each other.
    • Room squares are 2
  • Remove all dead ends.

Number of potions = free squares / (something)

Number of traps = free squares / (something)

  • Place traps in random locations.
  • Place potions in random locations.

Each square can only contain one item maximum.

  • Create starting square for controller and opponent

Starting squares must not be walls and must not contain items or the opponent.

Interface

The whole window needs to be small enough that I can fit two of it on my screen, for testing. The interface needs to contain:

  • A space big enough to show all of the dungeon
  • Game messages
  • Chat messages
  • Actions that can be done
  • The players hit points (not opponents)
  • Who's move it is
  • Inventory
  • Available actions (moves, inv, spells)

The dungeon will be displayed in text format, there will be no graphical output.

Keys

All done via numberpad, except for chatting.

  • / - Cast spell 1
  • * - Cast spell 2
  • - - Cast spell 3
  • 12346789 - Move
  • 0 - Pick up item
  • + - Inventory
  • Enter - Bring up chat prompt / Send chat message
  • ./del - End turn / Close chat prompt

5 is unused.

Dungeons

Dungeons will be small, to avoid lots of wandering around aimlessly. There will only be one dungeon per game. Dungeons will be randomly generated.

The dungeon is initially unknown to both players. FoV will be used. Items are only shown if they appear in the FoV.

Players always start far away from each other.

Creatures

There are no other creatures in the game. This is simply a 2-player, player-versus-player game in the roguelike style.

Spells

Only good and neutral spells are randomly given. Bad spells can be done via the random spell or potions.

Many spells have visual effects, which will be displayed for 250ms. However, this delay is always added to avoid metagaming. (so the opponent can't work out if a spell was cast, or not)

Positive

Ray of Cold - Goes through walls (but doesn't destroy them) until it reaches the edge of the dungeon. No chance of avoiding. The caster is told if they hit their opponent. No messages for the opponent, but they might see the ray. (d2 damage)

Fire Storm - Fire floods forward from the caster, up to a random distance between 5 and 10 squares. No chance of avoiding. The caster is told if they hit their opponent. No message for opponent, but they might see the fire.(d2 damage)

Magic Mapping - Reveals the layout for a random section of the dungeon. No message for opponent.

Collapse - Parts of the dungeon walls inside rooms are weakened, which makes boulders randomly fall down and crush people. Message for both players: "Parts of the dungeon ceiling collapse!" (d3 damage)

Alter Dungeon - The dungeon layout is completely changed. The new layout is known to the caster, but unknown to the opponent. Opponent gets a message: "You sense your surroundings are different."

Identify - Identifies potions in the inventory. No message for opponent.

Item Detection - Shows the locations of some items in the dungeon. No message for opponent.

Life Detection - Shows the location of the opponent. Message for opponent: "You feel like you're being watched."

Trap Detection - Reveals the locations of traps in the nearby area. No message for opponent.

Health Detection - Shows the hit points of the opponent. Message for opponent: "You feel like someone is looking through your medical records!"

Restoration - Heals one hit point. No message for opponent.

Take Life - Steals one hit point from the opponent, if they can be seen. Message for opponent: "You feel like your soul is being taken away."

Steal - Takes d2 items from the opponent, if they are in a square adjacent or diagonal to the opponent. Message for opponent: "Your pack feels lighter!"

Neutral

Random - A random spell is cast.

Demolition - Randomly destroys walls around the caster. Message for opponent: "You hear walls being destroyed."

Create Potion - A random potion appears in a random square of the dungeon. No message for opponent.

Blink - Moves the caster to a new unoccupied random position in the dungeon. No message for opponent.

Blink All - Moves everyone to new unoccupied positions. Message for opponent: "You are teleported!"

Negative

Forgetfullness - Parts of the dungeon are forgotten for the caster. No message for opponent.

Strike - Lightning strikes down and hurts the caster. (d2 damage). Message for opponent: "You hear lightning in the distance."

Items

Each square can contain a potion or a safe trap. Additionally, each square can contain a set trap.

The player can have up to 9 items in their inventory. Pressing + then the item number (1, 2, etc) will either drink the item (if potion) or set the item (if trap).

Traps

Traps can be found around the dungeon and then set somewhere in the dungeon. They will be triggered only by the opponent. When a trap is triggered, the person who put the trap down gets a message "You hear a trap going off in the distance."

Boulder - Does d2 damage.

Forget - Forgets the dungeon layout.

Destruction - Destroys walls nearby.

Sonic - Potions held by nearby people might be destroyed.

Potions

Random appearances. Players start with 2 potions. More can be found around the dungeon.

There is one potion appearance for each magic spell.

Once a potion has been used, all other potions of that type will be identified to the player.

Winning

When one player has their hit points reduced to 0 or below, they are dead. The other player wins.

Personal tools