Wc3C.net

Wc3C.net (http://www.wc3c.net/forums.php)
-   Samples (http://www.wc3c.net/forumdisplay.php?f=649)
-   -   TextParse System (http://www.wc3c.net/showthread.php?t=97876)

Ammorth 11-17-2007 09:30 AM

TextParse System
 
3 Attachment(s)
TextParse System - Version 1.20

Created by Ammorth

Requires Table and JassHelper by Vexorian


Parses a string to fit a certain width. Mainly used for multiboards.

Download Now

Expand Readme:

Pyrogasm 11-17-2007 09:52 AM

Sexy.

PipeDream 11-17-2007 09:59 AM

There are non greedy algorithms for solving this problem in linear time. In particular you should check out the Knuth Plass linebreaking algorithm.

Knuth and Plass, "Breaking Paragraphs into Lines" 1981

cohadar 11-17-2007 11:17 AM

@PipeDream
How the hell do you know so much about algorithms if you are not a programmer?

Tide-Arc Ephemera 11-17-2007 12:02 PM

He knows shit loads about code... maybe he's a hacker! O.O;

*changes password*

moyack 11-17-2007 12:46 PM

Quote:

Originally Posted by cohadar
@PipeDream
How the hell do you know so much about algorithms if you are not a programmer?

Isn't he a programmer??

*assuming sarcasm*

I'll check it out this system as soon as I get home.

Vexorian 11-17-2007 01:18 PM

Quote:

Originally Posted by cohadar
@PipeDream
How the hell do you know so much about algorithms if you are not a programmer?

He is a programmer, even though he pretends to be a physician ...

I can't think of a way to make an algorithm for this that had worse complexity than linear... I guess I am gonna take a look at code.

Pinzu 11-17-2007 03:06 PM

When I try to test the map i just end up at Frozen Throne menu,
(when you start up warcraft)

Help?

HINDYhat 11-17-2007 03:16 PM

Looks very good. I'm too lazy (or bad :P) to look at the code and possibly understand something, but based on the demo, it works fine.

Grats

PipeDream 11-17-2007 09:13 PM

His algorithm is linear. What I meant was that you can pack in more text to fewer lines with out sacrificing time complexity. Obviously for typical text not much more, particularly if you have only short snippets.

Ammorth 11-18-2007 01:51 AM

I looked into the method PipeDream stated and it seems like it would be more costly than the linear approach (requires building possible breaks and then finding the best route through the breaks).

Edit: I'm working on a syllable splitter that should increase the amount of text per line and stop the weird formatting, without requiring many more calculations.

moyack 01-07-2008 10:53 PM

After my check I haven't found anything strange.

*Approved*

Arkan. 08-12-2008 07:18 PM

This system rocks! It is just what I was looking for and it seems to be working flawlessly. Huge bonus that it can handle color codes and breaks!

Very well done, I will definately use this system for my ORPG Dark Invasion II (uses many multiboards with virtual items etc.).

:emote_thumbup:


All times are GMT. The time now is 09:16 PM.

Powered by vBulletin (Copyright ©2000 - 2017, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services