Page 1 of 1

Shark maps

Posted: Tue Dec 21, 2010 1:54 am
by davidb
Since the levels on the Electron version Firetrack are only really designed to stop the player from getting a clear shot at the pirates, I looked around for another game where editing the levels would have more of an effect on the gameplay. I've always liked Shark, so I went digging for the level data.

As with the Firetrack map information I uncovered, I'm really unlikely to do anything with this for the time being, so I've attached my notes here. Inspired by Cybershark's Hobgoblin level editor, I wanted to write a map editor to run on a real or emulated Electron, but I forgot how much I dislike 6502 machine code. ;-)

Maybe someone else will have more luck...

Re: Shark maps

Posted: Tue Dec 21, 2010 11:08 am
by Cybershark
Hahaha, thread title made me chuckle. I'm thinking "Yes, I do. What of it?" :lol:

But yeah, Shark was a really excellent game. Much more interesting than Green Beret! Although due to the manic - and totally random - enemy generation then the baddies were often so overwhelming you had to retreat a lot of the time!

However, in mapping terms then that random generation means level design would be very easy indeed 8)

davidb wrote:Inspired by Cybershark's Hobgoblin level editor, I wanted to write a map editor to run on a real or emulated Electron, but I forgot how much I dislike 6502 machine code. ;-)

Well, I wrote most of mine in BASIC. Not touched that for a day or two actually as there's still some enemy behaviour which I can't figure out - may be hardcoded. See above about mapping being easier when you don't have to worry about placing baddies :lol:


I'm very tempted to take a look into modding this!

Re: Shark maps

Posted: Wed Dec 22, 2010 12:01 am
by davidb
I thought I'd publish what I've managed to do so far. Here's the output of a simple Python tool to get the data out of the game's CODE file:

http://www.boddie.org.uk/david/Projects ... kMap/maps/

The Python script itself can be found here:

https://bitbucket.org/dboddie/sharkmap

There are also other bits and pieces, but nothing that really works very well. :)

Re: Shark maps

Posted: Tue Jan 04, 2011 9:16 pm
by Cybershark
Heh, I'd forgotten how small the levels actually are in Shark. It's all about the effort of progressing!

Nice level display routine there - I suspect this one may be easier to edit on an external platform as the game area does take up a much larger portion of the screen than does Hobgoblin. Also the sprite data is not as easy to use (for me at least).

Re: Shark maps

Posted: Thu Jan 06, 2011 5:15 pm
by davidb
I think it would be possible to do a simple level editor in BASIC and 6502 code, though with MoonMap I found it easier to have an external tool do the ASCII to map data conversion and regenerate a UEF file. With Shark, that's probably also possible because there aren't many kinds of map tile. Firetrack is a bit different - there are constraints on the way map data is encoded which would might make it quite easy to produce non-encodable levels.

Re: Shark maps

Posted: Mon Jan 10, 2011 1:00 am
by davidb
Well, I returned from holiday with the flu so, while off work, I thought I'd spend some time looking at the BASIC and 6502 code I'd already written.

If you want to play with this, you'll need to copy the CODE, LOADER and PATCH files from the Shark UEF file into the disc image. Then it should just be a matter of Shift-Break and off you go.

Keys:
Z X : / left, right, up, down
. , scroll level left, right
0-9 A-F set tile at the current position and set the current tile
Return set tile at the current position using the current tile
F1 F2 F3 select level 1, 2, 3
S save levels
L load levels
W wipe the current level

Have fun!

Re: Shark maps

Posted: Wed Jan 12, 2011 12:26 am
by Cybershark
Just had a little play with it and am rather impressed - although some of the structures you've created in your levels are very surreal!

Was having trouble finding the game files you mentioned ...until I remembered you'd said 'Electron'. Editor all works nicely but I guess I'm going to have to get myself an Elkulator now! That or merge the modified map data into the Beeb version :P

But yeah, very slick tool you have there. I love the speed of it and the way you can just switch between levels in the blink of an eye. Looks like you used the game code itself for the screen display? Nice touch, and it certainly saves time and memory!

Re: Shark maps

Posted: Wed Jan 12, 2011 1:09 am
by davidb
Cybershark wrote:Just had a little play with it and am rather impressed - although some of the structures you've created in your levels are very surreal!

I was in a rush to create them!

Cybershark wrote:Was having trouble finding the game files you mentioned ...until I remembered you'd said 'Electron'. Editor all works nicely but I guess I'm going to have to get myself an Elkulator now! That or merge the modified map data into the Beeb version :P

It looks like the BBC tape version stores the level data at the same offset into the SHARKMC file, so it should be possible to patch it in the same way as for the Electron version. The sprite data looks like it might be a bit different, though, so the editor won't display it properly. Of course, doing all this on an Electron (emulator) with PAGE at &E00 works just fine, but more messing about is required when using a BBC (emulator) with a higher PAGE.

The first level of the BBC version has some subtle differences to the Electron version, which I found mildly interesting.

Cybershark wrote:But yeah, very slick tool you have there. I love the speed of it and the way you can just switch between levels in the blink of an eye. Looks like you used the game code itself for the screen display? Nice touch, and it certainly saves time and memory!

Thanks! Actually, I wrote my own display routine, which was a nice way to remind myself why I never really got very far with 6502 back in the day. I think I probably won't feel the need to write 6502 code again for a while... :lol:

Re: Shark maps

Posted: Thu Jan 13, 2011 12:56 am
by davidb
I figured out the sprite format on the BBC version and modified the editor but the PAGE > &E00 on the BBC makes it impossible to use the editor. However, it is possible to use an Electron (emulator) to edit maps for use on the BBC. The attached disc image contains the modified editor, but no game files; you'll have to get those from the original disc.

Maybe someone with Beeb DFS mojo can do something to fix it up.

Re: Shark maps

Posted: Wed Jan 26, 2011 12:28 am
by Cybershark
I just used BeebEm in Master 128 mode :P
And thanks for making a BBC version too!

Cybershark wrote:The sprite data looks like it might be a bit different, though, so the editor won't display it properly.

Yeah, the Electron version has it all laid out quite plainly, now I see it. But that Beeb data just didn't seem to be in a friendly format to me.

Re: Shark maps

Posted: Wed Jan 26, 2011 1:01 am
by davidb
Cybershark wrote:I just used BeebEm in Master 128 mode :P
And thanks for making a BBC version too!

D'oh! I didn't think of that. Mind you, I don't have the Master ROMs for BeebEm, so maybe that's why. I hope you have fun with it!

Cybershark wrote:Yeah, the Electron version has it all laid out quite plainly, now I see it. But that Beeb data just didn't seem to be in a friendly format to me.

It appears to be stored in vertical strips, probably to make the scrolling routine simpler. I notice that the scrolling on the BBC version makes the game a lot harder in places.