Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > Advanced MUD Concepts
Click here to Register

Reply
 
Thread Tools
Old 07-03-2012, 01:51 AM   #41
swampdog
Member
 
Join Date: Jul 2010
Posts: 31
swampdog is on a distinguished road
Re: Can MUDs implement range/distance?

Haha well since you bumped it, not only are trees a cool thing to learn but the math for co-ordinate grids is very simple. And even if you are finding paths or distances all the way across your 100x100 grid the math executes very quickly - this pseudocode finds the distance between any 2 points basically instantly and it doesn't matter how far apart the locations are:

return square((x2 - x1) ^ 2) + ((y2 - y1) ^ 2)

Where, x1 and y1 are the co-ordinates of your starting point and x2 and y2 are the co-ords of your ending point, and this applies to all handling of the grids. You can use (fast) elementary math to crunch the numbers, and then figure out what your grids are representing, which could be a projectile in flight (which you would then poll, updating the X, Y positions of all flying arrows on a regular basis), or the types of resources available at any X, Y point on a map.

Last edited by swampdog : 07-03-2012 at 02:59 AM.
swampdog is offline   Reply With Quote
Old 07-03-2012, 05:01 AM   #42
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
Re: Can MUDs implement range/distance?

Quote:
Originally Posted by swampdog View Post
Haha well since you bumped it, not only are trees a cool thing to learn but the math for co-ordinate grids is very simple.
That's not the problem though. The problem is that most muds are room-based, and even if they laid their rooms out on a grid, those rooms would still represent abstract containers that restrict sight, movement and combat. You couldn't simply display everything within hundreds of rooms, the spam would be horrific - you'd need to make some fundamental design changes.

You'd also need to define the dimensions of each room, because a "room" could represent anything from a vast clearing in a forest to a tiny closet in a house. And to calculate the distances between two creatures or objects, you'd also need to track their position within each room.

Quote:
Originally Posted by swampdog View Post
And even if you are finding paths or distances all the way across your 100x100 grid the math executes very quickly - this pseudocode finds the distance between any 2 points basically instantly and it doesn't matter how far apart the locations are:

return square((x2 - x1) ^ 2) + ((y2 - y1) ^ 2)

Where, x1 and y1 are the co-ordinates of your starting point and x2 and y2 are the co-ords of your ending point, and this applies to all handling of the grids.
You need to make sure you don't try to calculate the square root of a negative number. This is my solution:

Code:
int CThing::GetDistance( IThing *apThing )
{
   int Diff = -1;

   if ( apThing != NULL )
   {
      if ( apThing->GetLocation() == this->GetLocation() )
      {
         double DiffX = double(gw2::Difference(apThing->GetPositionX(), mX));
         double DiffY = double(gw2::Difference(apThing->GetPositionY(), mY));
         Diff = (int)sqrt((DiffX*DiffX) + (DiffY*DiffY));
      }
   }

   return ( Diff );
}
Quote:
Originally Posted by swampdog View Post
You can use (fast) elementary math to crunch the numbers, and then figure out what your grids are representing, which could be a projectile in flight (which you would then poll, updating the X, Y positions of all flying arrows on a regular basis), or the types of resources available at any X, Y point on a map.
I wouldn't bother tracking individual arrows. You'd need to update a lot more frequently to do that, increasing the load on the processor (particularly when you're tracking tens or even hundreds of thousands of objects) - and it make archery very annoying, because you'd never hit a moving target.
KaVir is offline   Reply With Quote
Old 07-03-2012, 10:50 AM   #43
swampdog
Member
 
Join Date: Jul 2010
Posts: 31
swampdog is on a distinguished road
Re: Can MUDs implement range/distance?

Quote:
Originally Posted by KaVir View Post
That's not the problem though. The problem is that most muds are room-based, and even if they laid their rooms out on a grid, those rooms would still represent abstract containers that restrict sight, movement and combat. You couldn't simply display everything within hundreds of rooms, the spam would be horrific - you'd need to make some fundamental design changes.

You'd also need to define the dimensions of each room, because a "room" could represent anything from a vast clearing in a forest to a tiny closet in a house. And to calculate the distances between two creatures or objects, you'd also need to track their position within each room.
Having this system in mind from the beginning is pretty much required. You can also think of the room as the player's "view", in addition to container. One method I have seen used is moving the room instead of the player, updating as needed based on location, and splitting off new rooms to carry other players or creatures when they seperate.

I mentioned the simple math because it becomes easier to do the above when you can use your co-ordinates to generate and retrieve information (like terrain type) using perlin noise. Now you don't have to store that terrain type anywhere, you just have to call your noise function with the same arguments as you did initially (x, y, max range of types, and generally a randomized, saved seed for each new map) and you will always receive that terrain type back, as part of an overall map. I think the room space definition comes down to codebase and the actual gameplay you want to represent, which might be a global fantasy overmap or a galaxy of solar systems. It took me about a year to do the following, starting with gridding all the rooms and generating them at planet creation time and then moving to an on demand system:

1 50x50 and 3 100x100 planets running (how well this will work with more players is unknown (this example has about 15 players running around)) but just re-using some rooms that are not occupied is a memory saver compared to creating the actual rooms at each point: http://i.imgur.com/8HJvY.png

From the player's point of view, he can walk/drive/fly around with only the room he is in. All his stuff is where he left it because the rooms persist when occupied, but when he treks between points of interest he's actually in the same room the entire time, updating the view as he goes.
http://i.imgur.com/iLrIm.png

Once he goes into space he's inside a solar system that handles all interactions (scanning, auto pilot, move to coord, docking, orbitting, firing) based on object co-ordinates and can hop out if he wants, floating around as the ship leaves him behind. So it's far from a complete 3d co-ordinate based MUD but based on the type of game you want I think the specs on that are going to vary wildly. Window line of sight, interior room position would be a big deal in a shooter or survival game but doesn't matter at all on a surface warfare game with orbital strikes and vehicles and vice versa.

Quote:
I wouldn't bother tracking individual arrows. You'd need to update a lot more frequently to do that, increasing the load on the processor (particularly when you're tracking tens or even hundreds of thousands of objects) - and it make archery very annoying, because you'd never hit a moving target.
Arrows were a bad example, I was thinking of bullets from an FPS - a more reasonable MUD/MOO example would be a boat or starship on a heading at a certain speed.
swampdog is offline   Reply With Quote
Old 07-03-2012, 03:43 PM   #44
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
Re: Can MUDs implement range/distance?

Quote:
Originally Posted by swampdog View Post
Having this system in mind from the beginning is pretty much required. You can also think of the room as the player's "view", in addition to container. One method I have seen used is moving the room instead of the player, updating as needed based on location, and splitting off new rooms to carry other players or creatures when they seperate.
I've implement that approach in the past, but if you're building the system from the ground up and want to use accurate rather than abstract distances, then IMO you're better off dropping the concept of rooms entirely. They're an artificial constraint that isn't well suited to this style of mud.

Quote:
Originally Posted by swampdog View Post
I mentioned the simple math because it becomes easier to do the above when you can use your co-ordinates to generate and retrieve information (like terrain type) using perlin noise. Now you don't have to store that terrain type anywhere, you just have to call your noise function with the same arguments as you did initially (x, y, max range of types, and generally a randomized, saved seed for each new map) and you will always receive that terrain type back, as part of an overall map.
I've used that approach too, it has both pros and cons (which is why I prefer a hybrid approach) but it doesn't make it any easier (or more difficult) to calculate distances.
KaVir is offline   Reply With Quote
Old 07-04-2012, 09:59 AM   #45
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Can MUDs implement range/distance?

Since we've opened this conversation again:

Firstly, swampdog, I so wish wayfar1444 was more blind-friendly--I'd come offer to do it, but I just started coding over on cotn, and probably wouldn't have the time.

KaVir, the square of a negative is always a positive; the addition of two positives is always positive; the Pythagorean theorem can never result in the square root of a negative number--at least, not if done correctly.

As for the abstraction of arrows/bullets. No mud is going to have an update time fast enough for the player to notice whether or not you're faking the math; in most cases, even with such an update time, it's not going to show. Much easier to fake it. Given a coordinate and a vector, it's easy enough to determine if someone/something is in a certain range and on that heading:

given coordinate (x,y), and vector (xh, yh), we've got enough to draw an imaginary right triangle, so you can do all sorts of useful things. I can show the math, but it's probably way easier to get it off wikipedia; I've never done it in coding, so mine might be slightly wrong. In short, though, you've got an angle for player output and a slope, and:
y=mx+b. If you have m and some point, the point is on the line if that equasion works for that point. There you go, faked arrow trajectory.

And just an idea I've been toying with: empire mud clone. All the cities etc are rooms, in fact all the locales are, but when you go into combat, you go to a separate battlefield with your party and the enemies--think console rpgs here--with targettable features at the four edges, such as bridges, that let you exit, hazards, and of corse targettable enemies. Basically, godwars2 and empire mud. My point being, there's no reason you can't mix both; exploration, at least in my opinion, is much more engaging when you have all the complex text-adventure-like things rooms allow, and combat is more engaging when you cclone KaVir. Heh, I'm not too sure why no one has yet.
camlorn is offline   Reply With Quote
Old 07-04-2012, 12:36 PM   #46
dentin
Member
 
Join Date: Apr 2008
Home MUD: Alter Aeon
Posts: 245
dentin is on a distinguished road
Re: Can MUDs implement range/distance?

Camlorn: KaVir is way ahead of you here. I believe his point was that if you use integer math and have big distance differences (greater than above 46000 units), you can end up passing in a negative number to the square root function due to integer overflow. These kinds of integer overflow problems are a really common problem in signal processing, and I've seen it a ton over the last ten or so years. Integer overflow makes up a significant fraction of C programming code bugs.

FYI, when KaVir says something I don't understand, I've found it to be good policy to assume I've missed something important. His track record on posts like this is extremely good. He wouldn't write up a complicated function to calculate distance if he didn't have a good reason for it.

-dentin

Alter Aeon MUD
http://www.alteraeon.com
dentin is offline   Reply With Quote
Old 07-04-2012, 03:12 PM   #47
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Can MUDs implement range/distance?

Heh. I know that, dentin, but I was so sure this time...

True, though, integer overflow == fun. I'd not use c for a mud, however, so idk. I suppose it greatly depends on what language you're using whether or not that function or something like it is needed--I know python can promote numbers to bigint and I'm almost certain c# and java throw exceptions.

But yeah, listen to KaVir. I forgot the integer overflow.

Anyone know how his function is actually fixing the problem, though? He appears to be converting to double, but I'm not sure what cThing->location is supposed to be.

For those using c, it may be worthwhile to go read about the gcc extensions--in particular, long long (which is standard, now, I think), and 128-bit integers (which is even bigger and may also be standard). If we assume the maximum value of long long to be some measurement in meters, it's aproximately 1949.8640344137174849557028971024 light-years, unless my math is failing again. Beware, these may have performance penalties.

There is also the option of writing your own distance class of some sort, but that probably deserves a whole new thread, if not an entire article, and there's probably tons of literature on that already, and it may/probably isn't worth your time.

I still advocate oct-trees, a bit--there's problems with the pythagorean theorem for larger worlds unless you split them somehow. The truth is, I don't think there's much more that can be said in this thread without a bunch of specifics and someone actually working on a project asking for help.
camlorn is offline   Reply With Quote
Old 07-05-2012, 03:35 PM   #48
dentin
Member
 
Join Date: Apr 2008
Home MUD: Alter Aeon
Posts: 245
dentin is on a distinguished road
Re: Can MUDs implement range/distance?

Camlorn,

By casting the xdiff and ydiff to floating point, he gives them arbitrary range. If they start out as ints, the difference ends up floating point. If you square an int, it can overflow. If you square a double precision floating point number, it probably wont (and if you start from an int, its guaranteed not to.)

Adding the two squares, each of which is now guaranteed not to overflow, also doesn't produce an overflow. So the square root function always has a valid input.

-dentin

Alter Aeon MUD
http://www.alteraeon.com
dentin is offline   Reply With Quote
Old 07-05-2012, 06:15 PM   #49
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Can MUDs implement range/distance?

I know that much, dentin--I just don't understand all of it, mainly because I can't see everything it calls.

Didn't know floats and doubles were precise enough for this--it was my understanding that by the time you got to the integer overflow range, you're relatively close to the point at which you start rapidly losing precision. I suppose, however, it's better than a crash or something from wierd negative distances. Clearly I don't fully understand floats--do you have any online stuff that does a good job of explaining it, and where you start losing precision?

I'm not going to go through KaVir's function line-by-line saying what I don't understand; that's what I'd have to do to answer the question of what I don't understand about it, probably. That said, I don't believe in black boxes, with all the negatives that implies, and won't admit to understanding until I understand pretty much every line inside and out.
camlorn is offline   Reply With Quote
Old 07-06-2012, 12:48 PM   #50
dentin
Member
 
Join Date: Apr 2008
Home MUD: Alter Aeon
Posts: 245
dentin is on a distinguished road
Re: Can MUDs implement range/distance?

I understand your need for level of detail, but I'll leave that for KaVir if he feels it necessary. I can answer the float/double question though.

Single precision FP, which is the 'float' type in C, only has about 24 bits of precision even though it's a 32 bit number. The remaining 8 bits are the exponent, which means that it can take on values such as 1.5e16, even though the largest possible number that can fit in 32 bits is about 4e9.

Double precision FP, which is the 'double' type in C, has about 53 bits of precision, out of 64 bits total. The exponent on the 'double' type can be a lot bigger, so numbers like 1.5e60 are possible.

Wikipedia has a big article on the theoretical construction and design of floating point numbers in general; it might be worth reading that as well.

Since KaVir is using doubles here, he's got enough bits that he's probably not going to lose precision in any of the operations. But even if he used floats, the loss of precision would be 'close enough' for pretty much all meaningful situations. Remember that you can still add 1e-16 to 1e16 and get a result, even if the floating point representation lacks the precision needed. It just won't be perfectly accurate.

-dentin

Alter Aeon MUD
http://www.alteraeon.com
dentin is offline   Reply With Quote
Old 07-13-2012, 04:42 PM   #51
realmsofvalor
New Member
 
realmsofvalor's Avatar
 
Join Date: Jul 2011
Posts: 22
realmsofvalor is on a distinguished road
Re: Can MUDs implement range/distance?

The MUD I work on, Arantha, uses a hybrid room-and-coordinate
system we call tactical movement. Room-to-room movement is a MUD
standard with cardinal directions. Within each room is an X, Y grid.
Interacting with objects/mobs/players can be dependent on whether or not
you are close enough. For example, when you drop an object it will drop
on the same tactical space your character is standing on. If an object is
more than a step away, you cannot use 'get' to pick it up. You can't slap
(social) a person across the room, but you can whistle at them.

In regards to combat, moving into a room with an aggro mob will
automatically switch you to the 'tactical' mode. Movement is using the
same north-east-south-west, and once you walk out of the room it returns
to normal movement mode. Positioning can affect combat & group
dynamics, especially when AOE spells are slung into the fray.
From a code perspective it's quite simple to keep track of an X &
Y-placement integer for each obj/mob/PC and dimensions for each room,
then build your features by calling on those values. As the average room
spans 3x3 to 8x8, there's no issues with huge numbers, and the tactical
maps are designed to be displayed in a simple telnet client with minimal
embellishment.

I would agree with KaVir that if you're looking for accuracy,
full-coordinate is the way to go. Personally, I find the hybrid system makes
combat quite interesting, while still retaining the traditional MUD elements
of rooms. As to floating point numbers, I dislike using them due to the
rounding errors, but they are a very handy variable for large-number
calculations. If you want to learn more about the rounding issues, maybe
this article won't hurt your head:
What Every Computer Scientist Should Know About Floating-Point Arithmetic
realmsofvalor is offline   Reply With Quote
Old 07-14-2012, 01:39 PM   #52
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Can MUDs implement range/distance?

So, I had a few more thoughts after all:

Firstly, I've been keeping an eye on arantha--I was kind of waiting on the crafting system, assuming one is forthcoming (I get the impression one is from various posts here), but I'll probably be dropping by to check it out. Unfortunately, I'm not overly sure just how accessible your approach is, to the blind, and probably won't be able to use it unless it has added features for that, or something. The impression I get is a roguelike ascii map for combat, with a time limit on the turns, so not very accessible, but I shall see in the next couple of days if I get a free moment.

I wasn't going to go down this road, but since we seem to be anyway. If you're going to try this kind of mud, have a look at scala--there's issues with hosting it because it runs on the java vm, but c++ can do a lot of the same thigns, if you're willing to jump through hoops. In particular, one of the common things I've seen floating around when teaching scala is a fully working implementation of mixed numbers (i.e. 1 and 2/3), which can be used the same as ints (you multiply, divide, etc the same way, and use // to define one, as in val x = 2//3), and they can be converted to int/double/whatever easily. Which is one of the reasons I like scala, and one day I'll figure out how to host jvm for free or have an income, and buy a vps.

Finally, and this is for the math people out there, mostly. I don't fully understand how this works, only how it can be used.

Take a look at opengl math, in particular the matrices, as the same thing applies. If each object you want to represent in the game world is considered to be a model with one point, a lot of the same stuff applies--you can suddenly do "to your left" depending on the direction faced, etc, by transforming each object into the local coordinate system of the viewer and generating your descriptions off that. Basically, you transform the coordinates such that the player is at the origin and the y axis points straight out of the player's chest--negative x is to the left and positive x is to the right, and the pythagorean theorem still works for distances. This is heavily cpu intensive unless offloaded onto a graphics card, but both have the same problem: shared resources. You're unlikely to find a shared server with a graphics card that's high end and, if you do, 6 or 10 or 100 other people are probably all on it for the same reason--graphics cards are now basically hugely parallel cpus, and you can offload a lot of parallelizable scientific programming on to them. That said, I'm not sure how bad this'd actually be, but we're talking o(pn), where p is the number of players and n the number of objects per player--for each player, this has to be done for each object. It does allow for a lot of interesting things, however, like affects that make your left eye stop working, etc, or that flip everything about the y axis--couple that with some sort of block left/right system that protects either the left or right side, and you've got lots of really interesting fun under way. This is probably extremely overkill for this, but if you're interested, look into opencl (open computing language, iirc).

This is one of those optimization things, but for a 2d coordinate system, you can do most of the above with trigonometry--3d systems are doable this way, too, but matrices are much easier at that point, given the preexisting libraries.

One day, i'm going to get around to writing a mud with this kind of stuff. One day, when I work out the server issues and can use something that's not c/c++--I hate headers with a vengence, and just love signal segfault, or the more obscure segabrt (out of memory, sometimes, not always). I also need time and motivation--but as we all know, you can succeed without them.
camlorn is offline   Reply With Quote
Old 07-14-2012, 06:54 PM   #53
obit
Member
 
Join Date: Oct 2007
Home MUD: telnet://we-dont.gotdns.org:1701
Posts: 64
obit is on a distinguished road
Re: Can MUDs implement range/distance?

Hrmm.. this isn't a plug, (I promise!) but there is an open source text-based MUD engine that could be adapted to a Fantasy RPG type game with ranged spatial combat, movement, and logical line of sight in an open world that can be as large or as small as the dev would like it to be. Infact, it uses real 3-D algorithms, which could be used to calculate elevation and even allow for flying character classes. It has ranged instant damage attacks (can either do a constant amount of damage within the effective range, or a gradually increasing/decreasing amount, depending on the range), directional projectiles that travel in a straight line and cause damage on impact, and "seeking" projectiles that home in on the target.

Here's a screenshot:



While this game is 3-D space combat, it could really become 3-D anything.

The display is basically broken down into 5 zones:

The top of the buffer, the 2 lines above the tactical display, is used to flash information for a few seconds at a time, relevant to whatever's going on. You can send a command to show inventory of a certain item, receive alerts, in-game announcements, etc. In the above screen shot, the "torpedoes" inventory could be "arrows" instead. The range could be in feet, meters, whatever, and variable depending on what type of bow/arrow combination, and for real moving or instant damage projectile, there is a range modifier that can cause variable amounts of damage and potentially miss in the case of a moving target.

The next 3 zones make up your "HUD".

On the left, all of your vitals are shown. Your name, energy status, shields, damage, weapons charge, fuel, exact X/Y/Z location, speed, and direction of travel. "Warp 0-5" could be sit/stand/walk/jog/run/sprint. "Shields" could be armor. "Phasers" could be mana charge for a magical attack. "Damage" and "Life Support" could be well.. damage and life. (One note, when damage reaches over 100, life support begins to bleed down from 100% at a rate of 1% per second until damage is healed below 100 again) "X" and "Y" could be meters/miles- N/S and E/W, and "Z" could be elevation above/below sea level.

The center section, labeled "tactical display" tels you at a glance, where everything within your scan range is, in relation to you. Enemies fill the tac from the top, and objects/planets/bases fill the tac from the bottom. They disappear from the tac when they are out of your range, or when obscured from direct line of sight by another object. (perhaps a forest instead of a nebula or a wall instead of an asteroid?) Each item is assigned a letter or number to allow for quick commands specific to the item. (there's no need to ever type out a full name). The set of numbers with the +'s -'s etc, is the true bearing to the item. Broken down into navigational terms, the first of the pair is Heading, 360 degrees with 0 (and 360) being the top of the +Y axis. It could easily be output as "N, NE, E, SE, etc while keeping true with the real mathematical azimuth. The second of the pair is the relation to you, as viewed along the pitch axis with you "looking" at the item- Or simply relative elevation along the Z axis, up or down. 90 degrees is directly above you, -90 is below, and 0 degrees is at an equal elevation to you. The number on to the far right of the item name is the distance. This is the true distance, displayed without the ridiculously long trailing decimal that results from these types of calculations. (as discussed in previous posts) The game is doing the math but chops off the decimal because it's honestly TMI. It could represent whichever unit of measurement you like- furlongs and leagues and such.

On the right, you see detailed information about whatever you are scanning (looking at). You can also scroll through help files, display a real-time roster of other players online, set your personal preferences, view your complete inventory, and the list goes on.

Finally, the zone at the bottom consists of 2 lines where static information can be displayed such as effects you are currently under (cloaking device.. or invisibility potion!), the item you are targeting, and the coordinates or item you are pointed towards. The last several lines make up a scrolling message zone with combat damage reports, server anouncements, private and global chats, etc.


AND, on top of all of that, there is a graphical client out there which could be adapted as well (though I personally prefer raw telnet):





Just a thought.

Last edited by obit : 07-15-2012 at 02:25 AM.
obit is offline   Reply With Quote
Old 07-14-2012, 08:53 PM   #54
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Can MUDs implement range/distance?

Names are nice, obit. Plug or no, names are nice.

I think at this point it's worth mentioning that blind players are a significant-ish portion of the mudding community, and that there's no reason at all why these kinds of things can't be made blind-friendly--go look at godwars2 for a proof.

Unless you use a graphical display with a refresh rate smaller than the time it takes a projectile to leave a weapon and hit something else, you can fake a lot of the algorithms I think you're using. Not sure how far real 3d algorithms goes in this case.
camlorn is offline   Reply With Quote
Old 07-15-2012, 01:53 AM   #55
obit
Member
 
Join Date: Oct 2007
Home MUD: telnet://we-dont.gotdns.org:1701
Posts: 64
obit is on a distinguished road
Re: Can MUDs implement range/distance?

There is an example of the raw telnet server running at:

mtrek.com

telnet to mtrek.com on port 1701

The graphical client and documentation can be found at the XmlTrek Home Page and once installed, can be played on:
telnet xmltrek.com port 1702.

That said, the graphical client was originally developed with the visually impaired specifically in mind, with customizable fonts, zoom levels, color indication, and sound support to audibly alert the player of the surrounding situations and and conditions. It isn't a solution for the completely blind; for that, I think a new client would need to be developed. Full-blind support built off of this [client] software would be an undertaking similar to rendering Call of Duty for the same purpose. Or at least when you compare the manpower resources of Treyarch/Infiniti Ward to those of the typical MUD developer.

As for refresh rates, the game by default runs with 4 complete updates (ticks) per second or one every 250 milliseconds. The engine is fully adjustable though, and tick rate can be set at anything from 1 millisecond per update (1000 updates per second. 250X real-time!) to the incredibly slow. Use your imagination..

Debugging, I have maxed out the tick rate and let a server run with 60ish AI MOBS/bots, zooming around blasting each other at Ludicrous Speed for hours. The only real limiting factor is the game server CPU for the raw text version, but I'm not sure how well the client can keep up with "ludicrous speed". My 512MB server (VPS hosted) keeps up just fine. I'm also running a Wordpress homepage, apache/mysql, and another complete instance of the game running offline for testing/development. I imagine that if you throw in text readers and other visual support, you may want to slow the server down instead- even to the point where it's almost turn-based feeling. All of the math is still there and in the case of fast-moving projectiles, vectors, line of site, etc., everything can be calculated behind the scenes, even accounting for moving targets or whatever. Maybe full-blind support wouldn't be so hard to implement in that case?

The game can be downloaded at:
https://github.com/rumour/jtrek

Last edited by obit : 07-15-2012 at 01:59 AM.
obit is offline   Reply With Quote
Old 07-15-2012, 11:54 AM   #56
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Can MUDs implement range/distance?

The fact that this is apparently written in java gives me hope--512mb server is a lot less than what I figured I'd need if I ever did a mud on the jvm. (it still might be--I want to do something like empiremud, which requires storing a lot in memory).

A separate client probably isn't needed in most cases. Yours apparently already renders stuff for raw telnet, but seriously, go have a look at godwars2 for examples of this. Mushclient already has blind support--there's a tiny plugin that can call my screen reader, as well as several others. All that's really needed is a sensible non-mouse targetting system and a text version of the maps; the latter is typically something like "to the southwest, you see" or perhaps better, for this type of game, a relative coordinate system (the player is always at the origin--all objects are translated, and listed such as "(-2,3) a repair bot", or something). Miriani does the latter, is fully blind accessible with a player-produced soundpack, and is space combat, so ymmv.

As for generating this data, well, the difficulty depends on how the underlying representation is done. To be honest, that's a whole new thread, probably, and depends greatly on the specific situation--godwars2 can, because the whole world isn't stored as a grid of 1ft by 1ft squares, or what-have-you. Not that storing the world as a grid is bad or prevents alternative interfaces, but it makes finding nearby objects very, very inefficient.

I'm not criticizing you, obit, I'm just trying to draw attention to it--miriani has around 15-30 blind players, so there is a market for blind-accessible muds of this type. If you start the project with this in mind, it honestly isn't that hard--the difficulty is in coming up with an accessible interface in the first place, given that the developer may or may not be blind him/herself. Again, I can't give much detail on this without specific questions.
camlorn is offline   Reply With Quote
Old 07-23-2012, 09:38 PM   #57
swampdog
Member
 
Join Date: Jul 2010
Posts: 31
swampdog is on a distinguished road
Re: Can MUDs implement range/distance?

Quote:
Originally Posted by camlorn View Post
The fact that this is apparently written in java gives me hope--512mb server is a lot less than what I figured I'd need if I ever did a mud on the jvm. (it still might be--I want to do something like empiremud, which requires storing a lot in memory).

A separate client probably isn't needed in most cases. Yours apparently already renders stuff for raw telnet, but seriously, go have a look at godwars2 for examples of this. Mushclient already has blind support--there's a tiny plugin that can call my screen reader, as well as several others. All that's really needed is a sensible non-mouse targetting system and a text version of the maps; the latter is typically something like "to the southwest, you see" or perhaps better, for this type of game, a relative coordinate system (the player is always at the origin--all objects are translated, and listed such as "(-2,3) a repair bot", or something). Miriani does the latter, is fully blind accessible with a player-produced soundpack, and is space combat, so ymmv.

As for generating this data, well, the difficulty depends on how the underlying representation is done. To be honest, that's a whole new thread, probably, and depends greatly on the specific situation--godwars2 can, because the whole world isn't stored as a grid of 1ft by 1ft squares, or what-have-you. Not that storing the world as a grid is bad or prevents alternative interfaces, but it makes finding nearby objects very, very inefficient.

I'm not criticizing you, obit, I'm just trying to draw attention to it--miriani has around 15-30 blind players, so there is a market for blind-accessible muds of this type. If you start the project with this in mind, it honestly isn't that hard--the difficulty is in coming up with an accessible interface in the first place, given that the developer may or may not be blind him/herself. Again, I can't give much detail on this without specific questions.
Wayfar runs 4 10k room planets on about 300mb of RAM (mostly due to inflation, can be knocked down to about 150~ with reboots). I would also say Miriani and Star Conquest are mostly blind players - i have played both. My personal opinion is that fighting over the ~50-100 blind players is kind of a losing game, since there is an upper limit. The future of MUDs, such as it is, surely lies more in graphical games, especially on social media sites. You have a good point about the underlying representation: at no point does the player care whether you have a true 3d simulation of all your spaces, or whether you accurately simulate the interior room. It's more about the presentation to the player.
swampdog is offline   Reply With Quote
Old 07-24-2012, 11:50 AM   #58
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Can MUDs implement range/distance?

Well, moo and java are totally different--the libraries alone take up a few megabytes and each 2-dimensional array has more overhead. Every object has reference counters...I can go on, but you probably get the point. Java really isn't comparable to moo--moo was optimized for space in a specific domain over time, and has most of the underlying code in c. If you write in java, you've got all of the overhead for your world plus all of the overhead of writing the libraries yourself, and it can grow quite quickly. Scala adds another megabyte to this simply for using scala, and even more if you start using mixins and multiple inheritence (not natively available on the jvm). It really depends on what you're doing, but if I were to do something like wayfar1444, it'd be quite a bit larger than 300 mb, probably (before optimizations--I'm sure there's ways to make this smaller, but it's probably not woorth it: just get a vps or host from a box at home).

As for the situation with blind players, and I'm very surprised that someone hasn't done this yet, there really isn't an upper limit. Until someone comes along and makes a blind-accessible mmorpg, muds are the closest thing to World of Warcraft. I suspect muds could get quite a few more players if they targetted the blind community, but I have yet to see someone seriously do that. Most blind people that I know aren't even aware that such things exist.

As for "fighting over" the blind players on miriani or star conquest, your loss. A lot of those players play both, and I suspect quite a few wouldn't mind adding a third, and there's sites like audiogames.net to advertise on--miriani, alter aeon, and star conquest are a sort of cluster, but there are more blind players out there spread far and wide. I've spoken to you of this before and you've made it clear you don't care, so your loss (I don't quite blame you, but I really wish you would reconsider). We're not a finite resource--there's something like a million blind people in the United States (not sure on this and can't site a source, but it is a large number all the same--my parents keep up with that kind of thing, and it is apparently growing with the population). This is from wikipedia:

In 1994-1995, 1.3 million Americans reported legal blindness.

Siting as it's source the American Foundation for the Blind, which I can vouch for as being a reputable source (me and my family have been to some of their conferences). You have to count out those who are blind for reasons which would cause difficulty playing muds, but I still hold to my point that, if targetted properly, that's a sizeable number of potential players.

But I'm derailing the thread (which was necroed, anyway), and am starting in on a rant.

ps: I didn't read the source. As all things wikipedia, take it with a grain of salt.
camlorn is offline   Reply With Quote
Old 07-24-2012, 09:09 PM   #59
Ide
Senior Member
 
Join Date: Feb 2006
Location: Seattle
Posts: 361
Ide will become famous soon enoughIde will become famous soon enough
Re: Can MUDs implement range/distance?

Since we've already necroed, derailed and ranted, why not some more OT? Besides, it's an interesting subject.

There's 250,000,000 Internet users in the USA (Internet Users - Top 20 Countries - Internet Usage), and say around 50,000 mudders (just a seat of the pants guess really using MUDStats.Com: statistics and information on MUD/MUCK/MUSH/MUX/MOO games charts). Of course some of those mudders are not in the USA but I'd guess the large majority of mudders are in the USA; let's say 35,000. That means about 0.00014 % of Internet users in the USA play muds.

About 1.4 million people in the USA cannot read ordinary newsprint with the aid of glasses (Junior Blind of America |FAQs About Blindness) so I'd say that's the VI demographic we're talking about when we say 'blind players'. Let's say one million of them are on the Internet. That means using the figure calculated above that there are 140 mudders in our demographic. Surprisingly close to swamp's estimate .

Of course, that doesn't tell the whole story -- that any mud with an eye on its future should be looking for new players, people who have never played muds, and not tracked on mudstats. But it's always useful to know where you're coming from .
Ide is offline   Reply With Quote
Old 07-25-2012, 10:47 AM   #60
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Can MUDs implement range/distance?

But, Ide. Here's the point. Out of those 1.3 million people who can't read newsprint, I'd say over half probably can't read mmorpg chat logs either--so let's say 500000, for simplicity.

Of those 500000, let's say 300000 use screen magnification--you don't need to modify your mud for this. They still can't play graphical mmorpgs, but as for the modification of a mud, it's not needed.

But the remaining 200000 or so would need modifications--they'd be using jaws or the like.

But, of course, those are large numbers and they're not accurate, until you take into account the following which shrink them:

1) Many of them are older people with no interest in learning the computer.
2) A whole group is probably young children.
3) A whole group is probably blind as a symptom of something else, like mental or motor problems.
4) A group of those with no one competent to teach them the computer (I fell into this--I'm actually 100% self-taught): many school systems and the like don't have someone who knows assistive technology at all.
5) Then of course, the group that's not interested.

