1k hires idea, adaptation of Grandpr1x

General games-related topics
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1k hires idea, adaptation of Grandpr1x

Post by dr beep »

I found out how I could code on the screen without crashing.
Now the setting of HR-routine is done on screen and I have 156 bytes left.
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1k hires idea, adaptation of Grandpr1x

Post by dr beep »

Restart setting of initial values in just a few bytes.
149 bytes remaining....

(saved a byte in another routine)
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1k hires idea, adaptation of Grandpr1x

Post by dr beep »

Passing start finish on full speed.
https://m.youtube.com/watch?v=_r-QID9ctYU
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1k hires idea, adaptation of Grandpr1x

Post by dr beep »

Done some preparation for bonustime when finishing a round in time.
With the preparation I was able to free a lot of bytes.

Available space now 176 bytes.

The display was too large. The edges of the screen could not be reached.
So I altered the size in width and was able to delete bytes in the displayroutine.

In the DRAW-routine I also noticed an adjustment that would save almost 10 bytes.

Getting confidence to fit the game in 1K.
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1k hires idea, adaptation of Grandpr1x

Post by dr beep »

Due to the shortening of the display the first 30 bytes (#4000-401D) only need 16 for the display.
In the remaining 13 (1 byte is overwritten by plot) I can store the compressed track.

To do this I can store the compressed track in the hires linebuffer, after loading use the screen for the copy from
linebuffer to #4011 and then start the program. The next thing is the reuse of the linebuffer for the visbible track,
combined with the normal function of displaying a line in hires.

This saves another 12 bytes.
188 bytes free for coding.

The gameplay will become a bit different from Grandpr1x.
Grandpr1x keeps you playing when you finish a round in time with extra time.

Roadracer willbe like MarbleRacer.
Drive 5 rounds as fast as possible. time is meassured.
If you want to play the Grandpr1x-variant, upload a Spectrum emulator and play Grandpr1x.
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1k hires idea, adaptation of Grandpr1x

Post by dr beep »

Reset laps and time, restart game added.
Preparation for highscore (might fell off again).

To do
Controls and timing.
Bytes left 138
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1k hires idea, adaptation of Grandpr1x

Post by dr beep »

Drifting in the turns and steering now added.
Since the track is rather small I will not add the breakoutfunction when the turn is too large.

When you hit the sidetracks your speed drops to really slow and you need to built up speed again.
So best races are the ones with as less sidecollission as possible.

Only thing to do is timing and hiscore and perhaps speeddisplay.
Still 69 bytes left.
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1k hires idea, adaptation of Grandpr1x

Post by dr beep »

Game is ready!

The gameplay will be racing 2 rounds in the fastest time.
Your fastest time is saved as hiscore.

The screen has 49 lines of 16 bytes and 2 lowres lines.
As usual I will make a PDF with the source and the P-file will be set in the new games section.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: 1k hires idea, adaptation of Grandpr1x

Post by sirmorris »

Were there any bytes left?? :D

Amazing work as always Dr. Beep!
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1k hires idea, adaptation of Grandpr1x

Post by dr beep »

sirmorris wrote:Were there any bytes left?? :D
It seemed that some bytes were needed to prevent overwriting the code.
I left 12 bytes unused for this goal.
Amazing work as always Dr. Beep!
Thanks, this was a tough one.
I like the idea that the hires linebuffer is used 3 times.
1) datastorage of compressed track
2) after copying building the visible track in the linebuffer
3) the linebuffer, the display of the hiresdata in highmemory

It is possible to make versions with other tracks.
A corner is 1/8 of a circle. Full track may have 48 parts.
Start/finish must be set between straight tracks.
Post Reply