Example Parallax scrolling Star field - C source code for 68K MACs

DW1992

6502
Hi Everyone,

After receiving a several questions about how the parallax horizontally scrolling star field works in my Operation : Pew Pew game, I decided to write a specific example of how it works, so someone doesn't have to filter through all the game logic to find the relevant star field parts.

This lead to me getting far too caught up in it and writing a second example that demonstrates how you can take a simple horizontally scrolling star field and expand it to follow the mouse position, creating the illusion of 3D space flight, or could be modified into an overhead directional game field.

The code is fully commented, you just have to put up with my sense of humour. 😜
I hope this helps anyone looking to include a parallax scrolling star field in their game and gets more people into 68K programming. 😋

'q' or a mouse click quits
+ or - changes the star speed

Simple horizontally scrolling parallax star field

DOWNLOAD C source code example HERE
View attachment horizontal.mov


Nifty 360 degree mouse following parallax star field
DOWNLOAD C source code example HERE
View attachment following.mov


DW/Dark Systems BBS
 
Back
Top