I'd say if someone targeted the blind community and made an actual large effort to inform people, you could get 5 or 10 thousand--the problem is reaching the whole demographic. I'm talking, like, speaking at conferences here, and the like, as well as posting on blind-only mailing lists and similar. It'd be a really, really large effort, obviously. You'd spend more time targeting the blind community than writing your game and would probably be doing it for all games in general, but there's my thought.

Of the above statistics, I'd say 50000 are "potential" mud players--they don't have the alternative of mmorpgs and they have the computer and typing skills to make it work. But the 5-10 thousand grouping is probably more accurate as an underlying wish to play muds as opposed to, say, going outside needs to be present, and you can't exactly just give someone that desire.

One final point. Of those 5-10 thousand potentials, many of them probably don't know about the blind communities on the internet--you kind of have to explicitly be looking for this kind of thing. It doesn't jump out of google, as it were--if you're not searching for blindness specifically, you'll never find it.

Finally, I'm probably being very optimistic. But I'd say 240 blind players is really rather small--with the clusters of alter aeon, star conquest, and miriani, the community is already close to that if not over. There's no accurate way, basically, to come up with either of these numbers.
camlorn is offline   Reply With Quote
Reply


Thread Tools


Can MUDs implement range/distance? - Similar Threads
Thread Thread Starter Forum Replies Last Post
Old muds makila Tavern of the Blue Hand 13 06-08-2012 05:13 AM
Looking for RP MUDs Almondine War Advertising for Players 13 10-22-2005 02:07 PM
how to implement a class? UnKnOwN1205 MUD Coding 2 01-03-2005 07:09 PM
Top 20 muds Cayn Tavern of the Blue Hand 141 08-25-2004 12:30 PM
Any Muds? Asalyt Advertising for Players 6 03-10-2004 09:10 PM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 05:43 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014