Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 847 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 401 of 554 1 2 399 400 401 402 403 553 554
Re: What are you working on? [Re: Slin] #444905
08/21/14 12:07
08/21/14 12:07
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Quote:
Using the way Felix proposed, with bmap_rendertarget should work perfectly for you!?
Nobody forces you to redraw the bmap every frame. Just do it once and you are done. And if you want to draw additional letters into it there should even be some way to keep the textures content and render on top of it.

Edit: also why aren´t you using true type fonts?

but hoow? ;_;

In Felix's example he draws it once every frame which works fine, but if I only draw it once it's not working.

might be obvious but I'm really not getting it smirk
or it's just some dumb mistake, I don't know

Edit: I'm not using tt font's because in my case (low-/mediumres game) it just works better this way and I'm quite sure you can't get the same effect/accuracy/whatever with truetype fonts.
(like the one in the screenshot I posted some pages before)

Edit#2: forget all that, acknex is just doing some annoying s*** again.
After the startup I have to wait two frames instead of one before I can write the text, otherwise nothing happens. -.-

Last edited by Kartoffel; 08/21/14 12:19.

POTATO-MAN saves the day! - Random
Re: What are you working on? [Re: Kartoffel] #444906
08/21/14 12:44
08/21/14 12:44
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 283
Germany
If you only add one character per keypress you can send the position data through a material skill. That saves a lot of time. You don't need a wait(1) anymore

Code:
void paint_char(BMAP *bmpTarget, char *str, VECTOR *offset)
{
	var pos = str_getchr(str, 1);
		
	mtlProjectText.skill[0] = floatv(1);
	mtlProjectText.skill[1] = floatv(offset.x);
	mtlProjectText.skill[2] = floatv(offset.y);
	mtlProjectText.skill[3] = floatv(bmap_width(bCourier) / 32);
	mtlProjectText.skill[4] = floatv(bmap_height(bCourier) / 4);
	mtlProjectText.skill[5] = floatv(points[pos].x);
	mtlProjectText.skill[6] = floatv(points[pos].y);
	
	bmap_process(bmpTarget, bmpTarget, mtlProjectText);
}



I didn't test it. but it should run faster.

Last edited by jenGs; 08/21/14 12:49.
Re: What are you working on? [Re: Kartoffel] #444907
08/21/14 12:45
08/21/14 12:45
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Originally Posted By: Kartoffel

Edit: I'm not using tt font's because in my case (low-/mediumres game) it just works better this way and I'm quite sure you can't get the same effect/accuracy/whatever with truetype fonts.
(like the one in the screenshot I posted some pages before)


I am sure you can get that effect in a much better quality with true type fonts, BUT you need a font specifically designed for your needs, so either you find one online or build it yourself, however that is done.

Re: What are you working on? [Re: Slin] #444908
08/21/14 12:49
08/21/14 12:49
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Originally Posted By: Slin
Originally Posted By: Kartoffel
Edit: I'm not using tt font's because in my case (low-/mediumres game) it just works better this way and I'm quite sure you can't get the same effect/accuracy/whatever with truetype fonts.
(like the one in the screenshot I posted some pages before)


I am sure you can get that effect in a much better quality with true type fonts, BUT you need a font specifically designed for your needs, so either you find one online or build it yourself, however that is done.

Well I haven't seen a truetype font that used transparency so I don't think they support it.

Also I am very happy with the way my font looks like so ttf isn't going to make it look 'better' tongue
But thanks anyway laugh


POTATO-MAN saves the day! - Random
Re: What are you working on? [Re: Kartoffel] #444910
08/21/14 13:06
08/21/14 13:06
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 283
Germany
I improved my shader, and it's working very fast. No delays, when typing. If you are still interested, I will send you my improved code to you as PM.

Re: What are you working on? [Re: Kartoffel] #444911
08/21/14 13:09
08/21/14 13:09
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
They do, there are different flavours!
True Type Fonts are actually quite the amazing things, in reality they are byte code that is executed by a VM. And yes, that is turing complete.

However, the biggest advantage they have over bitmap fonts, aside being scalable, is that they contain information for kerning, ascender, descender and leading. Basically all the information needed to do proper typesetting of the text.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: What are you working on? [Re: WretchedSid] #444912
08/21/14 13:34
08/21/14 13:34
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
@^: Thank you for the info, I didn't knew that. However I think I'll go with MQ32's or jenGs' approach ( thanks you two wink ),
especially because acknex's way of rendering truetype fonts is slow as hell (every character is a single drawcall afaik)


POTATO-MAN saves the day! - Random
Re: What are you working on? [Re: WretchedSid] #444917
08/21/14 17:59
08/21/14 17:59
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
Originally Posted By: WretchedSid
True Type Fonts are actually quite the amazing things, in reality they are byte code that is executed by a VM. And yes, that is turing complete.


So what you're saying is that if I use a True Type Font in a Java app, I am running a VM in a VM?


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: What are you working on? [Re: Michael_Schwarz] #444918
08/21/14 18:44
08/21/14 18:44
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
ttfs in A8 are only a beast if you want them to scale with the resolution.
I found the only way to recreate the fonts with new size.

If you're interested: In the Ackmania source code this method can be found in hud.c

Re: What are you working on? [Re: Michael_Schwarz] #444923
08/22/14 00:30
08/22/14 00:30
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Michael_Schwarz
So what you're saying is that if I use a True Type Font in a Java app, I am running a VM in a VM?


Now imagine that said Java runs on an OS that runs on some kind of hypervisor...
The fun never ends on Mr. Bones Wild Ride!

Last edited by WretchedSid; 08/22/14 10:50. Reason: Pop culture reference

Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Page 401 of 554 1 2 399 400 401 402 403 553 554

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1