User Tools

Site Tools


scratch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
scratch [2018/12/22 04:55]
sausage
scratch [2021/02/02 01:24] (current)
Line 1: Line 1:
-One of the unique features available ​with orx is yhe ability to switch languages in game with locale. While many engin '​s ​allow a user to program ​with locale ​featuresorx lets you switch languages back and forth in realtime.+One of the unique features available ​within Orx is the ability to switch languages in game using locale ​features. While many game engines ​allow a user to program ​using locale ​to some degreeOrx lets you switch languages back and forth in real-time.
  
-An example of this would be a graphical ​adventurd ​game that features characters, onscreen text, digital speech, ​wnd music. Locale switching would allow you to completely switch out all graphics, text, speech and music with a single function call without altering the gameplay.+An example of this could be a graphical ​adventure ​game that features characters, onscreen text, digital speech, ​and music. Locale switching would allow you to completely switch out all graphics, text, speech and music with a single function call without altering the game-play.
  
-All data is defined by you,and so your regions or nations could be aliens/​humans,​ orcs / elves. You could even think of it as theming.+All data is defined by you, and so your regions or nations could be aliens/​humans,​ orcs/elves. You could even think of it as a kind of themeing.
  
 Its a pretty amazing feature that comes out of the box. Its a pretty amazing feature that comes out of the box.
Line 10: Line 10:
  
 1. Create a simple game with  characters with their own look, speech and music. 1. Create a simple game with  characters with their own look, speech and music.
-2. Add in a second locale and be able to switch between them. +2. Add in a second localeand be able to switch between them.
  
  
 Begin with a blank project created using init. Begin with a blank project created using init.
  
-Name itnsomething ​like the-xonversation. Our gamebwill be about two polite gwntlemen having a xonversation. They continually greet eaxh other all day.+Name your project something ​like the-conversation (or whatever you wish)
  
-We eventually ​want to be able to switch ​theor natio nality ​as theplayer ​may prefer to play the game in the theme pf th eir own country and language.+Our game will be about two polite gentlemen having a conversation. They continually greet each other all day. 
 + 
 +Eventually, we want to be able to switch ​their nationality, ​as the player ​may prefer to play the game in their own country and language.
  
 Assets Assets
  
-Lets bein with the french ​assets, ​ and build the french ​version ​of the game to start.+Let's begin with the French ​assets, and build the French ​version ​first.
  
-Obkect+ 
 +Object
  
 Speech Speech
Line 30: Line 32:
 Music Music
  
-Delete the default config object and fz. We wont need those. 
  
-Create ​thedefault ​person ​I bje c t in the.cpnfig woth+Delete the default config object and FX sections. We wont need those. 
 + 
 +Create ​the default ''​Person''​ object in the config with: 
 + 
 +[] 
 + 
 +Create a second ​person ​from the first, but one that stands on the other side and faces the other way: 
 + 
 +[] 
 + 
 +Next, create a ''​Scene''​ object that will be the root to hold all the other objects. Then place both Person objects ​in it's Childlist. 
 + 
 +[] 
 + 
 +Create ​the scene in the game in codeThis will create all the child objects onscreen. You can just change the existing ''​Object''​ creation with ''​Scene'',​ from: 
 + 
 +[] 
 + 
 +to: 
 + 
 +[] 
 + 
 + 
 + 
 +Create all the text objects to go onscreen. You will need text objects for: 
 + 
 + - The speech 
 + - The player instructions 
 + - The current language indicator 
 + 
 +Create these as: 
 + 
 +[] 
 + 
 +And now place them into the scene by adding them to the Childlist:​ 
 + 
 +Next is the music. Define it with: 
 + 
 +[] 
 + 
 +And add it to the scene with: 
 + 
 +[]
  
-Create a second man from the first but one that stands on the other side and faces the other way.+Next is the actual conversation. Define ​the speech with:
  
-Next, create a scene object that wiĺl be the root to hold all the other objects. Then place both men objects in Its childlist.+[]
  
-Create ​the scene in the game In code. This.will create all the xhild objects onscreen.+Them using a timeline track switch on and off the alpha of the speech text object to make it appear/​disappear,​ move its position and play the sounds.
  
-Next create all the text objects to go onscreenYounwill need text objects for +Compile and run. Our two French gentlemen will start having a lovely conversation.
  
-The speech 
-The player instructions 
-The current language indicator 
  
-Create these as+That is the basic game. 
  
-And now.place them into the scene by addong them to the.childlist. 
  
-Next is the musicDefine it with+Now to make the game switchable to Australia mode. This is the easy part.
  
-And add it to the scene with+Begin by defining ​the two languages for the game: French and Australian.
  
-Next is the actual conbersation. Define the speech with+[]
  
-Them usingna timeline track switch on and off thealpha of thenspeech text object to make it appear and disappearmove its position and play the sounds.+Nextdefine those languages as sections containing your keys for the various assets or text:
  
-Compile and run. Our two french gentlemen will start having a lovelo conversation.+[]
  
-That is the basic gameNow to make the game switchable to australia mode.+Finally go to each config and replace ​the absolute asset paths and text with the named keys from language sectionsThese keys are called using the special $ symbol: ​
  
-Befin by defining the two languages or locales for the game: french and aistralian.+[]
  
-Next, define.those locales ​and create keys for the various assets that are required to switch ​out: graphics, sound and text+Compile ​and run. Now you can switch ​between the two languages with the Space Bar. Everything in the game switches over in an instant. Pretty impressive stuff. ​
  
-Finally go to each config and replace the absolute pathsnto assets and text with the named keys in the locale sections. These locale keys are.called using the $ symbol 
  
 +Acknowledgements,​ permissions and thanks
 +Accordion performance of Je Te Veux by Norimichi Nagasaka. Youtube channel is at: https://​www.youtube.com/​user/​VAccordion
 +Graphics by Trevor Brennan: http://​trevorbrennan.com
 +Thanks to FullyBugged,​ Dom M ad Matt R for the voices.
  
scratch.1545454551.txt.gz · Last modified: 2021/02/02 01:24 (external edit)