don't click here

Making a James Pond 3 level editor

Discussion in 'Engineering & Reverse Engineering' started by saxman, Sep 6, 2023.

  1. saxman

    saxman

    Oldbie Tech Member
    Chedditor v0.50 Alpha (Demo 1):
    https://www.romhacking.net/utilities/1806/

    Quick video tutorial on making a level with Chedditor:
    https://rumble.com/v4cwdfc-build-a-quick-james-pond-3-level-from-start-to-finish-sega-genesis.html

    New level created with the editor:
    https://www.romhacking.net/hacks/8391/

    Kid Chameleon level conversion to James Pond 3:
    https://www.romhacking.net/hacks/8460/

    Lost levels:
    https://www.romhacking.net/hacks/8234/

    Hacking notes (very old... new version coming soon):
    https://www.romhacking.net/documents/529/

    PondPacker data cruncher/decruncher for JP3:
    https://www.romhacking.net/utilities/1807/


    ~~~~~~~~~~~~~~~~~~~~
    Original post...

    Way back in 2010, I released a bunch of James Pond 3 hacking notes I wrote, along with an open-source level viewer called "CHEESE!". (Check out Romhacking.net for these downloads.) My hope was that someone who loved the game as much as I did would take interest in what I put together and would take it a step further to actually create a level editor for the game. It's now 2023, and there's *still* no level editor for James Pond 3.

    You may also be aware of a level editor I created for Sonic 2 HD around the same time that I adapted into an unreleased level editor for the Sonic 2 disassembly called "Zone Builder". The framework I created to make the level editor is called "FLOW".

    I've had the FLOW source code sitting around for a while now, and I decided to adapt it to work with James Pond 3. It's very early yet, so it can't do much. But I got the darn thing running, and so far the results look promising. Assuming time permits, I hope to adapt the entirety of FLOW to work with the game. Some function rewrites are required since JP3 doesn't use one standard chunk size unlike all the Sonic games.

    Anyway, I'll continue to update this thread as I get more of it working. In the meantime, here's a couple screenshots of the chunk editor:


    JP3_01.png

    JP3_02.png
     
    Last edited: Feb 23, 2024
  2. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,411
    1,051
    93
    Long-term happiness
    It looks good! I've vague interest in maybe using this down the line depending on how insane the levels are to edit but do not have anywhere near the skill to pull the coding off. I've owned Pond 3 since the late 90s.
     
  3. saxman

    saxman

    Oldbie Tech Member
    Here's the level editor portion of the program so far. Very buggy at the moment, but you can at least see the layout!

    JP3_03.png

    JP3_04.png
     
  4. saxman

    saxman

    Oldbie Tech Member
    I can now select tiles and move them around (currently X axis only). The hard part has been making this work with FLOW's zooming functionality, but I managed to make everything work as intended.

    Tasks currently on my to-do list:
    * Insertion and deletion of tiles.
    * Changing the selected tile.
    * Moving tiles across the Y axis (a bit more involved due to how the layout is formatted in JP3).
    * Moving selected tile in front or behind other tiles.
    * Choosing between multiple tiles under the mouse cursor for selection.

    JP3_05.png
     
  5. saxman

    saxman

    Oldbie Tech Member
    I have been successful in implementing everything on my to-do list from the previous post. It is now possible to completely recreate the landscape of any map in the game. Though there's much more to a map than the landscape, this could be argued to be the "identity" of a level. So I think it's a good solid foundation on which to do other work on this tool.

    I'm thinking next of getting the in-level chunk editor working. The code is already there, but like everything else, it was designed for a Sonic game. So rewriting some of that code will be necessary.

    Anyway, I'm attaching two screenshots. The first one shows me creating new stuff in an existing map. The second one is just an interesting thing I found where it looks like the level designer redid a portion of the map, moved the old portion out into the middle of nowhere, and just never removed it.


    JP3_06.png


    (Thumbnail: click to enlarge)
    JP3_07.png
     
  6. Bobblen

    Bobblen

    Member
    428
    216
    43
    Always nice to see new games get the full level editor treatment. Means you can find out all the secret bits you missed back in the day, including the always interesting out of bounds stuff. Nice work!
     
    • Like Like x 1
    • Agree Agree x 1
    • List
  7. saxman

    saxman

    Oldbie Tech Member
    Several things have happened since my last post:

    * Chunk editing now possible from the level editor itself.
    * You can now enable the background in the level editor to make the level appear as it would in-game.
    * Collectable-type objects are now visible (e.g. umbrella, dynamite, health, etc).

    On another note, I don't always pick the best names for things I create. Currently, I'm using the name "Fi5hy" as a placeholder. But I'm not totally sold on that name. I'd like to ask for suggestions. Keep in mind that I envision the tool being able to modify levels, chunk mappings, block mappings, art tiles, palettes, and maybe some other random things too. But it will perhaps primarily be a level editor.

    Here's the latest screenshots I have:

    JP3_08.png

    JP3_09.png
     
  8. Chimes

    Chimes

    The One SSG-EG Maniac Member
    871
    603
    93
    Why not Fish 'n Chips?
     
  9. Bobblen

    Bobblen

    Member
    428
    216
    43
    Pond Renovator? (sorry)
     
  10. saxman

    saxman

    Oldbie Tech Member
    Regarding the name, I'm actually leaning towards "Moonscape", since the game takes place on the moon and it's a level editor. But we'll see. I'm still open about the whole name thing.

    As for changes, a couple things have happened:

    * Show and edit map screen markers
    * Show player start position on maps (with animation!)
    * Edit background map (could only view it previously)
    * Switch levels while running the program

    The map markers were a bit of a pain to implement, which surprised me a bit. But you can now move them wherever you want, change what levels connect to what other levels, change the marker types (normal, secret, secret fork, and tunnel), and rename the levels. The level names used on the map screen also apply to the levels themselves.

    I've included a bonus screenshot of an unused tunnel map marker for "The Forgotten Zone". It leads to "Blue Moon Dunes". Makes you wonder what they were originally planning for that tunnel marker. Anyway, the marker is completely disconnected, but the X/Y offset and it's destination map remains, so it shows up in the editor.

    I wanted to have more object graphics drawn by this point, but the map markers took way longer than anticipated. That said, I did get the player position visible with an animated James Pond just as he is in the game.

    Nothing else too exciting. I plan to make more object graphics available in the editor, as well as support for adding/removing/changing those objects. I also want to allow the level headers to be modified, although I have begun to realize that it'll first require writing out the game's data to the file system as the most practical way to support everything handled by the header (e.g. palette and background map numbers, which are "global" and can be shared across multiple levels). And finally, I want to allow maps from the Amiga and SNES ports to be imported (like I did in this video from 13 years ago).

    Here are my latest screen shots:

    JP3_10.png

    JP3_11.png

    JP3_12.png
     
  11. Glitch

    Glitch

    Tech Member
    176
    13
    18
    Seeing those graphics again is pushing my nostalgia buttons. I never knew there was a SNES port Keep up the great work!
     
  12. saxman

    saxman

    Oldbie Tech Member
    Thanks!

    Yeah, I actually thought it was a Genesis-exclusive title when I was a kid. And actually, just within the past week or two, I was reading this review of the SNES version which I thought was pretty humorous.

    For what it's worth, for whatever reason, the maps in the SNES version have all been modified to make them smaller and less complex. SNES maps can be ported to the Genesis and Amiga versions via simple copy/paste, but you *cannot* do the reverse. So it seems to me that some required data to make the original maps work properly just isn't present in the SNES version. The system has more RAM, so I have a hard time believing that would be an issue. Does the slower processor have something to do with it? I'm not sure.

    It'd be nice to be able to make SNES-compatible maps outright, but I'm not sure what that requires.
     
  13. saxman

    saxman

    Oldbie Tech Member
    As of today:

    * Display and modify "interactive" blocks (i.e. prize blocks, switches, etc.)
    * Modify pickup/collectable objects (i.e. umbrella, fruit gun, teacup, extra life, etc.)

    The first bullet in particular has been quite time consuming. But I feel now the level editor is getting closer to a state where I could potentially put out a public demo containing useful but limited functionality. The target release I'm thinking of is sometime in December, although that's subject to change. There are still some additional little things I'd like to add first, but I now think it actually supersedes the 'CHEESE!' program from 2010 in terms of what it is capable of showing.

    Some of the screen shots I've picked are specifically tailored to those who like secrets hidden inside of games...


    1) Here's The Chunnel with all the pickup/collectable and "interactive" blocks showing, along with their prizes. I know earlier screenshots showed moons, but don't be fooled -- they are used as both chunks AND objects (even single moons by themselves, which I have absolutely NO clue why that is).
    JP3_14.png


    2) Here's what looks like a J.A.W.S. ID card, which as far as I know, is never used in any levels. In fact, nothing seems to happen when you collect it, so it seems like functionality for it was never implemented.
    JP3_13.png


    3) This actually IS used, but it's rare. And odd. The level pictured uses this block many times. It's a question-mark instead of an exclamation-point. And unlike the exclamation blocks, there is only a SINGLE definition in the game using the question block. That defined block provides a limitless supply of fruit guns, unlike the other blocks which only give you one.
    JP3_15.png


    4) I wasn't sure if I was going to bother with this screenshot, because the editor doesn't display it correctly (but then, neither does the game due to an incorrect sprite mapping). This is a 32x32 question block. It reminds me of the 32x32 blocks in Robocod, except these are circles, and although they have definitions in place, they go completely unused. If you want to see them in action, look at this video I created years ago. The defined prizes are 3-moon drop, 5-moon drop, all the fruit suits, fruit gun, and I think a switch. But it seems clear to me the main driver of this block was those fruit suits since they are much bigger than the normal 16x16 blocks. But in the end, they decided to use those suits as regular objects in the game.
    JP3_16.png


    Other interesting items not pictured above:

    There's a plain orange block that doesn't get used. The graphics actually get swapped for an animated block (four frames: !, !-empty, ?, ?-empty). Two definitions exist for it: random health pickup, and random points pickup.

    There's a "gum" object. Like the J.A.W.S. ID card, you can collect it, but it doesn't seem to have any functionality. Likewise, it goes unused.
     
    Last edited: Oct 22, 2023
    • Informative Informative x 1
    • List
  14. saxman

    saxman

    Oldbie Tech Member
    I've been organizing data into project files in an attempt to remove a hard dependency on the ROM, and to also allow cohesion with the Amiga AGA ports. Since the AGA version has individual files, I figure it only makes sense to focus around it.

    What's been interesting about this is the discovery of "LOST LEVELS" in the AGA version. The AGA version also includes many of the same backgrounds (which are also created as maps in their own right, by the way), even though the AGA version doesn't actually display them. And if that wasn't enough, the AGA version references two background maps that aren't included. Also with some levels, there are alternate unused versions that have small modifications. So it seems the AGA version didn't really get cleaned up properly.

    Today, I'm going to share the two lost levels with you. These are NOT referenced anywhere in the game, nor does any other map resemble them, nor do they exist in the Genesis version. So they are truly unique!


    SLIMEP06.LVL
    JP3_17.png

    JP3_18.png


    SCAVEJ02.LVL
    JP3_19.png

    JP3_20.png


    And finally, here's a screenshot of three project files to give you a flavor of how I'm organizing data. One is for the game as a whole (the "master" project file). Another one is for a single level. And another one is for a single theme.
    JP3_21.png


    And that's it for now. Still aiming for a December demo, assuming time permits.
     
    • Like Like x 2
    • Informative Informative x 2
    • List
  15. saxman

    saxman

    Oldbie Tech Member
    I'm attaching a ROM hack. This isn't directly related to the level editor, but it felt appropriate to be here since I discussed the content above.

    This is James Pond 3: Lost Levels! It's the same two levels above. Although the maps don't exist in the Genesis ROM, there's some leftover "special function" data, which describes what should happen in a map when a switch is activated. This data lines up perfectly with SLIMEP06 and allows that map to be played in full. And what level is the special function data assigned? Lair of the Mush-Beast! So that suggests that SLIMEP06 was replaced with the mushroom boss battle.

    More details provided in the "Readme.txt" file included in the ZIP file. You'll need an IPS patcher for this. This was supposed to appear on Romhacking.net, but the submission got rejected for some reason, so I'll have to look into that. But in the meantime, it's here.

    JP3_Lost.png JP3_Lost_2.png
     

    Attached Files:

    Last edited: Nov 17, 2023
  16. Bobblen

    Bobblen

    Member
    428
    216
    43
    Wow, that's great detective work, well done.
     
  17. saxman

    saxman

    Oldbie Tech Member
    I haven't had as much free time as I'd like lately. However, I am still making progress little by little.

    It dawned on me that my editor doesn't have a way to compress (or "crunch", to use common PowerPacker terminology) data. That is vital, and I had difficulty finding free-to-use source code online that was in C that could crunch the data.

    So I decided to write my own. The result is a utility called Pond Packer, which is specifically designed for James Pond 3 data (so don't try to use it on standard PowerPacker 2.0 files; it won't work). The tool can both crunch and decrunch data in the specific variation of the PP20 format that JP3 uses. It will work for both the Sega Genesis and Amiga AGA versions of the game, though the Genesis version will require you to copy data into stand-alone files. I am attaching the utility here. I am actually *not* expecting anyone to use it, because it's made for those who wish to get hands-on with the data with the aid of my old hacking notes (which really should be updated now given I have so much more information now than I did 13 years ago). But if by chance you do make use of it, I'd love to hear about it and get any feedback you may have to offer.

    PondPacker.png

    The next step is to take the relevant code I've written into Pond Packer and use it in the level editor. I am a little behind where I'd like to be at the moment, so I might miss my desired December target for a public demo. But that's the way it goes sometimes. I haven't ruled it out yet, but January may be more realistic.
     

    Attached Files:

  18. saxman

    saxman

    Oldbie Tech Member
    Renaming "Fi5hy":
    I'm having difficulty with the name. Here are some of my top picks. It's really just variations of five names. And I might not even pick any of these.

    If *you* had to pick one of these, which one would you prefer?

    1a - Moonscape
    1b - Moonscaper

    2a - Cheescape
    2b - Chee-Scape
    2c - Cheesescape
    2d - Cheese-Scape

    3a - Cheditor
    3b - ChEditor
    3c - Chedditor
    3d - ChEdditor

    4a - Gratewhey
    4b - Gratewhey 2000
    4c - Grate Whey 2 Edit

    5a - Stargrate JP-3

    Any other suggested names? I tried to be punny with some of them by incorporate words like "whey", "grate", and any number of other cheese-related words. I've not been able to come up with many names I actually liked. So if you have one, feel free to suggest it.


    Pond Packer v1.01:
    Also for anyone who cares, I have Pond Packer on Romhacking.net now: Romhacking.net - Utilities - Pond Packer. Version 1.01 is currently available there which fixes two bugs from the previous version. But after I made that release, I discovered yet *another* bug which will cause corrupt crunched files if the resulting crunch bit count is evenly divisible by 32. I have a fix, but it'll have to wait until version 1.02 or whatever comes next.


    Level Editor:
    My self-written cruncher code is now integrated into the level editor and works as expected. I am working on the project load/save/generate functions again and will be using the new code there. Once all that stuff is done, then a public release will become possible.


    Lost Levels video:
    Finally, I made a video on the "James Pond 3: Lost Levels!" hack I did several weeks ago. I've made a number of JP3 videos in the past on one of my old YouTube accounts (ymtx81z). I just felt like another one needed to be made. So anyway, here that is: https://rumble.com/v3zo3gt-james-pond-3-lost-levels.html.
     
    Last edited: Dec 9, 2023
  19. Chimes

    Chimes

    The One SSG-EG Maniac Member
    871
    603
    93
    Roquepond
     
  20. Glitch

    Glitch

    Tech Member
    176
    13
    18
    I was sold on "Moonscape" until I got to "Chedditor"...
    That's genius :thumbsup: