Can AGD do scrolling?

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
User avatar
Lee Bee
Dynamite Dan
Posts: 1338
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Can AGD do scrolling?

Post by Lee Bee »

I had an idea for a game I wanted to make (if I ever had time which I don't at the moment) but it requires scrolling. I'm not sure AGD can do scrolling, can it?
User avatar
R-Tape
Site Admin
Posts: 6446
Joined: Thu Nov 09, 2017 11:46 am

Re: Can AGD do scrolling?

Post by R-Tape »

Lee Bee wrote: Sat Nov 18, 2023 10:09 pm I'm not sure AGD can do scrolling, can it?
Full screen scrolling - definitely not, but you can have a few simple scrolling rows e.g.like Moon Patrol with only the ground moving.

(Unless AGDX has moved on further than I realised!)
User avatar
Jbizzel
Dynamite Dan
Posts: 1537
Joined: Mon May 04, 2020 4:34 pm
Location: Hull
Contact:

Re: Can AGD do scrolling?

Post by Jbizzel »

basically - no it can't.
User avatar
+3code
Manic Miner
Posts: 442
Joined: Sat Mar 19, 2022 7:40 am

Re: Can AGD do scrolling?

Post by +3code »

Not sure, I remember a video in a FB group with an ULAplus tech demo of Super Mario Bros with lateral scrolling, no idea how.

PS: probably it was using a system like https://spectrumcomputing.co.uk/entry/3 ... oon_Ranger or similar. Time ago I was researching on engines to achieve more or less easily scroll; with some limitations, CharAde is the best at moment IMHO.
User avatar
Lee Bee
Dynamite Dan
Posts: 1338
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Can AGD do scrolling?

Post by Lee Bee »

Is it dumb of me to ask "Why can't Jonathan Cauldwell just add a scrolling engine to AGD?" :oops:

Yeah… "just"! How hard can it be?
User avatar
PROSM
Manic Miner
Posts: 476
Joined: Fri Nov 17, 2017 7:18 pm
Location: Sunderland, England
Contact:

Re: Can AGD do scrolling?

Post by PROSM »

Lee Bee wrote: Sun Nov 19, 2023 1:57 pm Is it dumb of me to ask "Why can't Jonathan Cauldwell just add a scrolling engine to AGD?" :oops:
Not at all, it's perfectly reasonable to ask if you haven't the experience to know the answer yourself. We all have to learn somehow :)
Lee Bee wrote: Sun Nov 19, 2023 1:57 pm How hard can it be?
Depends on what type of scrolling you want: horizontal, vertical, 4-way, per-pixel, per-character, with/without colour, using a buffer or blitting directly to the screen, etc. Each of these imposes their own constraints on what is possible (both on-screen and with regards to gameplay), and each implementation is going to prioritise different things. Retrofitting AGD with such a capability would, in my estimaton, be very difficult; it wasn't designed to be used in such a way, and significant compromises would likely have to be made to get it working.

I've no doubt you could write new game creation packages built around each scrolling type (or possibly multiple), but the restrictions they'll have to impose to produce a tool that can cover the general use-cases might make other projects totally unworkable in that system, just like some games are too big to fit within AGD, and instead have to be written in AGDX, or from scratch in assembly.
All software to-date
Working on something, as always.
User avatar
Lee Bee
Dynamite Dan
Posts: 1338
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Can AGD do scrolling?

Post by Lee Bee »

Excellent answer, thanks. This is what I suspected - there's no "one size fits all" as every game has different requirements and can be optimised differently.

Yes, I'm sure you couldn't just add scrolling to AGD as it is now, with its flip-screen mechanics. I was more imagining that AGD might give you a choice of two completely separate engines.

Being idealistic, I'd want a system that offered 8-way scrolling with a custom jump distance (allowing variable speed scrolling, or per-character scrolling, whatever you like). Plus optional colour mapping.

I wouldn't expect parallax as that would definitely be WAY too ambitious.
PROSM wrote: Sun Nov 19, 2023 2:34 pm using a buffer or blitting directly to the screen
Interesting. As a dummy, I don't know much about the mechanics of scrolling. Could you give a basic explanation how buffering works, or the pros and cons of the two methods? I'm guessing buffering couldn't work for diagonal scrolling?
User avatar
PROSM
Manic Miner
Posts: 476
Joined: Fri Nov 17, 2017 7:18 pm
Location: Sunderland, England
Contact:

Re: Can AGD do scrolling?

Post by PROSM »

Lee Bee wrote: Sun Nov 19, 2023 3:24 pm Could you give a basic explanation how buffering works, or the pros and cons of the two methods? I'm guessing buffering couldn't work for diagonal scrolling?
Wikipedia has a nice overview of software and hardware double-buffering. It should be mentioned that the 128K machines are capable of hardware double-buffering - as well as the normal screen at 16384, there's a "shadow" screen in a separate bank which can be displayed instead. Thus, when the normal screen is being displayed, the shadow screen can be your buffer, and vice-versa.

With regards to pros and cons on the Spectrum, buffering comes with the overhead of having to copy the buffer to the screen memory, which takes considerable time to do, even with the most optimised copying routine. On the other hand, it provides more flexibility than drawing directly to the screen - you don't have to worry about the ULA reading your partially drawn image, so you can draw things in whatever order you want, with no concerns to artefacts like flickering. Buffering is not just exclusive to scrolling games, it's used in lots of flip-screen games as well, and there's no reason it can't work with diagonal scrolling either.
All software to-date
Working on something, as always.
Timmy
Manic Miner
Posts: 237
Joined: Sat Apr 23, 2022 7:13 pm
Location: The Netherlands

Re: Can AGD do scrolling?

Post by Timmy »

Perhaps you could use his shoot em up designer (forgot its name) instead. Because that one was designed with scrolling in mind.

But the answer of your original question is easy.
If AGD can do scrolling easily, then why is everyone only making flip screen games with AGD?
You would definitely not be the first.
User avatar
Einar Saukas
Bugaboo
Posts: 3167
Joined: Wed Nov 15, 2017 2:48 pm

Re: Can AGD do scrolling?

Post by Einar Saukas »

Lee Bee wrote: Sun Nov 19, 2023 1:57 pm "Why can't Jonathan Cauldwell just add a scrolling engine to AGD?"
He did it, it's called S.E.U.D.
User avatar
jorgegv
Microbot
Posts: 113
Joined: Mon Aug 09, 2021 4:50 pm

Re: Can AGD do scrolling?

Post by jorgegv »

Lee Bee wrote: Sun Nov 19, 2023 3:24 pm Being idealistic, I'd want a system that offered 8-way scrolling with a custom jump distance (allowing variable speed scrolling, or per-character scrolling, whatever you like). Plus optional colour mapping.

I wouldn't expect parallax as that would definitely be WAY too ambitious.

Interesting. As a dummy, I don't know much about the mechanics of scrolling. Could you give a basic explanation how buffering works, or the pros and cons of the two methods? I'm guessing buffering couldn't work for diagonal scrolling?
I think you may be interested in this thread on mutidirectional scrolling. It has an engine and demo that shows everything you mention, except color scrolling.
Last edited by jorgegv on Sun Nov 19, 2023 7:05 pm, edited 1 time in total.
User avatar
Lee Bee
Dynamite Dan
Posts: 1338
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Can AGD do scrolling?

Post by Lee Bee »

Einar Saukas wrote: Sun Nov 19, 2023 5:31 pm He did it, it's called S.E.U.D.
Thanks. Does anyone know if SEUD can do platform games/gravity? All the games I've seen that use it aren't platformers.
User avatar
R-Tape
Site Admin
Posts: 6446
Joined: Thu Nov 09, 2017 11:46 am

Re: Can AGD do scrolling?

Post by R-Tape »

Lee Bee wrote: Sun Nov 19, 2023 6:33 pm Thanks. Does anyone know if SEUD can do platform games/gravity? All the games I've seen that use it aren't platformers.
'Fraid not. You can have rudimentary gravity by making the player "Go down" every pass of the main loop, but it's not as sophisticated as the AGD "FALL".

And platform games are not possible. Blocks can either be deadly on collision (i.e. it's a SHMUP & you've crashed) or just background that you 'fly' over.

I get the impression that you idea falls somewhere between AGD and SEUD, and you probably need a coder! f you're willing, it might be best to describe your idea and see what's possible.
AndyC
Dynamite Dan
Posts: 1420
Joined: Mon Nov 13, 2017 5:12 am

Re: Can AGD do scrolling?

Post by AndyC »

Lee Bee wrote: Sun Nov 19, 2023 3:24 pm Yes, I'm sure you couldn't just add scrolling to AGD as it is now, with its flip-screen mechanics. I was more imagining that AGD might give you a choice of two completely separate engines.
Part of the problem with that is scrolling is already a pretty big ask of an engine, once you start doing it you have to start making active choices that will limit aspects of your game considerably. Getting reasonable performance out of a Spectrum means cutting every possible corner and a lot of the time that heavily impacts on what you can do. PUSH scrollers limit how many things are on a line and what they look like, others only really work when large areas of background are guaranteed to be empty, some require that scrolling speed be fixed to limit how much recalculation there is etc.

Once you try and write a generic, 8-way scrolling routine with variable speed support and flexible camera control etc, you find yourself with something that's probably just too slow to be practical.
User avatar
Lee Bee
Dynamite Dan
Posts: 1338
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Can AGD do scrolling?

Post by Lee Bee »

Excellent answers, thanks for the clarification.
R-Tape wrote: Sun Nov 19, 2023 9:40 pm I get the impression that you idea falls somewhere between AGD and SEUD, and you probably need a coder! f you're willing, it might be best to describe your idea and see what's possible.
Thanks. My life has been too busy lately to commit to any kind of development (I started a Telebugs game earlier in the year but it's been on hold for months now). For the future though, I have tons of ideas, work-in-progress, and LOTS of music ready for various games I'd like to make in future, which includes scrollers. One's a Turrican-style shooter which I think would be more exciting if it scrolled. I'd also love to make a more accurate version of the first arcade machine I fell in love with, Paperboy. I'd also love to do a game based on my favourite cartoon, Inspector Gadget. This would require scrolling for at least certain levels, which need a sense of speed. Though I may eventually just try knocking out my Inspector Gadget idea in AGD, just to get it made :-)
Post Reply