Planet Explorer

Discuss your creative projects: game development, writing, film making or any thing else, fantasy related or otherwise! Talk about art you like, display your own artwork or stories, or offer help and insight.
Forum rules
Please read the Forum rules and policies before posting.
User avatar
Rasmus
Ee Master
Posts: 714
Joined: Fri May 08, 2009 1:44 am
Location: Sweden
Contact:

Planet Explorer

Post by Rasmus »

Just wanted to show you all a project I was working on before I started working on Dungeon Dwellers :)

It is a planet regeneration demo, where I fly around in space, walks on the Earth and on the Moon, and also do some minor digging :)

Video: http://www.youtube.com/watch?v=Goo1u60c ... e=youtu.be
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Planet Explorer

Post by beowuuf »

Looks fun!
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: Planet Explorer

Post by Lord_BoNes »

Rasmus, that looks awesome! You should continue developing it after you finish Dungeon Dwellers... just remember how many people out there love Minecraft type games, there's definitely a large market for it.
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
User avatar
terkio
Mon Master
Posts: 937
Joined: Tue Jul 10, 2012 8:24 pm

Re: Planet Explorer

Post by terkio »

This reminds me of "Captain Blood Arch" http://en.wikipedia.org/wiki/Captain_Bl ... eo_game%29
An ATARI game where one must visit planets.

Your video reminds me when the player must succed planet landings with final in narrow canyons.
"To make contact with an alien, the player launches an OORXX - a biological probe - to the planet's surface. The player must successfully navigate the probe over a fractal landscape"
"You can be on the right track and still get hit by a train!" Alfred E. Neuman
User avatar
Ameena
Wordweaver, Murafu Maker
Posts: 7515
Joined: Mon Mar 24, 2003 6:25 pm
Location: Here, where I am sitting!
Contact:

Re: Planet Explorer

Post by Ameena »

Ahh I remember Captain Blood, we had that :). I wonder if I can find it on Steem...
______________________________________________
Ameena, self-declared Wordweaver, Beastmaker, Thoughtbringer, and great smegger of dungeon editing!
User avatar
ebeneezergude
Expert
Posts: 345
Joined: Mon Jan 21, 2013 10:58 pm
Location: I see walls stretching off into the darkness...

Re: Planet Explorer

Post by ebeneezergude »

Rasmus, that is really amazing, an extremely interesting project. It is such a convincing planet that you've created. Are you able to provide a little more commentary on how it works and how you developed it? I'd be very interested to hear more. It reminds me a little bit of a program called 'Vista Pro' on the trusty old Amiga from back in the Age of Mystical Legend (...otherwise known as the late 80s).

Keep up the good work!

ps: What is the term you say at 1:35? I couldn't quite hear it.
User avatar
ebeneezergude
Expert
Posts: 345
Joined: Mon Jan 21, 2013 10:58 pm
Location: I see walls stretching off into the darkness...

Re: Planet Explorer

Post by ebeneezergude »

Ameena wrote:Ahh I remember Captain Blood, we had that :). I wonder if I can find it on Steem...
http://www.planetemu.net/rom/commodore- ... indscape-6

Technically may not be legal, but if you have WinUAE....
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Re: Planet Explorer

Post by linflas »

beautiful rendering, astonishing ! :shock:

EDIT : approved by authors, play Captain Blood ST for free (instructions in french but quite easy for people knowing Steem well) : http://captainbloodlegacy.blogspot.fr/p ... blood.html
Check the rest of the blog for information about the future episode : Captain Blood Legacy !
"The only way out is another way in." Try Sukumvit's Labyrinth II
User avatar
Rasmus
Ee Master
Posts: 714
Joined: Fri May 08, 2009 1:44 am
Location: Sweden
Contact:

Re: Planet Explorer

Post by Rasmus »

Thanks all for liking it :)

Yeah, maybe I will get back to working on it later on, but I will have to fix it up a lot because there are a lot of visual bugs as you may have seen :)

My main idea about this game was that you could run around on the planet gathering resources just like in Minecraft, building houses, building cars so you could travel farther, and as the technology increased, building aircrafts and spaceships..
After hours of playing you could finally go into your rocket that you have built and finally fly the Moon, the one that have been haunting you in the sky all this time :)
As you would be able to get more resources on the moon you could build a bigger spaceship and fly to the other planets in the solar system, and all this would be in multiplayer.. No clipping while entering the atmosphere to a planet or anything like that, it would all be in real time..

I loved this idea, planets that could be built just by tweaking some values here and there :)

Just want to clear some of the terms up for those not familiar with it and still wants to keep reading :)
CPU = Central processing unit (Calculations made by the computer processor, the speed is defined by MHZ)
GPU = Graphics processing unit (Calculations made in the graphic card)
The GPU is actually about 100 times faster than the CPU at preforming certain calculations because of its extreme multi threading abilities. So it is always preferable to do as much calculations at the GPU as possible (that can't be predefined by the CPU), also because the graphic cards gets about 30 % faster each year while the CPU:s only gets about 10 % faster a year.

But unfortunately I discovered one mayor problem with my layout.. All the planet generation was built on the GPU, if I would do it on the CPU the framerate would go down to about 10 - 20%.. Why it is a problem generating the planet only on the GPU is that the CPU don't get all the information. Lets say that I want to modify one little triangle amongst millions of triangles being rendered right now, or one triangle amongst billions of triangles being generated over the whole planet, first I would have to let the CPU communicate with the GPU just to get the triangles position (mayor fps decrease), then I would have to tell the GPU that that certain shouldn't be rendered amongst all those millions..
I did somehow manage to get around this problem, that is seen in the video when I dug in the ground and also that I had some collision detection with the mountains.

The reason why I had to do this and not just simulate the same calculations on the CPU as I do on the GPU to get one vertex location is because of the following:
As the planet is a sphere and not flat (like in Minecraft), I had to start all the calculations from the center of the planet and then expand the mountains to the planet size (Hmm.. that did not make much sense)..
Let me try again..
If we have a planet with a radius of 637800 meters that I have here, and then a specific vertex with the coordinate (0.43238722, 0.78924251, -0.43604764) should be raised 567.23 meters above the sealevel.. Then we have:
(Vertex Coordinate) * ((Planet Radius) + (Mountain Height)) = (0.43238722, 0.78924251, -0.43604764) * (637800 + 567.23) = (276021.8319188006, 503826.5549069473, -278358.5240948372)
So the vertex should get the location (276021.8319188006, 503826.5549069473, -278358.5240948372) on the planet..
Now that is a very big and very specific number! And the GPU only uses 32 bits floats when doing their calculations so the result on the GPU will be something like:
(276021.8, 503826.6, -278358.5) or even worse: (276022.0, 503826.5, -278359.0)
Making it round it down to the closest half meter.. That is why I couldn't simulate the locations on the CPU as the GPU would get totally different values :(
So that is why I have to ask the GPU every time I will have to get some information about the planet, and this is a very annoying way of doing it.. An alternative is to shrink the planet down to a radius of 6378 meters, but that would just look unrealistic..

Anyway, all these rounding errors and all the communications between the GPU and the CPU was a really creating problems for me. So therefore if I continue this project later on I will have to do some major changes and make it more manageable, otherwise it will be more like a demonstration of a planet generation than being a actual game..
But even if this took me a couple of months and led to nowhere I don't regret it. I have never learned so much about the GPU and managing shaders than I did when creating this project! I had to take shortcuts everywhere and really use every shader programming combination possible :)

At 1:35 I am saying "Fractal Regeneration" but what I meant to say was just "Fractal generation".. Some how the word "Regeneration" got stuck when I recorded this video and I don't think that is the right term to use.. I am having to redo the video, not only because I am using the wrong terms, but also because the video can freeze now and then, and that is a recording problem. The game itself is very smooth and are running at 300 fps at my computer..

One more thing.. In Dungeon Dwellers I use the GPU to handle all particle sorting, update and death. All the CPU does is to tell the GPU where the particles birth is and how it should behave, then the GPU does the rest. So this made it possible for me to render about 65536 particles at the same time on the screen always sorted in back to front order wherever the camera is in about 1 milliseconds time.. Now I only use about 5 % of that capacity in Dungeon Dwellers, but it is still fun when I think about when I first started to create particle effects in DMT 1 and had a fps problem if I tried to sort 500 particles at once :)

If anyone has read all the way down here without falling asleep in between I am REALLY impressed ;)

(And btw. I am really glad I copied all the text before submitting it because when I was done it wanted me to log in again!!)
User avatar
Rasmus
Ee Master
Posts: 714
Joined: Fri May 08, 2009 1:44 am
Location: Sweden
Contact:

Re: Planet Explorer

Post by Rasmus »

I could get more into the details about how I created it but I think it will be very abstract in plain text.. I would have to make some drawings, or maybe a video..
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: Planet Explorer

Post by Lord_BoNes »

I read it all without falling asleep... guess you should be impressed then? Hehehe :P

