Jump to content


Font creation code rewritten!


  • This topic is locked This topic is locked
54 replies to this topic

#41 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • Retired Staff
  • 9259 posts
  • Version:Unknown

Posted 22 March 2011 - 09:52 PM

I'm sorry, but of all the font effects to use, you chose the easiest-to-replicate as your example of support? Seriously, how hard is this?:

for (p=0; p<360; p+=45) {
  draw_text(xx + lengthdir_x(1,p), yy+lengthdir_y(1,p), "TEXT");
}
draw_text(xx, yy, "TEXT");

-IMP ;) :)
  • 0

#42 Dark Matter

Dark Matter

    RPG Expert

  • GMC Member
  • 3196 posts
  • Version:GM:Studio

Posted 22 March 2011 - 09:54 PM

Easy, but slow at the moment.
  • 0

#43 Desert Dog

Desert Dog

    GMC Member

  • Global Moderators
  • 6409 posts
  • Version:Unknown

Posted 22 March 2011 - 09:58 PM

I wish there was a simple way of adding bold into text your writing, other than clunky work-arounds.
  • 1

#44 Dark Matter

Dark Matter

    RPG Expert

  • GMC Member
  • 3196 posts
  • Version:GM:Studio

Posted 22 March 2011 - 10:01 PM

I wish there was a simple way of adding bold into text your writing, other than clunky work-arounds.

Yeah, and colour.
draw_text(32,64,"Hello there, this text is red");
EDIT: It's actually converting that to bold automatically, but I was using [b] tags.

Edited by Dark Matter, 22 March 2011 - 10:02 PM.

  • 2

#45 commander of games

commander of games

    Kaos Kreator

  • GMC Member
  • 2840 posts
  • Version:GM:Studio

Posted 22 March 2011 - 10:26 PM

Everyone is going to hate me for saying, but please don't add font effects. There are more useful things you could be working on.


Just because you don't see it as usefull, doesn't mean others won't. I would find glow very usefull, others may find shadows, outlines, etc. usefull.

I'm sorry, but of all the font effects to use, you chose the easiest-to-replicate as your example of support? Seriously, how hard is this?:

for (p=0; p<360; p+=45) {
  draw_text(xx + lengthdir_x(1,p), yy+lengthdir_y(1,p), "TEXT");
}
draw_text(xx, yy, "TEXT");

-IMP ;) :)


I don't have access to GM at the moment, so I'm going to assume that makes glowing text. The problem is that its slow. Only a small amount in my game caused it to lag to the point of being unplayable, and thats before I had even added anything complex.
  • 0

#46 Mr. RPG

Mr. RPG

    GMC's Forum Troll

  • GMC Member
  • 2671 posts
  • Version:GM:Studio

Posted 22 March 2011 - 10:38 PM

I am not understanding something. What is this font creation code Mike is talking about?

Edited by Mr. RPG, 22 March 2011 - 10:38 PM.

  • 0

#47 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 22 March 2011 - 10:48 PM

I'm sorry, but of all the font effects to use, you chose the easiest-to-replicate as your example of support? Seriously, how hard is this?:

NOBODY SAYS ITS HARD!!!! The problem is that your drawing the text 9 times (and 16 lengthdir's combined with a for cycle..) and that is VERY slow. If you think we want functions just because they are hard, then we have no need for newly implement dot product function, or data structures or many other functions. Many of these can be easily replicated. The advantage is speed, and that is why we want these functions natively. As a user who joined in 2004 you should be one of the first persons to understand this.

I am not understanding something. What is this font creation code Mike is talking about?

He fixed problems many people had with fonts. They were cut off or overlapping which made them unusable. That is what he is talking about.

Edited by HaRRiKiRi, 22 March 2011 - 10:49 PM.

  • 0

#48 ParodyKnaveBob

ParodyKnaveBob

    theUndiscovered

  • GMC Member
  • 987 posts
  • Version:GM:Studio

Posted 23 March 2011 - 12:21 AM

I have a feeling this will be the "must have" feature of 8.1 for many, so wanted to share it with you. We didn't know if we were going to manage to fix this in time so didn't want to get your hopes up. But it's in... and looks great!

Very nice! I must say, I expected I'd wait to install the new 8.1 until after I'd finished with my current semi-experiment project, but yes, this one feature is must-have enough that I've changed my mind and will try it much sooner than later. $:^ ]

Another cool little feature I added over the weekend was a proper "search". In the new Standard Edition you can now search ALL scripts for text. So no longer are you limited to searching just scripts for things, it'll now search scripts, objects, room creation code, instance creation code, timelines and triggers! This was another one we wanted in, but weren't sure we'd make it...

Enjoy!

Search now works on all paramaters/arguments in D&D events. Will now even pick up arguments to scripts, or if you use a D&D function to set a variable.

Awesome. Very good feature which I'm sure many will greatly enjoy! And, the feature I asked for in the request thread?--RTF-reviewing everything at once? Well, being able to search through all the text in a single Ctrl+F run was one of the major reasons for my request anyway! Little did I know you were already working on this instead. Rock on, and thank you. $:^ ]

No, you can't put fonts into the GMK; that's illegal. Sorry.

We do have a method of doing outlines and dropshadows we wantto use in the future, and while we're one step closer... we aren't there just yet. sorry.

Thank you here, too, for confirming/explaining the issue of GMK-embedded fonts and the preview of some quickie font effects!

--

I welcome the option to search in everything as well - it's gonna be pretty nifty. If it's actually a search-replace, I promise I will paint my house green as a tribute to your marvellous work. :)

