New 1K hires game in progress: Artillery Duel
- 1024MAK
- Posts: 5165
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: New 1K hires game in progress: Artillery Duel
Hey, sounds like you are making good progress .
Keep up the good work
Mark
Keep up the good work
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer being good this year.
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer being good this year.
Re: New 1K hires game in progress: Artillery Duel
Not enough yet.1024MAK wrote:Hey, sounds like you are making good progress .
Keep up the good work
Mark
Need more shrinking
Re: New 1K hires game in progress: Artillery Duel
Input routine altered.
Now only 1 change of entering the values for angle and speed by keyboard but with test on valid values only.
No longer setting with + / - and ready when NEWLINE pressed.
I managed to release 32 bytes.
Furthermore the table from claypigeonshoot (sinus) will become base for display, but with altered dx-routine.
Although not exactly a Bresenhamdisplay it will do well enough for correct gameplay.
Since the distance between points on the table is relative short the error from Bresenham is repaired 30 times through the table.
(complex, I thought so!)
Now only 1 change of entering the values for angle and speed by keyboard but with test on valid values only.
No longer setting with + / - and ready when NEWLINE pressed.
I managed to release 32 bytes.
Furthermore the table from claypigeonshoot (sinus) will become base for display, but with altered dx-routine.
Although not exactly a Bresenhamdisplay it will do well enough for correct gameplay.
Since the distance between points on the table is relative short the error from Bresenham is repaired 30 times through the table.
(complex, I thought so!)
Re: New 1K hires game in progress: Artillery Duel
And reading the SINUS-table in reverse order makes it a COSINUS.
With both I can recalculate the speed of the ball out of the cannon into horizontal and vertical speed.
and use the sinus table as the looping of the cannonball by gravity.
With both I can recalculate the speed of the ball out of the cannon into horizontal and vertical speed.
and use the sinus table as the looping of the cannonball by gravity.
Re: New 1K hires game in progress: Artillery Duel
Getting somewhere.
Tables set and speedcalculation
Routine for 'following' a line in just 27 bytes
Only to do add this routine, do entire loop
check on hit.
Bytes left: 62-27=35 bytes
I moved temporary screen to filler memory and that made me shift entire screen 24 bytes.
Also still possible save of 20 bytes when rock is 1 byte smaller.
Almost....
Tables set and speedcalculation
Routine for 'following' a line in just 27 bytes
Only to do add this routine, do entire loop
check on hit.
Bytes left: 62-27=35 bytes
I moved temporary screen to filler memory and that made me shift entire screen 24 bytes.
Also still possible save of 20 bytes when rock is 1 byte smaller.
Almost....
Re: New 1K hires game in progress: Artillery Duel
Function for dy and dx derived from speed out of cannon working.
I missed a few tablevalues.
Some routines copied over sysvar above from tables copied over sysvar.
So now still 56 bytes free - 27 for movement.
To add in 29: continue to next step in movement according to SINUS table and check on hit.
promising.....
I missed a few tablevalues.
Some routines copied over sysvar above from tables copied over sysvar.
So now still 56 bytes free - 27 for movement.
To add in 29: continue to next step in movement according to SINUS table and check on hit.
promising.....
Re: New 1K hires game in progress: Artillery Duel
61 bytes left, some pairloading altered in just loading the lowbyte and a shifting routine altered to use preset values better.
Re: New 1K hires game in progress: Artillery Duel
Basic movement added.
Next to do is following the sinusloop.
Cannon is moving on the screen.
I even shortened the routine from 27 to 26, a dx movement is always needed so testing reached coordinates could be done later.
Still 33 bytes free and possible 20 in altered display.
Almost....
Next to do is following the sinusloop.
Cannon is moving on the screen.
I even shortened the routine from 27 to 26, a dx movement is always needed so testing reached coordinates could be done later.
Still 33 bytes free and possible 20 in altered display.
Almost....
Re: New 1K hires game in progress: Artillery Duel
Loaded cannon was shown and fired after input from angle and speed.
Now shown before input, indicating who's turn it is.
Just a few things to do, set correct start, read next value in shooting loop, test out of screen, test hit restart game.
All can be done in max 10 bytes, I think.
28 bytes left (and still option on 20 bytes in altered screen).
Now shown before input, indicating who's turn it is.
Just a few things to do, set correct start, read next value in shooting loop, test out of screen, test hit restart game.
All can be done in max 10 bytes, I think.
28 bytes left (and still option on 20 bytes in altered screen).
Re: New 1K hires game in progress: Artillery Duel
Finetuning the last steps.
Shot left and right working, but calculation of Y-height is a problem to figure out.
It will be a small adjustment, will find it out.
Memory left: 0 bytes!!!!!
Shot left and right working, but calculation of Y-height is a problem to figure out.
It will be a small adjustment, will find it out.
Memory left: 0 bytes!!!!!