LePlatz - Platz Level Editor

Topics on software tools like TileStudio, comments on documentation and tutorials (or the lack of) should go here.
User avatar
paul
Posts: 457
Joined: Sat May 02, 2009 8:41 am
Location: Brisbane, Australia

LePlatz - Platz Level Editor

Post by paul »

LePlatz v1.0

ImageImage


LePlatz is a level editor for the Platz toolset (supporting Platz v1.0). LePlatz eliminates the tedious task of converting images of your game world into textual data structures. LePlatz provides a gui with a set of tools corresponding to the logical structure of the format expected by the Platz toolset. You simply need to draw shapes on your game world canvas and LePlatz does the rest. More specifically LePlatz will:
  • Match and select the underlying tiles/patterns/animations
  • Configure mutable background bitmaps
  • Configure moving platform directories
  • Maintain valid background index ordering
  • Determine appropriate slice boundary collision parameters
  • Facilitate rearrangement of slice ordering
  • Validate game world structure
  • Compile game world for inclusion in C code
An image representing a Platz slice that would have taken 15 minutes or more can be completed with LePlatz in around 30 seconds. Moreover, changing your game world goes from "don't even think about it" to standard practice. The most recent version of B.C. Dash was created with LePlatz. See here for more information on the Platz toolset.

Currently there is a windows build and a Linux/X11 build. The linux build has been tested on Ubuntu 9.10 (Karmic) and Fedora 12. If you have trouble running it on some other distro, you can always download the code and build it. If any Mac users want to build and test a Mac version, I will add it to the download section.

B.C. Dash

There is an included example with the download: <install dir>/examples/bcdash/bcdash.xml. B.C. Dash was recreated with LePlatz and the LePlatz project file can be viewed as an example of how to achieve certain things. I have included all of the game's art resources and the Tile Studio file which you may use as you like. It is now *very* easy to make new Dashes. All you need to do is build the background images with the tiles, maps and animations provided and then process them in LePlatz. You can compile, build and test it with a few clicks.

The only changes required are that you included the final four slices of the original B.C. Dash game (for title/intro/utility) and change the following values in the Makefile:
  • -DSLICE_COUNT=53 // This should equal your new slice count (not counting the four required slices i.e. this is an offset to those slices)
  • -DSTART_Y=40 // This is the height from which the panther is dropped into the first slice. You need him outside any BGC bgs
Your Dash must also contain TRIG_CHECK0,1,2,3 bg triggers so that finish conditions can be met. After that, compile, build, play.

I should also note the following changes in the emulator if you wish to see emulator stdout from within LePlatz. They don't have any significant performance penalty as they are not run often:

Code: Select all

      char caption[128];
		sprintf(caption,"uzebox emulator v1.09 (ESC=quit, F1=help)  %02d.%03d Mhz",cycles/now/1000,(cycles/now)%1000);
		if (uzebox.fullscreen)
			puts(caption);
		else
			SDL_WM_SetCaption(caption, NULL);
+++		fflush(stderr);
+++		fflush(stdout);  

LePlatz download available here.

LePlatz code available here.

User documentation for LePlatz is available here.

LePlatz will see significant code refactoring shortly, so if you plan on making any changes, I'd hang out for a couple of weeks.

Edit:

Linux users who launch from console may see this warning:

"CRITICAL: atk_object_set_name: assertion `name != NULL' failed"

It appears to be a known bug for a number of programs running under Karmic. It doesn't seem to bother LePlatz despite outputting the warning from a library that LePlatz is using.
Last edited by paul on Sun Feb 14, 2010 6:26 am, edited 3 times in total.
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: LePlatz - Platz Level Editor

Post by D3thAdd3r »

Wow, this is really impressive stuff. Platz is a serious asset to the future of Uzebox games and now it's even better. :D Very nice work Paul.
User avatar
paul
Posts: 457
Joined: Sat May 02, 2009 8:41 am
Location: Brisbane, Australia

Re: LePlatz - Platz Level Editor

Post by paul »

Thanks, Lee! Slowly it is evolving into a more newbie-friendly tool, hopefully without losing any flexibility.

I have updated the User Docs with controls and shortcut keys for LePlatz.
User avatar
Jhysaun
Posts: 214
Joined: Tue Nov 04, 2008 12:32 am

Re: LePlatz - Platz Level Editor

Post by Jhysaun »

DAMN. I just downloaded this and it's pretty intense.



Great Work


>J
Lerc wrote:I intend to use my powerful skills of procrastination to ensure that when I get to making things, the chips will be available.
User avatar
uze6666
Site Admin
Posts: 4821
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: LePlatz - Platz Level Editor

Post by uze6666 »

Wow, that's gonna make it a piece of cake now to use Platz, I'm looking to get some time to play with it. And I can see you've attempted to map a level of a game I intended to remake... :D

-Uze
User avatar
paul
Posts: 457
Joined: Sat May 02, 2009 8:41 am
Location: Brisbane, Australia

Re: LePlatz - Platz Level Editor

Post by paul »

@ Charlie

Thanks, mate! I seemed to get much better performance in Windows when zooming the canvas in and scrolling quickly. I'm not sure if that's a Qt thing or whether my drivers weren't setup properly or exactly why that was the case. Maybe some of you Linux guys can let me know how it goes for you.

@ Uze

Yeah, I only used that smb level to muck around with and see how quick it could be done. I found a site that had all the levels mapped out so it was really quick to import them and play around (let me know if you need them - I can't recall the site's URL). I think you will need the '1284 to really do smb right. You could go close with the current chip, but not quite. As far as Platz goes, the smb levels are extremely simple so they will be very cheap. Unfortunately you will probably not be able to use blue_knights' DDRC trick for the darkened tiles as the other parts of the level and characters are not shaded differently.
User avatar
Jhysaun
Posts: 214
Joined: Tue Nov 04, 2008 12:32 am

Re: LePlatz - Platz Level Editor

Post by Jhysaun »

@ Charlie

Thanks, mate! I seemed to get much better performance in Windows when zooming the canvas in and scrolling quickly. I'm not sure if that's a Qt thing or whether my drivers weren't setup properly or exactly why that was the case. Maybe some of you Linux guys can let me know how it goes for you.

Heres a screenshot of system performance while running LePlatz. The large spikes were made when I was scrolling around and zooming in and out.

>J
Attachments
Screenshot-1.png
Screenshot-1.png (346.68 KiB) Viewed 14424 times
Lerc wrote:I intend to use my powerful skills of procrastination to ensure that when I get to making things, the chips will be available.
User avatar
paul
Posts: 457
Joined: Sat May 02, 2009 8:41 am
Location: Brisbane, Australia

Re: LePlatz - Platz Level Editor

Post by paul »

Hmm, seems similar to my linux experience - very high cpu usage which sometimes results in pretty jerky movement. Strangely, on a 7 year old computer running XP I get good performance and on my current PC (same one as the linux one) booting into XP it's very smooth.

I might also have to find a way to get a native fill color for the unzoomed background area - that Windows button color looks out of place with your theme.
User avatar
paul
Posts: 457
Joined: Sat May 02, 2009 8:41 am
Location: Brisbane, Australia

Re: LePlatz - Platz Level Editor

Post by paul »

hey guys,

If you're using LePlatz for development you should note a few bugs that could hamper your efforts:

- Slice sizes other than 256x200 are not supported well. This is an embarrassing one where hard-coded values in the project loading code from very early development were left unchanged.
- Reordering source code defines that are used by LePlatz can corrupt your project files (by corrupt I just mean that some of your data is lost/set incorrectly). LePlatz stores defines as indexes, in order to dynamically updates name changes, but this has bad implications in the far more common case of removing/reordering defines. A search/replace tool will facilitate name changes in future.

These bugs are fixed in the dev branch code. I'll release a binary patch relatively soon with these and other fixes/enhancements. All existing LePlatz project files will remain compatible with the newer version and will automatically update to the new format upon being saved.
User avatar
paul
Posts: 457
Joined: Sat May 02, 2009 8:41 am
Location: Brisbane, Australia

Re: LePlatz - Platz Level Editor

Post by paul »

LePlatz v1.1 is now available here.

The new version fixes those bugs mentioned in the above post and adds support for Video Mode 2 to coincide with similar support in Platz v1.1. There's a B.C. Dash mode 2 demo in the examples directory.

From v1.1 onwards LePlatz updates will be distributed via the 'Check for updates...' menu option.

Image

If a new version is available, after selecting 'Check for updates...', the new version will be downloaded and can be installed at your leisure. The exclamation icon should alert you to downloaded updates that require installation.

Image

Pressing this will launch LePatch which will in turn re-launch LePlatz after a successful update.

Image

An unsuccessful update will restore the previous version. If you have problems with an update, please post your patchLog.txt file here. All code is available under the source tab of the googlecode site linked above. Rogue update scripts are limited to operating within the LePlatz working directory (provided LePatch is not relocated). I certainly don't intend on creating any malicious update scripts, but I think it's worth mentioning. The update process will update you from any previous version to the latest version.

There are a couple of upgrade options (as LePlatz v1.0 cannot take advantage of the update tools).

a. Delete your previous LePlatz installation and download v1.1.
b. Download the 1.0-1.1 patch that matches your system and unzip it in top level directory of your current LePlatz installation (i.e. such that LePatch and the updates are at the same level as the LePlatz application). Then run LePatch (LePatch will be invoked by LePlatz in all cases but this initial one).

Placing the patch in the LePlatz folder and executing this should handle the extraction in Linux:

gunzip -c LePlatz-patch-linux-x11-1.0-1.1.tar.gz | tar xopf -

Sorry about the Linux patch being so big - I wanted to link statically so that I could hopefully accommodate more distros, so the LePatch app got big. It's not a huge download in any case and will only be this once.

Oh, and I added a canvas background color option so Jhysaun didn't have to look at the ugly windows button color ;)

Here's the change log for completeness:

Code: Select all

LePlatz 1.1
- Fixed rare segfault when drawing items.
- Added update tool to easily distribute future versions.
- Added LePatch tool to patch downloaded updates.
- All valid slice sizes now supported.
- Slice canvas background color configurable through "Edit->Canvas Bg Color" menu.
- Compatible with v1.0 and v1.1 project files. v1.0 files will be converted to v1.1 files upon saving.
- Added find/replace dialog. This tool allows you to update previously set
  triggers/platform clear tiles/mutable classes/mutable bgs (src code defines) that
  may have changed their name in your code. v1.0 stored these as indexes into the source
  code defines, but this caused problems when defines were removed or reordered. The new
  LePlatz project file format stores the defines as strings and so it not affected by updates
  in the source code. However, name changes can be easily filtered throughout your LePlatz
  world through the use of this tool in the "Edit->Find/Replace..." menu.
- Added bg ordering tool to restore order for previously locked slices.
- Fixed an instance where you could not drop a tile onto an appropriate Inner bg to replace its
  tile index.
- Added support for Mutable Bg Classes (see Platz v1.1 for details).
- Added support for video mode 2.
- Added mode 2 example project.
- Numerous UI tweaks
- Removed need for SliceSize setting due to changes in Platz v1.1 collision handling.
- JPEG no longer an image format option.
- TileStudio sample now contains correct relative path to tiles.png.
I've started on the Platz v1.1 documentation and will update the Platz thread when it is complete.
Post Reply