Alright, Yal, "pictures or it didn't happen!" $;^ b

--

Regards, $:^ }
  • 0

#49 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • Retired Staff
  • 9259 posts
  • Version:Unknown

Posted 23 March 2011 - 01:28 AM

@HaRRiKiRi: Alright, well excuse me. No need to shout. I do understand the desire for native functions to speed up common tasks. When I posted the code here, I didn't have access to GM to test it; I really didn't think drawing text 9 times was going to slow the game down in any noticeable way. Now that I'm home, I've tested it, and I realize that it does, in fact, add a significant amount of time (in a test comparing outlined text to a simple draw_text, run 10000 times each, there's a 14-second difference, which is obviously a lot). It's much more inefficient than I had expected, so I concede that.

However, text effects are still not really a priority cause, so if we ever see native support for them, I sincerely doubt it would be in a minor version upgrade. It's much more suited to a major version, like GM9 or GM10.

-IMP ;) :)
  • 0

#50 Big J

Big J

    GMC Member

  • GMC Member
  • 2818 posts
  • Version:GM8.1

Posted 23 March 2011 - 02:43 AM

I don't know what's fixed, the two screen shots look identical. Good job anyway.
  • 0

#51 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14384 posts
  • Version:GM:Studio

Posted 23 March 2011 - 02:44 AM

Does that take care of the Clear Type problem too?

Great job btw.
  • 0

#52 benetonmovie

benetonmovie

    GMC Member

  • GMC Member
  • 1368 posts
  • Version:GM:Studio

Posted 23 March 2011 - 03:13 AM

I don't know what's fixed, the two screen shots look identical. Good job anyway.

Look closer. ;)
  • 0

#53 Dangerous_Dave

Dangerous_Dave

    GMC Member

  • Global Moderators
  • 9276 posts
  • Version:Unknown

Posted 23 March 2011 - 07:12 AM

@HaRRiKiRi: Alright, well excuse me. No need to shout. I do understand the desire for native functions to speed up common tasks. When I posted the code here, I didn't have access to GM to test it; I really didn't think drawing text 9 times was going to slow the game down in any noticeable way. Now that I'm home, I've tested it, and I realize that it does, in fact, add a significant amount of time (in a test comparing outlined text to a simple draw_text, run 10000 times each, there's a 14-second difference, which is obviously a lot). It's much more inefficient than I had expected, so I concede that.

Why not just draw it to a surface?
  • 0

#54 Dark Matter

Dark Matter

    RPG Expert

  • GMC Member
  • 3196 posts
  • Version:GM:Studio

Posted 23 March 2011 - 07:20 AM


@HaRRiKiRi: Alright, well excuse me. No need to shout. I do understand the desire for native functions to speed up common tasks. When I posted the code here, I didn't have access to GM to test it; I really didn't think drawing text 9 times was going to slow the game down in any noticeable way. Now that I'm home, I've tested it, and I realize that it does, in fact, add a significant amount of time (in a test comparing outlined text to a simple draw_text, run 10000 times each, there's a 14-second difference, which is obviously a lot). It's much more inefficient than I had expected, so I concede that.

Why not just draw it to a surface?

Yes, we know there are work arounds. That doesn't mean a faster built-in method would not be useful. Because it would.
  • 0

#55

  • Guests

Posted 23 March 2011 - 08:00 AM

Okay... closing down now. Thanks for the suggestions on search.

One last thing about effects. The font effects we most want to add are the simple ones everyone uses, outline and drop shadow.These cost a lot when drawing, and everyone (almost) uses them. So at somepoint we'll add this in natively.

As to colour/control code... its another one on the list that we usually do ourselves.... Both these I suspect will have to wait until the next version.

Thank peeps.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users