don't click here

SoniPlane

Discussion in 'Engineering & Reverse Engineering' started by AURORA☆FIELDS, Oct 13, 2014.

  1. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    As you may know by now, while PlanED is useful tool, but it has many flaws, and is unreliable. So, I present you; SoniPlane! This is a plane editor, which is made to be safe to use and user-friendly. This tool is still in early beta and may have fatal bugs. It is recommended to backup any work prior to editing! Note: This post is still incomplete and new information may be added at any given time. It is recommended to check from time to time for updates.

    Help wanted
    While working on SoniPlane, and making it more extensive and more compatible for extending it, I ran into some huge bugs, issues, inconsistencies and limitations. Overall, I ran into a point where I figured I should rather than try to work hard and make hacky solutions to hopefully make it work, I decided to rewrite it instead.

    The restart will be on a lot improved engine, OpenGL (to draw everything I want properly and efficiently, avoiding slowdown and annoying bugs like in the earlier versions), using LibGDX, and I will finally fix a lot of the annoying bugs, make the code readable, up to the Java standards, compatible, efficient, and make a mod/extension api, to make users able to add their own features they'd like! But, that is an awful lot of work and something I could definitely not make, especially considering I am way more busy than when I started SoniPlane originally, so to try do that all AND make sure it WORKS 100%, would take even up to one YEAR!

    I don't know about you, but that's awfully long and that's exactly the reason why I ask YOU to help make this a thing faster! In other words, I am inviting you to join a core development team to work on SoniPlane and possibly specify in certain areas, such as UI, Graphics, API, core, additional features. Anyone with some expertise with Java is eligible to join the team (except for the graphics people, who need to be able to draw something half-decent), and will have to have something to show they are capable of working on SoniPlane in any form. I will keep the team size at first small, so I have less people to deal with and can coordinate more.

    So, what are my plans? well, I mentioned some stuff earlier, but here is more complete list:
    • Launcher tool that can check everything is correct, see if there is updates, open up a downloader tool if updates are needed, and load SoniPlane itself along with needed mods and extensions and whatnot.
    • API to allow modification of almost anything in SoniPlane, and include most functions the user would need (to minimize need for Java supplied functions, you see why later)
    • Mod Database, so the users can submit their modifications for others to use. Also would need checking to reject mods which use SoniPlane directly or most Java functions (some would need to be allowed, such as String's)
    • Automatic error reporting (with option to turn off) and troubleshooting guide for common issues.
    • Proper Javadocs, and easily readable online source code(also hopefully an easy way to see what changed since last version)(Github is fine but its clunky and ugly to some extent)
    • Completely rewritten engine and better way of handling [input everything here].
    • Java versions of compressors (gets rid of the need for WINE on Linux and OSX)
    • Cross-platform compatibility.
    • Easy-to-use UI and window handling.
    • Graphics that don't look horrible and/or bland.

    I don't expect to do a release anytime soon, nor would I expect constant work towards SoniPlane, but I aim towards releasing the tool as soon as possible with still keeping quality at the best. If you want to ask me further questions, I am occasionally at IRC; irc.badnik.net #ssrg - or just message me here!

    Features & Releases
    Releases
    - Downloader - Download

    ChangeLog
    beta 1.1
    + Windows have borders
    + Windows can be resized and moved
    + Windows can be minimized and maximized
    + cursor images can be customized
    + proper hotkeys for menu functions
    + when project is loaded the taskbar will blink until the app is focused.
    + save states added
    * commandline would not work properly
    * all tiles were not rendered properly
    * now all menu items are grayed out instead of hidden when not used
    * program reset is not CTRL+ESC
    beta 1.0.4
    + select multiple tiles
    + added new information to debug screen
    + moving parts of plane with mouse
    + new advanced manager for program parts
    + optimizations
    * not closing when opening a project too quickly
    * made sure SoniPlane not trying to launch when using incorrect directory
    * system information output now outputs Bytes, KiloBytes, MegaBytes and Terabytes depending on the size of each drive/memory unit
    - Menu entries for shifting plane position
    beta 1.0.3
    + SoniPlane now runs under Java 7 instead of Java 8 like before (Convenience for the user)
    * Improved textfields and fixed bunch of bugs
    * Improved file chooser
    beta 1.0.2
    + Redesigned file selection button.
    + Icons for on/off switches.
    + Output of data in SoniPlane folder
    + Program icon
    * Not updating update checker status with very fast internet connection.
    * Hopefully fixed launch path detection
    - Removed "No backups" screen
    beta 1.0.1
    + Added ability to edit or delete projects from the project selection screen
    * update box appearing when not checking for updates
    * debug screens crashing
    * issues caused by editing certain files
    beta 1.0
    + now updates are handled via SoniPlane downloader.
    + the engine is completely rewritten.
    + window is redrawn only when something is changed.
    + automatic update checking.
    + instead of using KensSharp, now SoniPlane uses FW_KENC.
    + Comper support.
    + ugly in-program menus changed to window menus.
    + most things use proper version controllers.
    + compression system overhaul.
    * optimizations, tweaks, etc.
    * a lot of bugs, also some new may be introduced.
    - ability to change framerate - deemed useless due to engine rewrite.

    And whatever else I forgot :I
    beta 0.1.3
    + name field of compression format and mapping, tile, and palette modules are shown instead of filename.
    + implemented feature to remove autosaves after certain amount of space is used.
    + settings menu to easily manage preferences added in beta 0.1.2
    * crash issue on saving art (modules/tile/MD.jar).
    * inability to type space ( ) on textfields.
    * you could only open 1 instance of SoniPlane with run.bat (edited script)
    beta 0.1.2
    + added preferences! It allows you to edit certain aspects of the program.
    + button to reset the program (autosaves, preferences, etc.)
    + ability to use different commandlines per compression format.
    + ability to modify text field styles.
    + changed mappings, art and palette modules to .txt files to describe them and not have multiple files do that.
    * "Exception in thread "LWJGL Application" java.lang.ArithmeticException: / by zero".
    * opening main menu on project load when using commandline.
    * fixed positioning of errors in project creator
    * fixed program title without version number
    * changed loading texts
    beta 0.1.1
    + ability to choose palette line offset
    + commandline support
    + You can now select tile from the plane using O instead of only Middle Click
    * using Numpad on text fields would type "Numpad #" instead of "#"
    * pressing Numpad 9 or Num 9 would not work
    * you cant use colon or semicolon to write said characters
    * if you have less palettes than what plane uses, it will crash (Warning: now it just reads from existing lines!)
    * you are able to edit multiple textfields at once
    * compression format "Uncompressed" fails to automatically exit its command prompt and must be exited manually.
    * The editor itself may not be in a filepath that contains any whitespace characters ( ) due to a bug with commandline. However, edited files can be in any kind of filepath.

    Features
    - Support for "Uncompressed", "Nemesis", "Kosinski", "Enigma", "Comper" and custom compression formats.
    - Supports any MegaDrive games mappings, art, and palette, and can be extended for other systems similar.
    - Lot of options for editing plane mappings easily and efficiently.
    - Palette and tile editor.
    - Project file creator.
    - Autosave and save backup features.
    - High and low plane, tile flip, and palette line support.
    - Any number of palette lines, tiles, and mapping size supported.
    - Ability to customize the program
    - State save/load support

    To Do
    - add/remove/move tiles
    - import/export tiles from image
    - import/export plane from image
    - import/export palette from image
    - add support for multiple palette files

    How to Update SoniPlane
    First, if you don't have it already, download the downloader from this post, and move it to the directory you want to install SoniPlane in. Next, execute it with Java 7 or later. The updater will do everything needed from there. If the application does not start, make sure you have Java 7 installed, Downloader.jar is not renamed and you have working internet connection.
    Media
    System requirements & Source code & misc notes
    Source code:
    SoniPlane
    Downloader
    Graphics library

    System minimum requirements:

    Operating system: Windows XP, Windows 7, Linux (Ubuntu 14 tested) (Windows 8, and OS X untested)
    CPU: ? (Recommended dual core 1GHz or better)
    System memory: 20MB or more
    Hard Drive: 5MB (15MB recommended)
    Java version: Java 7 or better
    Wine: Needed in Linux and OS X (compressors are not cross-platform)

    Miscellaneous notes:

    If the application does not start normally or crashes, see run.txt for the errors. If the error is not listed as known issue or isnt found in troubleshooting section, nor has anyone reported in this threads replies, you can reply to this topic with everything you know about this issue, as well as short description about your computer (such as Operating System and Java version). You can also contact me via BadnikNet IRC, with the nickname "Natsumi", or write a private message on the forums.
    Tutorials
    Controls
    Text fields
    Text fields have been updated to being controlled by Java default text fields. They should work correctly in any computer with any keyboard style. Only remember all other textfields and controls are blocked while you are editing one. You can press Enter to exit a textfield.
    Plane editor
    F1 - reset window positions
    F3 - change debug information mode
    CTRL+ESC - reset preferences and remove autosaves
    CTRL+S - save project
    CTRL+R - reload project
    CTRL+E - edit project configuration
    CTRL+O - go back to main menu
    CTRL+Q - disable/enable draw high plane
    CTRL+W - disable/enable draw low plane
    CTRL+6 - Increase plane width
    CTRL+7 - Decrease plane width
    CTRL+8 - Increase plane height
    CTRL+9 - Decrease plane height
    CTRL+Y - Deselect
    CTRL+L - Clear tiles from selection
    CTRL+I - Remove tiles from selection
    CTRL+K - Insert tiles to selection
    CTRL+O - Fill selection with tile
    CTRL+U - Set selection to high/low plane
    CTRL+G - Flip tiles in selection horizontally
    CTRL+B - Flip tiles in selection vertically
    CTRL+H - Increase palette line in selection
    CTRL+N - Decrease palette line in selection
    CTRL+J - Increase tile index in selection
    CTRL+M - Decrease tile index in selection
    Mouse controls
    Tile Editor:
    Left hold: Draw pixels to tile.
    Right/Middle hold: Select palette offset from pixel.
    Palette Editor: Left/Right hold: Change value
    Palette selector: Left click: Select palette line and offset.
    Tile selector: Left click: Select tile.
    Plane editor:
    Left hold: Place tiles to plane
    Middle click/Key O: Select tile
    Right hold: Select an area
    Control/Shift + right hold: Copy/Move selection (when you let go of Control/Shift, the selection is Copied/Moved)

    Text tutorials
    Creating a new project
    While opening "Create new" from main menu, you can create new projects through there. Whilst it should be pretty self-explanatory, here is the list of data you must fill, and brief explanations (NOTE: This will be changed in near future and this will be obsolete):

    Project file: the file where project is saved to. The file should be on directory "projects" (relative to filepath of SoniPlane).
    Project name: the name given to the project. This will be displayed when opening projects.
    Palette file: direct filepath for the palette file
    Palette type: dropdown menu for available palette decoding modules
    Palette line offset: Offset of palette lines. Can be negative.
    Transparent line: line number for transparent color
    Transparent entry: offset (in current line) for transparent color
    Art file: direct filepath for the art file
    Art type: dropdown menu for available art decoding modules
    Art compression: dropdown menu for available art decompression types
    Mapping file: direct filepath for the mapping file
    Mapping type: dropdown menu for available mapping decoding modules
    Mapping compression: dropdown menu for available mapping decompression types
    Plane width: width of plane mappings (in tiles)
    Plane height: height of plane mappings (in tiles)
    Map offset: addition to tile offset values in decoded mappings (For example, Sonic 1 title screen would have -512)
    Autosave delay (Minutes): How many minutes between autosaving your current progress (0 will disable this feature)

    Project files must be saved to "projects" folder in programs filepath in order to work!

    Project file format:
    (NOTE: This will be changed in near future and this will be obsolete)

    SoniPlaneProject: 1.x: Used to determine this is valid project.
    name: Project display name.
    palette type: Palette module filename (No extension)
    palette file: Direct path to palette file.
    line offset: Offset of palette lines.
    trans line: Line number for transparent color.
    trans off: Offset (in current line) for transparent color
    art file: Direct path to art file.
    art type: Art module filename (No extension)
    art compression: Art compression script filename (No extension)
    map file: Direct path to mappings file.
    map type: Mappings module filename (No extension)
    map compression: Mappings compression script filename (No extension)
    map offset: Offset for tile drawing in plane.
    map width: Plane width in tiles.
    map height: Plane height in tiles.
    autosave: Delay between autosaving in milliseconds.


    If you are still confused with the project format, here is an example project.

    Adding new compression formats
    Due to the design of compression, you can easily add more compression formats, as long as you have application that supports commandline. You may not use batch, however.
    Existing compression formats are stored in application_path/modules/comp/ and new ones must be stored here as well. You can look at other files for example, but here is a short tutorial to it. All compression files must be .txt files!
    version: Version of this compression format caller. Usually your best bet is to have it be same as with any other of the files.
    name: String to be displayed on project creator.
    compress: Commandline to be executed when attempting to compress existing file. Only called when when cmd field contains %cmd%
    decompress: Commandline to be executed when attempting to decompress existing file. Only called when when cmd field contains %cmd%
    cmd: called when _OS_SPECIFIC.asm has %cmd% in command field.

    There is few rules and special commands to commandline:
    • %CD% can be used to get direct filepath to comp folder (also include extra slash (/))
    • %%I is used to describe where direct path to input file goes. Recommended to enclose in double quotation marks in case of spaces in filepath.
    • %%O is used to describe where direct path to output file goes. Recommended to enclose in double quotation marks in case of spaces in filepath.
    • %copyfile% is used for uncompressed file formats, to simply copy input file to output file location. Cannot be used with any other arguments.

    Launching using commandline
    Since beta 0.1.1, this application has had ability to directly launch parts of the program from commandline arguments. Here is guide how to use them.
    First of all, in order to launch the program to begin with, you must use line similar to this
    Code (ASM):
    1. Java -jar SoniPlane.jar
    Here is all the commandline arguments available:

    "-new" - Opens project creator
    "-edit <file>" - Opens project editor with specified file
    "-open <file>" - Opens the plane editor with specifier file

    Fail to use commandline properly and the app will boot normally. Here is example with commandline arguments:
    Code (ASM):
    1. Java -jar SoniPlane.jar -open <path>/projects/S1Title.SPP

    more coming soon!
    Video tutorials
    coming soon!
    Known issues
    When you use right click -> open with -> Java, the program wont open normally
    Troubleshooting
    "Unsupported major.minor version"
    This is because you are trying to run with older Java version. Make you sure install Java 7 or higher, and if problem persist, you can use run.bat, with replacing "Java" at beginning with this (Replace "jreX" with jre7 or jre8 depending on which version of Java you have installed):
    64-bit Java on 64-bit OS: "C:\Program Files\Java\jreX\bin\java.exe"
    32-bit Java on 32-bit OS: "C:\Program Files\Java\jreX\bin\java.exe"
    32-bit Java on 64-bit OS: "C:\Program Files (x86)\Java\jreX\bin\java.exe"
    "My issue is not listed as known issue, nor exists in troubleshooting section and no reply does note about this" - You can reply to this topic with everything you know about this issue, as well as short description about your computer (such as Operating System and Java version). You can also contact me via BadnikNet IRC, with the nickname "Natsumi", or write a private message on the forums.
    Copyright
    This software and all of it's components are lisenced under Open Software License v. 3.0 (OSL-3.0)
    Copyright 2014 Green Snake. Some Rights Reserved.
     
  2. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    I bet this program is great, and I am eager to test it out. But setup for the project files is a bit vague. How about including some sort of example project, to help others understand it's setup a bit better. :)/>

    Edit: Ignore that last bit. Bad habit of skipping lines when reading sometimes. >.<

    Edit2: So, I cannot get the "Open Project" button to do anything. I tried to hand make a project file, since the built-in setup for it glitches so text overlaps. So far I haven't gotten anything to load. =/
     
  3. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    About time we get a new one of these... nice work Green Snake! I look forward to trying this as soon as I can muster up some time to do so.
     
  4. kazblox

    kazblox

    Member
    178
    27
    28
    Diassemblies and decompilations.
    Tried the correct project settings (yes, map offset -512) with a normal Hivebrain disassembly, I get the tiles but no title plane...

    What did I do wrong?
     
  5. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    I forgot to specify, that the project files must be saved to "projects" in the programs launch path. woopsie. But the Open project button will only work if there is at least 1 project in said folder. I will also include example project download. (You must change to the correct path for your disassembly in order to make it work). Also, you can try to fix the overlapping by maximizing the window before going to the editor.


    Also, Kazblox, mind showing screenshot and the project file contents?
     
  6. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Finally got it to load something, Seems neat so far.

    [​IMG]

    For those looking to use custom compression, it is rather basic to get the program to work with the custom format.
    Here is how I was able to get comper compression to work with this:

     
  7. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    Thank you! And that reminds me I forgot to add Comper compression as well.
     
  8. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    Update: beta 0.1.1
    (* = fixed bug, + = added feature, - = removed feature)

    + ability to choose palette line offset
    + commandline support
    + You can now select tile from the plane using O instead of only Middle Click
    * using Numpad on text fields will type "Numpad #" instead of "#"
    * pressing Numpad 9 or Num 9 will not work
    * you cant use colon or semicolon to write said characters
    * if you have less palettes than what plane uses, it will crash (Warning: now it just reads from existing lines!)
    * you are able to edit multiple textfields at once
    * compression format "Uncompressed" fails to automatically exit its command prompt and must be exited manually.
    * The editor itself may not be in a filepath that contains any whitespace characters ( ) due to a bug with commandline. However, edited files can be in any kind of filepath.
     
  9. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Not sure why, but the update to this killed support for Comper it seems. Whenever I try to use it, I get an error from the program stating it cannot find the path, even though it exists. There are no special characters in neither the program path or the path to the files the project calls for...

    Edit: Never mind that, I had to edit the file slightly for this new version.
    Edit2: Using this I get no error, but nothing ever loads...
     
  10. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    Edit: Never mind, I misread. BTW, wrote some new stuff to the post.
     
  11. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    So, couple of new updates has been made;

    Update: beta 0.1.3 (Now the link is updated with actually working version)
    (* = fixed bug, + = added feature, - = removed feature)

    + name field of compression format and mapping, tile, and palette modules are shown instead of filename.
    + implemented feature to remove autosaves after certain amount of space is used.
    + settings menu to easily manage preferences added in beta 0.1.2
    * crash issue on saving art (modules/tile/MD.jar).
    * inability to type space ( ) on textfields.
    * you could only open 1 instance of SoniPlane with run.bat (edited script)



    Update: beta 0.1.2
    (* = fixed bug, + = added feature, - = removed feature)

    + added preferences! It allows you to edit certain aspects of the program.
    + button to reset the program (autosaves, preferences, etc.)
    + ability to use different commandlines per compression format.
    + ability to modify text field styles.
    + changed mappings, art and palette modules to .txt files to describe them and not have multiple files do that.
    * "Exception in thread "LWJGL Application" java.lang.ArithmeticException: / by zero".
    * opening main menu on project load when using commandline.
    * fixed positioning of errors in project creator
    * fixed program title without version number
    * changed loading texts
     
  12. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Excited to try this out when I get home today. Hopefully the issue I was having with custom compressions is fixed.
     
  13. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    Yes there is a new option in the preferences, which allows you to use per-compressor commandline thingamajig. It should give you larger options hopefully helpful fixing your issue. I will try to write a tutorial on that soon, but for now, it will use the "cmd" line on the formats when "commandline" in prefs.txt is empty.
     
  14. kazblox

    kazblox

    Member
    178
    27
    28
    Diassemblies and decompilations.
    On the behalf of Green Snake, the current SoniPlane beta was updated to 0.1.3(.1) to fix a crash for all users, as test mode was still flagged as on in the jarfile.
     
  15. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    Update beta 1.0 (Uses Downloader to download everything)
    (* = fixed bug, + = added feature, - = removed feature)

    + now updates are handled via SoniPlane downloader.
    + the engine is completely rewritten.
    + window is redrawn only when something is changed.
    + automatic update checking.
    + instead of using KensSharp, now SoniPlane uses FW_KENC.
    + Comper support.
    + ugly in-program menus changed to window menus.
    + most things use proper version controllers.
    + compression system overhaul.
    * optimizations, tweaks, etc.
    * a lot of bugs, also some new may be introduced.
    - ability to change framerate - deemed useless due to engine rewrite.
     
  16. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    I've tried to obtain the new version, but I am not sure where the downloader downloads to. I've checked everywhere...
     
  17. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    It should download to the folders relative to the folder it is in. Some files are inside folders, but the program will show the folders of the files are saved in. I suggest cleaning up the data for SoniPlane if you install on top of older versions. However you don't need to touch projects or aurosaves as they will be unaffected anyway.
    Btw I am not sure if new version can correctly display the project files due to slight tweaks. If not, open any missing project, and replace first line with this: "SoniPlaneProject: 1.0". I may make it automatically convert the projects in next minor release, like it already does conver newlines from "rn" to "n" (unfortunately it breaks on Notepad but then again it sucks anyway.)
     
  18. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Yeah, no dice. The downloader claims it's done it's job but there is nothing in the folder. =/
    Only way I could get the files for this was to get the URL from one of the .class files. >_>

    Edit: Either way, after testing this version, it seems to be improved upon a lot. Comper compressed files now load up every time, rather than just once like before. My only complaint is that the in-program option to create a new file always glitches up on me, forcing me to had make my project files. But that's no real big deal.
     
  19. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    Alright, I fixed up the downloader, seemed I had done some stupid changes that prevented files from saving. The link is updated.
    Also Hitaxes, I'll contact you via pm or IRC and get further details, and update SoniPlane fixing your issues and whatever else I may notice is off, soon.
     
  20. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    Update beta 1.0.1
    (* = fixed bug, + = added feature, - = removed feature)

    + Added ability to edit or delete projects from the project selection screen
    * update box appearing when not checking for updates
    * debug screens crashing
    * issues caused by editing certain files