Lode Runner on the ZX81?

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Lode Runner on the ZX81?

Post by dr beep »

Open Office Calc has all levels and is compressing it to db statements.
Now I need to write a displayroutine to test if compression is ok.
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Lode Runner on the ZX81?

Post by dr beep »

50 levels each in app. 7,5K

75 levels in 10K and 12K

So with 3 50 level versions we have

1K screen and stack
7,5K code
7,5K programcode available
-----
16K memory
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Lode Runner on the ZX81?

Post by dr beep »

Is this acceptable for breaking and fake bricks?
IMG_4540.PNG
(196.21 KiB) Downloaded 361 times
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Lode Runner on the ZX81?

Post by mrtinb »

dr beep wrote: Wed May 03, 2017 6:34 pmIs this acceptable for breaking and fake bricks?
A better question is - how do you load custom software into ZX81 on iPad. ;)
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Lode Runner on the ZX81?

Post by dr beep »

Compressor has an error on line 2.
I need to find it.....
User avatar
RetroTechie
Posts: 379
Joined: Tue Nov 01, 2011 12:16 am
Location: Hengelo, NL
Contact:

Re: Lode Runner on the ZX81?

Post by RetroTechie »

It would be great to have this game on the Zeddy!

Looking at Lode Runner levels & thinking about how to take advantage of typical layouts, you could do something like this:

1) Start with background + one or two different types of bricks only. That would encode as a series of (few bits + length in single byte). Scan horizontally, as bricks are mostly floors (horizontal) for optimal result. And simply continue (ignore) where ladders etc will come later. This would get an entire level's background + bricks in maybe 30~60 bytes or so?
2) Ladders: always vertical, right? Encode as <number of ladders> * (X offset, Y offset, height). Reasonably encoded, that could go into 2 bytes per ladder.
3) Same thing for the horizontal beams you can hang from: 2 bytes per beam (X offset, Y offset, width).
4) As said, starting positions of player / enemies can be encoded as a simple set of X/Y offsets. Similar for escape ladder.

For example the level shown in start post would then go into ~60 bytes or so all-in. 8-)
Some levels may encode really poorly using something like the above. But you could even include an alternative encoding method for those levels if considered a problem for the overall data size.

And that's not using some kind of actual compression a la LZH or whatever. There are some methods that have small & fast Z80 decompressors. So you still have the option to throw that in to squeeze things further... :)
User avatar
dasteph
Posts: 40
Joined: Fri Nov 27, 2015 2:51 am
Location: Sydney, AU
Contact:

Re: Lode Runner on the ZX81?

Post by dasteph »

Wow Dr Beep, you're getting some serious compression going there.

I think 32 levels might prove to be a comfortable target. It's a nice number and equals the total available on the Vic20.

My thoughts on level design graphics wise are:

If that's chr 8 then that's good for standard bricks. This means that char 9 can be used for re-filling blocks, which keeps a consistent look.

For escape ladders, I was going for chr 109, as this displays a blank space on the screen, and is the only "not used" character that won't lock up the ZX81 when poked to the dfile. Once the end of level conditions are met, it's then easy to read the dfile and update 109 to a ladder.


000 Empty
128 Block
008 Bricks
136 Bricks, Fake (or 8, 136 provides a nice visual clue)
022 Rope
045 Ladder
109 Ladder, Escape
131 Gold
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Lode Runner on the ZX81?

Post by dr beep »

BTW Chr$ 109 gives me a ? Otherwise I would love to use it.
IMG_4541.PNG
(259.7 KiB) Downloaded 304 times
Refilling was also my idea to use halflock too.

Setting escape can also be done with a seperate reread of the levels and then display the ladder.
Same for testing fakebricks, but then you must test a location.
Don't know if speed is fast enough, that's why I suggested 8 and 136.
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Lode Runner on the ZX81?

Post by dr beep »

dasteph wrote: Thu May 04, 2017 3:30 am Wow Dr Beep, you're getting some serious compression going there.

I think 32 levels might prove to be a comfortable target. It's a nice number and equals the total available on the Vic20.

My thoughts on level design graphics wise are:

If that's chr 8 then that's good for standard bricks. This means that char 9 can be used for re-filling blocks, which keeps a consistent look.

For escape ladders, I was going for chr 109, as this displays a blank space on the screen, and is the only "not used" character that won't lock up the ZX81 when poked to the dfile. Once the end of level conditions are met, it's then easy to read the dfile and update 109 to a ladder.


000 Empty
128 Block
008 Bricks
136 Bricks, Fake (or 8, 136 provides a nice visual clue)
022 Rope
045 Ladder
109 Ladder, Escape
131 Gold
When less than 50 I would suggest 30 since it will fit all levels in 5 loads.
With 30 the data would be app. 4K
Even hires then comes nearby. 6K screen, 6K program.

But first I would test lowres for the true ZX81 experience ( no altered hardware needed).
User avatar
dasteph
Posts: 40
Joined: Fri Nov 27, 2015 2:51 am
Location: Sydney, AU
Contact:

Re: Lode Runner on the ZX81?

Post by dasteph »

To print 109 to the screen without getting "?", you need to poke it to the Dfile.

05 rem print to the first character space on the screen
10 poke peek 16396+peek 16396*256+1,109
20 print peek (peek 16396+peek 16396*256+1)

The idea would be to poke the entire active level to the Dfile.
Post Reply