[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUDs
. -> [Folder]  General
. . -> [Subject]  Coding mud-style game for school assignment; looking for suggestions.

Coding mud-style game for school assignment; looking for suggestions.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Mademoiselle   Australia  (35 posts)  [Biography] bio
Date Sat 11 Aug 2001 02:35 AM (UTC)

Amended on Sat 11 Aug 2001 02:39 AM (UTC) by Mademoiselle

Message
I'm coding a text-adventure game (in Java) for a school assignment, which I'm writing with a MUD style in mind -- rather than writing a world per se, I'm writing an engine that a person can tack a world of their own design onto, which I'll then make a world for before handing it in.

This is what I've implemented so far:

World - contains a master list of Rooms, Items and Mobs. I'm planning on implementing an update() method to move Mobs around, etc.

Rooms - These have a name, a description, a set of Exits, a set of Mobs that are in the room, and a set of Items that are in the room. All can be defined during world creation, and can be added/removed on the fly.

Exits - There are currently 6 directions (N, E, S, W, U, D), and more are added easily (but it's not worth it for a project this small. If I continue to develop it with the aim of being distributable, I may add more compass directions). Exits have a short description (one or two words such as 'door', 'arch', etc), and a long description which is displayed when you look at the exit. They can be open or closed, and locked or unlocked, and can specify an item to use as a key to unlock the door.

Items - These have a name, a description, and a keyword for referring to them. They also have a weight. I'm thinking of adding some kind of itemstate, and statemodifier so they can decay over time.

Mobs - These have a name and a description (to refer to them in commands you use their name). They also have an Action (see below), and a variable canMove which defines whether or not they can roam around.

Action - Defines triggers and actions so when certain commands are performed on mobs with specific parameters (such as giving a cake to john), the mob can respond in various ways.

Player - Defines the player as s/he moves around the game world. Currently has an inventory of items, a 'holding' position (which I'm thinking of removing because after changing the command system a bit it's no longer needed), a current weight, and a maximum weight. The player can pick up items (as long as it doesn't push their weight over their maximum weight), drop items from their inventory, view their current inventory, move around, open doors (if the user is carrying the right key, locked doors are unlocked automatically to save typing in 'unlock' then 'open'), give items to mobs (which can in turn set off an action in the mob), and can look at the room they are in, any mobs/items in the room, and can look in any direction that contains an exit to another room.

The game is played through a commandline interface (DOS Prompt in Windows, Terminal in UNIX) and is for a single player only. Things like battle, magic and experience are not needed at this stage -- the assignment specification says to make the world only about 15 rooms in size -- but I'll probably implement them at a later date if I feel motivated.

I'm looking for suggestions of stuff to add to increase the realism of the game. No timed stuff please -- while it does add to realism, it also adds significantly to coding/testing time (and since I've never touched on threaded programming I'd have to figure that out first, which I won't be able to do in the couple of weeks left before due date).
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sun 12 Aug 2001 05:19 AM (UTC)
Message
This all sounds pretty comprehensive. My suggestion would be to make it all work properly before adding new stuff. I think you will get more marks for 8 things that work properly than 10 things that don't.

Perhaps add a couple more simple conditions for going through exits, eg.


  • Must carry item.
  • Must not carry item.
  • Must have some attribute (eg. male, female)


Maybe also have hidden exits.

I think you are doing pretty well - I know from experience that writing a MUD server takes months (or years), so I would concentrate on making what you already have as polished as possible. :)


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Mademoiselle   Australia  (35 posts)  [Biography] bio
Date Reply #2 on Sun 12 Aug 2001 09:43 AM (UTC)
Message
Yeah, I'm thinking I'm going to do the hidden exits thing, was pondering it earlier today.
[Go to top] top

Posted by Mademoiselle   Australia  (35 posts)  [Biography] bio
Date Reply #3 on Wed 06 Nov 2002 03:37 AM (UTC)
Message
Well, I'm at it again, this time in C++. Got some big ideas which will be very cool if I can a) keep motivated long enough to get around to them and b) manage to code them. ;)
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,484 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]