Firetrack maps

reminisce about bbc micro & electron games like chuckie egg, repton, elite & exileRelated forum: adventures


Post Reply
User avatar
davidb
Posts: 2338
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Firetrack maps

Post by davidb » Tue Dec 21, 2010 1:47 am

Recently, I got back into playing the Electron version of Firetrack. Although not as fully featured as the BBC version, it's still very impressive the way it all comes together. The smooth vertical scrolling is described on Wikipedia's page on the Acorn Electron:

http://en.wikipedia.org/wiki/Acorn_Elec ... _scrolling

The information about this technique originally came from Thomas Harte.

Anyway, I wanted to see how the map data was stored with the idea of writing a quick tool to generate new levels, but I don't have the time right now, so I've attached an almost certainly incomplete description of the level data. Maybe the BBC version uses a similar scheme. Perhaps someone will be inspired to do something with it...
Attachments
FiretrackMap.zip
Electron Firetrack map information
(2.46 KiB) Downloaded 324 times

User avatar
Cybershark
Posts: 401
Joined: Wed Jun 14, 2006 10:16 pm
Contact:

Re: Firetrack maps

Post by Cybershark » Tue Dec 21, 2010 11:01 am

Nice work there!

From my recent digging around in Hobgoblin then I know that this stuff is not easy to piece together ;)

User avatar
tautology
Posts: 372
Joined: Wed Sep 01, 2010 2:26 pm
Contact:

Re: Firetrack maps

Post by tautology » Tue Dec 21, 2010 12:05 pm

We should probably centralise this stuff somewhere for people who actually want to do something with the information. I put my Repton Infinity notes on the Reverse Engineering Wiki; just so that they'd be out there.

Samwise should we place this stuff on the retrosoftware wiki as extra information?

User avatar
Samwise
Site Admin
Posts: 1823
Joined: Mon Mar 14, 2005 9:13 pm
Contact:

Re: Firetrack maps

Post by Samwise » Thu Dec 23, 2010 11:22 pm

That's a damned good idea. We already have some game disassemblies linked off the Useful Docs page, so I'm wondering if it might be a good idea to extend that to include reverse engineering notes. It certainly doesn't hurt to have the information documented in both places and, as both sites are based around MediaWiki, it just needs the source for the article cutting and pasting from one to the other. Hurrah!

I'm currently without easy access to a PC over Xmas (long story, involving getting a bride in crisis from one side of the country to the other), but if you wanted to just cut and paste your notes into an article at Retro Software and link to it from the Useful Docs page, that'd be great. If you haven't got round to it by the new year, I should be able to do it when I get back down south.

Sam.

User avatar
tautology
Posts: 372
Joined: Wed Sep 01, 2010 2:26 pm
Contact:

Re: Firetrack maps

Post by tautology » Fri Dec 24, 2010 1:10 am

I've added the section. I can easily add the formats for Firetrack, Shark and Hobgoblin if davidb and cybershark give me permission.

Though I won't have much computer time after lunchtime tomorrow (holidays and my office being stolen to let people crash in - bah)!

User avatar
Cybershark
Posts: 401
Joined: Wed Jun 14, 2006 10:16 pm
Contact:

Re: Firetrack maps

Post by Cybershark » Tue Jan 04, 2011 9:22 pm

Oh yeah, you can stick anything I reveal up on there too. I'll have to get around to making a proper presentation of everything I've figured out so far :)

The problem with Hobgoblin is not the map data, but the way the enemy data is stored - I'm still scratching my head over some of that. But hey, on the plus side then I did go take a trip back to Hobgoblin II! For some reason I was originally convinced that was much harder to interpret, but after looking at it again recently I've been able to use an (only slightly modified) version of my level editor to work with that too. The enemy trickery remains a constant though #-o

User avatar
tautology
Posts: 372
Joined: Wed Sep 01, 2010 2:26 pm
Contact:

Re: Firetrack maps

Post by tautology » Tue Jan 04, 2011 9:41 pm

Cybershark wrote:The problem with Hobgoblin is not the map data, but the way the enemy data is stored - I'm still scratching my head over some of that. But hey, on the plus side then I did go take a trip back to Hobgoblin II! For some reason I was originally convinced that was much harder to interpret, but after looking at it again recently I've been able to use an (only slightly modified) version of my level editor to work with that too. The enemy trickery remains a constant though #-o
Drop some pointers and some of the rest of us can take a look. (I'm perverse - I enjoy reverse engineering stuff.)

I do remember spending hours playing hobgoblin on my Elk back in the day... Hmm maybe I should download it for old time's sake...

User avatar
davidb
Posts: 2338
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Firetrack maps

Post by davidb » Thu Jan 06, 2011 5:10 pm

tautology wrote:I've added the section. I can easily add the formats for Firetrack, Shark and Hobgoblin if davidb and cybershark give me permission.
You have my permission. Go for it! :D

User avatar
davidb
Posts: 2338
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Firetrack maps

Post by davidb » Thu Jun 27, 2013 9:51 pm

I'm reviving this thread because I figured out how the tile sprites are stored. As a result, I've uploaded my code to a repository and attached a screenshot of an editing tool which is really only good for browsing at the moment.
Attachments
2013-06-27-editor-scaled.png
The first level in its decoded form.
2013-06-27-editor-scaled.png (18.74 KiB) Viewed 1711 times

User avatar
tricky
Posts: 3283
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Firetrack maps

Post by tricky » Sat Dec 13, 2014 12:53 pm

Hi David,
I said I didn't have much luck with python!

pEditors\dboddie-firetrackmaps-13e10b20e987>Tools\editor.py Firetrack.uef
(most recent call last):
\DATA\MapEditors\dboddie-firetrackmaps-13e10b20e987\Tools\editor.py", line 27, in <module>
UEFfile
r: No module named UEFfile

Am I missing some files?

dboddie-firetrackmaps-13e10b20e987>dir /s/b
dboddie-firetrackmaps-13e10b20e987\.hg_archival.txt
dboddie-firetrackmaps-13e10b20e987\Documents
dboddie-firetrackmaps-13e10b20e987\Firetrack
dboddie-firetrackmaps-13e10b20e987\Firetrack_E.txt
dboddie-firetrackmaps-13e10b20e987\Firetrack_E.uef
dboddie-firetrackmaps-13e10b20e987\README.txt
dboddie-firetrackmaps-13e10b20e987\Tools
dboddie-firetrackmaps-13e10b20e987\Documents\notes.txt
dboddie-firetrackmaps-13e10b20e987\Firetrack\maps.py
dboddie-firetrackmaps-13e10b20e987\Firetrack\sprites.py
dboddie-firetrackmaps-13e10b20e987\Firetrack\__init__.py
dboddie-firetrackmaps-13e10b20e987\Tools\editor.py
dboddie-firetrackmaps-13e10b20e987\Tools\readmaps.py
dboddie-firetrackmaps-13e10b20e987\Tools\read_sprites.py

I also tried the Reverse Engineering Wiki, but the site doesn't seem to work with Chrome or IE. This error appears many times and then a few others:

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/mdrueing/public_html/rewiki.regengedanken.de/htdocs/w/includes/MagicWord.php on line 739

User avatar
davidb
Posts: 2338
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Firetrack maps

Post by davidb » Sat Dec 13, 2014 1:21 pm

Sorry about that. The UEFfile wasn't included in there because it's common to lots of projects of mine, but there's no obvious place to get it so I've added it to the repository now. :)

User avatar
tricky
Posts: 3283
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Firetrack maps

Post by tricky » Sat Dec 13, 2014 1:31 pm

Sorry, my luck isn't getting any better:

C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c>Tools\editor.py Firetrack_E.uef
Traceback (most recent call last):
File "C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Tools\editor.py", line 28, in <module>
from Firetrack import Firetrack
ImportError: No module named Firetrack

C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c>dir /s/b
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\.hg_archival.txt
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\COPYING
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Documents
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Firetrack
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Firetrack_E.txt
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Firetrack_E.uef
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\README.txt
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Tools
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Documents\notes.txt
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Firetrack\maps.py
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Firetrack\sprites.py
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Firetrack\__init__.py
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Tools\editor.py
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Tools\readmaps.py
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Tools\read_sprites.py
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Tools\UEFfile.py
C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Tools\UEFfile.pyc

User avatar
davidb
Posts: 2338
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Firetrack maps

Post by davidb » Sat Dec 13, 2014 2:18 pm

Ah, I'm not sure how this work on Windows. For some reason my system is including the current directory as a path to include Python modules, so it works rather unexpectedly without any extra messing around.

You need to set the PYTHONPATH environment variable to "C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c" then run the Tools\editor.py script as you were doing. I don't remember the syntax for setting environment variables on Windows, unfortunately. :(

Edit: Or just move the Firetrack directory inside the Tools directory. I might update the repository to have that directory structure.

User avatar
tricky
Posts: 3283
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Firetrack maps

Post by tricky » Sat Dec 13, 2014 4:41 pm

Still no luck, nevermind, I'll try a few other arcade maps instead.

C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c>set "PYTHONPATH=C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c"

C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c>Tools\editor.py Firetrack.uef
Traceback (most recent call last):
File "C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Tools\editor.py", line 359, in <module>
game_info = Firetrack(app.arguments()[1])
File "C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Firetrack\__init__.py", line 40, in __init__
self.uef = UEFfile.UEFfile(uef_file)
File "C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Tools\UEFfile.py", line 99, in __init__
raise UEFfile_error, 'The input file, '+filename+' could not be read.'
UEFfile.UEFfile_error: The input file, C:\DATA\MapEditors\dboddie-firetrackmaps-26fc9d918a6c\Tools\editor.py could not be read.

User avatar
davidb
Posts: 2338
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Firetrack maps

Post by davidb » Sat Dec 13, 2014 5:23 pm

