GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

Image
gta2text.7z
gta2text v1.0
(263.07 KiB) Downloaded 570 times
Image
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

downloadable again, fixed something :D
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

T.M. wrote:Its not just PHP, but in general, its very impractical in any application to pre-generate billion different word combinations (we need a lot, or else we wouldnt see any performance increase since checking only few words would actually make it slower than without the optimization). not to mention, the memory use would be epic, or you would need to load new images all the time, which makes super slow performance.

i havent tried palette trick yet, what do you mean by imagesize...? i havent heard about pngcrush, does it compress PNG better? :O
yeah the pre-generated-word-image is bad idea.

I meant the real file size of the image. the smaller that is, the better for the viewer (faster loading) and the webserver (lower bandwidth). you said in your test with palette it made file size 2x smaller, that would be awesome.

Nice work on the backgrounds! They look epic. [sm-82]

Image
Last edited by Cuban-Pete on 05 Dec 2011, 21:25, edited 1 time in total.
"Mmmm, your eyes are so beautiful."
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

pnggauntlet is GUI version of pngcrush and it just removed 40% of the filesize on a simple test image. just saying... :)
"Mmmm, your eyes are so beautiful."
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

Yeah, i tested the palet by converting "manually" that PNG to 256 colored image.

And oh yeah, paletted image support... forgot that. well, next release then :D

--

PS. i cant use pnggauntlet, it would make the image loading even slower (took like a whole second to optimize one PNG from the gta2text generator).
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

i noticed the pnggauntlet did only change my image into 256 color, which i will also do, but much faster.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

I did some cosmetic changes. To make it a little more user friendly if people visit the "real editor page". Here is a quick preview: http://lars.stonerocket.co.uk/gta2/txt2gta2/

Here is the zipped stuff: [see below]

It could be a lot nicer, maybe more like your editor style, but I think it will work for now. [gang]

//edit. hmm, maybe add date to the images (header and colour preview) so they don't get refreshed every time the page reloads...

//edit2: crap. sorry. looks like I put some errors in the code with putting in the preview image and header image. at least firefox error console complains about it.
Last edited by Cuban-Pete on 05 Dec 2011, 23:24, edited 1 time in total.
"Mmmm, your eyes are so beautiful."
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

Nice!

I think the width for the white area should be 800px max, lots of empty space there.

Hmm, date, you mean in header() ? i dont think that is smart, since it generates them on fly. the solution is to not link to the generator, but create own images and save as PNG. that should save some server stress too ;) btw it would be nicer if those title image links actually linked to the settings which you used to create those images :D

that preview colors link doesnt work very well, how about not using JS, but when you click the link, it will generate that image old fashioned way? ;-) (talking about that "Preview colours here (link)!")

edit: i dont think the clear button is very useful :-)
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

ok. give me 10 min and I fix those things.
"Mmmm, your eyes are so beautiful."
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

Image
lol one line too less to fit it there :P

--

it could work with JS too though, but only if it didnt disappear when i move my mouse out of that link :D (not everyone use full screen size window!)

edit: what are those (forum) tags ? i cant see those in forum :D
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

Those forum tags are from polish forum. hehe :P

I only now notice it does not fit the whole 18 on it.

I fixed the stuff. I added header.png, changed settings.php and index.php. plus changed to version 1.1 in index.php, but not in other files.
Attachments
v1.1_txt2gta2_php.7z
(283.55 KiB) Downloaded 550 times
"Mmmm, your eyes are so beautiful."
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

I kinda like the clear button. What if someone creates a car font but also wants a normal font... instead of clicking all options all he has to do is press reset. :)

//i'm off to bed [sm-01]
"Mmmm, your eyes are so beautiful."
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

$TXT2GTA2_YEAR = "2012";
lol wut? its 2012 already? :D

i've never really understood why a website needs (c) 2009-2011 etc... does it mean you can copy it at the year 2012 if they forget to add 2012 there?
User avatar
Sektor
Boss
Boss
Posts: 1453
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Sektor »

Copyright usually needs at least 100 years before it expires.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

For cuban-pete; i benchmarked the program with longest possible text and all colors and letters, here you can check results (click image):

Image

Edit: im thinking maybe i should somehow mark a date on the images; which i would change only when i have changed the output somehow, then the browser would be able to cache the images if it wants, and reload them only if needed.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

T.M. wrote: ...

Edit: im thinking maybe i should somehow mark a date on the images; which i would change only when i have changed the output somehow, then the browser would be able to cache the images if it wants, and reload them only if needed.
Yeah, if that is possible. It would mean massive amount less bandwidth and cpu time on the server. <3

Thanks for the bench. 100ms on average is actually pretty short, but long in websites terms. luckily the webpage with "our" images" is already loaded and the image will be put in later on, so the user won't be annoyed that much. just a crazy idea here, what if gif is faster in generating the final image (and smaller filesize), might it be a good candidate instead of png?

//edit: how do you use the bench? I added ?debug but it does not show the bench...


//nvm that. 100 ms is only for way too big images, else its all <20ms so no biggy
Last edited by Cuban-Pete on 06 Dec 2011, 15:38, edited 1 time in total.
"Mmmm, your eyes are so beautiful."
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

last time i checked PHP didnt support GIF, might have changed though.

you need to add "&debug" (check my image url end)
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

Added zipped text in case its smaller than non-zipped:
http://epicgta2.omnitude.net/gta2text/g ... F7fwM%3D&z

From 5856 bytes to 322 bytes! :)
Last edited by T.M. on 06 Dec 2011, 16:01, edited 1 time in total.
Post Reply