TyrOvC
Mossbaby

Posts: 369
This text is not random :(
|
 |
« Reply #60 on: April 05, 2012, 06:45:01 PM » |
|
Started working on a format for loading translations to other languages. Planned format so far: program_directory/languages/holds separate language folders. Each folder should have a simple ANSI name based on the language it contains. For example, English would be "en" and Russian would be "ru". This directories contents are parsed by config.exe, which lets players choose a language. Each language folder contains:flag.png 32x24 image that is displayed next to the language name in config.exe text.txt Will contain equal sign separated list of text keys + values. Example: Shopkeeperangermurderer=YOU'LL PAY FOR YOUR CRIMES Udjateye=YOU GOT THE UDJAT EYE! Udjateye2=YOU FEEL AWAKENED. language.txt - Contains long name that will show in config.exe, and the name of the characterset that the language uses Example: name=ENGLISH charset=ANSI_CHARSET "sprites" directoryShould contain sprites in the png format. Sprites with the same name as any files contained within the sprites directory are replaced. sFont and sFontSmall should not be replaced here, fonts will require special handling. Still working out how to deal with the image font used by Spelunky. Playing around how GameMaker 8.1 deals with other character sets and font_replace_sprite(); What I have done so far: // // scrLoadLanguage(String language identifier) // // Loads language from \languages\argument0 // // Example usage: scrLoadLanguage("en") loads english language var languageid, filepointer, spritemap, i, tempsprite, spritename, spriteindex; languageid=argument0;
//Load Sprites //First, need to map sprite_index ids to sprite names so that we can replace them based on filename tempsprite = sprite_create_from_screen(0,0,1,1,false,false,0,0);//Make a new sprite and use it to get the highest sprite_index value sprite_delete(tempsprite); spritemap=ds_map_create(); for (i=0; i<tempsprite; i+=1) { if (sprite_exists(i)) { ds_map_add(spritemap,sprite_get_name(i),i); } }
file_find_first(program_directory+"\languages\"+languageid+"\sprites\*",false);
filepointer=file_find_next(); while(filepointer!=""){ spritename=filename_change_ext(filepointer,""); spriteindex=ds_map_find_value(spritemap,filepointer); if(sprite_exists(spriteindex)){ sprite_replace(sprite_index,program_directory+"\"+languageid+"\sprites\"+filepointer,sprite_get_number(spriteindex),false,false,sprite_get_xoffset(xorig),sprite_get_yoffset(yorig)); filepointer=file_find_next(); } } file_find_close(); ds_map_destroy(spritemap);
|
|
|
|
« Last Edit: April 05, 2012, 07:27:38 PM by TyrOvC »
|
Logged
|
|
|
|
|
Moloch
|
 |
« Reply #61 on: April 05, 2012, 10:50:38 PM » |
|
For languages based on the Latin alphabet, maybe add sFontExtended and sFontSmallExtended, which would included the extended Latin alphabet characters (not sure all these could even be made readable in 8x8) for the translators to make use of, but I don't have a clue how you would deal with other languages like Russian, Arabic, Hebrew, Chinese, Japanese, Korean, etc. I'd like to see how this works out - I made a quick mod based on 1.2 for myself so I could play Spelunky at 1920x1080 in fullscreen with no black borders (480x270, scale x4) and would maybe turn it into a mod to allow any custom resolution (320x240 minimum), but among other problems, I would need to replace all the draw_text's with a script to align/position all the text based on the current resolution. It looks like there is over 600 draw_text functions in the objects and scripts.  If you have to modify all those for the language features then I'm not going to start that now. Let me know if you want some help with some of the tedious copy/paste/search/replace work that will likely be involved with this. The ability to have 'sprite packs' as external files rather than separate mods would be great, people would be able to make their recolor/reskins without having to use Game Maker (assuming someone goes to the trouble to export the default sprites/sheets first), and players could mix or omit individual sprites from different packs to suit their taste. I'm sure we'd see some great sprite packs from people who are talented in that area but haven't bothered because they have no interest in purchasing or messing around with Game Maker.
|
|
|
|
|
Logged
|
|
|
|
TyrOvC
Mossbaby

Posts: 369
This text is not random :(
|
 |
« Reply #62 on: April 06, 2012, 10:54:52 AM » |
|
As a fallback, I made default text fonts for each characterset and translations can specify to use them instead of an image font. Text outlining and everything has to be done programmatically when its not using the image font though, so I'm ending up replacing a lot of draw_text() with a script. Should make your resolution changes easier too 
|
|
|
|
|
Logged
|
|
|
|
TyrOvC
Mossbaby

Posts: 369
This text is not random :(
|
 |
« Reply #63 on: April 06, 2012, 03:31:38 PM » |
|
Translation text file. Think I got everything except for the config.exe text, key config + gamepad config. English text.txt #oGame BetterLuckNextTime=BETTER LUCK NEXT TIME... FinalScore=FINAL SCORE: ForHighScores=FOR HIGH SCORES. GameOver=GAME OVER MiniFinished=FINISHED! NewRecord=YOU SET A NEW RECORD! Paused=PAUSED PauseButtons2=ESC-RETURN F1-DIE F10-QUIT PauseButtons=START-RETURN BOMB-DIE ROPE-QUIT PauseButtonsNoDeath2=ESC-RETURN F10-QUIT PauseButtonsNoDeath=START-RETURN ROPE-QUIT ToEditLevel= TO EDIT LEVEL. ToLoadAnotherLevel= TO LOAD ANOTHER LEVEL. WelcomeToShortcut=WELCOME TO THE SHORTCUT HOUSE! #Level Transition CompletedLevel=COMPLETED! Depth=DEPTH: DepthUnit=FEET ForANewShortcut=FOR A NEW SHORTCUT. Level=LEVEL LevelKills=KILLS - LeveLoot=LOOT - LevelTime=TIME - LevelMoney=MONEY - None=NONE SavedDamsel=MY HERO! ShortcutBuilt=ONE SHORTCUT, COMING UP! TunnelmanDigsShortcuts=I DIG SHORTCUTS. TunnelmanDonate=DONATE: TunnelmanIntroduce=HEY THERE! I'M THE TUNNEL MAN! TunnelmanLendme=CAN YOU LEND ME A LITTLE MONEY? TunnelmanNeed=I NEED $ TunnelNeverFinish=I'LL NEVER GET THIS SHORTCUT BUILT! TunnelThanks=THANKS! YOU WON'T REGRET IT! TutorialCompleted=TUTORIAL CAVE COMPLETED! #Shopkeeper Armory=ARMORY! BombShop=BOMB SHOP! ClothingShop=CLOTHING SHOP! DiceHouse=DICE HOUSE! DiceLost=I'M SORRY, BUT YOU LOSE! DiceWon=CONGRATULATIONS! YOU WIN! GetOutDeadbeat=GET OUTTA HERE, DEADBEAT! HeSweet=NOW AIN'T HE SWEET! IHaveSomethingSpecial=I HAVE SOMETHING SPECIAL... KissingParlor=KISSING PARLOR! KissPress=A KISS. PRESS NotEnoughMoney=YOU HAVEN'T GOT ENOUGH MONEY! NowRoll=NOW ROLL THE DICE! OneBet=ONE BET AT A TIME! PleaseRoll=PLEASE ROLL THE DICE! PleasureDoingBusiness=PLEASURE DOING BUSINESS! RolledSeven=YOU ROLLED A SEVEN! Shesweet=NOW AIN'T SHE SWEET! ShopkeeperAnger1=COME BACK HERE, THIEF! ShopkeeperAnger2=DIE, YOU VANDAL! ShopkeeperAnger3=TERRORIST! ShopkeeperAnger4=HEY, ONLY I CAN DO THAT! ShopkeeperAnger5=NOW I'M REALLY STEAMED! ShopkeeperAngerMurderer=YOU'LL PAY FOR YOUR CRIMES! SpecialityShop=SPECIALTY SHOP! SupplyShop=SUPPLY SHOP! ToBet=TO BET $ ToPurchase=TO PURCHASE. WelcomeTo=WELCOME TO WonPrize=YOU WIN A PRIZE! YouBet=YOU BET $ YouNeed=YOU NEED $ YouRolledA=YOU ROLLED A #Items Ankh2=YOU FEEL PROTECTED. Ankh=YOU GOT THE ANKH! AnkhBuy=AN ANKH FOR $ Bombbag=YOU GOT 3 MORE BOMBS! BombbagBuy=A BAG OF 3 BOMBS FOR $ Bombbox=YOU GOT 12 MORE BOMBS! BombboxBuy=A BOX OF 12 BOMBS FOR $ Bow=YOU GOT THE BOW AND ARROWS! BowBuy=BOW AND ARROWS FOR $ Cape=YOU GOT A CAPE! CapeBuy=A CAPE FOR $ Compass=YOU GOT A COMPASS! CompassBuy=A COMPASS FOR $ Gloves=YOU GOT CLIMBING GLOVES! GlovesBuy=CLIMBING GLOVES FOR $ Glovewebcannon=YOUR SPIDER SENSE TINGLES! Hedjet2=IT GLOWS A BRILLIANT WHITE. Hedjet=YOU GOT THE HEDJET! Jetpack=YOU GOT A JETPACK! JetpackBuy=JETPACK FOR $ Jordans2=YOU FEEL LIGHT ON YOUR FEET. Jordans=YOU GOT JORDANS! JordansBuy=JORDANS FOR $50000! Kapala2=IT THIRSTS FOR BLOOD... Kapala=YOU GOT THE KAPALA! Machete=YOU GOT A MACHETE! MacheteBuy=A MACHETE FOR $ Mattock2=IT SEEMS A BIT RUSTY. Mattock=YOU GOT A MATTOCK! MattockBuy=A MATTOCK FOR $ Parachute2=IT WILL DEPLOY AUTOMATICALLY. Parachute=YOU GOT A PARACHUTE! ParachuteBuy=A PARACHUTE FOR $ Paste=YOU GOT STICKY BOMBS! PasteBuy=BOMB PASTE FOR $ Pistol=YOU GOT A PISTOL! PistolBuy=A PISTOL FOR $ Pitchersmitt=YOU GOT A PITCHER'S MITT! PitchersmittBuy=PITCHER'S MITT FOR $ Ropepile=YOU GOT 3 MORE ROPES! RopepileBuy=EXTRA ROPE FOR $ Shotgun=YOU GOT A SHOTGUN! ShotgunBuy=A SHOTGUN FOR $ Spectacles2=YOUR EYESIGHT SEEMS IMPROVED... Spectacles=YOU GOT SPECTACLES! SpectaclesBuy=SPECTACLES FOR $ Spikeshoes=YOU GOT SPIKE SHOES! SpikeshoesBuy=SPIKE SHOES FOR $ Springshoes2=YOU FEEL BOUNCY. Springshoes=YOU GOT SPRING SHOES! SpringshoesBuy=SPRINGY SHOES FOR $ Stealdamsel=YOU MUST BE IN LOVE! Teleporter=YOU GOT A TELEPORTER! TeleporterBuy=A TELEPORTER FOR $ Udjateye2=YOU FEEL AWAKENED. Udjateye=YOU GOT THE UDJAT EYE! Webcannon=YOU GOT A WEB CANNON! WebcannonBuy=A WEB CANNON FOR $ #Misc AnkhRevives=YOU HAVE BEEN REVIVED! AnkhShatters=THE ANKH SHATTERS! LevelSelect=PRESS ESCAPE TO RETURN TO TITLE. OutOfArrows=I'M OUT OF ARROWS! Press=PRESS SceptreFits2=BUT NOTHING IS HAPPENING! SceptreFits=THE SCEPTRE FITS... #Kali KaliVeryAngry=SHE SEEMS VERY ANGRY WITH YOU! KaliAngry=SHE SEEMS ANGRY WITH YOU. KaliForgive=SHE HAS FORGIVEN YOU! KaliHeals=YOU FEEL INVIGORATED! KaliEcstatic=SHE SEEMS ECSTATIC WITH YOU! KaliFillBombs=YOUR SATCHEL FEELS VERY FULL NOW! KaliVeryHappy=SHE SEEMS VERY HAPPY WITH YOU! KaliHappy=SHE SEEMS HAPPY WITH YOU. KaliBestows=SHE BESTOWS A GIFT UPON YOU! KaliPleased=SHE SEEMS PLEASED WITH YOU. KaliAcceptsSacrifice=KALI ACCEPTS THE SACRIFICE! KaliDevoursSacrifice=KALI DEVOURS THE SACRIFICE! DefileAltar=YOU DARE DEFILE MY ALTAR? DefileAltar2=I WILL PUNISH YOU! #Ghost Ghost=A CHILL RUNS UP YOUR SPINE... Ghost2=LET'S GET OUT OF HERE! #Level Feelings AlienCraft=THERE'S A PSYCHIC PRESENCE HERE! BetterUseFlares=I'D BETTER USE THESE FLARES! Blackmarket=WELCOME TO THE BLACK MARKET! CantSee=I CAN'T SEE A THING! Cemetary=THE DEAD ARE RESTLESS! CityOfGold=IT'S THE LEGENDARY CITY OF GOLD! HedjetShines=THE HEDJET SHINES BRIGHTLY. Lake=I CAN HEAR RUSHING WATER... SacrificePit=I CAN HEAR PRAYERS TO KALI! SnakePit=I HEAR SNAKES... I HATE SNAKES! YetiLair=IT SMELLS LIKE WET FUR IN HERE! #Highscores and Minigames SecretChallenges=SECRET CHALLENGES SunScore=SUN: MoonScore=MOON: StarsScore=STARS: SunRoom=SUN ROOM SunInstruction=KEEP YOURSELF AND SunInstruction2=THE DAMSEL ALIVE SunInstruction3=FOR AS LONG AS SunInstruction4=POSSIBLE! SunBeginsIn=DAMSEL CHALLENGE BEGINS IN Locked=LOCKED. MoonRoom=MOON ROOM MoonInstruction=SHOOT THE MOVING MoonInstruction2=TARGETS WITH YOUR MoonInstruction3=BOW AND ARROWS! MoonBeginsIn=ARCHERY CHALLENGE BEGINS IN StarsRoom=STARS ROOM StarsInstruction=KILL AS MANY ANGRY StarsInstruction2=SHOPKEEPS AS YOU CAN StarsInstruction3=BEFORE THEY GET YOU! StarsBeginsIn=SHOTGUN CHALLENGE BEGINS IN ChangingRoom=CHANGING ROOM LadyInRed=LADY IN RED... TopDefilers=TOP DEFILERS #The below stat names have to have spaces added behind the colons, to space them out properly in the highscore list depending on the translation Money=MONEY: Kills=KILLS: Saves=SAVES: Time=TIME: Plays=PLAYS: Deaths=DEATHS: Wins=WINS: #End of stats that need spacing Statistics=STATISTICS ThisClears=THIS WILL CLEAR EVERYTHING! #Tutorial ToJump=TO JUMP. ToUsewWip=TO USE YOUR WHIP. HoldUpAndPress=HOLD UP AND PRESS Tutorial1=WELCOME TO THE TUTORIAL CAVE! Tutorial2=THIS MIGHT BE YOUR FIRST TIME PLAYING. Tutorial3=YOU CAN HANG ON LEDGES, TOO! Tousewhip=TO USE YOUR WHIP. Tutorial4=COLLECT THE TREASURE! HoldUpAndPress=HOLD UP AND PRESS ToOpenChests=TO OPEN CHESTS. Tutorial5=HOLD DOWN TO DUCK AND CRAWL. Tutorial6=CRAWL OVER THE EDGE TO DO A FLIP HANG. Tutorial7=FALLING TOO FAR CAN REALLY HURT! Tutorial8=HOLD UP TO CLIMB THE LADDER. DuckAndPress=DUCK AND PRESS ToPickupItems=TO PICK UP ITEMS. ToThrowOrUseItems= TO THROW OR USE ITEMS. Tutorial9=HOLD UP TO THROW HIGH AND DOWN TO DROP. ToSelectyourropeand=TO SELECT YOUR ROPE AND ToUseIt=TO USE IT. CrouchAndPress=CROUCH AND PRESS Tutorial10=TO THROW A ROPE DOWN A LEDGE. ToRunHoldDown=TO RUN, HOLD DOWN Or=OR Tutorial11=OPEN THIS CRATE FOR A BAG OF BOMBS. ToSelectBombsAnd= TO SELECT BOMBS AND Tutorial12=THERE'S LOTS MORE AHEAD! Tutorial13=USE YOUR WITS AND BEWARE OF TRAPS! #Intro Intro=AS THE MOON BURNED BRIGHT ABOVE, Intro2=WITH THE DESERT STRETCHING BEHIND ME, Intro3=AFTER I DOUBLE-CHECKED MY MAP, Intro4=MY LIPS CRACKED AND COVERED IN SAND, Intro5=WITH FATE GUIDING MY EVERY MOVE, Intro6=PUTTING THE FADED PHOTO IN MY POCKET, Intro7=AS I RECALLED MY FATHER'S LAST WORDS, Intro8=MY MEMORY SLIPPING AWAY FROM ME, Intro9=I STRODE VALIANTLY TOWARD MY DESTINY, Intro10=I SQUEEZED THE WHIP AT MY SIDE, Intro11=I DRAINED THE REST OF MY CANTEEN, Intro12=I SPOTTED THE CAVE'S ENTRANCE, Intro13=I FURROWED MY BROW, Intro14=I PAID MY BEDOUIN GUIDE, Intro15=I DISMOUNTED MY CAMEL, Intro16=I SQUINTED INTO THE DARKNESS, Intro17=AND THOUGHT OF HER ONE LAST TIME. Intro18=AND HELD MY HAT AGAINST THE WIND. Intro19=AND A COLD CHILL TOOK HOLD OF ME. Intro20=AND WONDERED HOW LONG I'D BE BELOW. Intro21=AND VOWED TO RETURN VICTORIOUS. Intro22=AND SWORE I HEARD VOICES UP AHEAD. Intro23=AND FELT THE GODS SMILING UPON ME. Intro24=AND THAT'S WHEN IT ALL STARTED. #Ending YouMadeIt=YOU MADE IT! FinalScore=FINAL SCORE: RememberedAs=YOU SHALL BE REMEMBERED AS A HERO.
|
|
|
|
« Last Edit: April 06, 2012, 05:17:38 PM by TyrOvC »
|
Logged
|
|
|
|
|
EdenNov
|
 |
« Reply #64 on: April 06, 2012, 04:26:25 PM » |
|
Will it work with Hebrew (characters, right-to-left-ness)?
|
|
|
|
|
Logged
|
The thing about science is that it's true whether or not you believe in it.
|
|
|
TyrOvC
Mossbaby

Posts: 369
This text is not random :(
|
 |
« Reply #65 on: April 06, 2012, 05:17:05 PM » |
|
It seems to. Does this read right?  Edit: Here's what I have so far. Could use some help testing, and the text.txt is already completely ready (minus any text I might have overlooked to add to it) if anybody wants to start translating the text.
Todo: -Still need to replace every draw_text() with the new scrDrawText. -Handling for new image fonts. -config.exe code
http://www.spelunkylevels.tk/mods/spelunky1-2-translations-01.zipNewer version below.
|
|
|
|
« Last Edit: April 07, 2012, 12:07:28 PM by TyrOvC »
|
Logged
|
|
|
|
TyrOvC
Mossbaby

Posts: 369
This text is not random :(
|
 |
« Reply #66 on: April 06, 2012, 11:13:35 PM » |
|
Finished the configuration utility code for parsing and displaying a language selection menu. Also played the game for about an hour, bugfixing. Anybody have any ideas on how to make the language selection menu button in the configuration utility apparent as what it is so that people know to click it and choose their language? All that's left to do is: -Replace every draw_text() with the new scrDrawText. -Make the configuration utility translatable This download is ready for making translations for. http://www.spelunkylevels.tk/mods/spelunky1-2-translations-02.zip
|
|
|
|
|
Logged
|
|
|
|
|
EdenNov
|
 |
« Reply #67 on: April 07, 2012, 07:07:24 AM » |
|
The characters are readable but it's still oriented backwards (as in "Paused" is "desuaP"). I guess it would work if I just write everything in reverse. Right? Thanks for doing that btw.
|
|
|
|
|
Logged
|
The thing about science is that it's true whether or not you believe in it.
|
|
|
TyrOvC
Mossbaby

Posts: 369
This text is not random :(
|
 |
« Reply #68 on: April 07, 2012, 12:04:29 PM » |
|
I need someone that can actually read/write in a right to left language to help me figure out what all needs to be done to make them work properly. Can code in special handling if anything else needs to be done for right to left languages.
So, anything put in text.txt for right to left languages is reversed?
Is that every character that needs to be reversed? Like: This game is paused. .desuap si emag sihT
Individual words reversed? Like: This game is paused. sihT emag si desuap.
And does the ordering of the words in the phrase need to be changed?
|
|
|
|
« Last Edit: April 07, 2012, 12:08:14 PM by TyrOvC »
|
Logged
|
|
|
|
|
Moloch
|
 |
« Reply #69 on: April 07, 2012, 12:27:07 PM » |
|
I can't offer any help with any translations, but I haven't come across any problems while testing what you've done so far.
The only text I haven't seen in the language file is title screen "(Derek Yu) Presents", and the quit/win credits "Thanks for Playing!", "See you next adventure!"
|
|
|
|
|
Logged
|
|
|
|
|
EdenNov
|
 |
« Reply #70 on: April 07, 2012, 03:12:53 PM » |
|
I need someone that can actually read/write in a right to left language to help me figure out what all needs to be done to make them work properly.
Umm... I can help with that. The entire sentence is reverse, like the first option you said (also what did you write there, cuz I read "my hovercraft is full of eels"...), but the question mark should be to the right. Also, I could translate it to Hebrew if you want. That's why I got so exited-I finally get to contribute to the forum.
|
|
|
|
|
Logged
|
The thing about science is that it's true whether or not you believe in it.
|
|
|
Wonkyth
Big Bossy
Mossy

Posts: 2018
|
 |
« Reply #71 on: April 09, 2012, 07:18:02 AM » |
|
What can I say, guys, awesome job! 
|
|
|
|
|
Logged
|
|
|
|
TyrOvC
Mossbaby

Posts: 369
This text is not random :(
|
 |
« Reply #72 on: April 11, 2012, 06:48:29 PM » |
|
Finished converting text drawing to the new text draw script (lots of that done by Moloch!), added translations for the level editor, and now it's ready for some actual translating! Any translators out there look at the bottom of the original post under "WIP Translation Release" for a download and information on the translation format. Sample translation packs for German, Hebrew, and Afrikaans are included, although they've yet to actually be translated. To start one for a different language, just copy the English translation pack over and use it as a base.
|
|
|
|
« Last Edit: April 11, 2012, 06:50:18 PM by TyrOvC »
|
Logged
|
|
|
|
|
EdenNov
|
 |
« Reply #73 on: April 11, 2012, 11:45:31 PM » |
|
...what did you write there, cuz I read "my hovercraft is full of eels"...
Ohhh from Monty Python. I just got that.
|
|
|
|
|
Logged
|
The thing about science is that it's true whether or not you believe in it.
|
|
|
TyrOvC
Mossbaby

Posts: 369
This text is not random :(
|
 |
« Reply #74 on: April 14, 2012, 12:15:49 PM » |
|
Small update, if anybody's working on a translation added: TutorialEnter=PRESS UP TO ENTER! AGameBy=A GAME BY ThanksForPlaying=THANKS FOR PLAYING! SeeYouNextAdventure=SEE YOU NEXT ADVENTURE! To text.txt and the game code.
Also, is anybody working on any translations yet?
|
|
|
|
|
Logged
|
|
|
|
|