Adam's Lair Forum

game development and casual madness
It is currently 2017/03/25, 01:58

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: [WIP] ARC's Space Game
PostPosted: 2015/12/30, 23:00 
Member
Member

Joined: 2015/11/04, 20:02
Posts: 69
Location: Canada
Role: Hobbyist
Hi guys! Hope the holidays were good to you!

I've had the idea for this project kicking around in my head for a while now (read: years). I finally began working on it about 3 months ago, and have since scrapped and restarted at least once. I chose to use Duality because I like its open-source, extensible approach, and I like the community (though I've yet to meet a lot of you!). I'll be using this thread from now on to post progress, updates, and pretty pictures, and to hopefully keep me motivated. Once I get some real content in here I look forward to hearing feedback from you guys.

For now all I've got is some eye-candy straight from Dualitor, hope you enjoy :)










PS: Everything is procedurally generated :)


Last edited by ARC on 2016/01/05, 20:26, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: ARC's Space Game
PostPosted: 2015/12/30, 23:01 
Member
Member

Joined: 2015/11/04, 20:02
Posts: 69
Location: Canada
Role: Hobbyist
[reserved]


Top
 Profile  
 
 Post subject: Re: ARC's Space Game
PostPosted: 2015/12/31, 00:10 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 351
Location: Out there
Role: Hobbyist
Now THAT is an entrance!

I hope you show one day how you proc gen them planets!

And welcome!

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Top
 Profile  
 
 Post subject: Re: ARC's Space Game
PostPosted: 2015/12/31, 13:12 
Member
Member

Joined: 2015/11/04, 20:02
Posts: 69
Location: Canada
Role: Hobbyist
eyeliner wrote:
Now THAT is an entrance!

^^

eyeliner wrote:
I hope you show one day how you proc gen them planets!


I think I definitely will, when I have some spare time I'll write up a detailed post. Here's a little rundown for now, though :)

First I choose the mass of the star randomly, with some weighting toward the lighter end of the spectrum. From that I calculate the stars radius by approximating radiation pressure vs self gravity. With the radius and mass calculated I go ahead and choose a temperature for the star, between about 2500K and 40000K. This is weighted based on radius. Using temperature and radius I calculate solar luminosity in watts. Using luminosity I approximate the stars colour using the black body radiation colour temperature spectrum.

From there I begin to generate planets, first by choosing their mass. Their mass is used to calculate what type of planet it is, from celestial rocks to gas giants. I choose their orbit relatively arbitrarily, just ensuring two orbits don't overlap. From here on I still have work to do, planets at the moment use arbitrary variables to decide on their final qualities, except for temperature. Temperature is calculated using the parent stars luminosity, the planets orbital distance, and the planets albedo. I do a second pass on this calculation to adjust the albedo to the temperature, cold icy planets tend to get colder and oxide because ice has a high albedo. I need to refine the variables that go into building planets.

For the actual visual effects, stars have a GLSL shader I wrote applied to them that does all of the magic, causing the surface plasma to swirl and the corona to dance and flare. Planets on the other hand are, for now, rendered once to a texture using more custom shaders, then I apply another shader procedural shader to the result to do animated cloud cover (not shown well in the screenshots here) and finally I'm working on a shader that will apply dynamic lighting to the celestial bodies based on the stars luminosity.

I'm exploring ways to render the planets textures in such a fashion that lets me actually have animated faux-3D, rotating planets.

Hope that shed some light, pardon any mistakes I made, it's 7am and I'm on mobile! When I get planets in a better state I'll do an in depth write-up! :)


Top
 Profile  
 
 Post subject: Re: ARC's Space Game
PostPosted: 2015/12/31, 18:30 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 1933
Location: Germany
Role: Professional
Wow. This looks awesome. Nice work :) Really like the swirling, moving star surface, it makes them really come to life. Also, I'm quite impressed with the level of detail you're applying to your Proc.Gen. implementation. You might have some valuable content for a few technical blog entries there.

Edit: Almost forgot to ask: What kind of game will this be? Which genre?



Edit2: I think you might have potential Showcase material here.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
 Post subject: Re: ARC's Space Game
PostPosted: 2015/12/31, 20:04 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 819
Location: Italy
Role: Hobbyist
That... that looks glorious :omg: it looks amazing!
Can't wait to see more.. and can't wait to see the detailed post on how you did all that ^^

