Wikipedia:Reference desk/Archives/Computing/2009 April 11

= April 11 =

Common displayable Unicode mathematical symbols
Sorry if this belongs in the Math section, but it kind of seeps into both. I was wondering what are the most commonly displayable. Sure, most of them can display whatever's on the keyboard, but what else? Some computers back in the day were capable of displaying things like ², «», ±, °, √, ≤, etc. Now, they have much more advanced functionality, capable of displaying obscure symbols like ►,₪,↔,∕,⌡,∂,⅝, etc. But what's the limit to these symbols? Would they be able to display Unicode characters like ⁶ (superscript 6),₍ (subscript left parenthesis), or even ℏ (reduced Planck's constant)? I don't think so. So what would be the most common set of characters that would be compatible to computers back to say, the Windows 98 era? Obviously it would be different from computer to computer, but I'm asking just for the general sets. The use of images aren't acceptable in my case. I greatly appreciate your help! Thanks so much. 141.153.214.155 (talk) 02:31, 11 April 2009 (UTC)


 * Off the top of my head: Windows 98 didn't support Unicode via UTF-8, let alone any other character encoding system. A US-market copy of Windows 98 supported character set X, whereas a Japanese-market copy supported set Y. Not "X" or "Y" of course, but I forget what the names were -- all of this stuff is available for the searching within a certain online encyclopedia -- but anyway X didn't even include the Cyrillic alphabet, let alone fancy-schmancy maths symbols. What people did was to use odd, nonstandard fonts that substituted particular nonstandard symbols they wanted to use for those that they didn't want. Thus (imaginary example) Bludoni (which included ê and ç, though not ŏ or ą) might have had an additional Bludoni Math, with maths symbols taking the place of ê and ç and so forth. It was all rather nightmarish and I'd say you'd have to be perverse or masochistic to want to relive it. -- Hoary (talk) 04:05, 11 April 2009 (UTC)


 * I'm pretty sure that Windows 98 didn't only support ASCII, however. I think it used the localized variations of ISO/IEC 8859. See the table in that article; it looks like what you probably want. Column 1 is the most commonly used, the Western European set. Indeterminate (talk) 10:32, 12 April 2009 (UTC)


 * Win9x didn't support Unicode in file names or in the standard GUI widgets (buttons, edit boxes, etc.) but it did support Unicode text rendering (TextOutW was implemented). Some applications (including the major web browsers and word processors) took advantage of this and provided full Unicode support. But typical applications were limited to the system default code page, which was an extended ISO Latin-N in many countries but certainly not all. I don't think there's a single non-ASCII character that's found in all of the widely used code pages. -- BenRG (talk) 16:21, 12 April 2009 (UTC)


 * PCs didn't need to support displayable Unicode characters when using TeX, a typesetting program for books and theses. Most of the technical symbols used couldn't be displayed on the screen. Sleigh (talk) 08:01, 19 April 2009 (UTC)

Music Player Site
Is there some sort of website in which you can somehow enter musical notes and it will play the music? -- Nick4404 yada yada yada What have I done? 03:32, 11 April 2009 (UTC)


 * How about Musipedia? Oda Mari (talk) 04:43, 11 April 2009 (UTC)


 * Technically, zefrank. Search for its holiday carol music creation tool or click this: -- Guroadrunner (talk) 05:01, 14 April 2009 (UTC)

Right-justified text in text box
Sometimes when I am editing Wikipedia, I accidentally press some key combination that causes the text in the text box to become right-justified. Similar to when you edit in Wikipedias where the writing is right to left (e.g. Hebrew, Arabic). The keys involved are some combination of :
 * 1) CTRL and (ALT or SHIFT)
 * 2) and:
 * 3) * some letter(s) in the lower left (on a QWERTY)
 * 4) * or (the left arrow xor right arrow)

