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, Sogou, Yandex, Google

Members: 0
Guests: 10
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 » Codebases » AFKMud Support & Development » Projectiles
Forum Rules | Mark all | Recent Posts

Projectiles
< Newer Topic :: Older Topic > Implementation of a new type

Pages:<< prev 1 next >>
Post is unread #1 Jul 9, 2002, 3:30 pm
Go to the top of the page
Go to the bottom of the page

barbus_007

GroupMembers
Posts16
JoinedJun 23, 2002

My mud's plot is one that involves both sci-fi and fantasy elements and as such we
have three races that come from another dimension and are technologically advanced, though without magic. Anyway, basically they would like guns implemented. I was wondering if the projectile code would allow for that? If not I can always take a shot at writing something, but if I could add to the projectile code it'd probably be more efficient.
So which should/can I do?
Am I better off modifying the projectile code or writing a skill?
       
Post is unread #2 Jul 10, 2002, 12:16 am
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

So which should/can I do?
Am I better off modifying the projectile code or writing a skill?

Not having read many projectile codes in depth I can only give views, as I have written my own which works quite nicely

Some I have seen do everything at once, fire, flight, impact. Thus the entire mud has to wait when someone fires and the projectile travels through the rooms and impacts and does whatever it has to do. This is fine for short distances, when you get longer distances you are left waiting for the projectile to finish.

What I've got is a scheduled event that fires off to move an object so far (based on its rate of movement) each game "pulse". Now this centers around a event scheduler which I wrote based on ideas from two or three sources, but can be kludged into the update_handler() to work as well afaik. The projectile in created on fire/cast/invoke/whatever and it is given a direction, a target, flags and any contained spells, affects or whatever. These are packed into the projectile its closed, apply so much energy to drive it and fire off a "flight" event. The system does the rest.

Each object travels at its own rate usually, but it does this bit by bit, not all at once. It still travels fast (I defy anyone to be watching for projectiles on FE and dodge the things with a 0.25 RL second gap for action in close firing ) but I can, if I really wanted, have a fireball perpetually circling the planet at ground level but it doesn't lock up the game. It moves, schedules the next event, that fires, it moves, it schedules the next event, and so on. While it moves you can run away (hrm.. outrun a fireball... maybe not..) shut a door (again with a fireball thats not always useful raise some form of shield (if you can move or cast fast enough) or generally panic until it arrives and passes you when you realise it wasn't actually targeted for you..

The really wonderful thing is I can finally put in some reflect shielding for magical projectiles and two players can play tennis with a fireball till doomsday (or beyond) and it won't impact on the game (you run a bounce method iteratively and the game will lockup until the bouncing ends). I won't go into the nice little test I made when I had 23,000+ independant fireballs flying around, although the system just about kept going

In general though, any projectile system should do the job for you, but be wary about using something that does it all at once too heavily, especially if you talk about long range weapondry (which you might with your setting).
       
Pages:<< prev 1 next >>