February 2003
- Announcing Game Programming Gems 4 Andrew Kirmse
- Secondary characters as a mechanic Brian Hook
- Secondary characters as a mechanic Caliban Tiresias Darklock
- Secondary characters as a mechanic Daniel.Harman@barclayscapital.com
- Secondary characters as a mechanic Paul Schwanz
- Secondary characters as a mechanic Sasha Hart
- Secondary characters as a mechanic Brian Hook
- Secondary characters as a mechanic Koster, Raph
- Secondary characters as a mechanic adam
- Secondary characters as a mechanic Ted L. Chen
- Secondary characters as a mechanic Brian Hook
- Secondary characters as a mechanic Rayzam
- Secondary characters as a mechanic Sasha Hart
- Secondary characters as a mechanic Michael Tresca
- Secondary characters as a mechanic Serafina Pechan
- Secondary characters as a mechanic Damion Schubert
- Secondary characters as a mechanic Sasha Hart
- Secondary characters as a mechanic Daniel.Harman@barclayscapital.com
- Secondary characters as a mechanic John Buehler
- Secondary characters as a mechanic Edward Glowacki
- Secondary characters as a mechanic Brian Hook
- Secondary characters as a mechanic Wes Connell
- Secondary characters as a mechanic Harrok
- Secondary characters as a mechanic Brian Hook
- Secondary characters as a mechanic Richard Aihoshi aka Jonric
- Secondary characters as a mechanic Brian Hook
- Secondary characters as a mechanic Sasha Hart
- Secondary characters as a mechanic Daniel.Harman@barclayscapital.com
- Secondary characters as a mechanic Adam
- Secondary characters as a mechanic Russ Whiteman
- Secondary characters as a mechanic Valerio Santinelli
- Secondary characters as a mechanic Adam Burr
- Secondary characters as a mechanic Valerio Santinelli
- Secondary characters as a mechanic Adam Burr
- Limited character lifespans Dan Shiovitz
- Limited character lifespans Richard Krush
- Limited character lifespans Hans-Henrik Staerfeldt
- Limited character lifespans Peter "Pietro" Rossmann
- Limited character lifespans shren
- Limited character lifespans Paul Cobb
- Limited character lifespans Rayzam
- Limited character lifespans Sasha Hart
- Limited character lifespans Paul Schwanz
- Limited character lifespans Damion Schubert
- Limited character lifespans David H. Loeser Jr.
- How to Find a VC Michael Tresca
- How to Find a VC Koster, Raph
- How to Find a VC Amanda Walker
- How to Find a VC Marc Fielding
- Re:Secondary characters as a mechanic Thiago Moraes
- AP Wire story on activism in MMOG games Marc Fielding
- MMORPG, buildings, is it bad to be just props? Chris
- MMORPG, buildings, is it bad to be just props? Paul Schwanz
- MMORPG, buildings, is it bad to be just props? Dave Rickey
- MMORPG, buildings, is it bad to be just props? John Buehler
- MMORPG, buildings, is it bad to be just props? Damion Schubert
- MMORPG, buildings, is it bad to be just props? John Buehler
- MMORPG, buildings, is it bad to be just props? ceo
- MMORPG, buildings, is it bad to be just props? Marian Griffith
- MMORPG, buildings, is it bad to be just props? Dave Rickey
- MMORPG, buildings, is it bad to be just props? Lee Sheldon
- MMORPG, buildings, is it bad to be just props? J C Lawrence
- MMORPG, buildings, is it bad to be just props? Paul Schwanz
- MMORPG, buildings, is it bad to be just props? J C Lawrence
- MMORPG, buildings, is it bad to be just props? Lee Sheldon
- MMORPG, buildings, is it bad to be just props? J C Lawrence
- MMORPG, buildings, is it bad to be just props? Ron Gabbard
- MMORPG, buildings, is it bad to be just props? Damion Schubert
- MMORPG, buildings, is it bad to be just props? Paul Schwanz
- MMORPG, buildings, is it bad to be just props? Zach Collins {Siege}
- MMORPG, buildings, is it bad to be just props? Amanda Walker
- MMORPG, buildings, is it bad to be just props? Amanda Walker
- MMORPG, buildings, is it bad to be just props? J C Lawrence
- MMORPG, buildings, is it bad to be just props? Chris Holko
- MMORPG, buildings, is it bad to be just props? Dave Rickey
- MMORPG, buildings, is it bad to be just props? Koster, Raph
- Predictive models for churn in subscription based games Scott A. Farley
- Predictive models for churn in subscription based games Damion Schubert
- Mud Servers on RedHat Linux 7.2 Coyote
- Protecting the Player's Suspension of Disbelief Ron Gabbard
- Protecting the Player's Suspension of Disbelief Sasha Hart
- Protecting the Player's Suspension of Disbelief Paul Schwanz
- Protecting the Player's Suspension of Disbelief Caliban Tiresias Darklock
- Protecting the Player's Suspension of Disbelief Damion Schubert
- Protecting the Player's Suspension of Disbelief Ron Gabbard
- Protecting the Player's Suspension of Disbelief Marc Fielding
- Protecting the Player's Suspension of Disbelief Serafina Pechan
- Asian markets research question Dr. Cat
- MUD-Dev conference J C Lawrence
- MUD-Dev conference J C Lawrence
- Re:Secondary characters as a mechanic Thiago Moraes
- Re:Secondary characters as a mechanic Sasha Hart
- Gaming 'is good for you' Daniel.Harman@barclayscapital.com
- Gaming 'is good for you' Daniel
- Skill vs Knowledge (was: Brand Loyalty) ceo
- Skill vs Knowledge (was: Brand Loyalty) Caliban Tiresias Darklock
- FW: Cultural impact on Muds (was: Star Wars Galaxies) Damion Schubert
- Cultural impact on Muds Matt Mihaly
- Justification for audit trails in guilds? Rudy Fink
- Justification for audit trails in guilds? Damion Schubert
- Justification for audit trails in guilds? Matt Mihaly
- Justification for audit trails in guilds? Marc Fielding
- Justification for audit trails in guilds? Matt Mihaly
- Justification for audit trails in guilds? eric
- Justification for audit trails in guilds? J C Lawrence
- Justification for audit trails in guilds? Matt Mihaly
- Justification for audit trails in guilds? eric
- Justification for audit trails in guilds? Matt Mihaly
- Justification for audit trails in guilds? Zach Collins {Siege}
- Justification for audit trails in guilds? eric
- Justification for audit trails in guilds? Matt Mihaly
- Justification for audit trails in guilds? Steven J. Owens
- Justification for audit trails in guilds? chrep@hotmail.com
- New issue of the Daedalus Project Koster, Raph
- New issue of the Daedalus Project Ola Fosheim Grøstad
- Movie-Making Games (Was Spam: Star Wars Galaxies: 1 character per server) Damion Schubert
- Movie-Making Games (Was Spam: Star Wars Galaxies: 1 character per server) Damion Schubert
- Threading and Queues (What Fun) Ben Chambers
- Threading and Queues (What Fun) Sean Miller
- Threading and Queues (What Fun) szii@sziisoft.com
- Threading and Queues (What Fun) lynx@lynx.purrsia.com
- A new game paradigm (was: Star Wars Galaxies) Marian Griffith
- A new game paradigm (was: Star Wars Galaxies) Scott Miller - Intelligent Life Games
- A new game paradigm (was: Star Wars Galaxies) Caliban Tiresias Darklock
- A new game paradigm (was: Star Wars Galaxies) Thomas Tomiczek
- A new game paradigm (was: Star Wars Galaxies) J C Lawrence
- A new game paradigm (was: Star Wars Galaxies) Scott Miller - Intelligent Life Games
- A new game paradigm (was: Star Wars Galaxies) Travis Casey
- A new game paradigm (was: Star Wars Galaxies) Caliban Tiresias Darklock
- MMORPG/MMOG Server design Weston Fryatt
- MMORPG/MMOG Server design Edward Glowacki
- MMORPG/MMOG Server design J C Lawrence
- MMORPG/MMOG Server design Edward Glowacki
- MMORPG/MMOG Server design J C Lawrence
- MMORPG/MMOG Server design Thomas Tomiczek
- MMORPG/MMOG Server design J C Lawrence
- MMORPG/MMOG Server design Bruce Mitchener
- MMORPG/MMOG Server design Thomas Tomiczek
- MMORPG/MMOG Server design Daniel.Harman@barclayscapital.com
- MMORPG/MMOG Server design J C Lawrence
- MMORPG/MMOG Server design ceo
- MMORPG/MMOG Server design Damion Schubert
- MMORPG/MMOG Server design Jeremy Noetzelman
- MMORPG/MMOG Server design Weston Fryatt
- MMORPG/MMOG Server design Jeremy Noetzelman
- MMORPG/MMOG Server design Weston Fryatt
- MMORPG/MMOG Server design J C Lawrence
- MMORPG/MMOG Server design Weston Fryatt
- MMORPG/MMOG Server design J C Lawrence
- MMORPG/MMOG Server design Damion Schubert
- MMORPG/MMOG Server design Derek Licciardi
- MMORPG/MMOG Server design J C Lawrence
- MMORPG/MMOG Server design ceo
- MMORPG/MMOG Server design J C Lawrence
- MMORPG/MMOG Server design Caliban Tiresias Darklock
- MMORPG/MMOG Server design Sean Kelly
- MMORPG/MMOG Server design John Buehler
- MMORPG/MMOG Server design Sean Kelly
- MMORPG/MMOG Server design Thomas Tomiczek
- MMORPG/MMOG Server design Keith Brewer
- MMORPG/MMOG Server design J C Lawrence
- MMORPG/MMOG Server design Mike Shaver
- MMORPG/MMOG Server design Keith Brewer
- MMORPG/MMOG Server design Crosbie Fitch
- MMORPG/MMOG Server design Mike Shaver
- MMORPG/MMOG Server design lynx@lynx.purrsia.com
- MMORPG/MMOG Server design Ted L. Chen
- Movie-Making Games (Was Spam: Star Wars Scott Jennings
- Movie-Making Games (Was Spam: Star Wars ceo
- Multithreading: AI, Sockets, Brains, Bodies, and Storage Brian Lindahl
Multithreading: AI, Sockets, Brains, Bodies, and Storage
--------------------------------------------------------
Since there doesn't seem to be any real consensus as to how
threads should be used in a MUD running on a multiprocessor
machine, I'll set up a good design for such: add multiple threads
but remove the need for complex synchronization thus making
development/debugging time minimal with maximum benefits.
In addition, I'll be following my previous entity design pattern
of Brains/Bodies (described for those of you who are unfamiliar
with it).
Specifications
---------------------------
IO Specifications
- Input and output is stored in a tokenized form to provide
optimization of execution
- Input and output tokens (flushed per tick) are not serialized
to Storage
- All entities such as characters, objects, accounts, questions,
are considered Bodies
- Each Body can have a Brain which provides control
- Bodies contain output tokens
- Brains contain input tokens Thread Specifications
- Threads are allocated via a pool, called a Spool
- Machine-specific optimization can be done by altering the
Spool size
- Threads can be suspended/resumed
- SpawnThread creates a new thread
- SpawnTiedThread creates a new tied thread
- WaitOnThreads waits until all threads spawned from calling
thread return
- WaitOnTiedThreads waits until all tied threads spawned from
calling thread return Brain Specifications
- A PC Brain is a Socket
- An NPC Brain is AI
- When a Socket's Body has output tokens, it is found in
SocketOutput
- When an AI's Body has output tokens, it is found in AIOutput
- Generate output tokens to simulate needs Body Specifications
- Take input tokens and execute them to their own specification
(if possible)
- Block output tokens to the Brain
- Generate input tokens from output tokens to simulate impulse
responses
- When a Body or Body's Brain has input tokens, it is found in
InputList AI Specifications
- Soft-coded scripts can be assigned to NPCs individually or to
NPC-Types
- NPC-Types can have hard coded responses.
- Soft-coded script responses take precedence.
Ideally, the only synchronization done will be waiting until
threads finish execution, removal/addition of threads into the
Spool. Note that if no threads are available in the Spool,
SpawnThread/SpawnTiedThread suspends itself until it is signaled
that one is available.
Concurrency:
Since AI only reads game data, Storage can be done concurrently
(assuming input/output tokens are not serialized as stated
above). Since Socket Input/Output doesn't write to game data, it
can be done concurrently with Storage and AI. Thus, all four
proceedures can be executed concurrently. However, since game
execution writes to Socket Output, AI and Storage (if asynchronous
flushes are done by the OS) and reads from Socket Input and AI, it
cannot be done concurrently with any of the operations. Thus, we
wait on all threads before performing game execution. Although we
could have Game Event execution done concurrently with Socket
Input, it makes more sense from a player's point of view that
their Input is executed before Game Events.
Functions
---------
Main Loop
a) ForEach Socket in SocketList: SpawnThread 'Socket Input'
b) WaitOnThreads
c) execute Server Events (shutdown, reboot, etc.)
d) ForEach Body in InputList: execute input tokens
e) execute Game Events
f) SpawnThread 'Storage'
g) ForEach Socket in SocketOutput: SpawnTiedThread 'Socket
Output'
h) ForEach AI in AIOutput: SpawnThread 'AI Response'
i) Sleep to synchronize loop time
j) WaitOnTiedThreads
k) Repeat
Socket Input
a) Flush input into input buffer
b) Retrieve first line
c) Tokenize line
d) Check proper syntax for token sequence
e) Remove line from input buffer
Game Events
a) Event = event with the earliest execution time in queue
b) If Event's execution time > now, End
c) Execute Event
d) Remove Event from queue
e) Repeat
Storage
a) Synchronize in-memory data with in-storage
data. (i.e. database commitals)
Socket Output
a) Generate text from output tokens
b) Parse output codes in text (if any)
c) Send text to socket
AI Response
a) Soft-coded scripts generate input tokens from output tokens
b) Hard code generates extra input tokens from remaining output
tokens
---------------------
Brian Lindahl
Development Director
The Cathyle Project - Multithreading: AI, Sockets, Brains, Bodies, and Storage J C Lawrence
- Multithreading: AI, Sockets, Brains, Bodies, and Storage J C Lawrence
- Multithreading: AI, Sockets, Brains, Bodies, and Storage Caliban Tiresias Darklock
- Perl - SOAP/XML - Slow? Tom Sullivan
- Perl - SOAP/XML - Slow? J C Lawrence
- Perl - SOAP/XML - Slow? Tom Sullivan
- Perl - SOAP/XML - Slow? J C Lawrence
- Perl - SOAP/XML - Slow? Mark Cheverton
- Perl - SOAP/XML - Slow? Daniel.Harman@barclayscapital.com
- Perl - SOAP/XML - Slow? Stephane Boisjoli
- Perl - SOAP/XML - Slow? Caliban Tiresias Darklock
- Hourly usage Peter Tyson
- Hourly usage lynx@lynx.purrsia.com
- Hourly usage Michael Tresca
- In this corner.representing SCS.The Tyrant! F. Randall Farmer
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design Mike Shaver
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design Felix A. Croes
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design Travis Nixon
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design Felix A. Croes
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design Felix A. Croes
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design Felix A. Croes
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design Amanda Walker
- MMORPG/MMOG P2P design Ted L. Chen
- MMORPG/MMOG P2P design Ben Hoyt
- MMORPG/MMOG P2P design Derek Licciardi
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design Ben Hoyt
- MMORPG/MMOG P2P design Felix A. Croes
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design Caliban Tiresias Darklock
- MMORPG/MMOG P2P design Ben Hoyt
- MMORPG/MMOG P2P design Ben Hoyt
- MMORPG/MMOG P2P design lynx@lynx.purrsia.com
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design lynx@lynx.purrsia.com
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design lynx@lynx.purrsia.com
- MMORPG/MMOG P2P design Crosbie Fitch
- MMORPG/MMOG P2P design lynx@lynx.purrsia.com
- MMORPG/MMOG P2P design Crosbie Fitch
- workload simulation (was: MMORPG/MMOG Server design) Mike Shaver
- MMORPG/MMOG Server design - intel-ligent choices of hardware ; ) ceo
- workload simulation (was: MMORPG/MMOG Server design) ceo
- Team management Peter Harkins
- Team management Tom Sullivan
- Team management Sanvean
- Team management Michael Tresca
- Virtual worlds meet LARPs Richard A. Bartle
- Virtual worlds meet LARPs Mark Cheverton
- Virtual worlds meet LARPs Richard A. Bartle
- Virtual worlds meet LARPs Lee Sheldon
- Skotos Kicks Off Associate Program Shannon Appelcline
- Infrastructure kat-Zygfryd