The Official GreaterMUD Forums

GreaterMUD Discussion => Frequently Asked Questions => Topic started by: erek on Jan 22, 2006, 02:41 PM

Title: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: erek on Jan 22, 2006, 02:41 PM
will GreaterMUD strive to emulate the ANSI output of MajorMUD in order to allow MegaMud to work with it?
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: The Crazy Animal on Jan 22, 2006, 05:44 PM
From what i've read it seems that they want megamud to feel right at home in greatermud. Though I would hope that greatermud would inspire someone to make a better term/scripting program to go with it.

TCA
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: DeathCow on Jan 22, 2006, 05:58 PM
Megamud works fine with it.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Relorian on Jan 26, 2006, 11:27 PM
Quote from: The Crazy Animal on Jan 22, 2006, 05:44 PM
Though I would hope that greatermud would inspire someone to make a better term/scripting program to go with it.

We been hoping for one of those real hard for real long now and so far no ones gotten round to it.
Though i would like to see a new Megamud like program for bother MajorMud and Greater Mud... that would be pretty kickin and cool.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: DeathCow on Jan 27, 2006, 01:14 AM
Yeah, megamud has how intense limitations, but it is nice that everyone pretty much uses the same thing.  Now I've heard that Vitoc might be interested in making a client..which would be cool...but really thinking about it.  All he'd really need to do is make the ground work for that client then just leave it open source.  Honestly mudders are a pretty dorky crowd..plenty of them would be able to work together to make it into something useful.

Although maybe i could track down merlin or something..but that sounds like alota work, he's kind of a recluse nowadays.

I'll have to be a realist and assume that the existance of a client will be purely based on the quality of what we produce.  I'll aim for the best and hope that my love, and knowledge, of a now dead game help me to make something other people will enjoy.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: The Crazy Animal on Jan 27, 2006, 07:59 AM
Quality of the product; I think DC hit the Groundhog with that one, if enough people like the game then the odds of a new client go way up.

TCA
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Achilles on Jan 27, 2006, 12:34 PM
..it's amazing how many people come out of the woodwork when something like greatermud arises.

There are plenty of people that are just waiting for something like this to come around.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: DeathCow on Jan 27, 2006, 04:22 PM
I hope so Zurvan.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Stylez on Feb 22, 2006, 04:38 PM
Quote from: Relorian on Jan 26, 2006, 11:27 PM
Quote from: The Crazy Animal on Jan 22, 2006, 05:44 PM
Though I would hope that greatermud would inspire someone to make a better term/scripting program to go with it.

We been hoping for one of those real hard for real long now and so far no ones gotten round to it.
Though i would like to see a new Megamud like program for bother MajorMud and Greater Mud... that would be pretty kickin and cool.

Aye, I attempted this some time ago, (2 years?)  But I'm no C++ developer, primarly C#/VB.NET and I couldn't get around speed issues.  I might take another stab at it in the future if no one else does.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: The Crazy Animal on Feb 22, 2006, 08:45 PM
That would be very cool of you if you gave it another try as there are a large number of limitations that mega introduces.

TCA
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Stylez on Feb 23, 2006, 09:19 PM
I'll give it a shot.  I just need to get past the initial terminal part... ANSI Parsing etc...   Thats where I found the biggest problems before as far as speed is concerned.

I have an idea to try out, and hopefully it'll go smoothly.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: DeathCow on Feb 24, 2006, 01:15 AM
Good luck..let us know how it goes...
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Vitoc on Feb 24, 2006, 05:35 PM
Quote from: Stylez on Feb 23, 2006, 09:19 PM
I'll give it a shot.? I just need to get past the initial terminal part... ANSI Parsing etc...? ?Thats where I found the biggest problems before as far as speed is concerned.

I have an idea to try out, and hopefully it'll go smoothly.
The terminal and ANSI parsing is the easy part. ;)

After you get that to work, you'll realize that Mega is already doing 98% of what you're about to spend countless hours creating.? Are you willing to put in all that work for just that extra 2%?? I wasn't, and neither were the people in the other numerous projects that set out to better it.? Mega is a damn fine program, not without it's flaws, but there's a reason it's still what most Major MUDders turn to even after development essentially stopped on it years ago.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: The Crazy Animal on Feb 24, 2006, 05:52 PM
I always thought they turned to it still because no one has made a newer program and that it is so easy to get a keygen for..
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Stylez on Feb 24, 2006, 10:06 PM
Well the text parsing and such shouldn't be to hard.. Time consuming yes, but still :) 

I attempted 3 different ways to do the terminal, and none worked.  All incredibly slow.  ANSI parsing itself is pretty easy, just clumsy, at least how I've implemented it so far.  But I've finally found a quick way to display the text.  I just need to see how well I can manipulate it.

I agree that Mega's a great program, it just seems that with a new mud coming out, a new terminal might be necessary.  Hell, Mega freaks out about the smallest change.  I know what I'm working on will take some time, and there's no tellin whether or not I'll get overwhelmed with the amount of replication.   But worst case, I give up and throw it out there as opensource for someone to play with :)

I'll tell ya where I'm at thus far.  (Skip this part if your eyes start to glaze over)

I wrote the socket class in about 10 seconds.  (exaggeration Alert!)    I've written them tons of times, I can just never find one of my previous classes when I need it....  or its old code...or whatever...   

Anyway...  That?s when I began to tackle the emulation portion.
Luckily, I still had some old code for the actual escape sequence parsing, so I set off on to stress testing GDI.  I tried creating a new control, and i tried writing directly to a panel.  In both cases I simply pounded out 80x24 random chars every 100ms.  You should of seen the CPU hit the roof, was so bad the laptop fans kicked on lol.  I tried a couple of variations, using every performance boost I could... Even reverting back to 1.1's method of doublebuffering, thinking that 2.0's optimized wasn't so optimized, but no joy.  Ended up going out on a limb and now I'm testing out using DirectX to do the drawing.  And thus far its blazing fast.    Still need to test a bit more... background colors, etc...


(Ok you can continue here if you want)
Only issue is, never heard of a terminal program requiring DirectX 9 before...lol   What do you guys think?

Sorry about goin on like that...  I usually talk about implementations like that to people I work with about something new I'm working on, but I think they'd laugh if I told em what it was :)
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Stylez on Feb 24, 2006, 11:26 PM
Score..

So far, I can write about 12000 Random Characters per second, with some random background colors behind about half of the characters with great speed.  Even though when thats going on, the CPU peaks to about 25% I think its acceptable.  Not like that amount of data gets rendered when playing mud anyway.

So what's yer viewpoint on using DirectX?   Do you think that dependency will be a big problem?

I'm kinda diggin it so far..  Never really got into it much before.  But so far, using it is simular to GDI, little easier in some ways. 
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: The Crazy Animal on Feb 25, 2006, 12:32 AM
I don't have a problem using dx9 but I know older machines sometimes have problems with it.

You should think about maybe allowing it to use MMudexplorer type database files to query the realm data from. This would open up a lot of possibilities for you to work with.

TCA
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: DeathCow on Feb 25, 2006, 03:12 AM
or...you could ask us if you ahve a question...we know.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Vitoc on Feb 27, 2006, 09:00 PM
Lol, umm.... no on the DirectX ;)

What exactly is causing the CPU usage, processing the incoming ANSI or rendering it?? DirectX isn't going to help you with processing, and rendering colored text on a control shouldn't take up much CPU at all.? For starters, forget the panel.? Create your own control from scratch and do your rendering using GDI+.? You'll have to keep track of the current location on the terminal manually.? Use a queue-styled buffer to get the info from the host and have your rendering loop plow through the contents of the buffer character by character, parsing ansi codes on the fly.? I had a working sample that used very little CPU, but I must have lost it in one of my many formatting sessions. :(
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Stylez on Feb 28, 2006, 06:36 PM
Hrmph :)

I did the control part...

Thats what I started with.   The processing isn't as fast as I'd like, but that wasn't where my bottle neck was. I was using GDI to draw the screen, it was just horribly slow.

Like I said, maybe it was my approach. 

The processing of the ansi stored characters and their attributes in a collection of a collection.

I basically created a Terminal Class, which had a collection of  TerminalRows, which had a collection of TerminalCharacters.

The processing would handle the current cursor position, as well as each individual characters attributes.  ForeColor, BackColor, Blink, Hidden, Visible, Underline, Reverse, and of course the actual character.

OnPaint would simply draw y0-24 -> x0-79 characters.

The way I read the RFC on escape sequences lead me to believe this would be the most efficiant approach.  Maybe thats where my issue is.

Either way, I've run into problems with the directX route as well.   Drawing on a form is cake, but drawing to a control ended up rendering blurry text.  Though I chalk that up to my lack of knowledge with the managed directx library :)
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Stylez on Mar 02, 2006, 08:01 PM
Well I'm not sure what I did that was different, but I simply painted out the DirectX code in the paint event, and replaced it with the equiv drawString method and everything is fine...  It parsed a welcome screen just fine...

Like I said, I don't know whats different..

Gonna go ahead and clean the code up some, get the telnet socket connected to the client, and do some asthetics... Cursor, menu's etc..

Gotta say, now I feel kinda silly :)
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: DeathCow on Mar 02, 2006, 08:24 PM
We still love you.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: The Crazy Animal on Mar 02, 2006, 10:53 PM
I have a few ideas for this for its later development:

A map/path, loop interface that would let you highlight a travel path on a map just by checking off the rooms you want it to travel through when auto walking. This way if you think very graphicly you could just draw your loop or path and not actually have to walk it in the first place.

I think a better way of figuring out a lost characters location would involve using a mudexplore like room database. The first step would be to search the database for a room with the same name and same available exits. If more than one is found the next step would be to remove rooms from the possible room list by looking into adjacent rooms and comparing their available exits to the possible locations. The third step would be to then travel to an adjacent room and repeat the steps until the location is known. Since this requires less random walking it would be safer for the characters and should also be more efficient.

I?m also thinking that if it always knows where you are then it shouldn?t need as many defined paths just a list of destination rooms. It could then build the paths as it uses them. Which would be a more useful way of going about making paths provided content is updated frequently.

Similarly using a mudexplorer like room database. I was thinking if you could get it to write the scripts just using the room/map numbers and waypoints instead of using just the map directions. So if you wanted to write a script to walk from say Silvermere to Khaz you would just set the start and stop points and the program would pick the shortest path and pull any necessary special commands directly from the real room data. If you wanted it to take a different path then you would just set in waypoints that it would have to walk through and it would follow from start room to waypoint 1,2,3 and on till it reaches the end room.

Another nice idea would be a loop builder that uses the regen room data to determine the most efficient loop in an area. Perhaps it could convert them to waypoints and have it build a loop using that data. Maybe have it so you can set sets of max min room/map numbers in and then let it auto configure the loop from the room numbers the user provided and available data.

Another nice function would be a way of synchronizing database information from whatever server you play on so before it enters the realm it can check the server for content updates. This would be a nice way of always being up to date.

TCA



Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Stylez on Mar 03, 2006, 06:43 AM
Quote from: The Crazy Animal on Mar 02, 2006, 10:53 PM
I have a few ideas for this for its later development:

A map/path, loop interface that would let you highlight a travel path on a map just by checking off the rooms you want it to travel through when auto walking. This way if you think very graphicly you could just draw your loop or path and not actually have to walk it in the first place.

I think a better way of figuring out a lost characters location would involve using a mudexplore like room database. The first step would be to search the database for a room with the same name and same available exits. If more than one is found the next step would be to remove rooms from the possible room list by looking into adjacent rooms and comparing their available exits to the possible locations.

This is what I had in mind, though it should really only need to do it once, from that point on, it'll know what room/map number its in.

Quote from: The Crazy Animal on Mar 02, 2006, 10:53 PM
The third step would be to then travel to an adjacent room and repeat the steps until the location is known. Since this requires less random walking it would be safer for the characters and should also be more efficient.

I?m also thinking that if it always knows where you are then it shouldn?t need as many defined paths just a list of destination rooms. It could then build the paths as it uses them. Which would be a more useful way of going about making paths provided content is updated frequently.