EDIT: As for the particles... if you're using additive blending, then sorting isn't needed, and the order of input is irrelevant (you could render in front-to-back order and the result should be the same). I'm fairly certain that multiplicative (or subtractive) blending is similar. The only time you should need to sort the particles is for other blending types (like alpha blending). So, if sorting the particles into order is causing issues... perhaps you could separate the additive/multiplicative blended particles into a separate list (so there's less particles to sort in the primary list) and then just dump them, in any order, into the back-buffer whenever you render.
And given that a-whole-hell-of-a-lot of particle systems are additive/multiplicative (like fire is additive, for instance)... you can save yourself a decent amount of work.
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
User avatar
Rasmus
Ee Master
Posts: 714
Joined: Fri May 08, 2009 1:44 am
Location: Sweden
Contact:

Re: Planet Explorer

Post by Rasmus »

Yeah, fire, lightning and some other particles are additive, but if you are going to mix smoke and fire you can't render the particles in whatever order because the smoke should dim the fire behind it.. And I can't have particles that are just a little bright, it is all or nothing when using additive. It would of course save a lot of rendering time for me to just have additive particles, but as I will have everything from dirt to water particles with various shininess it wouldn't work :S Instead I use sorted particles with alpha blending and also render the particles shininess at the same time. This shininess are later on used with the blooming effect. I think this has been the best approach for me yet, and I am rendering in 300 - 400 fps (unoptimized) so I am not feeling that it will be a problem yet ;)
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: Planet Explorer

Post by Lord_BoNes »

Fair point. Still... it would make for a good "low spec" option :P

EDIT: You mentioned "graphics glitches" earlier... I take it that you're referring to how the mountains take a bit to process. Look at how Minecraft just pops chunks into view. It's honestly not that bad... don't get me wrong, if you could speed up the loading process for mountains and such, then I'm all for it... but it's definitely little enough to be able to play, and it's not gonna break your game.
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
User avatar
Bit
Arch Master
Posts: 1064
Joined: Mon Mar 03, 2008 10:53 am
Location: Nuts trees

Re: Planet Explorer

Post by Bit »

Would it help to calculate with two angles and one distance (from the center), whereby you could count the sealevel out?
GPU doesn't support it i bet - any way to trick it there?
User avatar
Rasmus
Ee Master
Posts: 714
Joined: Fri May 08, 2009 1:44 am
Location: Sweden
Contact:

Re: Planet Explorer

Post by Rasmus »

@Bones: Yeah, perfect for low spec :) I was talking about that the video I recorded are stopping now and then for just a couple of ms, annoying.. I don't care that much about the mountain generation because it is mostly visible when the mountains are having very peaky tops and you are flying by at high speed, so that is not really a problem.. The problem is that the planet geometry are very unhandleable, and that makes it very hard when it comes to collision detection or modifing the terrain in any way, it took me almost a week to get the collision detection working, and it is still buggy. So I will have to reconstruct the engine somehow to make it more manageable :/

@Bit: I tried that one out.. The problem was that when terrain detail shifted it got really weird :S

I will have to make a video or drawing explaining everything.. Because it is very hard for me to explain the technices I am using in plain text.. Just give me a couple of days ;)
User avatar
Ameena
Wordweaver, Murafu Maker
Posts: 7515
Joined: Mon Mar 24, 2003 6:25 pm
Location: Here, where I am sitting!
Contact:

Re: Planet Explorer

Post by Ameena »

Finally got round to watching this video! The beginning bit (flying over the plains) reminded me of the Magic Carpet games...and I can see the resemblence to Captain Blood, mainly later on in the spiky mountains. It looks like it could be fun, flying around the planet to look at all the cool stuff - even better if there's other stuff to do as well, of course ;). And if there were other planets that'd be cool as well, so you could have different terrain than the familiar Terran types :).
______________________________________________
Ameena, self-declared Wordweaver, Beastmaker, Thoughtbringer, and great smegger of dungeon editing!
User avatar
Bit
Arch Master
Posts: 1064
Joined: Mon Mar 03, 2008 10:53 am
Location: Nuts trees

Re: Planet Explorer

Post by Bit »

Don't jump between projects Rasmus. Even though that this one is really amazing and surely a fine base for a brandnew game concept, better go on with the dwellers. And no - not a minute for a concept like Captain Blood... Got stuck there badly... no fun!
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Planet Explorer

Post by beowuuf »

Holy crap I haven't thought about Magic Carpet since...well, since they were released!
User avatar
Ameena
Wordweaver, Murafu Maker
Posts: 7515
Joined: Mon Mar 24, 2003 6:25 pm
Location: Here, where I am sitting!
Contact:

Re: Planet Explorer

Post by Ameena »

