Swirling Galaxy in CC

For questions about using Classic.

Post » Sat Dec 14, 2013 10:48 pm

I'm trying to crate an animated background for the game I'm doing that looks like a spiraling galaxy. Sort of like this:

Spiral Galaxy

Or like this photo (but in motion):



I can use the orbiter behavior to create rotating star fields, and they look good. But I was trying to create the CLOUDS that appear to be endlessly spiraling into the center of the image (into the sun or black hole or whatever) and I'm having no luck.

Is there a trick to animating an endless loop like that? Should I be trying to animate this as a sprite and paste it into the background? (That'd be a BIG sprite, the game runs at 1920 x 1200).

Any suggestions appreciated! Thanks!
B
4
S
1
G
2
Posts: 64
Reputation: 980

Post » Sun Dec 15, 2013 2:38 am

I would say animate each "whisp" that heads to the center (smaller game object), then duplicate/rotate it around the center point. It's hard to explain as I've not drawn something like that before but I hope it helps!

Edit: Oh, maybe you could also attach smaller clouds to the individual objects then "blob" them together with pixelshader fx! (or just make them solid colored on a layer that's 50% transparent)Jayjay2013-12-15 02:40:17
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
41
G
17
Posts: 2,204
Reputation: 19,545

Post » Sun Dec 15, 2013 11:50 am

I think I understand that idea: Actually animate one of the curved clouds as a sprite with multiple frames... Then rotate several instances of that around the center object..?

I can try that -- doubt my animating skills are up to the task!

I've played around with the blob shader as well. I guess I could rotate several blob sprites in a kind of chain? Is that the idea?

I keep thinking the Orbiter Behavior will somehow save me. I just don't feel like I understand the math! Here are a few attempts that produce fun results (but not really what I'm hoping for):

Spiral Stars

Spiral Stars 1

Spiral Stars 2

These are just tests. I was thinking I could reduce the number of objects and make them larger "whispy cloud" sprites instead.

Maybe I should skip the Orbiter behavior and try Gravitation?
B
4
S
1
G
2
Posts: 64
Reputation: 980

Post » Sun Dec 15, 2013 12:22 pm

Okay, one more -- this one is getting closer... I just feel like I'm being VERY inefficient with this. For instance, I'm rotating the entire layer just to get it to look right. I keep thinking there would be a way to do this with our old friend math.

Star Spiral 3

Also, I think it would be better if the stars would actually disappear when they reached the center of the spiral -- then new stars could form at the far end and the process could loop forever...
B
4
S
1
G
2
Posts: 64
Reputation: 980

Post » Sun Dec 15, 2013 11:08 pm

This is the closest I've gotten. I create 20 sprites and orbit them around a center object... Decreasing the orbit distance constantly. When a sprite overlaps the center object, it gets destroyed:

Cloud Spiral Testing

My problem is, I want to create a NEW sprite at the end of the chain to replace every sprite that gets destroyed. I can't figure out how to pick the last sprite in the chain, get it's location, orbit step, etc... and tack a new sprite on right behind it.

Any suggestions?
B
4
S
1
G
2
Posts: 64
Reputation: 980

Post » Wed Dec 18, 2013 1:06 pm

For completeness sake... I got a sort-of, kind-of version of this working. I'll upload in case anyone is curious:

Sort-of Swirling Clouds

I'm not too happy with it, but my meager construct skills are the limiting factor, I think. This level will have to wait until I get better!

Thanks!
B
4
S
1
G
2
Posts: 64
Reputation: 980


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests