Talk:Text-based MMORPG
From Makers Local 256
Thoughts on engine design
I see this taking the approach of about 3 components:
Core
- Here's the meat and potatoes of your engine. It handles the basics, who's where, who's got what, etc. Also it handles message passing between the two component types.
- This is one script/thread/program running on one box. It could connect in with other cores on other boxes to scale.
- Manages AI instance data
AIs
- Each of these handles all of the AI for an area.
- These run as separate programs, and they don't have to be in the same language or on the same physical machine as the core.
- This could be resource generators, simple NPCs, environmental triggers, you name it.
- This could also be a single AI instance, roaming from place to place, interacting the same way as users.
- Think of these as templates, and not single instances.
- Example: HideawayInn.script:
- This is the Hideaway Inn AI script.
- It runs the following AIs:
- Inn Keeper
- He hangs out by the front door, 2x2 and 2x3, roaming back and forth randomly.
- When approached, he offers a way for people to "stay at the inn" and thus go into sleep mode.
- Maid
- She starts in the morning and roams from 3x1 to 3x4, then 4x4 to 4x1 knocking on each door, waking the guest inside then disappearing until the next morning.
- Inn Keeper
- It registers with the Core that the Inn occupies 4x4 when placed on the map. The Core keeps up with how many Inns and where they're placed on the map.
- The core also keeps up with all the information for that instance of the Inn. Write once, reuse often.
- Example: Goat.script:
- This is a goat AI.
- It occupies 1x1 and roams quickly where there is no grass, and slowly where there is grass.
- I guess it could provide meat if killed and eaten. Maybe sickness if not cooked.
- The goat.script doesn't need to be sent information about the Inn Keeper's moving arounds inside his Inn, unless the goat actually wanders into the Inn.
Interfaces
- This is the user-to-game bridge.
- This could be telnet, ircd, web, you name it.
- It's all about relaying commands from the user to the core, and stats from the core to the user.
- This could allow for fun in game macros. Say you "train" your character to mine, carry to depot, and return via the telnet interface. Then you can put him in a loop and check on his status via the web interface on your mobile phone in class. Maybe you could even instruct him to stop and take a nap with a few buttons on a web page.
--Brimstone 21:23, 15 November 2009 (CST)