Petscii Robots Modern Map Editor

Post here to find code monkeys, artists, musicians, and other help for your project.
Post Reply
sol1013
Posts: 4
Joined: Mon Apr 07, 2025 5:10 pm

Petscii Robots Modern Map Editor

Post by sol1013 »

I really like the game! As far as I know, there's only a map editor available for the PET version. I was a bit bored, so I ended up reverse-engineering the level structure to some extent and eventually managed to display the map using the attached Python script. It only requires PyQt5 as an external module.
I got the tiles from the Amiga version on GitHub, and the levels from the PET version (also from GitHub). The tiles (or all bitmaps needed) need to be placed in a folder named "tiles" in the same directory as the script. Before loading a level (map), rename it level.bin and set the tiles (after starting the script) to something that starts with "tiles". You can edit by choosing a tile on the right side, undo (Ctrl + z) is also possible.
That said, it's just a small script, and my knowledge of both the level file structure and Python Qt is pretty limited. For example, editing a map and saving the result currently corrupts the level. But maybe someone out there knows exactly what each byte in the level file does — and how to implement robots, objects, and everything else...
Attachments
screenshot.png
screenshot.png (3.1 MiB) Viewed 740 times
mapedit.py.zip
(5.17 KiB) Downloaded 45 times
User avatar
desertfish
Posts: 1127
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: Petscii Robots Modern Map Editor

Post by desertfish »

Nice, makes me wonder what David himself used to create the maps
sol1013
Posts: 4
Joined: Mon Apr 07, 2025 5:10 pm

Re: Petscii Robots Modern Map Editor

Post by sol1013 »

Thanks! As far as I know, he used the PET, and all the maps are from it.

Big update: I checked the PET code and found some useful information about the positions of the robots, doors, hidden items, etc., which are now displayed (though not too detailed). It’s still not a map editor by any means, but for now, it's a cheat map creator. :D
Attachments
Screenshot.png
Screenshot.png (2.04 MiB) Viewed 561 times
mapedit.py.zip
(5.99 KiB) Downloaded 32 times
sol1013
Posts: 4
Joined: Mon Apr 07, 2025 5:10 pm

Re: Petscii Robots Modern Map Editor

Post by sol1013 »

Okay, I’ve made some more changes and restructured the code.
I’ve also set up a GitHub repository here:

https://github.com/radi0sus/robots-mapedit

Any help or feedback is welcome!
sol1013
Posts: 4
Joined: Mon Apr 07, 2025 5:10 pm

Re: Petscii Robots Modern Map Editor

Post by sol1013 »

Big update: Map and unit editing are now possible (note the water raft and the extra robot in the first screenshot)! While there may still be bugs and the UI might need improvement (code is also not well-structured), feel free to give it a try if you're interested. Check the map data offsets (can be changed in constants.py), it might be different in your version.
Post Reply