Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / String2Hex

Author
Message
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 14th Jul 2007 23:29 Edited at: 16th Jul 2007 13:44
Well, I thought it was time to make some sort of a contribution to this community, so I enhanced the editor I use to write ini-files in a hexadecimal repressentation of the bytes (0 to 255) corresponding to the characters.
Why?
Well, it's easy for people to just go inside and mess with a regular ini-file, written in plain text, so I thought that I should "cover it up" somewhat.
Because of the ascii table range (256 characters in total), the hexadecimal base made for a fitting choice.
In the end, the hex-repressentation of ie. "startup: normal", 73 74 61 72 74 75 70 3A 20 6E 6F 72 6D 61 6C, is somewhat more complicated to read and change to "startup: debug (which would be 73 74 61 72 74 75 70 3A 20 64 65 62 75 67).
Also, nicely separated by a space between every value, it looks a bit too complicated for the average player to even bother trying to change

~~~~~~~~~~~~~~~~~~~~~~~~~~
Description: What the program does is basically to let you convert plain text to a hexadecimal repressentation of itself.
Also, these "hexStrings" can of course be turned back into (ascii) text. For further info, see the included documentation.
~~~~~~~~~~~~~~~~~~~~~~~~~~
So, if you would like to try it out, go ahead.
I'm pretty satisfied with it anyways (hey, it actually does what it's supposed to).

"I kören hörs de brummande busarna Björnligan och Gondolen"

Attachments

Login to view attachments
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 23rd Jul 2007 12:59
Whoa.... I had at least expected some reply like "this sucks" or similiar

"I kören hörs de brummande busarna Björnligan och Gondolen"
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 23rd Jul 2007 14:53
Nice idea, especially using your own editor thing to encode and decode.

Maybe it would be better though to have a symbol to tell the system that it has to convert, that way you could have text bits as well, maybe options that the user should be able to hack.

Like...
#73 74 61 72 74 75 70 3A 20 6E 6F 72 6D 61 6C

Then when you read your ini file back again you can check for the #, if there's no # then don't convert it.

.ini files are a great help in organising a project, but often it's vital to be able to directly hack them. With the addition of a convert flag, you could use pure text the whole time, then before deployment you could encode the whole lot.

Just a thought, to be honest I'm not sure that you'll get many responses for a program like this, it's the sort of thing people consider after their game is finished, and unfortunately that's pretty rare for most DBPro users

We're going down... in a spiral to the ground...
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 29th Jul 2007 22:52
Thanks for the comment

I'll see if I might add commenting in later on; I'm currently using this to make a minigame... or more of a small game, one might say, as it isn't part of anything bigger; as of yet, there's been no need to comment anything as the variable names I use are pretty self-explanatory, and one can easily see them in the string panel (left side)

"I kören hörs de brummande busarna Björnligan och Gondolen"

Login to post a reply

Server time is: 2024-05-19 00:20:30
Your offset time is: 2024-05-19 00:20:30