This is probably more detailed than necessary, since some of you may already know the combination. What key combination causes this, and what key combination do I need to press do undo this? My current solution is to open a new window, and copy and paste my progress into that. — Twas Now ( talk • contribs • e-mail ) 10:12, 11 April 2009 (UTC)
 * In Firefox, Ctrl+Shift+x. Same to switch it back. — Matt Eason (Talk &#149; Contribs) 11:07, 11 April 2009 (UTC)


 * Ha ha, thanks. That makes things easier. — Twas Now ( talk • contribs • e-mail ) 23:07, 11 April 2009 (UTC)

Open source game developing
Are there open source platforms out there for game developing? The main idea is that I would do the "screenplay" and graphics and put it on a kind of virtual machine that would deliver the logic behind the game.--88.6.158.100 (talk) 11:59, 11 April 2009 (UTC)


 * Blender has a built-in game engine. --93.106.178.219 (talk) 12:16, 11 April 2009 (UTC)


 * It does - and there are other things like it - but they don't really do what the OP needs - there is always some programming involved somewhere. Your best bet for most game genres is to find an existing game that's similar to what you want and which is 'mod-able'. SteveBaker (talk) 06:51, 12 April 2009 (UTC)


 * Note however that won't meet the open source requirement. I presume the OP want his/her games to be widely available so doesn't want to limit them to people who own a certain game Nil Einne (talk) 15:43, 12 April 2009 (UTC)


 * It really depends on what sort of game your talking about and what you want to do besides creating the graphics. For example, there is Adventure Game Studio which unfortunately is not open source (but is freeware) and also only has a Windows version (there used to be a Linux and Mac OS X version of the engine but that was discontinued) which is commonly used for creating amateur adventure games. As SB mentions, there are moddable FPSes, RPGs, RTSes and probably other games although these suffer the limitations I mention above. I believe ID software regularly releases the code for their older FPSes under an open source licenses and I presume versions of these have been made which are modable Nil Einne (talk) 15:43, 12 April 2009 (UTC)


 * iD games are generally moddable out of the box - but indeed, there are huge opensource communities who take the OpenSourced Quake/Doom engine code and make entirely new games with little or no actual programming. I have good friends who work at iD - they are truly one of the better software companies out there...they entirely "get it". SteveBaker (talk) 18:59, 12 April 2009 (UTC)

whats with possible loss of precision (java)
This isn't exactly what I'm trying to do, but it will illustrate what I'm asking well enough: http://www.cs.princeton.edu/introcs/31datatype/Rot13.java.html

In that program

char c = s.charAt(i);

complies fine. But if I replace that with

int d = s.chatAt(i); char c = d;

the code refuses to compile, and I get a "possible loss of precision" error. Why? And how can I avoid possible loss of precision errors in general?

Thanks in advance. —Preceding unsigned comment added by 137.165.246.36 (talk) 20:08, 11 April 2009 (UTC)


 * The "possible loss of precision" is because you are assigning an int to a char, which stores less bits than an int. Thus if   had a value greater than 255 (or 65535 if a char in Java is wide), it would be "trimmed" to fit inside a char, producing the "loss of precision". --wj32 t/c 23:27, 11 April 2009 (UTC)


 * Yes. This is called a narrowing conversion, and Java does not allow these implicitly.  You need to explicitly specify the conversion using a "cast" expression, such as
 * which is allowed. -- Tcncv (talk) 04:07, 12 April 2009 (UTC)
 * which is allowed. -- Tcncv (talk) 04:07, 12 April 2009 (UTC)

A puzzle about a puzzle game cookie
Recently I had been doing an online puzzle game which has many levels. When I got up to level 33 I, and several other people on the internet, found that the game would not allow entrance to that level, despite there being several levels beyond that. The site owner does not respond to emails. After examining the cookie for level 32 with IECookiesView by Nirsoft dot net it seems that the cookie may not work due to having an invalid date, which can be corrected with IECookiesView.

However I was busy at the time and I have now lost the cookie I had after completing level 32 (the levels have to be done in sequence). I do not want to plod through all 32 levels again. Instead I have inspected the cookies obtained after completing levels one, two, and three, and the relevant differences in the cookies are shown below:

LEVEL ONE

Key                : __utma

Value              : 11671083.1539782161861915000.1239481907.1239481907.1239481907.1

Key                : __utmb

Value              : 11671083.1.10.1239481907

LEVEL TWO

Key                : __utma

Value              : 11671083.1539782161861915000.1239481907.1239481907.1239482097.2

Key                : __utmb

Value              : 11671083.1.10.1239482097

LEVEL THREE

Key                : __utma

Value              : 11671083.1539782161861915000.1239481907.1239482239.1239482420.4

Key                : __utmb

Value              : 11671083.1.10.1239482420

Can anyone deduce what the relevant values may be for level 33 please? Note that the value for utmb for the first and second levels differs by one digit, the fourth from the end. The online game, if you are curious, is Ice Breaker by Nitrome, which was recommended by someone here. Thanks. 78.147.135.185 (talk) 22:37, 11 April 2009 (UTC)


 * 1239481907 appears to me to be the number of seconds since Jan 1, 1970 if measured at Sat, 11 Apr 2009 20:34:57 GMT. -- k a i n a w &trade; 00:01, 12 April 2009 (UTC)


 * You're looking in the wrong place - __utma and __utmb are Urchin (Google Analytics) tracking cookies. The unlocked levels information is stored Flash cookie somewhere in %appdata%\macromedia\flash player\#sharedobjects . Dig down in the directory for cdn.nitrome.com and you'll eventually find a file called so_icebreaker1.sol. Open it in a hex editor like xvi32. Starting at address 38, every other address is the 'unlocked' status of a level (level 1, level 2, level 3...). Just change the value from 00 to 01 to unlock that level (select the cell and type 01). Hit Ctrl+S to save, reload Icebreaker, and the levels should be unlocked. — Matt Eason (Talk &#149; Contribs) 01:52, 12 April 2009 (UTC)

Thanks!!!! I did as you said and now have access to all levels, including the mysterious level 33! Design note - I hate games that require you to go through a series of levels again if you restart the game or whatever - destroys the fun completely. 78.151.152.56 (talk) 20:47, 12 April 2009 (UTC)


 * I think a better way to design multi-level games is to allow access to all levels right from the start, but have some bit of info that is divulged at the end of each level which is needed to be successful in higher levels. For example: "Don't waste ammo on schnurzels, just charge at them and they will run away". StuRat (talk) 10:04, 13 April 2009 (UTC)


 * That's a reasonable idea - but it only lends itself to games where new features (like ammo and/or schnurzels) are introduced on each and every level...there aren't many games that are like that. Consider how your idea would work with (for example) space invaders or PacMan - where things basically only become incrementally faster at each level.  The save-game approach is really what works best...and even on simple web-based games, that's easily achieved with a cookie.  Serious, professional game level-designers (who know stuff about story arcs and difficulty arcs and attract/reward theory) would be utterly horrified at the idea of revealing all of the levels at the outset - even if they were effectively unplayable until you'd worked up to them gradually.  There is actual science behind how games build tension and reward people who solve hard levels with a couple of easy ones to follow and you ignore that stuff at your peril. SteveBaker (talk) 03:04, 14 April 2009 (UTC)

You must be able to save the current level, to be able to switch the computer off and come back to it later. Save it at the end of every level, and find out where the saved file (or cookie) is placed. If you mess up the next level, delete the cookie for it, turn off the game,and it will restart at the last good level you had. SteveBaker, I don't think OP wants to start at level 100; they just don't want to do 1-30 again if their player dies on level 31. KoolerStill (talk) 13:25, 19 April 2009 (UTC)