Home
Welcome
- Details
- Written by Super User
- Category: Willkommenstexte
- Hits: 3431
Welcome on BeSly the Haiku knowledge base.
This site are created to help other users and developers. What to start, has begun in August 2004 with only German translations and little tutorials has now become a comprehensive, informative, multi-lingual knowledge base.
It contains a variety of assistance to install, program descriptions, program and system settings. We always try to make the tutorials easy to understand with a simpe but effect layout. In the years the site is online many ideas are included into the website. Idears from other users, like the system information at the beginning of every tutorial.
The menu structure is designed so that all instructions are displayed sorted by their program type. You can also use the search function to find tutorials.
There is also a small Software that allows you to find BeSly tutorials. Here also all programs listed by there program type, but also by the system type, language or authors. Even the smallest instructions are included, usually found only in collections of "Tips and Tricks".
Due to the similarity between the systems, wich are all have the same basis or be a rebuild, many of the tutorials are applicable on all systems.
Who wants to help this project, can do this writing their own tutorials, descriptions or translations. Also ideas or criticisms are welcome.
With the relaunch of BeSly it is now possible for the user to write the instructions themselves in the web interface. Even uploading pictures should be no problem. The only condition is to log on the BeSly. Your data will not pass from us.
Playground Editor documentation
- Details
- Written by Lelldorin
- Parent Category: Entwicklung
- Category: playgroundeditor
- Hits: 596
The Playground Editor is a program with which you can create playing fields for games. To do this, you specify a size for the playing field, import graphics and place these graphics on a generated grid.
You can define different backgrounds, objects and switches (example: background = meadow, object = tree, switch = treasure). Once you have created your playing field, it can be saved as a project. This makes subsequent editing easier.
The saved project can be exported. The exported playing field is a text file with the entries of the playing field and the associated graphics. If you want to incorporate this into a game, you have to read out the text file and use the read out data to generate the playing field.
In the text file, 3 numbers per field of the playing field are separated by a colon. Each field is marked with a straight vertical line | separated:
BG01:OB02:SW00|BG01:OB03:SW04|… |
The first number is the number for the background, the second for the item, and the third is the switch.
This makes the generation of playing fields much easier. Because, unlike in most common forms with w for wall, p for player and spaces for empty space, you can plan a complete world here. The switch can stand for many things, e.g. for a random function for opponents, finding objects or the destination of a level.
In the editor you can insert a comment for each object, which provides a better overview, especially with the switches.
Installation
Since the Playground Editor is not part of the Haiku standard installation, it must be installed from an external source.
To integrate the installation source into HaikuDeport enter the following command line in the terminal:
BeSly 32bit
pkgman add-repo https://software.besly.de/repo |
BeSly 64bit
pkgman add-repo https://software.besly.de/repo64 |
Then open HaikuDepot and update the repository server via "refresh repositories" in the HaikuDepot menu.
After the update has been completed, the packages from our repository server are also listed in the package lists.
Search for PlaygroundEditor and install it.
Create a new project
In the start menu of the program select "new project".
In the next window you define the size of the desired playing field (vertical fields and horizontal fields) and its name.
After confirming this information, the playing field will be created. This is initially a grid with the desired number of fields.
Insert graphics
Now go to "Tiles" to add playing field graphics (tilesets).
To add graphics here, search in the left directory list for the corresponding graphic and add it to the desired area (backgrounds to "Backgrounds", objects to "Objects").
After adding the tilesets, go back to the editor. The tilesets that have been added are now displayed here.
Painting the playing field
There are three lists in the right area of the editor. One for the backgrounds, one for the objects and one for the switches.
To paint a playing field, select one of the graphics listed and paint it on the editor field on the grid area by pressing the left mouse button.
Descriptions of the tilesets
To ensure a better overview, every background, every object and every switch can be given a description. To do this, select one of the entries and use the right mouse button to select the "Add Description" option. A description can then be inserted and added in the upper right input field.
Export playing field
To export the playing field go to "Export".
There are several ways to export the playing field. The playing field can be exported in whole or in part. To do this, select the appropriate storage option and press export.
The different options allow different processing of the playing field file. Everyone has different approaches and logic in programming. Therefore you can create a classic playing field here which is simple and simple, or you can use all functions and use the extensive range of functions.
The exported playing field is output as a text file.
You can also export a screenshot of the playing field when exporting. This makes programming easier because you can see what is where better without looking at numbers and letters.
- Translation: Yes
Insert automaticly information from clipboard
- Details
- Written by Super User
- Parent Category: Development
- Category: yab
- Hits: 500
In some programs is it possible that copied informationen from clipboard goes automaticly into a textedit or textcontrol.
In this code is a example to get the informationen from the clipboard automaticly.
#!/boot/home/config/bin/yab |
Tutorial by Lorenz Glaser(Lorglas) Feb 2022
Made available by BeSly the Haiku, BeOS and Zeta knowledge base.
- Translation: Yes
How to sort a array in Yab
- Details
- Written by Super User
- Parent Category: Development
- Category: yab
- Hits: 394
Sometimes i have the problem that an array is not sorted. So I wrote a little subroutine that solves exactly this problem. This example is for sorting numbers. The example at the end is for strings.
dim zahlen(10) zahlen(1)=10 zahlen(2)=0.10 zahlen(3)=5 zahlen(4)=3 zahlen(5)=8 zahlen(6)=55 zahlen(7)=10777 zahlen(8)=22 zahlen(9)=0.0001 zahlen(10)=1034 sorting_array(zahlen(),"desc") sub sorting_array(zahlen(),order$) // Asc or DESC if (order$="asc") then for k =1 to arraysize(zahlen(),1) for i =1 to arraysize(zahlen(),1) if (i=arraysize(zahlen(),1)) then break endif if (zahlen(i) > zahlen(i+1) ) then temp = zahlen(i) zahlen(i) = zahlen(i + 1) zahlen(i + 1) = temp endif next i next k elseif (order$="desc") then for k =1 to arraysize(zahlen(),1) for i =1 to arraysize(zahlen(),1) if (i=arraysize(zahlen(),1)) then break endif if (zahlen(i) < zahlen(i+1) ) then temp = zahlen(i) zahlen(i) = zahlen(i + 1) zahlen(i + 1) = temp endif next i next k endif end sub for i=1 to arraysize(zahlen(),1) print zahlen(i) next i |
This example is for strings. It is sorting upper case frist, then lower case by option asc. By option desc the upper case strings are at the end.
dim text$(10) text$(1)="gert" text$(2)="google" text$(3)="Firefox" text$(4)="Android" text$(5)="ZigBee" text$(6)="Hubert" text$(7)="Hello" text$(8)="Alfred" text$(9)="Batman" text$(10)="Robin" sorting_array(text$(),"asc") sub sorting_array(text$(),order$) // Asc or DESC if (order$="asc") then for k =1 to arraysize(text$(),1) for i =1 to arraysize(text$(),1) if (i=arraysize(text$(),1)) then break endif if (text$(i) > text$(i+1) ) then temp$ = text$(i) text$(i) = text$(i + 1) text$(i + 1) = temp$ endif next i next k elseif (order$="desc") then for k =1 to arraysize(text$(),1) for i =1 to arraysize(text$(),1) if (i=arraysize(text$(),1)) then break endif if (text$(i) < text$(i+1) ) then temp$ = text$(i) text$(i) = text$(i + 1) text$(i + 1) = temp$ endif next i next k endif end sub for i=1 to arraysize(text$(),1) print text$(i) next i |
- Translation: Yes
Page 1 of 2