JBlocks

From Open Surge Wiki
Jump to: navigation, search

Overview

JBlocks 1.0.4
Editing a brickset

JBlocks is an app created for designing Open Surge brick scripts (.brk). It's able to pick the bricks from the image, apply the properties and save them to a file. It simplifies the brickset creation process. JBlocks is created with Java, so it will run in every OS with Java installed.

Usage

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 xD 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.
  • 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

Collision masks

Recent versions of the engine support custom collision masks. To work with them, you'll need to manually write the "mask" parameter in your .brk scripts, as described in Bricksets (no support on JBlocks 1.0.4)

Troubleshooting

When I double-click the file, nothing happens! In this case, check if you have installed last Java update: Java download. If after installing the last version of Java you can't start the program:

  • Open a terminal. Go to the folder where JBlocks.jar is located.
  • Type:

java -jar JBlocks.jar

  • Note you may need an updated version of Java to run this app.
  • You can check your current Java version typing in a terminal:

java -showversion

  • After updating, check if an error occurs. In that case, take a screenshot and send it to the developer to get support. It could be a software bug.

Feedback

If you have a problem, you discover a bug or you simply want to give your opinion of the tool, you can do it in the related forum topic: http://forum.opensurge2d.org/viewtopic.php?id=1683

Changelog

Version 1.0.0

Created the app, with its basic features.

Version 1.0.1

Added custom grid, added "New" button. Fixed a bug on brick selection.

Version 1.0.2

Fixed bugs on "Update Brick" and writing files. Fixed the bug opening some bricksets.

Version 1.0.3

Fixed the problem with the images and some bugs with the "Add Brick" button.

Version 1.0.4

Minor bugfixes. This is the current version.