[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
DenTut12-Pas

Well, a lot has happened since the last trainer, which is the reason for the amazingly long delay. First, the elections. These were quite easy actually, I went and watched a move (Demolition Man) (Election day special, all movies R2, which is about 50 US cents), then went and voted after most voters had gone home, so no long lines
. Soon after were
exams. These did not go too well, and I am not looking forward to the
results. Finally, I got measles and pneumonia at the same time and was
sent off to hospital for a few days. All in all, not events which are
conducive to coding! This has meant that the trainer has been delayed,
and ASPHYXIA was not able to enter into the local democompo, Dexterity
'94, which we were hoping to do well in. Oh well, onward and upward!
This trainer is on full screen scrolling in Chain-4, by request. This is actually very easy to do (and smooth), and holds a lot of potential, as I am sure you can immediately imagine.
Full screen scrolling is not limited to movie credits. Games like Raptor have you flying over a scrolling landscape while you are down the bad guys. In this tutorial we will be doing vertical scrolling, but the code can very easily be altered for horizontal scrolling too.
Remember that we will be using Chain-4 to do our scrolling, so you may want to brush up on tut 10 in which that was covered. I will assume a brief knowledge of how chain-4 works for this tutorial.
Picture if you will, a screen that is two monitors high. Chain-4 actually has four, but for this we only need two. Now, for this screen that is two monitors high, we can only see one monitors worth. Here it is in ASCII
This actually works in our favour. Anything done outside the bit we are looking through cannot be seen, so we can do our work without changing our screen.
On to scrolling. The method we will use this time is as follows :
When we hit the top of our enlarged screen, we flip down to the bottom which looks exactly the same as the screen we have left. In this manner we have obtained smooth, infinate full screen scrolling!
A map of sorts could be generated, with one byte equalling one terrain type. In this manner, the terrain scrolled over could be set, as in a flying game (Flying Shark, Raptor etc). The terrain could also easily be replaced with letters for our movie-style credits.
Free direction scrolling, ie scrolling in all directions, is a very different matter, with very different methods to get it to work. Perhaps this will be discussed in a later trainer. But for now, work with this, know it, understand it, and think up many great things to do with it! How about a full screen text scrolly? A game? Go wild!
I have recieved a few requests for future trainers, and most of them are for effects, so I guess that is what will be done from now on. A surprising number have told me not to do a sound trainer and stick with graphics stuff, with only a few asking for sound stuff, so I will hold off on that until there is more of a demand.
I am still open to suggestions for future trainers, and of course suggestions for improving the series. Leave me mail!
Hmm. A quote? Okay, let me think ....
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
DenTut12-Pas
ÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͸
³ W E L C O M E ³
³ To the VGA Trainer Program ³ ³
³ By ³ ³
³ DENTHOR of ASPHYXIA ³ ³ ³
ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ; ³ ³
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
--==[ PART 12 ]==--
- Introduction
Well, a lot has happened since the last trainer, which is the reason for the amazingly long delay. First, the elections. These were quite easy actually, I went and watched a move (Demolition Man) (Election day special, all movies R2, which is about 50 US cents), then went and voted after most voters had gone home, so no long lines
This trainer is on full screen scrolling in Chain-4, by request. This is actually very easy to do (and smooth), and holds a lot of potential, as I am sure you can immediately imagine.
- What is full screen scrolling?
Full screen scrolling is not limited to movie credits. Games like Raptor have you flying over a scrolling landscape while you are down the bad guys. In this tutorial we will be doing vertical scrolling, but the code can very easily be altered for horizontal scrolling too.
Remember that we will be using Chain-4 to do our scrolling, so you may want to brush up on tut 10 in which that was covered. I will assume a brief knowledge of how chain-4 works for this tutorial.
- The theory
Picture if you will, a screen that is two monitors high. Chain-4 actually has four, but for this we only need two. Now, for this screen that is two monitors high, we can only see one monitors worth. Here it is in ASCII
+-------------+ Screen two monitors high
| |
| |
| |
| |
|+-----------+|
|| ||
|| ||<- This is the bit we can see, one monitors worth
|| ||
|+-----------+|
+-------------+
We can move the bit we can see up or down the enlarged screen. So, for
example, if the screen two monitors high had a picture on it, we could
move the bit we see up and down to try glimpse the entire picture. Think
of it in this way : The screen is a large painting, but we can only see
though a small magnifing glass. We can move this magnifing glass around
the painting, but can never see the painting all at once.This actually works in our favour. Anything done outside the bit we are looking through cannot be seen, so we can do our work without changing our screen.
On to scrolling. The method we will use this time is as follows :
1) Draw the next line to be seen just above and just below the part we
can see.
+------------+ The enlarged screen
| |
| |
|111111111111| The new part of the picture
|+----------+|
|| || The bit we can see
|+----------+|
|111111111111| The new part of the picture
+------------+
2) Move the view up one pixel so that the new part of the picture is
visible at the top of the screen.
3) Repeat Steps 1) and 2) until the whole screen is filled. Our screen
will look as follows :
+---------------+
|+-------------+|
||3333333333333||
||2222222222222|| Viewscreen
||1111111111111||
|+-------------+|
|333333333333333|
|222222222222222|
|111111111111111|
+---------------+
Check this picture with steps 1) and 2), you will see that this is
correct.
4) Set our viewport to the bottom of the enlarged screen.
+---------------+
|333333333333333|
|222222222222222|
|111111111111111|
|+-------------+|
||3333333333333||
||2222222222222|| New position of viewscreen
||1111111111111||
|+-------------+|
+---------------+
As you can see, the bit we will be looking at is exactly the same as
before, we are now just at the bottom of the larger screen instead of
the top!
5) Jump back to 1). The entire sequence can begin again, and we can have
infinate scrolling in the upward direction. Clever huh?
- Our code
When we hit the top of our enlarged screen, we flip down to the bottom which looks exactly the same as the screen we have left. In this manner we have obtained smooth, infinate full screen scrolling!
- Extra bits
A map of sorts could be generated, with one byte equalling one terrain type. In this manner, the terrain scrolled over could be set, as in a flying game (Flying Shark, Raptor etc). The terrain could also easily be replaced with letters for our movie-style credits.
Free direction scrolling, ie scrolling in all directions, is a very different matter, with very different methods to get it to work. Perhaps this will be discussed in a later trainer. But for now, work with this, know it, understand it, and think up many great things to do with it! How about a full screen text scrolly? A game? Go wild!
- In closing
I have recieved a few requests for future trainers, and most of them are for effects, so I guess that is what will be done from now on. A surprising number have told me not to do a sound trainer and stick with graphics stuff, with only a few asking for sound stuff, so I will hold off on that until there is more of a demand.
I am still open to suggestions for future trainers, and of course suggestions for improving the series. Leave me mail!
Hmm. A quote? Okay, let me think ....
[ The little devil sat atop the alpine slopes, frolicking in the
snow. He threw a snowball at a nearby squirrel, which
missed. The resulting avalance buried two villages and a ski
resort.
The little devil was scared. Avalances were bad for
business. The locals would form team spirit, be nice to
each other and work together and free those trapped beneath
the snow, which created even more goodwill. The man
downstairs didn't like goodwill. He didn't like it at
all.
In the blink of an eye the devil was in his penthouse
apartment, dressed in his usual suit. He picked up the phone.
Dialing was for mortals.
"Hello, Micros..."
"This is Mister Crowley", interrupted the devil.
There were sounds of thumping on the other side of the
phone, then there was a new voice. "Hello, Bill here, we
haven't heard from you in a while, Mister Crowley." The fear
of the man on the other end was almost tangible. The devil
smiled.
"Hello Bill. Something has come up."
"No!" The man on the other side almost shouted with .
"Not Win..."
"Yes, Bill. It is time."
"Havn't I paid enough for my sins? Just that one night..."
The man was almost sobbing.
"You are touching me, Bill. But nevertheless, it is time."
"No." The man sounded beaten, alone.
"Yes. Bill, it is time for a new update."
]
- Grant Smith
14:23
23-7-94
See you next time!
- Denthor
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