Similarly using a mudexplorer like room database. I was thinking if you could get it to write the scripts just using the room/map numbers and waypoints instead of using just the map directions. So if you wanted to write a script to walk from say Silvermere to Khaz you would just set the start and stop points and the program would pick the shortest path and pull any necessary special commands directly from the real room data. If you wanted it to take a different path then you would just set in waypoints that it would have to walk through and it would follow from start room to waypoint 1,2,3 and on till it reaches the end room.

I've given this some thought in the past, and I haven't yet come up with a way to do a search like this efficiantly...

Quote from: The Crazy Animal on Mar 02, 2006, 10:53 PM
Another nice idea would be a loop builder that uses the regen room data to determine the most efficient loop in an area. Perhaps it could convert them to waypoints and have it build a loop using that data. Maybe have it so you can set sets of max min room/map numbers in and then let it auto configure the loop from the room numbers the user provided and available data.
Good Idea...

Quote from: The Crazy Animal on Mar 02, 2006, 10:53 PM
Another nice function would be a way of synchronizing database information from whatever server you play on so before it enters the realm it can check the server for content updates. This would be a nice way of always being up to date.
Interesting, but I don't know if it'd work.  Though I think auto updating dat files will be important...   to hell with a full reinstall everytime a new mud version comes out :)
TCA




Quote
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Stylez on Mar 04, 2006, 02:45 PM
Anyone know how to display "Extended Ascii" characters through GDI?

I'm stumped...
Been testing the term on numerous bbs's to get the ANSI parsing workin right, and there are a few that won't even display due to this issue.

I've looked all over, and I can't find squat on it, minus Uniscribe/MultiByteToWideChar which don't work in GDI+

Not sure what to do here...   I could conver the characters to something else..   or try to detect them and manually draw the glyphs, but I think that would cause a performance hit...  especially withthe shaded boxes.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Ian on May 11, 2006, 05:47 AM
Good to see you're still thinking/working on this.  This is more of an encouragement post than a help one.... keep up the good work!  ;)
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Locke Cole on May 11, 2006, 08:48 AM
Quote from: Stylez on Mar 04, 2006, 02:45 PMAnyone know how to display "Extended Ascii" characters through GDI?

Should just automatically work if you have the right font selected. You can use a raster (bitmap) font like "Terminal" (which ships with Windows, so you can rely on everyone having it), or you can use an opentype/truetype font like "Lucida Console" (which ships with recent versions of Windows, anyways). Both of those should have high/extended ASCII characters.

If nothing else, try to get a font editor and make your own (for your purposes you only need to create 255 characters, so it's not like you'd be creating all sorts of funky characters). If you make your own, you can embed it in your executable as a resource and access it that way.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Ian on May 15, 2006, 10:34 PM
Ooh, here's a feature I'd like to see that pisses me off severely in megamud.

I like that your char will stop before entering a boss room.  But it's REALLY annoying when you're level 50 and you stop before entering the mad wizard or giant spider.  I'd like to see a "Stop before entering if below level" type parameter for each monster (or for bosses rather).
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: DeathCow on May 16, 2006, 04:07 AM
That has nothing to do with us we didnt make megamud, and have no plans to make a new megamud.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Ian on May 16, 2006, 05:09 AM
I wasn't talking to you DC :P

I was talking to Stylez.  You da man  ;D
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: The Crazy Animal on May 16, 2006, 10:44 PM
Forgot about this post:

Stylez, theres a program called wget that will auto get files for you so you might be able to use that to sync to a server to get updates.

http://www.gnu.org/software/wget/
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: Locke Cole on May 18, 2006, 02:54 AM
Quote from: The Crazy Animal on May 16, 2006, 10:44 PMForgot about this post:

Stylez, theres a program called wget that will auto get files for you so you might be able to use that to sync to a server to get updates.

http://www.gnu.org/software/wget/

Programmatically you'd want to use WinInet (which comes with Windows/Internet Explorer) probably. You can use WinInet to download files from HTTP/FTP servers, and I believe it offers asynchronous transfers as well (so your GUI could keep a progress bar updating as the download proceeds).

WGET is a cool tool though.
Title: Re: "GreaterMUD" ANSI compliance (MegaMud)?
Post by: The Crazy Animal on May 18, 2006, 03:10 AM
True didn't think of that...