Oh, and welcome! :mrgreen:

_________________
Come on Duality's Discord channel. It's entertaining and productive! :mrgreen:


Top
 Profile  
 
 Post subject: Re: ARC's Space Game
PostPosted: 2016/01/01, 19:49 
Member
Member

Joined: 2015/11/04, 20:02
Posts: 69
Location: Canada
Role: Hobbyist
Adam wrote:
Wow. This looks awesome. Nice work :) Really like the swirling, moving star surface, it makes them really come to life. Also, I'm quite impressed with the level of detail you're applying to your Proc.Gen. implementation. You might have some valuable content for a few technical blog entries there.

Edit: Almost forgot to ask: What kind of game will this be? Which genre?



Edit2: I think you might have potential Showcase material here.


Thank you! :)
Those stars went through a fair number of iterations before I got the effect I wanted, I'm really happy with them. I'm glad you like the detail in the PG, I really enjoy making detailed models of processes, to me it's natural to try and make everything have some sort of real world explanation. I'm a huge fan of detailed hard science fiction.

I'll refrain from talking too much about the planned game play just yet. Everything is in a tentative state as you can imagine. I'll try to describe the general idea of it though. Imagine a cross between a 2D space shooter and a 4X. You'll control a single craft at a time and every physical action you take in the game will be performed through that craft. Colonization and maintenance of planets will be a huge mechanic. I want players to value every single planet they own, and I want those planets to reward the player in return.

At it's core it's a game about building empires and caring for them over the long term.

PS. I'll check out the showcase! I'll gather some more material just for that! :D

SirePi wrote:
That... that looks glorious :omg: it looks amazing!
Can't wait to see more.. and can't wait to see the detailed post on how you did all that ^^

Oh, and welcome! :mrgreen:


Really glad you guys like the pretty pictures! ^^ I'll post more as they come, currently in the process of fleshing out planets and adding more types!


Top
 Profile  
 
 Post subject: Re: ARC's Space Game
PostPosted: 2016/01/01, 23:38 
Member
Member

Joined: 2015/11/04, 20:02
Posts: 69
Location: Canada
Role: Hobbyist
Here's a teaser of what I worked on tonight, procedural gas giants!

Image

This won't be their final state, I can't say I'm totally happy with them yet. Their color bands are determined by the % composition of each gas that makes up their upper atmosphere. In this case you're looking at a gas giant with a large amount of ammonia and helium. When I flesh out planet generation a bit more and refactor the code to be more generic then this atmospheric composition feature will be a part of all of their rendering pipelines.

Can you guess what the super experimental feature is? :)


Top
 Profile  
 
 Post subject: Re: ARC's Space Game
PostPosted: 2016/01/02, 08:11 
Member
Member

Joined: 2015/11/04, 20:02
Posts: 69
Location: Canada
Role: Hobbyist
Image

Can you tell this is a 2D engine? :D

Math is hax. The details of getting this to work were tricky. It basically relies on generating the planets surface in 4 dimensional space, and then walking the surface in a 4 dimensional torus to get a seamlessly tileable 2 dimensional surface. Not my idea, you can find details of it online. After that I take the 2D texture and wrap it around a virtual 3D sphere.

Here's what the above looks like before the wrap:

Image

All of this including the noise generation is implemented on the GPU. On my old machine sporting an HD6850 it runs at several hundred fps, even if I recompute the noise every frame, and zoomed in closely. The processing required is tightly coupled with just how many screen pixels are occupied by planets. The way it's implemented also means planets have a very high level of detail, you can zoom in closely on coastlines and the image is still crisp.

Here's one more gif illustrating pretty clearly the virtual sphere effect:
Image


Top
 Profile  
 
 Post subject: Re: ARC's Space Game
PostPosted: 2016/01/02, 19:00 
Forum Adept
Forum Adept

Joined: 2015/07/08, 16:41
Posts: 414
Role: Gamer
I like the faux 3D a lot: it would make the final, textured (and possibly "living") planets look quite nice.

I notice you said that the level of detail remains high even when zoomed in: nice! This would make just watching planets enjoyable, if you manage to incorporate some sort of "life" into the planets. Heck, even without that.

Plus, it would open up a few extra possible avenues of gameplay: ground combat or a sort of colony building management? Real time strategy elements? However, I know it's a bit early in development to think about that, but still, I'll leave it on the table for future consideration.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group