Lol...I replay Magic Carpet 2 every few years. Never finished the first one - my dad got to the final level (level 50) but didn't finish it due it being total chaos with monsters and enemy wizards and stuff everywhere and he just kept getting killed all the time so gave up. The second game is much shorter (only 25 levels, plus about five hidden bonus levels) and much easier.
Captain Blood was another one I never finished - messed around for ages and generally didn't really achieve very much except a few conversations with aliens that didn't really go anywhere. If I tried it again today I might do better, I suppose, since I was probably only about seven or something back then.
______________________________________________
Ameena, self-declared Wordweaver, Beastmaker, Thoughtbringer, and great smegger of dungeon editing!
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Planet Explorer

Post by beowuuf »

All I remember is something about being on a carpet, firing magic at stuff, and...ummm...orbs or crystals or something to collect? Anyway, this has been another relevant post to the topic in hand that has seen me have 20,000 completely relevant informative posts :)
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Planet Explorer

Post by Seriously Unserious »

@Rasmus: I love the sort of game you are planning with this, I hope you do continue with this project after you have completed Dungeon Dwellers. It's good to know you have something else in the works too, so I can look forward to many more awesome games from you. :D

@Beowuuf: Of course, all of your twenty thousand posts are completely relevant and on topic... you have never posted anything off topic or irrelevant just to run up your post count, have you... :?: :wink:

:P

EDIT: @Rasmus: I did read thought that huge post above, without falling asleep or anything like that. I found it interesting to read about how you do what you do.
User avatar
Rasmus
Ee Master
Posts: 714
Joined: Fri May 08, 2009 1:44 am
Location: Sweden
Contact:

Re: Planet Explorer

Post by Rasmus »

No.. I will NOT start up this project again for a while.. It is a real maze that needs to be untangled :P

Yeah, and I forgot to congratulate Bones and now you SU for having the energy reading all that text ;)
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Planet Explorer

Post by Seriously Unserious »

yeah, that was a longish post... :P

I've also noticed that same problem on this board when writing a long post of being logged off while entering the post. I've learned to at leas back up my post to the clipboard before attempting to post it if I've taken a long time typing it. BTW you can recover your test even if the board did kick you off while typing it and hit the "submit" button and are asked to log in, hit the "back" button in your browser, copy your text, log back in, hit the reply button, past your text and submit it again, this will recover your post nicely without any loss if you do run into that...
User avatar
Rasmus
Ee Master
Posts: 714
Joined: Fri May 08, 2009 1:44 am
Location: Sweden
Contact:

Re: Planet Explorer

Post by Rasmus »

Yeah, I think we have all learned to copy the text to the clipboard the hard way. Hehe, I can remember a lot of complains on this forum about just this..
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Planet Explorer

Post by beowuuf »

The only time I get logged out is if I open a second instance of the forum directly after opening the first (mistaken double click, etc). Even multiple instances of the forum with a sufficient time delay don't log me off. At worst, the older session is giving a warning about having an invalid session, the post remains, and pressing send again sends a post in the old session.

Edit: Like happened now with this post
User avatar
Ameena
Wordweaver, Murafu Maker
Posts: 7515
Joined: Mon Mar 24, 2003 6:25 pm
Location: Here, where I am sitting!
Contact:

Re: Planet Explorer

Post by Ameena »

I habitually copy any forum post/e-mail before I send it, in case my Internet/browser/the website bugs in some way and I lose it. It's happened before, on occasion, though doesn't really happen much these days. But it used to be sooo annoying if I'd spent ages writing out a long post, then waited ages for it to send, and then it didn't and then I couldn't be arsed to write it out all over again :P.
______________________________________________
Ameena, self-declared Wordweaver, Beastmaker, Thoughtbringer, and great smegger of dungeon editing!
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Planet Explorer

Post by Seriously Unserious »

oh-oh, I think I may have just hijacked Rasmus' thread onto O/T postings... :P :twisted:
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Planet Explorer

Post by beowuuf »

I prefer to think of it as keeping the thread alive until Rasmus can dedicate more time to this project after his other one :)
User avatar
Rasmus
Ee Master
Posts: 714
Joined: Fri May 08, 2009 1:44 am
Location: Sweden
Contact:

Re: Planet Explorer

Post by Rasmus »

beowuuf wrote:I prefer to think of it as keeping the thread alive until Rasmus can dedicate more time to this project after his other one :)
Hehe, at least you guys keep me alert so I don't forget about it ;)
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Planet Explorer

Post by Seriously Unserious »

yup.

We'll keep bugging you every - single - day until you get Dungeon Dwellers done and get started on this project, then we'll keep on bugging you every - single - day until you finally get this project done, and by then you will no doubt have another project ready to go and so we'll bug you every - single - day about that until it's done and so on... :P :twisted:

I guarantee we will never let you forget a single project or let it go incomplete... :wink:
Post Reply