Romhacking.net

Romhacking => Personal Projects => Topic started by: Revenant on March 29, 2013, 09:37:42 pm

Title: Kirby's Dream Course editor (version 1.13b)
Post by: Revenant on March 29, 2013, 09:37:42 pm
(still forever untitled)

Download v1.13b (Windows) (https://github.com/devinacker/kdceditor/releases/download/v1.13b/kdceditor-113b.rar)
Download v1.13 (OS X) (https://github.com/devinacker/kdceditor/releases/download/v1.13/kdceditor-113-osx.dmg)

Screenshot (from v1.10) (http://dl.dropbox.com/u/43107309/kdceditor-110.png)
Readme (http://dl.dropbox.com/u/43107309/kdc-docs/index.htm)
Source code (https://github.com/devinacker/kdceditor)

Sample course images (by Kles): 1 (http://dl.dropboxusercontent.com/u/43107309/carbowl1.png) 2 (http://dl.dropboxusercontent.com/u/43107309/carbowl2.png) 3 (http://dl.dropboxusercontent.com/u/43107309/carbowl3.png) 4 (http://dl.dropboxusercontent.com/u/43107309/carbowl4.png) 5 (http://dl.dropboxusercontent.com/u/43107309/carbowl5.png) 6 (http://dl.dropboxusercontent.com/u/43107309/carbowl6.png) 7 (http://dl.dropboxusercontent.com/u/43107309/carbowl7.png) 8 (http://dl.dropboxusercontent.com/u/43107309/carbowl8.png)

After documenting the level format and compression and stuff for this game back in January, I started working on this at the beginning of March. This is both a hacking project and a personal exercise in developing GUI apps (of which this is basically my first).

All level-editing capability is implemented, as well as background, palette, and music selection. US/EU ROM support is now in. Special Tee Shot support is still planned for some point in the future.

Bug reports/suggestions are still welcome (preferably via github).
Title: Re: Untitled Kirby's Dream Course editor
Post by: Auryn on March 29, 2013, 10:16:02 pm
Nice work :)
Title: Re: Untitled Kirby's Dream Course editor
Post by: Revenant on April 26, 2013, 05:53:44 pm
http://dl.dropboxusercontent.com/u/43107309/kirbything6.png

Finally taking some time to implement the 3D tilemap generation. Pretty tedious, but it's starting to look like it shouldn't take as much time as I was initially expecting.

(Forget about that "end of April" thing I said before, though, because I'm a lazy bastard  ;D)
Title: Re: Untitled Kirby's Dream Course editor
Post by: ChronoMoogle on April 26, 2013, 08:02:41 pm
Nice progress!
Special Tee shot support would be awesome! Satellaview hacking needs more love :)
Title: Re: Untitled Kirby's Dream Course editor
Post by: Revenant on April 26, 2013, 08:18:30 pm
I definitely plan to support STS when this is done, yeah.
Title: Re: Kirby's Dream Course editor (version 0.80b released, still untitled)
Post by: Revenant on June 01, 2013, 05:51:25 pm
Version 0.80b is out! Link is in the original post. Hopefully it's not too broken, but I'll be making fixes and improvements along the way. Play around with it and tell me what you think!
Title: Re: Kirby's Dream Course editor (version 0.80b released, still untitled)
Post by: ze10 on June 01, 2013, 11:36:43 pm
Cool! I've always loved Kirby's Dream Course!
Btw, I have a suggestion: in the future, you could make it so that the user of your tool could test their new stages by simulating shots. For instance, they would place Kirby somewhere in the level they are designing and adjust the shot parameters (the same ones as the ones you use to make Kirby move in the game) to see whether it's possible or not to beat the level. There could even be a feature to test whether it's possible to make a hole in one in the level.
I don't know how hard would it be to implement this. I imagine it wouldn't be extremely hard if you know the physics of the game.
Anyways, nice job with this! =)
Title: Re: Kirby's Dream Course editor (version 0.80b released, still untitled)
Post by: Revenant on June 02, 2013, 11:07:49 am
A shot simulator would be cool, but the problem is that there wouldn't really be a good way to simulate using abilities, especially ones like UFO or Tornado that basically let you move around freely. Testing holes-in-one would be even harder because you'd have to somehow simulate insane tricks like the one in this video (http://www.youtube.com/watch?v=JBn_3mU9yTE) :P

However, one thing I do plan to add for testing levels is a feature which will launch an emulator and go directly to the current level, which should make testing levels a lot easier without using the level select/debug patch or cheats.
Title: Re: Kirby's Dream Course editor (version 0.80b released, still untitled)
Post by: ze10 on June 03, 2013, 08:02:50 pm
Oh, I forgot about that boost you can do while rolling... yeah that complicates things. =(
Still, your emulator idea sounds pretty convenient! I love it! =D
Title: Re: Kirby's Dream Course editor (version 0.90 released, still untitled)
Post by: Revenant on June 15, 2013, 09:41:59 pm
Version 0.90 is released, link and details in the original post.

Changes:
Quote
v0.90 [2013-06-15]:
US/Europe ROM support
Updated compression routine to make saving levels about 3-4x faster
Editor now generates sprite clipping tables
    (this means Kirby won't appear to be on top of something when falling behind it anymore)
Added load/save course files option
Fixed "save level" menu item not doing anything
Added notice to readme about putting Kracko and Whispy Woods in same level
Editor now displays error when:
    - trying to save to a file that has been moved/deleted [thanks Kles]
    - saving a level whose 3D tile map becomes too large
Fixed bugs relating to opening/closing ROMs with headers
Handle possible corrupted ROMs a bit more gracefully
Fixed bug where west slope had the wrong tiles for the east border [thanks Kles]
Dedede's stage sprites/tiles now supported
Changed some music titles to match the snesmusic.org set
Bit of interface tweaks, mostly under the hood
Updated README.txt (real documentation still forthcoming)
Title: Re: Kirby's Dream Course editor (version 0.90 released, still untitled)
Post by: Mirby on June 16, 2013, 05:20:47 am
This is shaping up pretty nicely.

If you don't mind a name suggestion, how about "Dream It" or something. Cause you know, if you can dream it up, you can try using this to make it? And it's a play off the game's title?
Title: Re: Kirby's Dream Course editor (version 0.90 released, still untitled)
Post by: PhyChris on June 16, 2013, 07:35:16 pm
LOVE THIS GAME! Nice work, I always wanted something like this!

Title: Re: Kirby's Dream Course editor (version 0.90 released, still untitled)
Post by: ChronoMoogle on June 23, 2013, 07:37:10 pm
The project is almost finished and you also released the "HAL-code" (sounds way cooler than "HAL compression routine" ;P), so I decided that it would be nice to tell you the naked truth:

You are absolutely awesome sir!

Please keep it up  :thumbsup:
Title: Re: Kirby's Dream Course editor (version 0.95 released with shiny new sample levels)
Post by: Revenant on June 27, 2013, 11:26:12 pm
I'm going out of town for a while tomorrow, so I put this together in a hurry. Nonetheless, some important bug fixes and other stuff (including a brand new course for your playing pleasure.) I also made the help file prettier because I was bored at work today.

Quote
v0.95 [2013-06-27]
Added sample course "carbowl.kdc" [thanks Kles]
Replaced README.txt with HTML documentation
Added course select dialog
Added cut/copy/paste
Added various keyboard shortcuts
Added support for several unused rotating tile types
Added "keep" layer option to preserve existing layer assignment
Sprites are now displayed in preview window
Applying obstacle numbers 24/30/31/32/33 now adjusts for slopes
Fixed bug with selection area not being updated when changing levels or closing a ROM
Fixed bug with scrollbar size remaining when closing ROM
Fixed bug relating to layer 2 terrain drawing too many wall tiles when behind layer 1
Fixed background 3 not displaying correctly in US/EU ROMs [thanks DarkMatt]
Fixed missing tile for terrain 0x15
Fixed messed up south bumper for terrain 0x07
Setting terrain type 0x00 now fully removes other tile properties
Removed some menu items for a few still-unimplemented actions
Window positions/sizes and settings are saved on exit

Thanks for all your positive feedback so far :)
Title: Re: Kirby's Dream Course editor (version 0.96 released - just a bug fix before 1.00)
Post by: Revenant on July 06, 2013, 12:43:14 pm
Version 1.00 is almost ready, but I want to release a "small" bugfix that I would have posted a few days ago, if I had internet access :P Link is in the first post, as usual.

Quote
Fixed bug where a level being saved near the end of a ROM bank sometimes caused a bad pointer
    (i.e. sometimes a chunk of data would need to be moved to the beginning of the next bank
    when the current bank ran out of space, but the pointer to the data didn't reflect this
    because the pointer was written BEFORE moving to the next bank. oops...)
    [thanks DarkMatt for initially finding this]

Title: Re: Kirby's Dream Course editor (version 0.96 released - just a bug fix before 1.00)
Post by: ChronoMoogle on July 07, 2013, 02:49:57 pm
A version which supports Special Tee Shot will probably be 2.0, right?
Title: Re: Kirby's Dream Course editor (version 0.96 released - just a bug fix before 1.00)
Post by: Revenant on July 07, 2013, 03:10:24 pm
Something like that, yeah.

I actually did a bit of poking around with STS just to see how similar its level data/object numbers were to KDC's (and to see how screwed up they looked with KDC's graphics):
http://dl.dropboxusercontent.com/u/43107309/sts-1-1.png
http://dl.dropboxusercontent.com/u/43107309/sts-1-3.png
http://dl.dropboxusercontent.com/u/43107309/sts-3-3.png

(these are editor shots, not ingame ones. Pretty recognizable, right? :P)

Either way, it'll still be a while before I get around to adding "real" STS support, just because it does a lot of stuff differently under the hood and I'm a bit more interested in focusing on other things for a little while.

(also, apologies to anyone who was impacted by me forgetting to pay the hosting bill before going out of town last week)
Title: Re: Kirby's Dream Course editor (version 0.96 released - just a bug fix before 1.00)
Post by: Revenant on August 24, 2013, 10:32:49 pm
Just a quick "I'm not dead yet" post here. 1.0 is almost done, but not quite ready for prime time (especially since I want to release the source at the same time and it needs to be a bit less ugly first...) and a few things have been drawing my attention away for the past month or so. Here's the tentative changelog, anyway, mostly fixing things caused by my own sloppiness:

Quote
2D view displays an indicator for layer 2 tiles
Added support for bumpers on diagonal slope top/bottom tiles, and some 2-way slopes
Fixed several Gordo path types sometimes behaving like invisible Gordos (?! HAL...)
Fixed tiles for terrain 0x1A (slope northwest middle)
Fixed tiles for obstacle 0x37 (east conveyor sloping down)
Fixed east/west bumpers for north slope
Fixed north/west bumpers of north/west slopes next to a flat tile with no bumpers
Fixed tiles for adjacent rotating spaces
Reworked some other tile data to be less broken sometimes
Slopes on layer 1 next to terrain on layer 2 don't sometimes have messed up edges anymore
Window maximized state and level image path are saved on exit
More menu/toolbar actions are enabled/disabled when appropriate
Current file name is displayed in titlebar
Removed several unused icons
Prevent main window being closed while file save is in progress
Fixed small memory leaks

In the meantime, you can also look at these stupid levels I tried designing to provide a few more cool examples. These aren't really the best-designed things ever, but they're all HIO-able, and they're only meant to demonstrate the editor anyway :P

http://dl.dropboxusercontent.com/u/43107309/demoattempt1.png
http://dl.dropboxusercontent.com/u/43107309/demoattempt2.png
http://dl.dropboxusercontent.com/u/43107309/demoattempt3.png
http://dl.dropboxusercontent.com/u/43107309/demoattempt5.png
http://dl.dropboxusercontent.com/u/43107309/demoattempt6.png
Title: Re: Kirby\'s Dream Course editor (version 0.96 released - just a bug fix before 1.00)
Post by: Revenant on September 15, 2013, 06:12:25 pm
Consummatum est.

Quote
v1.00 [2013-09-15]
Released source under MIT license
Updated source and build to Qt 5
Added sample course "demo-6holes.kdc" [by Revenant]
Added sample course "KirbysRevCourseSampleSelects.kdc" [by DarkMatt]
2D view displays an indicator for layer 2 tiles
Added support for bumpers on diagonal slope top/bottom tiles, and some 2-way slopes
Fixed several Gordo path types sometimes behaving like invisible Gordos (?! HAL...)
Fixed tiles for terrain 0x1A (slope northwest middle)
Fixed tiles for obstacle 0x37 (east conveyor sloping down)
Fixed east/west bumpers for north slope
Fixed north/west bumpers of north/west slopes next to a flat tile with no bumpers
Fixed tiles for adjacent rotating spaces
Reworked some other tile data to be less broken sometimes
Slopes on layer 1 next to terrain on layer 2 don't sometimes have messed up edges anymore
Window maximized state and level image path are saved on exit
More menu/toolbar actions are enabled/disabled when appropriate
Current file name is displayed in titlebar
Removed several unused icons
Prevent main window being closed while file save is in progress
Fixed small memory leaks

Sorry about the larger download this time, I updated the build to Qt 5 at some point and didn't have the patience to build smaller binaries (it's a pain under Windows, believe me). Maybe next time.

September 15, 2013, 10:36:34 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Reuploaded with a missing Qt5 DLL intact. Sorry about that.
Title: Re: Kirby's Dream Course editor (version 1.00!)
Post by: ChronoMoogle on September 17, 2013, 04:20:10 am
Thanks a lot for finishing the Dream Course Editor!
If you can still find the motivation, please don't forget about good ol' Special Tee Shot...  :woot!:
Title: Re: Kirby's Dream Course editor (version 1.00!)
Post by: Revenant on December 18, 2013, 08:01:17 pm
https://github.com/devinacker/kdceditor/releases/download/v1.10b/kdceditor-110b.rar

Quote
v1.10b [2013-12-19]
Fixed corrupted demo-6holes.kdc

v1.10 [2013-12-18]
Updated compression code based on exhal v1.20
    (now several times faster again)
Added undo & redo commands/keys
Fixed a critical bug that caused the Windows build to save corrupted .kdc files
    (due to gcc changing the behavior of sizeof() w/r/t bit fields for some reason)
    [huge thanks to DarkMatt for finding this]

Note the Windows bug fix; this was something I thought I had fixed months ago but had slipped into the v1.00 build unnoticed. If you saved any .kdc files with v1.00 you'll need to save them again with v1.10, as they're almost guaranteed to be corrupt. (This bug had no effect on saving/loading data in the actual ROM.)

The rest is minor stuff I had added to the github repository about a month ago.
Title: Re: Kirby's Dream Course editor (version 1.11)
Post by: Revenant on January 13, 2014, 04:57:19 pm
https://github.com/devinacker/kdceditor/releases/download/v1.11/kdceditor-111.rar

Hot(?) on the heels of one file-related bug fix, here's another that potentially affected headered ROMs (though I generally don't recommend actually using headered ROMs; the editor only supports them as an afterthought :P)

Apart from that, just some under-the-hood changes. The 2D display probably looks better outside of Windows now.

Quote
Fixed possible data corruption when saving levels to headered ROMs
Heavily rewrote 2D map display (including better handling of font metrics)
Tweaked compression code again (just slightly faster, probably the last change)

Probably the last update for a while barring any more unfortunate bugs, since I'm focusing on something else (http://www.romhacking.net/forum/index.php/topic,13779.msg255129.html#msg255129) now...
Title: Re: Kirby's Dream Course editor (version 1.11)
Post by: ChronoMoogle on January 15, 2014, 08:40:40 pm
Thanks for keeping this updated with fixes! I was hoping to see Special Tee Shot integrated as well (because I would personally love to do a hack of that game) but at least Kirby got a fully working editor now. Thanks for the hard work!  :thumbsup:
Title: Re: Kirby's Dream Course editor (version 1.12)
Post by: Revenant on June 14, 2014, 03:44:50 am
Just another small update, 1.12 fixes some goofy display issues that the rewritten 2D display in 1.11 introduced. Links in the OP as usual.
Title: Re: Kirby's Dream Course editor (version 1.12)
Post by: SmarshBrooz on March 10, 2015, 12:47:45 am
I was so happy when I found this. :laugh:
Title: Re: Kirby's Dream Course editor (version 1.12)
Post by: SilokHawk on March 10, 2015, 11:04:53 pm
I quite literally just made an account so I could congratulate you on this! Haha
The editor is ridiculously easy to pick up on and I love the interface just in general.
I was wondering if you have any plans for this editor however (Such as a tile set editor; or other various tools you may find in editors similar to Lunar Magic). Whatever the case, thank you for such an awesome tool!
On a side note, I noticed kirby will have very weird depth influence with whispy; a lot of times when kirby is in front of him, the ball sprite will be displayed behind it rather than in front. I didn't notice this problem when playing the game vanilla; and unless I have a bad rom, I think it's something you should take a look at.  ;)
Title: Re: Kirby\'s Dream Course editor (version 1.12)
Post by: Revenant on March 11, 2015, 06:04:08 am
I did plan to at least add a palette editor at some point (or at least post info about the palette data somewhere, since it's currently buried in an old email thread from a year or more ago...) To be the most useful that'd probably require me to not be lazy and actually load graphics from the ROM instead of using premade ones, which is definitely doable (especially since they use the same compression that the editor already uses for basically everything else) but I dunno if it's a terribly high priority or not.

Also, as cool as a tileset editor would be, I really can't see it being very useful, just because of the massive amount of work it would take to do any substantial work with it; most of the terrain graphics consists of literally hundreds of nearly identical-looking 8x8 tiles representing more or less every possible terrain combination. (The editor actually has to turn the 2D course maps into 8x8 tilemaps itself, which was painstaking to set up, to say the least...)

The sprite depth issue sounds like something I may be able to fix; there's a hash table for each hole that the game uses to determine the Z-order of Kirby's sprite based on his position. I might have to tweak how the editor generates it somewhat if it's causing issues with other sprites, but hopefully it should be easy to do. If you can send me a course file where this happens easily, that should be helpful.

March 11, 2015, 06:30:56 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Also, hello to anyone who found out about this via Game Grumps, because that apparently happened (talk about a pleasant surprise...!)
Title: Re: Kirby\\\'s Dream Course editor (version 1.13)
Post by: Revenant on March 22, 2015, 06:36:35 pm
Hey, this has users now. Thanks, Game Grumps.

Quote
v1.13 [2015-03-22]
Much faster multithreaded saving
Added loading/saving of individual level files
Increased maximum tile height from 31 to 49 and max level width/length to 100
  (so you can waste more tile memory. Note that 2D and 3D map area limits are unchanged)
Some more build/deployment improvements for OS X (thanks ConnorRK)
Settings now saved in system-standard paths (%AppData%, etc.)
Fixed buggy repainting of 2D map when scrolling horizontally
Fixed possible bad graphics pointers when saving European ROMs

March 23, 2015, 06:23:07 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Just posted an OS X build as well (thanks ConnorRK). Let me know how it works, especially if you're a pre-10.9 user.

March 29, 2015, 04:27:28 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Updated again, this time with just a small fix for graphical problems that rarely occurred when placing some slopes next to raised-up slopes.