December 2001
- Stories, why? -- Because :) Marian Griffith
- [SECURITY] Bonefarming Adam Martin
- If JRRT did MUDs... Adam Martin
- If JRRT did MUDs... Hans-Henrik Staerfeldt
- If JRRT did MUDs... Marcus Johansson
- Story Implementation Lee Sheldon
- Story Implementation rayzam
- Story Implementation Lee Sheldon
- Story Implementation Jeff Freeman
- Story Implementation Lee Sheldon
- Story Implementation Jeff Freeman
- Story Implementation Marian Griffith
- Story Implementation Jeff Freeman
- Story Implementation Jeff Cole
- Story Implementation Valerio Santinelli
- From the linux-kernel list Jeff Cole
- Survey: Internet Cuts Into TV Time Michael Tresca
- Interesting DAoC Poll Lee Sheldon
- Interesting DAoC Poll Vincent Archer
- Interesting DAoC Poll Robert Fleck
- Interesting DAoC Poll Azeraab
- Interesting DAoC Poll Matt Mihaly
- Interesting DAoC Poll Dave Shepherd
- Interesting DAoC Poll Azeraab
- Interesting DAoC Poll Dave Shepherd
- Interesting DAoC Poll Matt Mihaly
- Project announcement: Cool++ ryan daum
- DAoC: Empowering Players to Alter the World (was: New laws) Lee Sheldon
- DGN: Chemistry based magic systems Bryan "Cyngon" Helmkamp
- DGN: Chemistry based magic systems Nathan F. Yospe
- DGN: Chemistry based magic systems rayzam
- DGN: Chemistry based magic systems Bryan "Cyngon" Helmkamp
- DGN: Chemistry based magic systems Bryan "Cyngon" Helmkamp
- DGN: Chemistry based magic systems Sellers, Mike
- RuneSword Brian Hook
- Economic Growth (Was: [STORY] Story and population size) Daniel.Harman@barclayscapital.com
- Economic Growth (Was: [STORY] Story and population size) Elia Morling
- Economic Growth (Was: [STORY] Story and population size) Timothy Dang
- Economic Growth (Was: [STORY] Story and population size) Koster, Raph
- Economic Growth (Was: [STORY] Story and population size) John Buehler
- Economic Growth (Was: [STORY] Story and population size) Koster, Raph
- Economic Growth (Was: [STORY] Story and population size) John Buehler
- Economic Growth (Was: [STORY] Story and population size) Travis Nixon
- Economic Growth (Was: [STORY] Story and population size) Marian Griffith
- Economic Growth (Was: [STORY] Story and population size) Daniel.Harman@barclayscapital.com
- Economic Growth (Was: [STORY] Story and population size) Steve {Bloo} Daniels
- Economic Growth (Was: [STORY] Story and population size) Koster, Raph
- Economic Growth (Was: [STORY] Story and population size) Steve {Bloo} Daniels
- Economic Growth (Was: [STORY] Story and population size) Sellers, Mike
- Economic Growth (Was: [STORY] Story and population size) Matt Mihaly
- Economic Growth (Was: [STORY] Story and population size) Travis Nixon
- Economic Growth (Was: [STORY] Story and population size) Daniel.Harman@barclayscapital.com
- Economic Growth (Was: [STORY] Story and population size) Daniel.Harman@barclayscapital.com
- Economic Growth (Was: [STORY] Story and population size) Koster, Raph
- Economic Growth (Was: [STORY] Story and population size) Travis Nixon
- Economic Growth (Was: [STORY] Story and population size) Daniel.Harman@barclayscapital.com
- Economic Growth (Was: [STORY] Story and population size) Bobby Martin
- Economic Growth (Was: [STORY] Story and population size) Paul Schwanz
- Economic Growth (Was: [STORY] Story and population size) Peter Harkins
- Economic Growth (Was: [STORY] Story and population size) Daniel.Harman@barclayscapital.com
- Economic Growth (Was: [STORY] Story and population size) Travis Nixon
- RE : Story Implementation Veynom
- RE : Story Implementation Matt Mihaly
- RE : Story Implementation Matt Mihaly
- Economy (was [STORY] Story and population size) Jeff Cole
- Economy (was [STORY] Story and population size) Dave Rickey
- RE : Story Implementation Veynom
- RE : Story Implementation Matt Mihaly
- economy and population size Adam Martin
- economy and population size J C Lawrence
- Art vs. Fun Michael Tresca
- Art vs. Fun Koster, Raph
- Art vs. Fun Matt Mihaly
- Art vs. Fun Matt Mihaly
- Art vs. Fun Robert Zubek
- First use of "avatar"? Koster, Raph
- First use of "avatar"? Lars Duening
- First use of "avatar"? Matt Mihaly
- First use of "avatar"? Ola Fosheim Grøstad
- First use of "avatar"? Koster, Raph
- First use of "avatar"? Steve {Bloo} Daniels
- First use of "avatar"? Travis Casey
- First use of "avatar"? Koster, Raph
- First use of "avatar"? Christopher Kohnert
- First use of "avatar"? Travis Casey
- First use of "avatar"? Koster, Raph
- First use of "avatar"? Travis Nixon
- First use of "avatar"? Madman Across the Water
- First use of "avatar"? Takis Kalogiratos
- First use of "avatar"? Tamzen Cannoy
- First use of "avatar"? Dr. Cat
- First use of "avatar"? F. Randall Farmer
- First use of "avatar"? Mats Lidstrom
- First use of "avatar"? Koster, Raph
- First use of "avatar"? Nathan F. Yospe
- First use of "avatar"? Ola Fosheim Grøstad
- First use of "avatar"? Richard A. Bartle
- Managing MUD economy Vladimir Prelovac
- Managing MUD economy opteek
- Managing MUD economy Koster, Raph
- Managing MUD economy Derek Licciardi
- Managing MUD economy Bryan "Cyngon" Helmkamp
- Managing MUD economy Sasha Hart
- Managing MUD economy Vladimir Prelovac
- Managing MUD economy Freeman, Jeff
- Managing MUD economy John Buehler
- Managing MUD economy Marian Griffith
- Managing MUD economy Daniel.Harman@barclayscapital.com
- Managing MUD economy Adam Martin
- Managing MUD economy Sasha Hart
- Managing MUD economy Marc Hernandez
- Managing MUD economy Travis Casey
- Managing MUD economy Vladimir Prelovac
- Managing MUD economy Travis Casey
- Managing MUD economy William Murdick
- Managing MUD economy Timothy Dang
- MUD implementation issues. Marcus Johansson
- MUD implementation issues. J C Lawrence
- MUD implementation issues. Nicholas E. Walker
- MUD implementation issues. Phillip Lenhardt
- MUD implementation issues. Bruce Mitchener
- MUD implementation issues. Jonathan Berling
- MUD implementation issues. Bruce Mitchener
- MUD implementation issues. Marcus Johansson
- MUD implementation issues. Bruce Mitchener
- Economy Vincent Archer
- Ten Rules of PvP was Interesting DAoC Poll Azeraab
- Ten Rules of PvP was Interesting DAoC Poll Dave Shepherd
- Ten Rules of PvP was Interesting DAoC Poll Azeraab
- Ten Rules of PvP was Interesting DAoC Poll John Buehler
- Ten Rules of PvP was Interesting DAoC Poll Daniel.Harman@barclayscapital.com
- Ten Rules of PvP was Interesting DAoC Poll Vincent Archer
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Derek Licciardi
- MMORPGs & MUDs Sellers, Mike
- MMORPGs & MUDs Brian Hook
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs Sellers, Mike
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs Derek Licciardi
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs Lee Sheldon
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs Mike Caruso
- MMORPGs & MUDs Adam Martin
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Jeff Freeman
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Koster, Raph
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Jeff Freeman
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Koster, Raph
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Jeff Freeman
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Koster, Raph
- MMORPGs & MUDs Madrona Tree
- MMORPGs & MUDs John Buehler
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs Koster, Raph
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Dave Rickey
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Koster, Raph
- MMORPGs & MUDs Dave Rickey
- MMORPGs & MUDs Koster, Raph
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs David H. Loeser Jr.
- MMORPGs & MUDs Daniel.Harman@barclayscapital.com
- MMORPGs & MUDs Freeman, Jeff
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Dave Rickey
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Vincent Archer
- MMORPGs & MUDs Dave Rickey
- MMORPGs & MUDs Vincent Archer
- MMORPGs & MUDs Sellers, Mike
- MMORPGs & MUDs rayzam
- MMORPGs & MUDs Sellers, Mike
- MMORPGs & MUDs Dave Rickey
- MMORPGs & MUDs William B. Taylor
- MMORPGs & MUDs Skaei@aol.com
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Dave Rickey
- MMORPGs & MUDs Madrona Tree
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Christopher Allen
- MMORPGs & MUDs Dave Rickey
- MMORPGs & MUDs J C Lawrence
- MMORPGs & MUDs J C Lawrence
- MMORPGs & MUDs Vincent Archer
- MMORPGs & MUDs Dave Rickey
- MMORPGs & MUDs Koster, Raph
- MMORPGs & MUDs Richard Aihoshi aka Jonric
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Koster, Raph
- MMORPGs & MUDs Sellers, Mike
- MMORPGs & MUDs Marc Bowden
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs Marc Bowden
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs David Bennett
- MMORPGs & MUDs Marc Bowden
- MMORPGs & MUDs Freeman, Jeff
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Jeff Freeman
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Koster, Raph
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Matt Mihaly
- MMORPGs & MUDs Wes Connell
- MMORPGs & MUDs Koster, Raph
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs J C Lawrence
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs Joel Palmtag
- MMORPGs & MUDs J C Lawrence
- MMORPGs & MUDs Michael Tresca
- MMORPGs & MUDs J C Lawrence
- MMORPGs & MUDs Michelle Elbert
- MMORPGs & MUDs Sami Kosonen
- MMORPGs & MUDs Azeraab
- MMORPGs & MUDs Sellers, Mike
- MMORPGs & MUDs J C Lawrence
- Re[4]: Economy Travis Casey
- Eiffel Brian Hook
- ADMIN: Origin of "Avatar" thread J C Lawrence
- Call for Papers - NetGames2002 Tristan Henderson
- Continuous versus Discrete Functions John Buehler
- Continuous versus Discrete Functions Brian Hook
- Continuous versus Discrete Functions John Buehler
- Continuous versus Discrete Functions Koster, Raph
- Continuous versus Discrete Functions John Buehler
- Continuous versus Discrete Functions Koster, Raph
- Continuous versus Discrete Functions rayzam
- Continuous versus Discrete Functions John Buehler
- Continuous versus Discrete Functions Travis Casey
- Continuous versus Discrete Functions Caliban Tiresias Darklock
- Continuous versus Discrete Functions John Buehler
- Continuous versus Discrete Functions Caliban Tiresias Darklock
- Continuous versus Discrete Functions John Buehler
- Continuous versus Discrete Functions Daniel.Harman@barclayscapital.com
- Continuous versus Discrete Functions John Buehler
- Continuous versus Discrete Functions Andrew Hefford
- Continuous versus Discrete Functions John Buehler
- Continuous versus Discrete Functions Koster, Raph
- Continuous versus Discrete Functions Jon Lambert
- Continuous versus Discrete Functions John Buehler
- Continuous versus Discrete Functions Koster, Raph
- Continuous versus Discrete Functions Dave Rickey
- Continuous versus Discrete Functions Daniel.Harman@barclayscapital.com
- Continuous versus Discrete Functions Dave Rickey
- Continuous versus Discrete Functions John Buehler
- Continuous versus Discrete Functions Dave Rickey
- Continuous versus Discrete Functions John Buehler
- Continuous versus Discrete Functions rayzam
- Continuous versus Discrete Functions Caliban Tiresias Darklock
- Continuous versus Discrete Functions kyndig@kyndig.com
- Continuous versus Discrete Functions Caliban Tiresias Darklock
- Continuous versus Discrete Functions Jon Lambert
- Continuous versus Discrete Functions Peter Harkins
- Continuous versus Discrete Functions Travis Casey
- Continuous versus Discrete Functions Caliban Tiresias Darklock
- LPC-Natural Language Parser z032383@students.niu.edu
- [TECH] Event Queues in MUDs Daniel.Harman@barclayscapital.com
- [TECH] Event Queues in MUDs Jon Lambert
- [TECH] Event Queues in MUDs Christian Loth
On Wed, Dec 19, 2001 at 01:03:19PM -0000,
Daniel.Harman@barclayscapital.com wrote:
> Still progressing slowly with my game, and started work on
> implementing an event queue/scheduler class. Does anyone have any
> particularly good priority queue algorithms for this type of
> thing?
> I want to make a fairly generic scheduler, so I'm thinking along
> the lines of multiple lists of events categorised by time until
> the event. This would speed up insertion sorting as I would expect
> to have a lot of events ticking fairly frequently along with
> things on a period of several hours/days. In fact they don't have
> to be multiple queues, I just need multiple pointers into one to
> simulate this.
What I did was the following. My scheduler works with a
priority_queue, where the sorting criteria is a 64bit unsigned
integer. The lower the number, the higher in the priority queue it
is.
This 64bit integer is split into two parts: The first 32 bit is the
timeslice, at which the event wants to be executed. The second 32
bit is the event's running number, to actually address the event
object.
With these presumption, the scheduling algorithm I use is fairly
easy (pseudo code follows)
void schedule_events() {
// If there are events waiting for execution...
while (!priority_queue_empty()) {
// First get the priority which is currently on top of the queue.
priority = pop_top_of_priority_queue();
// Then get the event adressed by the second 32 bits of the priority
event = get_event_by_running_number(low32bits(priority));
// Then check if execution is due for this priority, i.e. compare
// the first 32 bits with the current time slice.
if (high32bits(priority) <= current_time_slice) {
// If execution is due, execute
execute_event(event);
// Is the event finished yet with its work? If so, remove the
// event object. Otherwise calculate a new priority from the
// event's running number, and the timeslice when it should
// execute next. Insert the new priority into the priority
// queue.
if (not_yet_finished(event)) {
priority = recalculate_priority(new_time_slice,
event.running_number);
insert_in_priority_queue(priority);
} else {
remove_from_event_list(event);
}
} else {
// We can assert the following: if the top of the execution
// queue is not due for execution, the rest won't be as well.
insert_in_priority_queue(priority);
break;
}
}
This sort of algorithm might not be optimal, but it was what I could
come up with, plus it works for me as of now.
This scheduling is btw running in its own dedicated thread. The
timeslices I use are 25ms which is enough for my needs.
Hope this answers your question and helps somehow,
- Chris
--
Christian Loth
Coder of 'Project Gidayu'
Computer Science Student, University of Dortmund
chris@gidayu.mud.de - http://gidayu.mud.de
- [TECH] algorithm request Malcolm Tester II
- [TECH] algorithm request William Murdick
- [TECH] algorithm request Lars Duening
- [TECH] algorithm request David Bennett
- [TECH] algorithm request Travis Casey
- [TECH] algorithm request Malcolm Tester II
- [TECH] algorithm request Adam Martin
- [TECH] algorithm request Eli Stevens
- [TECH] algorithm request Bobby Martin
- [TECH] algorithm request Bryan "Cyngon" Helmkamp
- non-'realistic' spatial models Nicholas E. Walker
- non-'realistic' spatial models rayzam
- non-'realistic' spatial models Hans-Henrik Staerfeldt
- non-'realistic' spatial models Cybrarian Rök
- non-'realistic' spatial models Nathan F. Yospe
- The Problem With "Massive" Michael Tresca
- The Ideal Player Michael Tresca
- The Ideal Player Lars Duening
- The Ideal Player Dave Rickey
- The Ideal Player Caliban Tiresias Darklock
- [Theory?] Parsing of knowledge to allow for more interactive NPCs holding99@mindspring.com
- [Theory?] Parsing of knowledge to allow for more interactive NPCs Robert Zubek
- [Theory?] Parsing of knowledge to allow for more interactive NPCs holding99@mindspring.com
- CHI 2002: Funology: Designing Enjoyment Bruce Mitchener
- CHI 2002: Funology: Designing Enjoyment Bruce Mitchener
- CHI 2002: Funology: Designing Enjoyment Ola Fosheim Grøstad
- [OFF TOPIC] Happy Holidays Derek Licciardi
- Are crafts fun? Adam Dray
- Are crafts fun? Michelle
- Are crafts fun? Bobby Martin
- Are crafts fun? Bobby Martin
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Jon A. Lambert
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) amanda@alfar.com
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Marian Griffith
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Caliban Tiresias Darklock
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Marian Griffith
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Caliban Tiresias Darklock
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Marian Griffith
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Caliban Tiresias Darklock
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Paul Schwanz - Enterprise Services
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Caliban Tiresias Darklock
- Gender differences -> spatial navigation rayzam
- Gender differences -> spatial navigation amanda@alfar.com
- Gender differences -> spatial navigation Nathan F. Yospe
- Sex and MUDs... the_sage2000@juno.com
- Sex and MUDs... Jon Lambert
- Sex and MUDs... David Bennett
- Sex and MUDs... Travis Casey
- Sex and MUDs... Malcolm Tester II
- Sex and MUDs... Matt Mihaly
- Sex and MUDs... Adam Dray
- Some vworlds (maddog) related changes Frank Crowell
- Some vworlds (maddog) related changes Frank Crowell
- (no subject) claw@kanga.nu
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Caliban Tiresias Darklock
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) amanda@alfar.com
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Caliban Tiresias Darklock
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Marian Griffith
- Boys and Girls - was (MUD-Dev digest, Vol 1 #16 3 - 25 msgs) Sellers, Mike
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) Caliban Tiresias Darklock
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) amanda@alfar.com
- Boys and Girls - was (MUD-Dev digest, Vol 1 #163 - 25 msgs) mystran@ltv.cx
- Combat system in persistent world Veynom
- Combat system in persistent world J C Lawrence
- Taligent docs Bruce Mitchener
- Taligent docs Chris Corry
- TECH: Servers in Java Brian Hook
- TECH: Servers in Java Bruce Mitchener
- TECH: Servers in Java Brian Hook
- TECH: Servers in Java Bobby Martin
- TECH: Servers in Java Emil Eifrem
- TECH: Servers in Java Aaron Mulder
- TECH: Servers in Java justice@softhome.net
- TECH: Servers in Java Brian Hook
- TECH: Servers in Java Daniel.Harman@barclayscapital.com