| |
Cobrakid
Registered: Oct 2011 Posts: 23 |
Create smooth scrolling starfield
I want to make a classic starfield look where the stars are coming from left towards right... just normal dots. What is a good approach for this you think?
I have considered a table with the starfield and then shifting them in the table but that sounds a little overkill and slow. I have also though of randomly generating some dots but I have no idea how to do that (no random generator in C64)?
Any good ideas are appreciated (and I would love some pseudo-code to see how you would do it). |
|
... 7 posts hidden. Click here to view all posts.... |
| |
Skate
Registered: Jul 2003 Posts: 494 |
i don't like single colored starfields (unless they are fullborder ;)). to give the real depth feeling, either you should use multicolor mode or if your routine is irq dependent (mostly using sprites), change colors depending on speed every line/block. slower stars meant to be darker. just keep that in mind whichever method you choose. |
| |
enthusi
Registered: May 2004 Posts: 677 |
Well, ALL starfields are unrealistic anyway ;-)
But I agree, shaded ones are nicer. |
| |
Cobrakid
Registered: Oct 2011 Posts: 23 |
I have aprox the half screen available (interrupt based) for this starfield and in front I want 8 sprites - so nothing fancy. Below the starfield I have some rasterbars and two scrolls (also interrupt based).
Several things have been suggested - as I am not going for any medals or alike I just want to make this as simple as possible so I guess this is done with the normal charset compared to the bitmap approach? A color-mix would be pure gold but it is not necessary in the first simple version.
My first attempt was reading the memory banks and if I ran into fx a #$01 I would print a dot but that for sure didn't work of abvious reasons.
Can anyone give any more precise hints on this - is this standard $D016 smooth scroll? And how do I place the dots? |
| |
algorithm
Registered: May 2002 Posts: 705 |
Don't use $d016. |
| |
Ksubi Account closed
Registered: Nov 2007 Posts: 87 |
http://www.codebase64.com/doku.php?id=base:demo_programming
Scroll down to the bottom of the screen, might be of some help Cobrakid. |
| |
TWW
Registered: Jul 2009 Posts: 545 |
If you are planning on using sinus sprites, good luck with the rasterbars underneath. You should look at spritestretching or dysp tech to do that :-) |
| |
algorithm
Registered: May 2002 Posts: 705 |
One of the simplest forms of starfield is to fill the entire screen with one char eg char (0) then just move the dot and voila the entire screen will consist of 1000 dots moving. move other dots at different speeds and voilla. parallax. next stage would be to use longer char strips |
| |
Soren
Registered: Dec 2001 Posts: 547 |
There's a nice one in here, done with sprites.:
Imaginating
|
| |
Skate
Registered: Jul 2003 Posts: 494 |
i don't remember that one Jeff. thank you for sharing. it's really good, specially skipping bad lines and allowing inner screen to be open makes it extra special. of course other great fullborder starfield is here -> Unicorn |
| |
Honesty
Registered: Jan 2003 Posts: 121 |
For doing a starfield use 8 chars where you had a "dot"
in means bit 7 to 0 .
When going from right to left mask it with and#07
if the result ist zero decrease the offset for
the star (something like star at 0427 when result is
zero 0426 and store the rest as new x offset).
This also works with fld thingy but you need
something like 64 chars then ,means 8x8 dots.
As i remember flosch of sabian did something
similarin just one part demo.
|
Previous - 1 | 2 - Next |