New version of Scramble for the beeb (going well)

new games to be launched and discussed here
User avatar
jbnbeeb
Posts: 421
Joined: Sat Apr 03, 2010 8:16 pm
Contact:

Re: New version of Scramble for the beeb (going well)

Post by jbnbeeb » Mon Aug 13, 2018 10:06 am

tricky wrote:
Sun Aug 12, 2018 9:39 am

I've been thinking about difficulty and apart from the arcade difficulties that I know of:
- max 1 or 3 rockets flying at the same time.
- fuel draining slow or fast (4 or 6 for me).
I was thinking of adding:
- extra flying saucers: 4..6
- extra meteors: 4..6

I'm trying to think what would make a good difficulty ramp.
Which order should things be increased and how many should be increased per loop?

If the difficulty didn't change during the game, it could just be easy:1,4,4,4 medium:2,5,5,5 hard:3,6,6,6 but I want it to increase per loop.
I know this is bad game design, but with limited memory, it has to be something fairly small to implement.
When you say per loop .. you mean increase difficulty after getting through all levels? That'd be fine I reckon. After your easy/medium/hard, you could then have even quicker fuel drain or fewer FUEL containers (or both to be really cruel :) )
I'm going to ..
ABUG Cambridge Sept 7th-9th Sept 2018
Image

User avatar
Rich Talbot-Watkins
Posts: 1339
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: New version of Scramble for the beeb (going well)

Post by Rich Talbot-Watkins » Mon Aug 13, 2018 11:01 am

This looks absolutely superb! I'm astonished with how much you're managing to pack into a 20ms frame! I think, technically, this must be your best work yet. Can't wait to give it a go when it's finished (although I already predict that I'm going to be terrible at it - Rocket Raid used to give me enough trouble as a 13 year old).

User avatar
simonm
Posts: 208
Joined: Mon May 09, 2016 2:40 pm
Contact:

Re: New version of Scramble for the beeb (going well)

Post by simonm » Mon Aug 13, 2018 11:28 am

Agree with Rich. This is crazy good for a beeb. Amazing work tricky. Would love to see a 'how it works' type blog if you ever feel so inclined.

User avatar
Rich Talbot-Watkins
Posts: 1339
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: New version of Scramble for the beeb (going well)

Post by Rich Talbot-Watkins » Mon Aug 13, 2018 2:10 pm

+1000 to that!

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

Re: New version of Scramble for the beeb (going well)

Post by tricky » Mon Aug 13, 2018 9:41 pm

I will try and write it up, but it won't be as good as pop.

For now:

The scrolling is similar to what I described in the smb thread.

I was asked about collision detection, and here is what I said.

For scramble, I check the character address of the shot/bomb against the character addresses of the rockets, fuel and mysteries (other wise the shot can go right as a visible pixel goes left and "misses". I do this by checking if the char ROW (high byte LSR) matches the shot for either rows and then the X (low byte ROR to include the lsb of high byte).
I then check the shot / bomb-tip for being over black and early out if so.
For the saucers, I do a bounding box check in pixels.
If nothing hit, but also not black, we hit land and remove the shot / bomb.
I have to remove (EOR) the player ship, shots and bombs before checking so as not to bomb yourself or shoot your own bombs!

In centipede, I have a character map of where the mushrooms are/what their destruction frame is and the BB for the centipede, char check for the fle and ROW/BB for the scorpion.

I Carnival, I use the hight of the shot when it is not over black to decide which thing to check.

In AstroBlaster, I check for not black and then pick then approx BB the alien. For the aliens shooting the player I have a monochrome low res copy of the ship that I do a bitwise comparrison as bombs are two pixels wide and your ship moves two pixels at a time.

For Space Invader, I use the colour of what I have hit to decide what it was and then go from there.

I generally don't like bounding box checks, but sometimes I can't be bothered to write the code for pixel perfect collision and sometimes pixel perfect would allow you to shoot through a moving object or gaps in the target that are only there to make it look nice.

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

Re: New version of Scramble for the beeb (going well)

Post by tricky » Tue Aug 14, 2018 6:14 am

I had also forgotten about the sound.
During play, the three tone channels are used for the engine noise (womwom), the bomb (descending) and shouting (dumdum) while noise is used for explosions, so can also be used for whistling when not exploding.

User avatar
Rich Talbot-Watkins
Posts: 1339
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: New version of Scramble for the beeb (going well)

Post by Rich Talbot-Watkins » Tue Aug 14, 2018 9:15 am

tricky wrote:
Mon Aug 13, 2018 9:41 pm
The scrolling is similar to what I described in the smb thread.
In SMB weren't you plotting every non-blank tile every frame? Surely there's too many in MODE 1 to be able to do that with such a great frame rate? Do you just render edges instead? (Presumably with four versions of each tile for each pixel offset).


User avatar
kieranhj
Posts: 717
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: New version of Scramble for the beeb (going well)

Post by kieranhj » Tue Aug 14, 2018 4:32 pm

Hey Tricky, am I right in thinking (based on a half-remembered conversation at a previous ABUG maybe) that you're not just storing four shifted versions of all the tiles but also computing all combinations of tiles that are next to each other and essentially shifting them together? (Since we're only scrolling in a single direction and the landscape doesn't change.)

So in effect most of the tile blocks will end up something like:
  • a leading edge (e.g. diagonal) shifting into an empty space
  • a full tile shifting into a leading edge
  • a trailing edge shifting into full tile
  • an empty space shifting into a trailing edge
And then only updating the tile pairs that have changed, which in effect is just the edges - when there are large blocks of solid colour nothing is plotted. Obviously this wouldn't work if the main landscape was textured and not solid colour!

I'm also guessing that each character row is ruptured in two page boundaries for the left & right hand side clipping ala Frogger? Although do you need sprite clipping at the edges?

Is there an updated SSD available BTW? Looking forward to trying this on a real machine in the near future. Great work, as ever. =D>
Last edited by kieranhj on Wed Aug 15, 2018 11:16 am, edited 1 time in total.
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

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

Re: New version of Scramble for the beeb (going well)

Post by tricky » Tue Aug 14, 2018 9:31 pm

That is correct, four copies of four pixels per pair, I think my maps end up with 30 pairs which fits nicely into four pages.
Same clipping, mostly for the sprites, but also to keep things simpler (apart from those trixy masters). You can see it in the early video before hiding the sides.
I only have one interrupt every two rows/frames which latches the row about to start and then imediatly latches r12/13 for the following one.
I'll sort out the latest ssd tomorrow, but I'm not 100% at the moment.

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

Re: New version of Scramble for the beeb (going well)

Post by tricky » Sun Aug 26, 2018 3:12 pm

I've added shooting/bombing the launched rockets and sound for the meteors (needs work). 665 bytes left.
You still can't die and the game instantly loops when you kill the base.
Exit with ESCAPE to tidy up properly.
There are two .SSDs in the .zip, one for beebem and one for everything else (may have corruption on bottom on VLSI master).

I spent all morning adding "live drawing" to beebem to find my launched rocket explosion corruption and then found it in about 10 seconds without even using my new debugging feature!
The feature records the palette and other bits that beebem uses to display beeb memory for each scan line as they are drawn while the debugger window is displayed.
When entering "LiveRedraw" mode, the screen is redrawn using the current contents of memory and the display settings and palette from the last time each scan line was drawn.
As a write to screen memory happens, that line(s) is redrawn and displayed immediately, making it very easy to see what drew on the screen where you weren't expecting it.
I didn't bother adding it for MODE 7 and there will be plenty of places where it will be a little off, but I think it will come in handy every now and then.

I would post the code, but: it is a little messy, for beebem403, I didn't get a great response before add I still don't use github. I haven't bothered.
PS It seems that beebem writes an AVI frame every time it redraws the screen, which might be what throws my FPS off when recording sometimes.
Attachments
ScrambleDemo4.zip
(25.02 KiB) Downloaded 18 times
Last edited by tricky on Sun Aug 26, 2018 3:16 pm, edited 2 times in total.

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

Re: New version of Scramble for the beeb (going well)

Post by tricky » Sun Aug 26, 2018 4:17 pm

And a gameplay video :)

URL:https://youtu.be/_EvKYgXitcE View at 720p+ for 50hz.
My PC stutters a bit, but beeb is silky smooth ;)

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

Re: New version of Scramble for the beeb (going well)

Post by tricky » Mon Aug 27, 2018 8:45 am

Added player/boss explosion. 558 bytes left.
Now I have a lot of clean up code to add for when you die as most things on screen when you died are still "alive"!

User avatar
leenew
Posts: 3633
Joined: Wed Jul 04, 2012 3:27 pm
Location: Doncaster, Yorkshire
Contact:

Re: New version of Scramble for the beeb (going well)

Post by leenew » Mon Aug 27, 2018 10:20 am

C'Mon!!
This is getting so close now...... :D
Keep it up Tricky!
It's a rainy bank holiday so it's ideal to get this done [-o<

Lee.

User avatar
guddler
Posts: 431
Joined: Sat Apr 04, 2009 9:43 am
Location: W.Somerset
Contact:

Re: New version of Scramble for the beeb (going well)

Post by guddler » Mon Aug 27, 2018 3:16 pm

Just catching up on this.

I'm using a Master 128 with internal data centre. Demo 4 has no timing issues and works fine, other than the whole of the fuel area at the bottom is just full of corruption (already noted).

I have also found that if I hold 'forward' then a lot of the time 'up' and 'down' will fire bombs. Don't know if anyone has mentioned that one?

And I had to turn off my internal co-pro. But I kind of took that as a given?
Last edited by guddler on Mon Aug 27, 2018 3:16 pm, edited 1 time in total.

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

Re: New version of Scramble for the beeb (going well)

Post by tricky » Mon Aug 27, 2018 5:07 pm

Thanks for the feedback, I'm glad it has no DC issues (yet!).

I hadn't looked at Key clashes as I assumed that lots of games had checked and use these keys.
I usually use SHIFT instead of SPACE, which is a little less convenient, but doesn't clash (at least on real HW).

I hadn't considered the co-pro. I stomp on everything except for three OS required bytes, so I'm not too surprised.
It might just be that my file has an 00xxxx load and run addresses and should have FFxxxx addresses.
I might have to upgrade my beebasm (I thought that I already had).
If you get a chance, please try changing them (I'm not sure how - probably *load *save) and see if it works with the co-pro on.

I have added dying and explosions for it and destroying the boss.
Explosions don't kill you and I've tidied up quite a bit of restarting code. 417 bytes left.

Main things left are:
1. Change keys! (maybe add remapping or a selection)
2. Update high-score when beaten (EDIT: 2a. maybe add some more digits and maybe have a high-score table)
3. add difficulty ramp (saucers, meteors and fuel usage) EDIT: 3a. And flags for loops completed
4. add joystick support (with auto detect and button 1 does fire+bomb until button 2 is pressed, maybe)
5. add attract mode and starting a new game (instead of current infinite lives)
6. Hide the corrupt bit on VLSI masters (should be fairly easy - would be nice to have beebem and VLSI compatible in one version)
7. Do a write up - it won't be as good as PoP, sorry.

EDIT: Added attract mode (5), high score update (2) and start new game (5). 339 bytes left.
EDIT: Added difficulty ramp (3) and flags for loops completed (3a). 281 bytes left.
EDIT: Changed SPACE to SHIFT (1) and added joystick support for B,B+,Master and Compact (4). 241 bytes left.
EDIT: Added an extra digit to the scores (2a), may even need another, but we will see. 222 bytes left.

I'm still hoping to have this ready for Cambridge, but I should also get some beebs ready :)
Last edited by tricky on Tue Sep 04, 2018 3:11 pm, edited 6 times in total.

User avatar
guddler
Posts: 431
Joined: Sat Apr 04, 2009 9:43 am
Location: W.Somerset
Contact:

Re: New version of Scramble for the beeb (going well)

Post by guddler » Mon Aug 27, 2018 9:27 pm

tricky wrote:
Mon Aug 27, 2018 5:07 pm
If you get a chance, please try changing them (I'm not sure how - probably *load *save) and see if it works with the co-pro on.
Hmm, you lost me a bit there. Try changing what? Happy to try anything as long as I understand what you mean :D

Honestly, I'm not sure I'd expect it to work with the Tube on. Very little else does!, I just figured I'd report it seeing as there is quite a bit of hype over the Pi co-pro these days.

As far as keys are concerned, clearly I would not think it is a priority that should take up precious bytes, a high score table or something like that would be much better, BUT some ability to remap or configure always gets my vote ever since I bought a copy of Zap and simply cannot play it as I find the key layout really awkward even though it's a fairly normal layout for the beeb.

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

Re: New version of Scramble for the beeb (going well)

Post by tricky » Mon Aug 27, 2018 9:45 pm

Don't worry, I'll try it in my next .ssd.

Files with a load address starting with &FF then the four digit address should load in the beeb and the rest (I think) try to load into the copro if present. Beebasm writes the addresses as 00.... So if you have a copro, the file is probably going there, where a "legal" game would work, but games doing direct memory access won't.

I might do what I did on frogged and offer a few different options on first load, we'll see.

User avatar
guddler
Posts: 431
Joined: Sat Apr 04, 2009 9:43 am
Location: W.Somerset
Contact:

Re: New version of Scramble for the beeb (going well)

Post by guddler » Mon Aug 27, 2018 10:52 pm

It's OK - I got it. I changed it and saved it back to the SSD.

Changing the Load and Exec addresses to FFxxxx does indeed do the trick and the game runs without having to disable TUBE. It doesn't exit cleanly when you press escape so there maybe something wrong going on at exit maybe? And once I got a blue background in the game - don't know what was going on there!

I've attached the SSD just in case I did anything wrong...
Scramble.zip
(190.27 KiB) Downloaded 7 times

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

Re: New version of Scramble for the beeb (going well)

Post by tricky » Tue Aug 28, 2018 5:10 am

Thanks,
I'm glad that it runs, but exiting is a shame.
Because I have stomped on everything, I try to force a power on reset with escape. Maybe the master needs more convincing.

Does anyone have any ideas?

Blue screen - well I do build on windows :lol:
Last edited by tricky on Tue Aug 28, 2018 5:10 am, edited 1 time in total.

User avatar
uniforix
Posts: 44
Joined: Sun Apr 21, 2013 9:57 pm
Contact:

Re: New version of Scramble for the beeb (going well)

Post by uniforix » Tue Aug 28, 2018 5:05 pm

Game looks amazing, now I have a BBC i can try it =D>
---

Electron Forever
www.electronforever.co.uk

AndyGarton
Posts: 191
Joined: Tue May 21, 2013 2:47 pm
Contact:

Re: New version of Scramble for the beeb (going well)

Post by AndyGarton » Fri Sep 07, 2018 9:18 am

Some quick feedback on demo4, other than it's awesome: on my real hardware (a Model B and Master 128, both with a DataCentre, both connected to Cub monitors), the game will often fail to load/initialise video properly. I hear audio and can fire missiles, but I either see a black screen (Master) or a white/black flickering/scrolling screen (Model B). Trying again will usually see it load fine - I'd say it's about 50/50 so far work/no work.

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

Re: New version of Scramble for the beeb (going well)

Post by tricky » Fri Sep 07, 2018 10:39 am

Thanks,
I noticed the same thing last night.
It is causes by the changes I made to support the VLSI (I think) 6845.
I'm going to try to get a better understanding of the incompatibility and if I can't, I'm going to revert that code for the release and have a second "exe" that will support the troublesome chip.

Post Reply