GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
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 made a test version. It does work rather nice, that php stuff.

I had the luck that the xampp server contained example php image code. :D

Try it out:
http://lars.stonerocket.co.uk/gta2/txt2gta2/
"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, all you need now is font selector and colors.

Do you read the fonts from .sty file?
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 »

TradeMark wrote:Nice, all you need now is font selector and colors.

Do you read the fonts from .sty file?
No, from a simple .tff, I'm not that good programmer. ;)

I also tried to make an overload/flow protector. Something that prevents users pressing too often on 'fire' and cause the free server to stop working. They won't like that. I tried to write the time() to a txt file and read it in next load and compare the time. If shorter than 1-3 seconds it should block it. It did work a little, perhaps you got better idea's?
"Mmmm, your eyes are so beautiful."
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

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

Post by B-$hep »

Check if IP is same and allow one user only generate text in some defined intervals.
Like only after every 10 or 15 minutes, or something like that.
Like rapidshare.
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 »

As you might know I have a version 4 that works with .net and opengl and looks pretty nice :P , but I ran stuck with shader crap. Because lots of stuff was unclear (like, I didn't even know about pointers), I decided to start a version 3.5. This version will go back to basics and will have a command line interface and run on windows/ubuntu/osx you name it - it's all basic c++. Also the file size will be nice and small. After this version I can go three ways: 1) continue with version 4 and finish it nicely. 2) restart version 4 going all multi operating systems (lots of work). 3) go to web based version php (lots of learning).

How things go after 3.5, I don't know, but for now I try to finish this version and learn as much as possible. :)

When I got something worth showing, you guys will be the first to know. :)
"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 »

Cuban-Pete wrote:As you might know I have a version 4 that works with .net and opengl and looks pretty nice :P , but I ran stuck with shader crap. Because lots of stuff was unclear (like, I didn't even know about pointers), I decided to start a version 3.5. This version will go back to basics and will have a command line interface and run on windows/ubuntu/osx you name it - it's all basic c++. Also the file size will be nice and small. After this version I can go three ways: 1) continue with version 4 and finish it nicely. 2) restart version 4 going all multi operating systems (lots of work). 3) go to web based version php (lots of learning).

How things go after 3.5, I don't know, but for now I try to finish this version and learn as much as possible. :)

When I got something worth showing, you guys will be the first to know. :)
Screw no GUI, that is so 2008 (late). I made a better version with SFML and a custom GUI. For now the GUI (buttons mainly) can keep up with my wishes, but maybe in the future it will need to be replaced by a real GUI and not a home made one. :D

Anyway, [respect] try a very early beta version and tell me what you think:
beta release 3.5.7z
known bugs:
- generate image is wrong.
- coloring example does not look the same
- clicking bottom half of letter does not change color
(454.24 KiB) Downloaded 477 times
//note sure if I can respond this week
"Mmmm, your eyes are so beautiful."
User avatar
Sektor
Boss
Boss
Posts: 1426
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

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

Post by Sektor »

Typing without an cursor is funny :)

It reminds me of those animations in TV shows and movies that show fake applications/typing.

cmd opens when I click on the filename ;)

I like it. It has style.
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 »

Sektor wrote:Typing without an cursor is funny :)

It reminds me of those animations in TV shows and movies that show fake applications/typing.

cmd opens when I click on the filename ;)

I like it. It has style.
Thanks. :D

The cmd opens and starts explorer to go to the folder with the saved image. I don't know any other way to it besides calling "system()". On my win7 cmd closes directly, but on vista it stayed open while the folder is open... a bit weird.

I might add a cursor option, maybe a old school one that blinks a horizontal line.
"Mmmm, your eyes are so beautiful."
User avatar
Sektor
Boss
Boss
Posts: 1426
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

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

Post by Sektor »

You can use ShellExecute API to open the default file manager to a specific folder.
User avatar
Salamander
Janitor
Janitor
Posts: 145
Joined: 01 Apr 2009, 20:38
GH nick: Salamander
KingSalamander
Sally
[00]
Contact:

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

Post by Salamander »

I got TXT2GTA2-3.0.1 to run in wine-1.3.27 by installing dotnet20 and vcrun2008 using winetricks. Seems to work fine.

Cuban-Pete you could improve it by coding it in a cross-platform toolkit, and by immediately updating the preview image as text is typed.
Last edited by Salamander on 06 Sep 2011, 05:30, edited 2 times in total.
User avatar
Salamander
Janitor
Janitor
Posts: 145
Joined: 01 Apr 2009, 20:38
GH nick: Salamander
KingSalamander
Sally
[00]
Contact:

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

Post by Salamander »

TXT2GTA2 beta release 3.5.7 somewhat works using wine as well, also needs vcrun2008, not sure about dotnet20.

Clicking the two color boxes at the top-right and then clicking on text does change its color, only strangely enough the pink box makes the text blue. Saving works, but the area saved is displaced by roughly 30-50 pixels vertically, see this output image:
Image



Screenshot:
Image

Another screenshot:
Image
Last edited by Salamander on 06 Sep 2011, 05:33, edited 2 times in total.
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 »

Thanks for the feedback. I already had a version that got that problem fixed a month ago, but I did not release it because the coloring system (under the hood) is crap. Currently not enough time to finish it. Unless I keep it this way, but than I need to manually pick all the fontcolors which takes a lot of time. If someone wants to do that for me - please tell me and i'll give some instructions.

btw, it's not 3.5.7 ... it's 3.5 in a 7zip file. :)

Here is a better beta version:
beta release 3.5 v2.7z
(454.31 KiB) Downloaded 456 times
"Mmmm, your eyes are so beautiful."
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

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

Post by B-$hep »

Clicking on color boxes does nothing.
I cant choose color because it just doesn't work.


And why is text quality so poor? Looks very blocky.
Previous version generated smooth text. What did you change there?

After clicking many times, trying to change color and closing app it just crashed.


Using XP Pro Eng.
Always wear safety glasses while programming.
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 »

Can you make a screenshot of "blocky"?

Here it all works perfect and looks perfect... anybody else problems on XP?

Are you sure your videocard driver is up-to-date B-shep?
"Mmmm, your eyes are so beautiful."
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

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

Post by B-$hep »

Sorry CB.
Seems that blocky text bug is gone.
I guess my XP is dying, i have to make clean install.
It's getting very old now, i installed it at the beginning of the 2011 i think.

But anyway one bug remains: colors and crash at exit.
Take a look, what your code does when shutting down app, maybe you have little bug there.
Anyway, you have made a good work on this thing.

All the best.
Always wear safety glasses while programming.
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 »

Yes, that is true. On XP/Vista on exit it gives an error, but that is something in SFML I'm afraid...
"Mmmm, your eyes are so beautiful."
User avatar
R4ZZ0R
Ped
Ped
Posts: 2
Joined: 25 Sep 2011, 22:38
GH nick: RazzorRockweel

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

Post by R4ZZ0R »

Nice program, guy. I liked it. :P

Image
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 went crazy and found Processing (java development thing with aim on graphics). [respect]

So here I present a new beta, just to see if it works for all. Even included Mac and Linux version.

The beta is very basic, only text show up, rendering one line in basic color. I made this in one day - way faster than with c++ crap. :)

In fact, because it is java, there is even a web version: http://lars.stonerocket.co.uk/gta2/txt2gta2/

Problem with web version is that the user can't save the image. A logical restriction to prevent hackers putting bad programs on your pc.

The future is looking bright again with processing on my side. :mrgreen: :| :lol:
Attachments
txt2gta2 beta v5.7z
(220.53 KiB) Downloaded 406 times
"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. »

Why dont you make a PHP version? it makes most sense if you want to show it on website too, really easy to make and doesnt need java support etc. the nice thing with PHP is that you can use a PHP script to generate an image which will be usable inside the [img] tags even here on the forums. not to mention, i dislike java from bottom of my heart.
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 »

PHP is so different in syntax and does not have decent image manipulation or I need to work with the real pixeldata which will always be a mess when converting back to an image (not to mention, very slow). Also, real text preview will be a no-go with PHP.

What is wrong with java? It looks a lot like a combo of c++ and python, it works on all operating systems and most people got it installed (which is not with python, bummer). Maybe java is a bit slower in execution, but that does not matter for most of my simple programs.
"Mmmm, your eyes are so beautiful."
Post Reply