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.

Geek Culture / GameGuru and DBPro

Author
Message
TheComet
11
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Apr 2015 15:35
Soo... Can someone run the code Mr. V claims can print Japanese and print a screenshot?

http://forum.thegamecreators.com/?m=forum_view&t=213618&b=2&msg=2557478#m2557478

Need help with C/C++ game dev? PM me or add me on skype: the__comet.
Current active project: Light Ship
James H
11
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 17th Apr 2015 16:21
TheComet - Yes it does

Attachments

Login to view attachments
Clonkex
Forum Vice President
8
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 17th Apr 2015 16:48
Quote: "Soo... Can someone run the code Mr. V claims can print Japanese and print a screenshot?"


FINE

(ignore the initial text - that's just all my default template code - just look at the very last line)



MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Apr 2015 22:11
You forgot set font "fixedsys"

James H
11
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 17th Apr 2015 23:08
Quote: "fixedsys"

I can change to whatever font name I want - its the charset value 128 that is needed. That said although I can change the font name, no actual font changes on screen are apparent in normal text while using the charset 128. Seems charset 128 is a fixed font which I guess should be expected.
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Apr 2015 00:01 Edited at: 18th Apr 2015 00:02
Quote: "

Charset Name Charset Value(hex) Codepage number
------------------------------------------------------

DEFAULT_CHARSET 1 (x01)
SYMBOL_CHARSET 2 (x02)
OEM_CHARSET 255 (xFF)
ANSI_CHARSET 0 (x00) 1252
RUSSIAN_CHARSET 204 (xCC) 1251
EE_CHARSET 238 (xEE) 1250
GREEK_CHARSET 161 (xA1) 1253
TURKISH_CHARSET 162 (xA2) 1254
BALTIC_CHARSET 186 (xBA) 1257
HEBREW_CHARSET 177 (xB1) 1255
ARABIC _CHARSET 178 (xB2) 1256
SHIFTJIS_CHARSET 128 (x80) 932
HANGEUL_CHARSET 129 (x81) 949
GB2313_CHARSET 134 (x86) 936
CHINESEBIG5_CHARSET 136 (x88) 950

"



Quote: "

APPLIES TO
•Microsoft Platform Software Development Kit-January 2000 Edition

"


Hmm, you could be onto something there, but it still does not explain how they got that string in the first place... was it a shift over to the charset? >>CHINESEBIG5_CHARSET 136 (x88) ?

EDIT

Forgot to link source

https://support.microsoft.com/en-us/kb/165478

James H
11
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 18th Apr 2015 02:38 Edited at: 18th Apr 2015 04:10
Quote: "it still does not explain how they got that string in the first place"

I have been asking myself that from the moment I read your post!
Quote: "was it a shift over to the charset? >>CHINESEBIG5_CHARSET 136 (x88)"

I do not understand what your saying there - I don't think Chinese has any bearing in this although there is a connection in the way its written traditionally(top to bottom columns each new column going left of the previous one). In truth I don't know the first thing about it..
That said, I believe some things should be taken into consideration, I was hoping to come across some way of determining as many things as possible so that I might guess what to look for in terms of gaining access to the creation of the strange string used in the code.
After a lot of googling I beleive I have determined that the characters produced by that strange looking string is known as Katakana, having looked at a chart of this I can see there is no direct translation as such. The translation of the characters produced by the code does seem to translate as DarkBASIC.
The first letter D is the same as the first character ダ as it is followed by letter a, also upper/lower case also has some bearing though I am not sure what significance it has exactly.
If you look at the chart on the right hand side labelled "Katakana used in Japanese orthography" on this page here http://en.wikipedia.org/wiki/Katakana you can see it displayed if viewed by matching row and column.
So that seems to take care of the first 2 letters Da, but then its followed by a character I cannot find an exact match for which looks like 一. The nearest I can find is in the table below the one from the same link I just gave which is listed as functional characters with the symbol being ー and when you click on that character(chōonpu) you get a description of a long sounding vowel and later in that same first paragraph it shows there is the possibility of getting mixed up with Kanji's 一 meaning "one" so to me it looks like the charset does not have the exact symbol but the nearest thing.
So we are now looking for the katakana version of r which doesn't appear to exist on the first table, so I skipped it assuming it is an indication of making a sound when spoken that is similar to r.
The next symbol is ク which looking at that table is Ku. So far we seem to have something that relates to the Dark part of DarkBASIC in as much we have DaaKu
Looking at the next symbol is ベ which on the first table is Be, followed by yet another prolonged vowel sign 一 (or ー ) giving us so far DaaKuBee.
The next 2 characters are the odd looking smiley faces, 1 appears to relate to SI and the other is either Tu(on first chart) or tsu(on second chart), I assume here its from the second chart but I didn't understand its usage and have made the assumption its either a way of changing the sound of SI to sound like the si in the word sick as opposed to the sound of si in the word sigh, or it has something to do with the final letter C which uses the same character from Katakana ク(Ku). As you can see we have more or less accounted for the entire DarkBASIC translation to ダ一クベ一ツック or ダークベーツック
So assuming it is in fact Katakana I am now looking at the strange string to see if I can find some sort of chart with just those specific characters that might relate. Will post back if I find one!

Edit
I have noticed that in the strange garbled string there are 16 characters and there are 8 characters in the katakana version of - in standard characters 1 character=1 byte and in Katakana 1 character=2 bytes, therefore it could be that every 2 characters of the strange string =1 character of the katakana string? (initially the strange string looks like 14 characters but if you use the arrow key to cycle through them there are 2 invisible characters)
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Apr 2015 04:07 Edited at: 18th Apr 2015 04:13
Quote: "I do not understand what your saying there - I don't think Chinese has any bearing in this although there is a connection in the way its written traditionally(top to bottom columns each new column going left of the previous one). In truth I don't know the first thing about it.."


Ignore my Chinese reference here, it was a crossover from my charity work lol

From that link:
Quote: "
ISO 15924
Kana, 411


Direction Left-to-right

Unicode alias
Katakana

Unicode range
U+30A0–U+30FF,
U+31F0–U+31FF,
U+3200–U+32FF,
U+FF00–U+FFEF,
U+1B000–U+1B0FF
"


Hmm, I think you may be onto something, alas we are back at that string... thank you for taking the time! and should this nut be cracked, we could open up DBPro to Multi Languages [Non-Western]!!!!!!!

EDIT

Heck, not just DBPro, GG as well!

James H
11
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 18th Apr 2015 04:13
Well I should have refreshed before editing my last post once again! So this post is to let you know I made an edit in my previous post...though as you have said it does lead us right back to that strange string lol
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Apr 2015 04:24 Edited at: 18th Apr 2015 04:28
I found this after a bit of digging...

http://en.wikipedia.org/wiki/Shift_JIS

which from the earlier source may relate to this...

SHIFTJIS_CHARSET 128 (x80) 932

EDIT

I did read your edit

Further findings

http://en.wikipedia.org/wiki/Code_page_932

OOOOH!

http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT !!!

https://msdn.microsoft.com/en-gb/goglobal/cc305152 !!!

MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Apr 2015 05:18
Update...

Keep forgetting the charset value...

OK so I have managed to remove the need for the fixedsys font and can use arial or supportive fonts... arial works nicely

set text font "Arial",128
print "ハローワールド " + " ƒ_[ƒNƒx[ƒVƒbƒN"

But still, only the strange character set converts...

http://forum.thegamecreators.com/?m=forum_view&t=195149&b=7

this may hold some tidings, Strigulino had some success with Euro texts but from some old bygone era...

Time for a nap...

MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Apr 2015 06:01
Apologies for triple post but this is deserved!!!

I CRACKED IT! [somewhat]

Follow me through the stages I went through and maybe there is a cleaner route that I missed at this moment

http://en.wikipedia.org/wiki/Windows_code_page#ANSI_code_page

From here I went to the 1252 link in ANSI to:

http://en.wikipedia.org/wiki/Windows-1252

In the chart titled 'Windows-1252 (CP1252)' I found a familiar looking char, ƒ, [Block 8_,_3] I looked at the code below it '0192' thinking of certain web based code I added & # to the front with a ; at the back and got À which in your email and probably on this page will show as... À probably...

I then had a rethought and went to:

http://en.wikipedia.org/wiki/%C6%91

After clicking that curvy ƒ in the chart and then copied one from that page into DBPro and got a different result... a Period in the middle of the Char space...

Anyway I need some rest...

I think this is still far too messy for any form of result... there must have been a method Lee used to get that result... a shame he did not include the original method or text he used in the code...

But I suppose this substantially indicates that Unicode was never implemented into DBPro, I would say, that the update to DBPro if any should include this... and I think this page will help https://msdn.microsoft.com/en-us/library/cc194830.aspx found via one of Strigulinos posts, he did not link directly to that page but it was an option... credit is due where it is deserved


TIME FOR BED!!! damn tired!

James H
11
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 19th Apr 2015 07:16 Edited at: 19th Apr 2015 07:24
MrValentine
I had already looked at those links and countless others for several hours and got no where fast as they keep sending me round in circles when trying to understand them, all the while attempting to follow the path they seem to show. Even after reading your more recent posts I still fail to connect the dots and you especially lose me with the part referring to 0192 through to emails.

Regardless of this I have sussed it out although the steps I am about to describe are a little long winded, but to me they are the simplest possible steps to take in order to get from start to end with regards to obtaining the correct characters for the desired strange looking string.
Anyway here goes, I hope you and others with any interest can follow this as I am making a special effort to try and keep it simple;

Step 1
http://mymemory.translated.net/en/English/Japanese/Dark-BASIC
Make sure you are using English to Japanese lol - you first of course need to translate your desired English text to katakana, so your only interested in the results that show the katakana symbols/characters. Copy them over somewhere you can easily access them. I don't know but I assume a space between words is just that if this is what is required. Likewise I don't seem to see anything indicating lower/upper cases but I am sure you would agree by process of elimination you can work this out over time along with any characters that aren't strictly part of the alphabet. In the case of DarkBASIC as we already know you should have ダークベーツック, and put spaces between to easily spot them separately ダ ー ク ベ ー ツ ッ ク so that step 2 will be easier

Step 2
http://en.wikipedia.org/wiki/Katakana
As mentioned in my earlier post your only interested in the Japanese section ie not the script as far as I can tell. What needs to be done here is to find each symbol from step one and write down the corresponding English characters from the unicode description from the tables ie 2 letters or functional characters. Once again with spaces this will give you Da - ku be - si ? ku
Note that the - I am using to represent the prolonged sound mark or chōonpu and the ? I am using to represent the little tsu or sokuon which after some reading is now simply tu. These are both from the functional characters and are not the hard sounds but appear to be ways of determining how previous characters should sound when spoken.

Step 3
ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT
This is the awkward part - it would be best if you took all the lines with the word katakana in them from the above site and pool them in a text file to make life easier. What you want to do is to find the unicode description that matches the read out you produced in step 2, then for each one take the hex value(1st column) without the 0x and input them into a hex to string converter here http://www.string-functions.com/hex-string.aspx then click convert and you can copy the result over somewhere and keep adding to it. This will give you your final strange looking string to use in the print command of your code.
So Da is 835F and converts to ƒ_
- or prolonged sound mark is 815B and converts to [
NOTE just before the bracket is an invisible character - one you can spot by cycling the cursor through the result
ku is 834E and converts to ƒN
be is 8378 and converts to ƒx
- once again is the prolonged sound mark, it is 815B and converts to [
si is 8356 and converts to ƒV
? which is the little tsu now called small tu, this is 8362 and converts to ƒb
NOTE I mentioned earlier this is another functional character that dictates how the previous characters sound when spoken, in this case si as in sick
ku once again this is 834E and converts to ƒN
Put them all together and voilà you have your odd looking string ƒ_[ƒNƒx[ƒVƒbƒN !!

So now you have the right tools to work with. I hope this is clear enough for all to understand, anything not clear then please feel free to ask, I don't know how much more help I can be as this is the first time I've done anything like this, heck I don't even understand what all these formats and encoding things are - I can only know what I see I am afraid as I am without proper terminology or ability to describe to you all the way I see them - and no I don't know the first thing about Japanese so I wouldn't be much help there either.

Now I believe we are way off topic, my opinion on GameGuru is neutral - but I will say this, Lee knows exactly what he is doing I should think, so speed issues won't be a problem, and if as MrValentine has stated Lee wrote the snippet for charset 128 then I should think he can write translations if that's what he wants - I would guess that it depends on if he thinks its worth the effort or not.
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 19th Apr 2015 08:44 Edited at: 19th Apr 2015 08:45
Quote: "I would guess that it depends on if he thinks its worth the effort or not. "


A bit long winded indeed...

Hmm, I think we can both agree, that it is a counter intuitive method to process through into...

But I think you mentioned using a text file... might give that a try and see if DBPro displays it or not...

But I think Unicode should be added and should have been implemented half a decade ago... would open DBPro up to more markets I think...

TGC have been a bit quiet with updates this past week... but there was mention of AppGameKit having 3D enhancements being added to it...

GameGuru, not heard much aside from bug fixes really...

The theory of them needing to rewrite the source code and base engine of DBPro to optimise GameGuru, should be a tantalising thought



James H
11
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 20th Apr 2015 04:09 Edited at: 20th Apr 2015 04:12
Quote: "OK so I have managed to remove the need for the fixedsys font and can use arial or supportive fonts... arial works nicely"

I didn't test this before I just took your word for it - I have tried all 3 editors(original, Synergy and Indigo) and this does not work. Using u7.7rc7 here, could this be the issue or perhaps because I'm on Win764 SP1? Can you please confirm that with the charset 128 this is actually working for you? I noticed your previous sentence mentioned that you kept forgetting the charset so am wondering now how sure you are. Also what do you mean by supportive fonts? At first I thought you must mean the fonts available to the DBP/windows but then I thought well why mention it as it would seem obvious - not trying to nit pick but just wondering if I am missing something other than installing some unicode fonts to my system like these here http://www.wazu.jp/gallery/Fonts_Japanese.html - could you please clarify.

Quote: "But still, only the strange character set converts..."

Unsurprisingly when you save your project file you will find the Japanese writing will be replaced with ???????? when you next open the project again as its saved as ANSI which I have based on the fact you can save a .txt in either ANSI, Unicode, Unicode big endian or UTF-8 - ANSI is the only one that changes the input to ????????

Quote: "A bit long winded indeed..."

lol

Quote: "But I think you mentioned using a text file... might give that a try and see if DBPro displays it or not..."

That's not what I meant - I meant to simply copy the Katakana references from the site I linked into a text file so that you could find the hex codes much quicker than looking for them on that site. I did already try what you suggested and it does not work no matter what format the text file is saved in.

Quote: "But I think Unicode should be added and should have been implemented half a decade ago... would open DBPro up to more markets I think..."

I believe it is implemented else you would not get the desired output on your screen at all I should think. Its just not implemented into the IDE, I would guess because the IDE is ANSI and not Unicode, as per the assumption I made earlier in this post. Perhaps there is a specific reason its in ANSI(assuming that is what it is) as all 3 editors I have mentioned behave the same when saving to produce the ????????
What would be real nice is if Balid switched to Unicode format for Indigo if its possible but how that would play out I do not know. Better still that Lee would implement it in the original IDE or if John Y is still about into Synergy. I do prefer Indigo though, that said I could have sworn it has something to do with Bluegui by Robert Knight so he may be limited by the source from this. Would make life a lot simpler in this matter to say the least - or perhaps we just have to accept that as this is multi language support, its simply falls in the area of the pro part of DBP.
Clonkex
Forum Vice President
8
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 20th Apr 2015 07:49
Quote: "You forgot set font "fixedsys""


I still don't understand why you want that font and I just ran TheComet's code.

MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Apr 2015 12:17
Quote: "I still don't understand why you want that font and I just ran TheComet's code."


Do a web search on the name and thou shalt reveal the truth

Well, I think I will simply use an image based system for cross language support...

Quote: "or perhaps we just have to accept that as this is multi language support, its simply falls in the area of the pro part of DBP. "


I've heard this before



TheComet
11
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Apr 2015 15:45
Quote: "Do a web search on the name and thou shalt reveal the truth"


Also make sure to use Bing

Need help with C/C++ game dev? PM me or add me on skype: the__comet.
Current active project: Light Ship
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Apr 2015 15:50
TheComet you are not allowed to be cute on this thread... You are banned for -1 seconds!

Clonkex
Forum Vice President
8
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 20th Apr 2015 16:04
Green Gandalf
VIP Member
14
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 24th Apr 2015 21:53 Edited at: 24th Apr 2015 22:00
Just returned to this.

Try this - and explain what's going on. The image shows what I see with Windows 7:






Powered by Free Banners

Attachments

Login to view attachments
Green Gandalf
VIP Member
14
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 24th Apr 2015 22:00 Edited at: 24th Apr 2015 22:02
This post is merely here because I can't seem to edit my previous post unless I post a new message (seems to be a bug caused by a strange refresh issue on my machine ). Confused? Well, so am I.

Edit: Phew! Finally managed to edit my previous post.



Powered by Free Banners
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 24th Apr 2015 22:08
Yeah I often get cache issues too...

Thanks for trying it out too

James H
11
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 1st May 2015 06:13
Green Gandalf
If I have understood your request correctly then the sort of invisible white space character can be created by holding the alt key down and typing 0129 on the number pad. This is the reason for there being 16 characters rather than the 14 we can see physically which I guess you already know. Every two characters we type into the string equates to 1 Katakana symbol.
One thing to note however is its actual appearance in different editors -in both the shipped Synergy editor that comes with DBP and Indigo the white space appears "collapsed". You only really spot it by cycling through the string with the arrow cursors, as the blinking cursor appears to not move when using the arrow keys - you have to press the arrow key twice to continue to the next character in either direction. However in the original editor it shows up as a space and can you can cycle through the string with arrow keys - you can see the blinking cursor move along the characters normally when it comes across the invisible white space(now visible lol).
What this character is called I don't know, neither can I recall how I know it exactly, I guess so far white space or invisible character seem mostly appropriate but a Google search brought up nothing useful(only other white space characters like alt+0160, alt+32, alt+999999 etc which do not produce desired result when used in that odd looking string and then compiled/ran), so I can only assume I came across it in 1 post on 1 of many results or it may just be that I did a search on the hex result from the converter page mentioned earlier which is 0x81 which then converts to 129 and I simply got lucky by adding in the extra zero at the front.
Anyway I hope that clears it up for you
Green Gandalf
VIP Member
14
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st May 2015 20:45
Did you notice the difference between two of the strings in that snippet of mine? One was the original string, the second had those two invisible characters deleted. I deleted them quite simply using the method you described:

Quote: "You only really spot it by cycling through the string with the arrow cursors, as the blinking cursor appears to not move when using the arrow keys - you have to press the arrow key twice to continue to the next character in either direction."


In other words once you know where they are you can simply delete them in the usual way.

Thanks for the additional notes about character codes and their appearance in different editors though. I was using the default synergy editor.



Powered by Free Banners
James H
11
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 2nd May 2015 00:10
Quote: "Did you notice the difference between two of the strings in that snippet of mine?"

Yes I did, but was "slightly" drunk so could not tell if that was what you meant as I did mention the invisible spaces in an earlier post, along with mention of 14 and 16 characters but it was in an edit, my posts are not exactly easy to read a lot of the time. Being drunk I was having difficulty following what I had written! In fact I am surprised I was even able to write my last post at all!!
Quote: "In other words once you know where they are you can simply delete them in the usual way."

I certainly seem to prefer not to explain things more simply but I am working on it!
Quote: "Thanks for the additional notes about character codes and their appearance in different editors though. I was using the default synergy editor."

Glad to have been of use, I used to love synergy but now I prefer Indigo, that said these days I often use all 3 just in case of issues like this. Originally I moved over to Indigo because the Newton fps demo did not work as intended with the other two, but worked fine with Indigo.
Green Gandalf
VIP Member
14
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd May 2015 13:28
Quote: "as I did mention the invisible spaces in an earlier post, along with mention of 14 and 16 characters but it was in an edit"


I missed that, sorry.

Quote: "Being drunk I was having difficulty following what I had written! In fact I am surprised I was even able to write my last post at all!!"


I'm sure you are not alone ...



Powered by Free Banners
Seditious
5
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 2nd May 2015 14:28
Off-topic:

@Green Gandalf: Knowing you like the M&M games, I thought I'd tell you that the latest humble bundle has HOMM II Gold edition and HOMM IV Complete Edition, plus the M&M 1-6 collection. And if you pay more than the average, HOMM V, HOMM VI Gold Edition, and some other stuff. Cool huh?
Green Gandalf
VIP Member
14
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th May 2015 01:23
@Seditious Just seen your post.

Thanks!



Powered by Free Banners

Login to post a reply

Server time is: 2019-04-19 03:45:48
Your offset time is: 2019-04-19 03:45:48