Fadest Posted July 8, 2008 Share Posted July 8, 2008 (edited) I don't know if you had a look on Merlain's adventure game in Yastuna 1. This is a small text adventure game with no other pretention than giving tips to find hidden games on the cartridge. The game is based on a background graph, a main program and a setup text file loaded from ROM. Some months ago, on the french forum Yaronet, I gave the sources and a tutorial to let people wrote their own games with it. It seems some people are interested in re-using or studying the source code, so I will try to translate the tutorial here. First, you need a BLL kit with C compiler ready to use. Then download : http://fadest.free.fr/DevLynx/Aventure.zip I chosed to use .bat programs rather than makefile, because it was intended to beginners, and even me, with this old kit, I prefer batch. But, i you are able to create makefile and prefer to do so, please feel free to do it I, this english tutorial, I assume that you are familiar with BLL kit and will be able to create your makefile of setup .bat program according to your BLL path... There is a french LisezMoi.txt to explain the kit. If you want to have a look on setup file, this is the aventure.txt file. Well, if you are ready to use strange syntax like this, you are ready to make your own games : £Setup P5& C8& S13& £Texte 0#Bienvenue|dans le kit|de creation|de jeux d'aventures||Code| Fadest& 1#Base sur le moteur|de la Quete|de Merlain.& 2#Gestion de choix|multiples& 3#La, vous avez|pris le choix 1.& 3#La, vous avez|pris le choix 2.& 5#Gestion|d'inventaire.& 6#Il faut juste|un peu de courage.|En avez vous ?& 7#Bien.|Alors faites nous|de beaux jeux.& 8#Bon, il ne vous reste|plus qu'a attendre|que les autres|fassent des jeux.& 9#Gestion|de conditions|sur les objets.& 10#Merci et a bientot.& £Options 0# <<Commencer>>[1]& 1# <<Continuer>>[2]& 2#Choix 1[3]|Choix 2[4]& 3# <<Continuer>>[5]& 4# <<Continuer>>[5]& 5# <<Continuer>>[6]& 6#Oui[7]{1}|Non[8]& 7# <<Continuer>>[9]& 8# <<Continuer>>[9]& 9# <<Continuer>>[10]& 10# <<Continuer>>[200]& £Inventaire 0#Inventaire :& 1#courage.& £Fin Yes, the syntax is rough, a nice Windows program to generate it would be the top Note, as long as you do not change the background graph, programs graphisme.bat and programme.bat are useless. You only have to (setup before first use and) launch cartouche.bat after every modification of aventure.txt to generate the ROM (.lnx file to use with Handy). A quick translation of the readme.txt file : Kit de création de jeux d'aventure textuels sur Lynx Fadest, december, 2007 This kit will allow you to create quite easily adventure text games, playable on Lynx. You need no skill in programmation, just some logic and courage. At this time, you also need an installed BLL kit, as we will use tools from the kit. First, open a MSDOS session and go into Aventure directory. There is 3 batch program that you may use :graphisme.bat programme.bat cartouche.bat The background : It is possible to change the background. The kit use the file fond.bmp in repertory source\bmp It must be a bmp file, 160x102 pixels in 16 colors Once your file is created, execute program graphisme.bat This will convert your graphic file into an object useable by a Lynx program Lynx Then, you must recompile the source file with programme.bat At this point, you have an executable ready to run, with your background included (note, in this version, the background is linked to the program and not yet read from ROM) All we have to do now is to modify the advecture text file and generate Lynx ROM. The file aventure.txt contains all your adventure datas, and used a specific syntax (see below) Once your text file is ready, the program cartouche.bat generate a ROM image cartouche.lnx useable on Handy. aventure.txt file syntax : Important : Each information line must be ended by character & The file is divided in 4 parts : £Setup £Texte £Option £Inventaire £Setup defines the position of the text on screen, colors used, ... Pn& : (P keyword) indicates than the first caracter of each text line will be display from the pixel n (example P5&) Cnn& : (C keyword) defines the color used for the text (rank in 16 colors palet) (example C10&) Snn& : (S keyword) defines the color used for the selected text (rank in 16 colors palet) (example C12&) £Texte contains all pages displayed on screen For practical reasons, a text page begins after caracter # . All caracters before are optional (I only use then to numerate my chapter) To insert a line return, use carater | betwwen 2 words. Be careful : accentuated caracters are not managed by BLL fonts The conditions on possession or non possession of an object are managed between % The sign %+ says the text will be displayed if player got the object The sign %- says the text will be displayed if player did not get the object A conditionned chapter is ended by an end phrase caracter & Example 6#%+1%You have a key&Sorry, you do not|have a key& I player have the object number 1, then the text "You have a key" is displayed. In the other case, the text "Sorry, you do not|have a key" is displayed. Note it is not useful to specify %-1% in second case, because this is the default case. £Option list all possible options for a given chapter For practical reasons, a text page begins after caracter # . All caracters before are optional (I only use then to numerate my chapter) To separate 2 options, you must use a caracter | between the 2 words. The following chapter number is indicated between [ and ] Example : 2#Option 1[3]|Option 2[4]& If player choose the option 1, he will go to chapter 3, in the other case, he will go to chapter 4 If the action allows player to pick an object, the object number is written between { and } Exemple : 6#Yes[7]{1}|No[8]& If he answered Yes, the players picks object number 1 (as said in invetory list) and go to chapter 7, in he answers No, he don't pick object and go to chapter 8. The conditions on possession or non possession of an object are managed between % The sign %+ says the text will be displayed if player got the object The sign %- says the text will be displayed if player did not get the object A conditionned chapter is ended by an end phrase caracter & Exemple 6#%+1%Continue[ 7]&Back[ 8]& If the player have the object 1, then option Continue is displayed and next chapter is number 7. In the other case, option Back is displayed and next chapter is 8. Note it is not useful to specify %-1% in second case, because this is the default case. £Inventaire list all objects used in the game (limited to 10 objects in this version) The firts object of the list is the term Inventory (or bag content, or whatever you want to be display when player displays inventory) The game is limited to 200 chapters. If you want to end the game, just specify 200 as next chapter. It is also limited to 16kb text files. Theses limitations (numbers of objects, chapters, size of text file) can be changed with programmation. You will probably also have to change some remaining french text hard coded in game (like "Vous ramassez" instead of "You pick"...) This is the first version of the engine, really basic, I may add functionalities in the future, but you can still create some nice mini-games with it and some imagination. Feel free to modify, or reuse parts or rewrite source code, this is 100% freeware. Well, of course, the engine is really limited and you will not write the game of the century with this kind of tools, but with a nice game idea, and some imagination, I think everyone should be able to make something with it. Feel free to ask if you have any questions or need some help or to enhance the program if you need and share it if you want. Edited July 8, 2008 by Fadest Quote Link to comment Share on other sites More sharing options...
matashen Posted July 8, 2008 Share Posted July 8, 2008 I code a complete Editor, that nobody has to code on Line to create an Adventure Quote Link to comment Share on other sites More sharing options...
EricDeLee Posted July 31, 2009 Share Posted July 31, 2009 Just wanted to let you know that I am going to look into this a bit and give things a try! I've got a great idea for this! Quote Link to comment Share on other sites More sharing options...
EricDeLee Posted July 31, 2009 Share Posted July 31, 2009 I code a complete Editor, that nobody has to code on Line to create an Adventure Editor? No coding on line to create an adventure? Info please! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.