Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4

Author Topic: Planet Generator 110902 Crashing into the Sun Edition  (Read 11241 times)

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #15 on: August 23, 2011, 09:16:30 pm »

You should look up frontier elite for inspiration.

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #16 on: August 23, 2011, 10:20:07 pm »

Hmmm Interesting, but that (Armok) had a flat world, going by the screenshots!

@Max White: I've played Elite, so that's definitely something I have in mind. I have a copy of the Frontier files too but I don't think I ever booted that up ;)

Anyway Minor update

- Tidied up planet gen code, exe is smaller now. @Kay12, this code will be easier to work with now.
- Slightly more planet variation (jay now gets his own Terran world)
- Added code to support tesselating planets in smaller parts (will allow more detail later in ground mode)
- F1 camera mode can zoom to planet surface
- F2 camera mode allows free flight, explore star systems (right now they are just a star)

To add next:

- Space "Cell" system, star density maps
- LOD changes as you change system : planets appear in every system (this is disabled now due to speed)
- improved explorer camera mode, show view of spaceship (basic), able to fly down to planet, not through it
- basic physics for ship, gravity etc
« Last Edit: August 23, 2011, 10:27:01 pm by Reelyanoob »
Logged

DrPoo

  • Bay Watcher
  • In Russia Putin strikes meteor
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #17 on: August 23, 2011, 11:52:32 pm »

Hmmm Interesting, but that (Armok) had a flat world, going by the screenshots!

@Max White: I've played Elite, so that's definitely something I have in mind. I have a copy of the Frontier files too but I don't think I ever booted that up ;)

Anyway Minor update

- Tidied up planet gen code, exe is smaller now. @Kay12, this code will be easier to work with now.
- Slightly more planet variation (jay now gets his own Terran world)
- Added code to support tesselating planets in smaller parts (will allow more detail later in ground mode)
- F1 camera mode can zoom to planet surface
- F2 camera mode allows free flight, explore star systems (right now they are just a star)

To add next:

- Space "Cell" system, star density maps
- LOD changes as you change system : planets appear in every system (this is disabled now due to speed)
- improved explorer camera mode, show view of spaceship (basic), able to fly down to planet, not through it
- basic physics for ship, gravity etc

Weee! Thanks! :D

Eh, edit: Could yer use filesmelt or something instead? Unless it is that you earn money from that link, since then i would gladly click it a thousand times for what you got now!
« Last Edit: August 24, 2011, 12:00:16 am by DrPoo »
Logged
Would the owner of an ounce of dignity please contact the mall security?

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #18 on: August 24, 2011, 01:54:00 am »

Ok I'll give filesmelt a try if you think it's better.

Just be aware the camera I'm using right now is more of a ground "FPS" style-camera. Having trouble finding source code for a fully 3D flight-sim style camera. The problem is called "gimbal lock". The effect is noticable when you look "up" and the hit left or right, you don't pan left or right then, instead you spin around on your forward axis.

This is something I'll fix later on (you can still get around 99% of the time with hardly noticing the problem), after I've created more places to go, the "space cells" which will allow me to load / unload planets from memory as you move around. Also I'll have to have the planets go into higher detail as you get close to one (with eventual higher surface detail once you're down there). Right now it just draws the "home planet" in 'reasonable' detail and skimps on the other 120 celestial objects.

I'm also going to have a sort of "hyperdrive" where if you are not in a solar system's zone, you can travel extra-fast, but it'll automatically slow down once you're near another system. Fixing the camera system fully is sort of lower piority than these other things.
Logged

Kay12

  • Bay Watcher
  • Fighting for Elite Liberal values since 2009!
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #19 on: August 24, 2011, 01:56:38 am »

BTW Kay12: I simplified the planets code now, so it'd be easier to understand / make changes. Lots of that was legacy from the previous app this was part of. Will Upload shortly. A few new features added.

Thanks, gotta check that out...

You planning to setup SVN or Git repo at some point?
Logged
Try Liberal Crime Squad, an excellent Liberal Crime adventure game by Toady One and the open source community!
LCS in SourceForge - LCS Wiki - Forum thread for 4.04

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #20 on: August 24, 2011, 02:31:23 am »

Yeah, kind of, git's pretty popular so I looked at the mainpage the other day but didn't sign up yet.

Well I actually need someone to run this through a compile on Linux, me and some guys on another project did this for much earlier version, but that was ... a long while ago. It should definitely run though, it's not windows specific.

So I guess a git repo would be handy for that ? We had the earlier version on SVN (I forget the link though). Do you recommend GIT or SVN ? What are the Pros / Cons? Which client uses the least Hard-drive space (my main restriction).

Right now I'm adding a timer in, to smooth animation and display frame-rate.

BTW I'm developing this on my machine without a working graphics card, so it's running default windows SVGA drivers, I guess that means it's using software rendering? (not 100% sure). It's a 2ghz AMD sempron 3000+ (laptop version), 256MB RAM, so this project should be considered to target a low-end machine.

It's also just about the only way I can play with anything 3D until after I move in the new year and can consider buying new hardware, so less distractions from other games while I'm making this.

Logged

Kay12

  • Bay Watcher
  • Fighting for Elite Liberal values since 2009!
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #21 on: August 24, 2011, 02:52:26 am »

Well I actually need someone to run this through a compile on Linux, me and some guys on another project did this for much earlier version, but that was ... a long while ago. It should definitely run though, it's not windows specific.

So I guess a git repo would be handy for that ? We had the earlier version on SVN (I forget the link though). Do you recommend GIT or SVN ? What are the Pros / Cons? Which client uses the least Hard-drive space (my main restriction).

I can try compiling it later today... if I remember and have the time. Git's usually considered to be better, at least by the people I usually discuss them with. This source may be a bit biased, but... well, whatever you choose, either is better than no version control at all.
Logged
Try Liberal Crime Squad, an excellent Liberal Crime adventure game by Toady One and the open source community!
LCS in SourceForge - LCS Wiki - Forum thread for 4.04

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #22 on: August 24, 2011, 03:43:20 am »

Ok I'll look at Git then, get it all set up.

BTW I just enabled FPS display :) with some code I googled. Had to add a couple of ifdef's in there because I didn't want to link SDL.h (the windows portion of the code didn't even need it, so that was an oversight from whoever wrote the code).

You can just add SDL as a dependencies on linux for the FPS counter, or let me know if there's a better way. I'll consider the benefits of using SDL for the whole thing later.

Well it's that time of day when I get the world's worst connection speeds :( so I guess I'll and upload that later on.

BTW: DrPoo I tried FileSmelt but I couldn't make it download the file once it was uploaded, not matter what I click, so I'm sticking with the other one until i get GIT up at least.

FileSmelt was no good for me <link deleted as it didn't work>
« Last Edit: August 24, 2011, 12:56:17 pm by Reelyanoob »
Logged

Kay12

  • Bay Watcher
  • Fighting for Elite Liberal values since 2009!
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #23 on: August 24, 2011, 03:47:30 am »

No hurry... I won't promise I'll be of use though, because I have never written any 3D-related code myself (debugging, yes) - I am extremely grateful for this chance to learn more about this stuff and I'll do my best to be of assistance for building all sorts of stuff upon that planet.

Thanks, Reelyanoob!
Logged
Try Liberal Crime Squad, an excellent Liberal Crime adventure game by Toady One and the open source community!
LCS in SourceForge - LCS Wiki - Forum thread for 4.04

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #24 on: August 24, 2011, 04:29:16 am »

It's kinda fun, but I'm getting periodic freakouts. As in, the screen turns into a gibbering mess of polygons. Inconsistent in some cases, such as one time when planet Bob went haywire at just 96 detail. Most do that only if at 256 or above. (Unfortunately, planet Antidisestablishmentarianism is pretty dull on any detail level) One 100% reproducible case is that planets turn invisible at 1024 detail.
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #25 on: August 24, 2011, 06:46:56 am »

Thanks for reporting the problem, I'll look into how that can be avoided. Unfortunately I can't replicate any of the problems here. Can you switch cameras between F1 and F2 to see if the problem persists? And you're using the latest version of my exe?

First, I wouldn't recommend running really high detail level.

They way it renders it, is X * X quads (2 triangles) per face, with 6 faces. Total polys >12 million, total vertexes > 6 million for detail 1024. the amount of data (float values) pumped per vertex is 2 for texture coord, 3 for vertex, 3 for normal, 4 for colour. Colour probably becomes a 32 bit for the whole lot, but the others will probably still be stored as 32-bit float, so there's a total of 8*4+4 = 36 bytes of video data per vertex. Plus it has to store which vertex belongs to which ploygon strip, and each vertex is a member of two adjacent strips, that adds 2 x 32 bit values for each vertex, bringing the total to 44 bytes per vertex.

With 6 million vertex's that means the video card is trying to store a single dlist object with something like at least 6 x 44 million = 254 MB of video data. I wouldn't be surprised if that's more than OpenGL can handle with a single display list, and it's returning an error code rather than creating the display list, hence the "invisible" planet. At 96, it's only storing 1% the about of data, or 2.5 MB.

Second - can you check whether reducing hardware acceleration avoids the problem? And let me know something about your video card? Eg make, V-Ram etc. I'm surprised that there's errors at the 96 level. I might try breaking up the dlist into smaller pieces and see if that fixes your problem.
« Last Edit: August 24, 2011, 06:55:29 am by Reelyanoob »
Logged

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #26 on: August 24, 2011, 08:29:33 am »

http://www.mediafire.com/?vc7ygffzirpfu2p

^ Debug Version. No new 'game' features.

This only adds FPS counter and some debug info, it checks for GL ERROR values each frame, and spits it out to the console.

If experiencing errors let me know if anything appears in there.

Oh, and I disabled the extra star systems in this version, so there's just the main system.

You can put them back by increasing the variable maxSystems in file worldSettings.cpp, then recompiling the program. I've run up to 1000.
« Last Edit: August 24, 2011, 08:34:59 am by Reelyanoob »
Logged

Kay12

  • Bay Watcher
  • Fighting for Elite Liberal values since 2009!
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #27 on: August 24, 2011, 10:17:54 am »

Thanks Reelyanoob. I'll download the source and see whether I can compile on Linux at once!

Oh, this also has the Windows version. Good news - seems to work fine on Wine, produces only the following error:
Code: [Select]
err:appbar:SHAppBarMessage couldn't find appbar window
err:appbar:SHAppBarMessage couldn't find appbar window
err:appbar:SHAppBarMessage couldn't find appbar window
err:appbar:SHAppBarMessage couldn't find appbar window

Which may or may not mean a bloody thing, knowing it's Wine.

As for compiling: I couldn't get that done for now... it might be missing libs or something, although I do have libglut3 (and -dev) installed...
Code: [Select]
In file included from /home/ezekiel/coodaus/planetgen/gl/glApp.h:4,
                 from /home/ezekiel/coodaus/planetgen/gl/glApp.cpp:5:
/home/ezekiel/coodaus/planetgen/lib/libMath.h:117: warning: this decimal constant is unsigned only in ISO C90
/home/ezekiel/coodaus/planetgen/lib/libMath.h:118: warning: integer constant is too large for ‘long’ type
/home/ezekiel/coodaus/planetgen/lib/libMath.h:118: warning: large integer implicitly truncated to unsigned type
In file included from /home/ezekiel/coodaus/planetgen/gl/glInterface.h:4,
                 from /home/ezekiel/coodaus/planetgen/gl/glApp.cpp:8:
/home/ezekiel/coodaus/planetgen/gl/glColours.h:131: error: duplicate ‘inline’
/home/ezekiel/coodaus/planetgen/gl/glColours.h: In member function ‘void cPalette::getColourHeightBlend(float, float*)’:
/home/ezekiel/coodaus/planetgen/gl/glColours.h:151: error: invalid initialization of non-const reference of type ‘cCol&’ from a temporary of type ‘cCol’
/home/ezekiel/coodaus/planetgen/gl/glColours.h:131: error: in passing argument 1 of ‘void pasteColour(cCol&, float*)’
In file included from /home/ezekiel/coodaus/planetgen/gl/glApp.cpp:8:
/home/ezekiel/coodaus/planetgen/gl/glInterface.h: In member function ‘void gl::iStream::operator<<(int64)’:
/home/ezekiel/coodaus/planetgen/gl/glInterface.h:93: error: no matching function for call to ‘gl::iStream::sendString(std::string)’
/home/ezekiel/coodaus/planetgen/gl/glInterface.h:84: note: candidates are: virtual void gl::iStream::sendString(std::string&)
make[2]: *** [CMakeFiles/planet.dir/gl/glApp.o] Error 1
make[1]: *** [CMakeFiles/planet.dir/all] Error 2
make: *** [all] Error 2
« Last Edit: August 24, 2011, 10:35:21 am by Kay12 »
Logged
Try Liberal Crime Squad, an excellent Liberal Crime adventure game by Toady One and the open source community!
LCS in SourceForge - LCS Wiki - Forum thread for 4.04

MaximumZero

  • Bay Watcher
  • Stare into the abyss.
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #28 on: August 24, 2011, 11:23:08 am »

This is relevant to mah interests.
Logged
  
Holy crap, why did I not start watching One Punch Man earlier? This is the best thing.
probably figured an autobiography wouldn't be interesting

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #29 on: August 24, 2011, 12:39:09 pm »

@Key12: I grabbed the GLUT which was patched to access the mouse wheel from here:-

http://www.realmtech.net/opengl/glut.php

Unfortunately it looks like that's windows only (unofficial patch since glut is no longer supported) and I don't know if that's available cross-platform. You shouldn't have a problem if you just rem out the lines which refer to the glut mouse wheel, just use a recent version of GLUT and make sure you take the 'glut.h' out of the planetgen/gl folder, that might be interfering (it's the patched version).

Now for the errors -

glColours.h :-

 line 131 - there was the word "inline" twice ! Easy to fix, that's a typo obviously that my compile gave a warning over (I've been ignoring most warnings)

line 151 - try breaking the 'pasteColour it up like this :-

      cCol c1 = col[col1] * (1 - dx);
      cCol c2 = col[col1 + 1] * dx;
      cCol c3 = c1 + c2;
      pasteColour(c3, target);

That should avoid it caring about the being a temporary variable, or at least narrow down what the problem is

glInterface line 93:-

replace with :-

         string temp = numToString(rhs);
         sendString(temp);

It's the same problem, VC++ creates/handles temporary variables differently. n this case, it was unable to convert the output of my "numtostring" command to a string reference. Making an explicit variable, temp, will allow a reference to be passed. Hope that helps.
Logged
Pages: 1 [2] 3 4