Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot, Google

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » dlsym thoughts
Forum Rules | Mark all | Recent Posts

dlsym thoughts
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 21, 2005, 2:35 am
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

Hey, just poking my head above water to look around at things again

Anyways, I had a thought about the lovely dynamic symbol table code that AFK uses. Currently, it just uses this to avoid having to keep a hard-coded table of function pointers hanging around, but I remember a project from the Dawn of the Internet &#153; that did one better.

Back in 1991 or thereabouts, there was a very cool game that I used to play on the Sun 3 workstations called XTank. It was a multiplayer top-down tank game where you could design your own maps, vehicles, weapons... and even AI code for robot players. I remember it came with a "gnat" player which was easy to beat... unless you loaded up several of them. If more than one were loaded, they'd cooperate and act as a team and were very devastating.

One other thing I remember about this code was that it used dynamic linking to allow you to re-compile and add new AI code while the game was running. Basically, instead of the usual static linking that merges all the object files into one executable, this code used the dlsym functions to pull in individual object files at run-time.

It occurs to me that this would be possible here as well, provided that all calls to spells/skills/commands go through the appropriate lookup function rather than calling them directly. My question is, how many places do you think calls to dlsym'd functions actually exist?

The functionality of this is slightly diminished with copyover code... but it might still be interesting if used for more than just bug fixing. One example I can think of might be to load different versions of the look command based on time of day, rather than putting all the logic into one big function.

Anyways, just stumbled upon the xtank game again, so it got me thinking.
       
Pages:<< prev 1 next >>