How would you guys make a starfield?

Get help using Construct 2

Post » Thu May 23, 2013 7:55 am

I think this an appropriate place to post this.

I've been working on a spaceship kind of game for a bit. I've completely ignored the graphics side of things until I got the core game-play down, but now I've reached a point where I need to start getting some good looking assets into the mix.

It's a desktop based game with a 16:10 ratio that extends well past the layout size. I wanted a lot of room for the player to fly in, so the actual size of the layout is upwards of 3000x3000+ pixels in width and height.

So how should I approach this?

Should I make one massive image inside Photoshop and just throw it into the game? Should I make each star individually and place them all as sprites (yikes)? Chop up an image an tile it?

What if I want some of the stars to fade in and out or something too?

I'm just curious on what would be the most efficient way to approach something like this...

Thanks for any insight.Kazan2013-05-23 07:56:40
B
13
S
6
G
5
Posts: 74
Reputation: 3,991

Post » Thu May 23, 2013 8:54 am

Its usually best to cut a large image up into power of two size tiled backgrounds and build your levels this way, re using textures when possible.

A star background you would treat similar, but if you want it to fade you may need to use many small sprites and set a random opacity...

Are you using pixel or vector artwork?...
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,260

Post » Thu May 23, 2013 9:13 am

Pixel art, and thanks for the reply.

That seems like the most sensible way to go. I'm just a little worried that I might end up slowing down the layout with so many tiles, animated sprites etc.

Though so far Construct seems pretty capable of handling most of what I've thrown at it, I'm just concerned since the layout size is so large.

That's a lot of ground to cover with sprites.
B
13
S
6
G
5
Posts: 74
Reputation: 3,991

Post » Thu May 23, 2013 9:32 am

It all depends on your game I suppose and how much your pushing around, and your target device, the tiled backgrounds can be pretty large with no performance hit, best to experiment with a frames per second indicator...

the stars would only need to be in the visible viewport, not the entire layout,so the performance hit of a few hundred or so 2x2 sprites with no collision detection will be negligible on a desktop, I have just posted a tutorial that covers that funnily enough...

You have done things the correct way round by getting your base mechanics sorted first...time to have fun...

https://www.scirra.com/tutorials/565/beginners-tips-to-using-global-variable-for-lives-with-lives-indicatorPixel perfick2013-05-23 09:34:32
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,260

Post » Thu May 23, 2013 11:00 am

Thanks a lot, I'll take a look at that :)

I didn't even think to test fps out (duh!). I'll have to experiment with that a bit.

Thanks again.
B
13
S
6
G
5
Posts: 74
Reputation: 3,991


Return to How do I....?

Who is online

Users browsing this forum: newt, Yahoo [Bot] and 18 guests