I've no idea why that fails the way it does. It should be passing the UEF file name to the Firetrack reading code, but instead passes the script name. I've never tried the tool on Windows so I've no idea if I'm doing something wrong with argument handling on that platform.

User avatar
davidb
Posts: 2338
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Firetrack maps

Post by davidb » Sat Dec 13, 2014 6:04 pm

I've attached images of the levels to this message. The numbering is fairly arbitrary - the Devil Rock is not level 5 but just the fifth set of level data in the game. The palettes are also incorrect for various levels - I have more ideas about how they are encoded in the game now, but haven't looked at it properly.
Attachments
level-1.png
level-2.png
level-3.png
level-4.png
level-5.png
level-6.png
level-7.png

User avatar
billcarr2005
Posts: 1290
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Firetrack maps

Post by billcarr2005 » Sun Feb 24, 2019 10:14 am

Added full sets of the first two worlds below
Last edited by billcarr2005 on Sun Mar 03, 2019 11:01 am, edited 6 times in total.

User avatar
davidb
Posts: 2338
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Firetrack maps

Post by davidb » Sun Feb 24, 2019 11:10 am

Nice. :) Are you using my scripts or have you created a utility of your own?

User avatar
billcarr2005
Posts: 1290
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Firetrack maps

Post by billcarr2005 » Sun Feb 24, 2019 11:32 am

davidb wrote:
Sun Feb 24, 2019 11:10 am
Nice. :) Are you using my scripts or have you created a utility of your own?
I initially starting hacking at the BBC disk version code, then clunkily exported the graphics to single BMP tiles and rewrote the 6502 loops in BBC BASIC for Windows, although now I've realised I can't easily (unless I'm missing something obvious) change the colours just like VDU19 #-o
I'm not sure if the BBC and Electron share the same data storage methods, or plotting routines...

For some reason, the PNG posted above doesn't appear full size, 640 pixels across :?

User avatar
davidb
Posts: 2338
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Firetrack maps

Post by davidb » Sun Feb 24, 2019 12:17 pm

The plotting routines will be different due to the different screen modes between the versions. I think I tried to figure out the BBC version and couldn't really be bothered at the time. :)

I'll take another look to see if I can find some similar-looking patterns in the data.

User avatar
billcarr2005
Posts: 1290
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Firetrack maps

Post by billcarr2005 » Sun Feb 24, 2019 12:41 pm

Code: Select all

1C 00 06 08 
04 40 A8 49 08 10 18 20 <-- value
05 0F 0A 0E 08 0C 13 1B <-- offset
D9 E5 7A 7D B9 5E 5F AE D7 97 EB F9 C1 F7 07 9F 1F B3 7C 3D 07 BF 35 E6 5F D6 87 F3 19
This is the code for the start of the level
1C 00 is the length of the data 001C
06 gets stored in 0031
08 is the amount of data which gets stored in &A00, by the offset in the following 8 bytes, ie A05 = 04, A0F = 40
D9 E5 onwards is the data for the 20 x 10 tiles of the start of the level, as shown in screenshot :)

Edited to clarify that it's the start of each level, from a gameplay perspective, not the start of each level's data
Attachments
LEVEL START.png
Last edited by billcarr2005 on Sun Feb 24, 2019 1:10 pm, edited 3 times in total.

User avatar
davidb
Posts: 2338
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Firetrack maps

Post by davidb » Sun Feb 24, 2019 12:55 pm

I'm not quite following you just yet. :?

The level format is certainly different to the Electron version, which is basically just expanding a run-length-encoded sequence of spans.

User avatar
billcarr2005
Posts: 1290
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Firetrack maps

Post by billcarr2005 » Sun Feb 24, 2019 1:31 pm

Level data manipulation is started at &2D9E in the game code

User avatar
billcarr2005
Posts: 1290
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Firetrack maps

Post by billcarr2005 » Sun Mar 03, 2019 10:53 am

Baseworld Cygni
LEVEL1t.png
LEVEL2t.png
LEVEL3t.png
Attachments
Baseworld Cygni.zip
(135.2 KiB) Downloaded 3 times

User avatar
billcarr2005
Posts: 1290
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Firetrack maps

Post by billcarr2005 » Sun Mar 03, 2019 11:00 am

Dustworld Delan
LEVEL1t.png
LEVEL2t.png
LEVEL3t.png
Attachments
Dustworld Delan.zip
(148.65 KiB) Downloaded 2 times

User avatar
billcarr2005
Posts: 1290
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Firetrack maps

Post by billcarr2005 » Tue Mar 05, 2019 10:00 pm

Iceworld Shail
LEVEL1t.png
LEVEL2t.png
Attachments
Iceworld Shail.zip
(98.79 KiB) Downloaded 2 times

User avatar
billcarr2005
Posts: 1290
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Firetrack maps

Post by billcarr2005 » Wed Mar 06, 2019 3:30 pm

Mallworld Tesla
LEVEL1t.png
LEVEL2t.png
LEVEL3t.png
Attachments
Mallworld Tesla.zip
(145.85 KiB) Downloaded 3 times

Post Reply