Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Create smooth scrolling starfield
2011-11-17 11:49
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).
 
... 10 posts hidden. Click here to view all posts....
 
2011-11-17 19:56
algorithm

Registered: May 2002
Posts: 705
Don't use $d016.
2011-11-17 20:08
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.
2011-11-18 13:26
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 :-)
2011-11-18 13:57
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
2011-11-18 14:13
Soren

Registered: Dec 2001
Posts: 547
There's a nice one in here, done with sprites.:

Imaginating

2011-11-18 22:59
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
2011-11-22 06:01
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
JonEgg
krissz
daimansion
Martin Piper
Avalanche/Atlantis
algorithm
Thierry
ΛΛdZ
Guests online: 98
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.059 sec.