-
-
Notifications
You must be signed in to change notification settings - Fork 33
jblocks
JBlocks is a tool developed by TheSeventhEmerald for creating brickset scripts. It's able to pick the bricks from the image and save them to a .brk file. JBlocks is created with Java, so it will run in every operating system with Java installed.
Download the executable JAR file. Once you have it, simply execute it to run the app. No installation is required. From that point, you can follow the steps:
- First, import an image with File > Import image. A dialog will be opened: it shows the folder where JBlock is. Find the image you want to show and click "Open".
- Now, you can start adding bricks. Select a region on the image, and adjust it using the location / width,height spinners. Once you have selected your brick, choose the properties (passable, circular, zindex, etc). After set the properties, click the "Add Brick" button; you'll see a "Brick 1" in the Block List.
- You can zoom the image as you want. The selection rectangle looks like it's not being scaled, but it is! You only have to make a new rectangle or click the buttons. However, I recommend you to select your preferred zoom level and work always with it.
- To set correctly the angle of a block, click on the button where says "PLANE (0)". A list of angle types will appear. Select the orientation of the angle, and it will be automatically calculated. You can adjust it if you need.
- Note: recent versions of the engine no longer use the angle parameter, so this can be left at zero
- To set an animated brick, click on the "Animated" property and choose the frame width and height.
- If you want to edit a brick, simply click it on the Block List. You'll see that the selection rectangle gets the brick and its properties will be automatically displayed. You can now edit your brick. After finish, click the "Update Brick" button.
- Click on File > Save as... to save your brickset to a now file. Click on File > Save to overwrite the current file. You also can open a brickset with File > Open. When you open a brickset, the brick list appears and the source image of the brickset will be displayed.
- If you have problems to see the selection rectangle, you can click on Configure > Rectangle Color and change the selection color.
- If you check the Configuration > Use grid button, a dialog will appear. Choose the grid size. Now a grid will appear and the selection will adjust the grid. Uncheck the button to hide the grid. You can change the grid color with Configuration > Grid Color.
Tip
EOF error? You may receive an error opening some bricksets. If a message appears saying you have an "EOF error" simply open (with a text editor) the .brk file and write this comment at the end:
//JEOF
Nowadays the engine support collision masks. This was not the case when JBlocks was originally developed. To work with them, you'll need to manually write the "mask" parameter in your .brk scripts, as described here.
Important
Using collision masks is highly recommended!
Q: When I double-click the file, nothing happens!
A: In this case, check if you have installed latest Java Runtime. If after installing it you can't start the program, then:
- Open a terminal
- Go to the folder where JBlocks.jar is located
- Type
java -jar JBlocks.jar