'Video is private'
Pitfall
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Pitfall
Re: Pitfall
Whoops - should be fixed
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
There are several fast line drawing routines including one of mine, I think Kieran posted a nice test program where you could switch between them. Spoiler, mine was only fastest about 10% of the time.
Re: Pitfall
Thanks, I couldn’t find the test program but a quick search brought up the following, so I’ve got a bit of reading to do…
kieranhj wrote: ↑Tue Feb 28, 2017 10:18 amActually we do, although not technically ours. Simon.M spent some time making the crazy fast 3D stuff we discovered compatible with BeebAsm for easy re-use. https://github.com/simondotm/bbc-micro-3d/. I believe there is a fully unrolled MODE 4 line draw in there somewhere.tricky wrote:So, does anyone have a fast line drawing routine for the beeb before I go off to write another?
The proof of concept is in mode 0, but mode 4 is probably more practical.
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Nope, that seems to be using a back buffer to handle the line code hence using 10k modes 4 and 5
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Further optimisations
Line drawing now only checks for down and left and down and right, also delta y is always greater than delta x
Plots line backwards from y2 to y1 and stops just above the leaves as there was no point plotting the pixels hidden by the trees
Still more code tweaks to go, such as remove get screen address on every plot pixel call as I'm sure I could inc or dec the screen address?
Video test is here
https://youtu.be/Nik-AQ2XZDI
Line drawing now only checks for down and left and down and right, also delta y is always greater than delta x
Plots line backwards from y2 to y1 and stops just above the leaves as there was no point plotting the pixels hidden by the trees
Still more code tweaks to go, such as remove get screen address on every plot pixel call as I'm sure I could inc or dec the screen address?
Video test is here
https://youtu.be/Nik-AQ2XZDI
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Added jumping on and off the custom line drawn vine
There is still a slight flicker and so more optimisation is needed
Also player doesn't always catch the rope, so the logic needs looking at again
Picture showing most of the objects and background removed
Latest video
https://youtu.be/xB5Krr0ksk4
There is still a slight flicker and so more optimisation is needed
Also player doesn't always catch the rope, so the logic needs looking at again
Picture showing most of the objects and background removed
Latest video
https://youtu.be/xB5Krr0ksk4
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Alpha version 0.004
Last night added the following
Further optimisation on vine - still needs more though
Added jumping on and off of vine
Fixed vine collection detection
Added sinking into swamp
Added jumping onto crocodiles
NB doesn't test for sinking into quicksand yet
Last night added the following
Further optimisation on vine - still needs more though
Added jumping on and off of vine
Fixed vine collection detection
Added sinking into swamp
Added jumping onto crocodiles
NB doesn't test for sinking into quicksand yet
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Nothing to see or play, but I've just added player sinking into quicksand
Also the game now relocates down to &0200 to give me more memory to play with, but it's currently crashing when you lose your 3 lives and the game starts again.
NB I don't think I'll go down to &0000 like other do though
Also the game now relocates down to &0200 to give me more memory to play with, but it's currently crashing when you lose your 3 lives and the game starts again.
NB I don't think I'll go down to &0000 like other do though
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
&0200 is the OS Vectors so unless you’ve completely disabled/bypassed the MOS you’re probably safer starting at &0400 upwards. (&0300 is VDU workspace.)fizgog wrote: ↑Sat Jan 14, 2023 10:12 pm Nothing to see or play, but I've just added player sinking into quicksand
Also the game now relocates down to &0200 to give me more memory to play with, but it's currently crashing when you lose your 3 lives and the game starts again.
NB I don't think I'll go down to &0000 like other do though
Edit: PS. Great progress! Looking forward to trying a build one of these days.
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/
Re: Pitfall
Thanks, I'll probably do another alpha release in the week
I've just fixed the game crash, after losing 3 lives and restarting the game
I'm skipping the first 4 bytes, then putting in my IRQ handler at &0204 / &0205, then the main code is at &0206 onwards.
NB I will need to do some research on generating sound effects without the MOS though.
I've just fixed the game crash, after losing 3 lives and restarting the game
Yes I'm no longer using the MOS for the game, was only ever using it for the rope and altering the swamp colour, but I'm doing that myself now.
I'm skipping the first 4 bytes, then putting in my IRQ handler at &0204 / &0205, then the main code is at &0206 onwards.
NB I will need to do some research on generating sound effects without the MOS though.
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
I build the vectors into my image, which I decompress with interrupts disabled.
I can try to tidy my vgm converter if you wanted to see what it does to sounds recorded on the beeb. I think at least one of the emulators will export a .vgm of the sound.
I might do a video of using it as it is written for my weird brain
I can try to tidy my vgm converter if you wanted to see what it does to sounds recorded on the beeb. I think at least one of the emulators will export a .vgm of the sound.
I might do a video of using it as it is written for my weird brain
Last edited by tricky on Tue Jan 24, 2023 6:57 pm, edited 1 time in total.
Re: Pitfall
Yes please to everythingtricky wrote: ↑Sun Jan 15, 2023 10:44 am I build the vectors into my image, which I decompress with interrupts disabled.
I can try to tidy my vgm converter if you wanted to see what it does to sounds betrayed on the beeb. I think at least one of the emulators will export a .vgm of the sound.
I might do a video of using it as it is written for my weird brain
I did find the following site with a bit of the sound chip info on, but have not read it yet
https://www.chibiakumas.com/
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
This has the best info for the sn76489 and even has a bit on the differences in the different versions of the sn76489.
https://www.smspower.org/Development/SN76489
The only one that matters for most coders is that on the SMS, period 0 is DC which is great for playing samples, but on the beeb it is effectively &400, which is the lowest frequency.
For chip tune people, the white noise is "in tune" with the sound channel when it is being controlled by the sound frequency but on the beeb, it isn't!
https://www.smspower.org/Development/SN76489
The only one that matters for most coders is that on the SMS, period 0 is DC which is great for playing samples, but on the beeb it is effectively &400, which is the lowest frequency.
For chip tune people, the white noise is "in tune" with the sound channel when it is being controlled by the sound frequency but on the beeb, it isn't!
- Cybershark
- Posts: 741
- Joined: Wed Jun 14, 2006 11:16 pm
- Contact:
Re: Pitfall
Ooooh! This one's not smelling too far off being cooked now
Re: Pitfall
Alpha version 0.005
Tonights build includes the following
No longer using Acorn MOS
Program now relocates to &200
Added player sinking into quicksand
Added collection of treasures
Added treasure score increase
Fixed - bug where static objects where constantly being erased and redrawn
Fixed - game restart crash when losing all 3 lives
Fixed - stopped vine being added to all crocs screen rather than just certain ones
Removed VideoNuLA support as it seems to be broken when running it on a standard beeb (seems to set all colours to magenta and white)
Still to do in no particular order
Sound Effects
Fix VideoNuLA support
Lose score when being hit by a rolling log, and forcing Harry to kneel
Game over screen ?
Game completion screen ?
Finish loader
Add joystick support
Fix quicksand timings ?
Further optimisations to reduce flicker on the vine screens
+ anything else I've forgotten
Tonights build includes the following
No longer using Acorn MOS
Program now relocates to &200
Added player sinking into quicksand
Added collection of treasures
Added treasure score increase
Fixed - bug where static objects where constantly being erased and redrawn
Fixed - game restart crash when losing all 3 lives
Fixed - stopped vine being added to all crocs screen rather than just certain ones
Removed VideoNuLA support as it seems to be broken when running it on a standard beeb (seems to set all colours to magenta and white)
Still to do in no particular order
Sound Effects
Fix VideoNuLA support
Lose score when being hit by a rolling log, and forcing Harry to kneel
Game over screen ?
Game completion screen ?
Finish loader
Add joystick support
Fix quicksand timings ?
Further optimisations to reduce flicker on the vine screens
+ anything else I've forgotten
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Yes indeed. Starting to play very well.
Why is this list always longer than the todo list
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
Re: Pitfall
Thanks, it's much appreciated.
I'm still plodding away, but not had much spare time to work on it. I did however manage to add being hit by rolling and static logs and losing points
Also been trying to read about SN76489 sound chip but it's not sinking in yet, eventually it will I hope.
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Regarding the sound (and apologies if this is teaching grandmothers...) I have taken quite a lot of "inspiration" from Lovebug's ladybug here : https://github.com/LoveBug2084/LadyBug/ ... adybug.asm
Basically you need to keep track of a 10 bit frequency and a volume and send them to the chip when they change. How you calculate them is up to you. FYI as far as I know these are the 10 bit frequency values for the bottom octave that the Beeb can produce - Divide by two for each octave up.
Basically you need to keep track of a 10 bit frequency and a volume and send them to the chip when they change. How you calculate them is up to you. FYI as far as I know these are the 10 bit frequency values for the bottom octave that the Beeb can produce - Divide by two for each octave up.
Code: Select all
B %1111110011
C %1110111011
C# %1110000101
D %1101010010
D# %1100100011
E %1011110101
F %1011001011
F# %1010100011
G %1001111101
G# %1001011001
A %1000110111
A# %1000010111
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
Re: Pitfall
Don't get too hung up on the latching, of you are sending both bytes, you'll be fine.
When you set the noise channel's frequency, it resets its counter, which means if you do it every frame, you get a 50hz clucky humb.
When you set the noise channel's frequency, it resets its counter, which means if you do it every frame, you get a 50hz clucky humb.
Re: Pitfall
you could encode your music table as 5 bits for 32 notes (2.6 octaves) and 3 bits for duration, 2nd byte for 4 bits volume and some other control bits for loop, end etc
in ladybug soundtables.asm are just raw register data and duration which is kind of wasteful
in ladybug soundtables.asm are just raw register data and duration which is kind of wasteful
Re: Pitfall
Thanks all, there’s much to ponder on with the sound.
Nothing to see but I managed to find a bit of time to remove the leading zeros from the score apart from the last one if your score is 0
Next alpha release might be a while as I’d like to get the sound working
Nothing to see but I managed to find a bit of time to remove the leading zeros from the score apart from the last one if your score is 0
Next alpha release might be a while as I’d like to get the sound working
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Alpha version 0.006
This build includes the sounds effects for jumping, swinging, falling and dying
Next on the list is to look at reducing the flickering and a clean reset
NB Seems to be a bug collecting treasure as it makes you lose a life, so this also needs looking at
This build includes the sounds effects for jumping, swinging, falling and dying
Next on the list is to look at reducing the flickering and a clean reset
NB Seems to be a bug collecting treasure as it makes you lose a life, so this also needs looking at
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
- Cybershark
- Posts: 741
- Joined: Wed Jun 14, 2006 11:16 pm
- Contact:
Re: Pitfall
Amazing what a difference the SFX make to it! Or perhaps it's just that the advancements have now accumulated to such a point that this is now barely distinguishable from a completed product. The deadly treasure is certainly something of a drawback though
Re: Pitfall
Thanks and yes the sound does seem to make a big difference, I can’t believe I started on this last June, although I did lose some time before xmas due to work and life.Cybershark wrote: ↑Sun Feb 05, 2023 9:20 pm Amazing what a difference the SFX make to it! Or perhaps it's just that the advancements have now accumulated to such a point that this is now barely distinguishable from a completed product. The deadly treasure is certainly something of a drawback though
Currently trying to track down the treasure bug at the moment.
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Alpha version 0.007
This build fixes the treasure collecting bug were it killed you for collecting the treasure and played the dying sound effect
treasure sound effect is now played and lets you carry on.
Need to look at code optimisation and flicker next, so might be a while.
This build fixes the treasure collecting bug were it killed you for collecting the treasure and played the dying sound effect
treasure sound effect is now played and lets you carry on.
Need to look at code optimisation and flicker next, so might be a while.
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Started looking at the flickering last night, so I switched to using a timer to trigger the vsync flag which now triggers at the bottom of the play area - row 28
Using the following formula which I hope is correct for row 28
NB Magenta is objects being erased, blue is objects being drawn
This has reduced the flickering a bit, so next I need to look at optimising the code
*Edit this is a couple of shots without the base layer showing worse cases. (seems one of the drawing frames in the 2nd pic is getting hammered)
Using the following formula which I hope is correct for row 28
Code: Select all
;Timer1Value = (39-35) * 8 * 64 ; total rows - vsync row * 8 * 64 (Fixed)
; - 2*64 ; latch * 64 (Fixed)
; + 28*8*64 ; row * 8 * 64 (Can be changed)
Timer1Value = (39-34) * 8 * 64 - (2 * 64) + (28 * 8 * 64)
NB Magenta is objects being erased, blue is objects being drawn
This has reduced the flickering a bit, so next I need to look at optimising the code
*Edit this is a couple of shots without the base layer showing worse cases. (seems one of the drawing frames in the 2nd pic is getting hammered)
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Managed to get a bit done in my dinner hour
Alpha version 0.008
This build adds the following: -
Uses timer1 for handling vsync - reduces flickering a bit - still need to look at optimising the code.
Added collision sound effect when being hit by the logs
Added frontend instructions / manual (pressing escape jumps to the controls section)
Shift Break to load
Alpha version 0.008
This build adds the following: -
Uses timer1 for handling vsync - reduces flickering a bit - still need to look at optimising the code.
Added collision sound effect when being hit by the logs
Added frontend instructions / manual (pressing escape jumps to the controls section)
Shift Break to load
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Pitfall
Alpha version 0.009
This build adds the following : -
Further optimisation on the swinging vine - Thanks go to ChrisB for some coding advice
Changed instructions heading title from green to yellow as there was too much green showing on the screen
Let me know if you experience any bugs / glitches in this version
I need to look at optimising the sprite routines next
This build adds the following : -
Further optimisation on the swinging vine - Thanks go to ChrisB for some coding advice
Changed instructions heading title from green to yellow as there was too much green showing on the screen
Let me know if you experience any bugs / glitches in this version
I need to look at optimising the sprite routines next
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad