Parallaxed / scrolling starfield

Show off your games, demos and other (playable) creations.
Post Reply
User avatar
Posts: 79
Joined: Thu Oct 15, 2015 6:25 am
Location: Bristol, UK

Parallaxed / scrolling starfield

Post by unixfreak »

Here's a scrolling starfield, probably useful for side scrolling space shooters (all CC-BY-SA / GPL), most of the image assets are from opengameart :awesome:

There are 4 object types which are spawned randomly based on a seed:
- Nebulae
- Planet
- Star
- Nova

Some screenshots here:

Image Image Image Image Image Image Image Image

Feel free to reuse the code in your own games/projects if it's of any use, but really asking for some feedback in terms of whether anyone likes this effect for generating a background scene.

Press [ or ] to change scroll speed, or press J to reseed the starfield. :

Also please note it is only optimized for 1920x1080 fullscreen, it may look odd on any other resolution (sorry about that).

I have been slowly working on a game using this here (although i haven't got very far with it as of yet):
(11.77 MiB) Downloaded 225 times
User avatar
Party member
Posts: 265
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: Parallaxed / scrolling starfield

Post by xNick1 »

That looks great!
Wonderful job, man!
Currently working on a lucid dreaming adventure called Aarstider:
User avatar
Party member
Posts: 234
Joined: Thu Sep 24, 2015 1:05 pm
Location: New York, USA

Re: Parallaxed / scrolling starfield

Post by Beelz »


Code: Select all

if self:hasBeer() then self:drink()
else self:getBeer() end
GitHub -- Website
User avatar
Posts: 29
Joined: Sat Aug 05, 2017 7:05 am

Re: Parallaxed / scrolling starfield

Post by Mutos »

Hi unixfreak,

Nice ! NIce ! Nice !

I keep it preciously and will remember to ask you for advices if I ever want to include a starfield in a game (which will eventually happen one day) !
Benoît 'Mutos' Robin
Hoshikaze 2250, Sci-Fi universe in collaborative writing
User avatar
Posts: 4
Joined: Mon Jan 25, 2016 8:00 pm
Location: Hungary

Re: Parallaxed / scrolling starfield

Post by varpeti »

What a nice job, man!
Sry4MyBadEng :3
User avatar
Party member
Posts: 125
Joined: Sun Feb 14, 2016 1:13 pm

Re: Parallaxed / scrolling starfield

Post by steVeRoll »

Very beautiful and atmospheric! (no pun intended :P )
Great work!
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests