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 11196 times)

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #30 on: August 24, 2011, 12:58:27 pm »

Looks interesting. I hope you manage to succeed at even half your goals for this game!
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

Kay12

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

You have a laissez-faire compiler... :P
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

Kay12

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

Gah, I got more whines, I might've broken something myself... humm, I'll check back if I can't settle this myself.
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 #33 on: August 24, 2011, 01:25:20 pm »

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.
Consider me stupid - I can't figure out HOW to reduce acceleration. I know it's usually done through DxDiag, but apparently it's not so in Windows 7. The NVidia control panel is of no use either.

My card's a GeForce GT330M, with 1GB VRAM.

I've tried the "debug" version, but can see no log or anything. Once again, I tried "Bob" (and "BOB") as planet names, two times out of four I got screen garblage, at default 96 detail. Switching camera modes does nothing, it's as if the rendering engine itself goes haywire. I can (vaguely) see how stuff rotates as I move the mouse, but there isn't a single shape, triangles notwithstanding. When I zoom in, the whole screen is just two triangle faces, in primary colors of the planet. Zoomed out, it's a black strip between two grayish polygons. Weird stuff.

Edit: Er, whoops, that wasn't the debug version. Unrarred the old one again by accident. Still see no log though, but there's definitely a change. Now ANYTHING I try ends up with a big black screen through which various polygons occasionally flicker. I guess my laptop just can't stomach your programming. :P
« Last Edit: August 24, 2011, 01:30:08 pm by Sean Mirrsen »
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 #34 on: August 24, 2011, 01:41:30 pm »

The debug version added a check for GL's error codes, they appear on the text console that starts when you first run the program, not the GL window, so alt-tab etc to the console to see what it says. I was sort of hoping you were triggering some sort of known GL error message.

I'll have to see about adding in more debug related controls. Such as changing the nearView, or drawing the planet-thing in real-time rather than display list pre-rendering. That'll be a lot slower technically but might help narrow down the problem.
Logged

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #35 on: August 27, 2011, 02:19:52 am »

Edit: Er, whoops, that wasn't the debug version. Unrarred the old one again by accident. Still see no log though, but there's definitely a change. Now ANYTHING I try ends up with a big black screen through which various polygons occasionally flicker. I guess my laptop just can't stomach your programming. :P

Missed your edit til just now. That is weird because the 'debug' version 110825 didn't actually change anything rendering-wise, just added FPS counter, error-checking messages and stopped their being more than one star system generated.

The next version i put out will have more than 1 exe to try out, with a full debug build, and I'm going to remove lots of 'inline' functions because I know they've been trouble in the past, when going from debug build => release build. All the exe's I've provided until now have been 'release' builds because i've found that these show up errors that debug builds tend to hide, better to see the errors straight away than to have them lurking.

Also I've done a rewrite of the planet code which cuts out 10 openGL instructions per planet drawn. That will obviously remove them as a possible source of errors. I'm just finishing up the build now.
Logged

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Fractal Planet Generator - based on your name
« Reply #36 on: August 27, 2011, 06:17:07 am »

PlanetGen.110827

Mainly provided for debug purposes. Rendering of the planets has been simplified, managed to cut out 10 OpenGL instructions per planet drawn, which should improve performance when there's lots of objects, and rules out their being problems with those instructions. "planet.exe" is a new release version (hopefully with improved compatibility) and "planet_d.exe" is a compiler debug version (the first time I've provided one of these). if you had problem running the previous versions, please run both of these and tell me if either or both have problems.

Known problems: For some reason when I did the debug build, the planets are egg-shaped (in model coordinates, not screen coordinates). I can't find any reason for this, and in the release build they are perfectly spherical. I'm looking into this.

New controls:

F1 now locks view to nearest planet/star class object, F2 unlocks view. The camera is now unified, but there is currently a jump in view when swtching from F2 to F1 view (but not back). Middle Mouse Button now applies brakes when moving in F2 mode. So it's mouse wheel up to accelerate, m-wheel down to brake/reverse and click on the m-wheel to brake (cuts speed in half).

The program now tracks what "space cell" in 3D your craft is in, but the contents of space itself are still static. Next version should have loading and unloading of cell contents as you move around.
« Last Edit: August 27, 2011, 06:31:40 am by Reelyanoob »
Logged

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Planet Generator 110827
« Reply #37 on: August 27, 2011, 07:18:01 am »

Whatever you did with OpenGL functions there, seems to have fixed everything. At 1024 planets still disappear, but I've gotten as far as 512 with nary a hiccup.

I couldn't run the debug version (planet_d), an error pops up. It's in russian, so a screenshot won't do you much good. It says something like "Unable to launch application, because its parallel configuration is incorrect".
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: Planet Generator 110827
« Reply #38 on: August 27, 2011, 07:42:10 am »

That's excellent news! So I can get on with creating a galaxy now ;) Although your bug did encourage me to streamline the planet code itself quite a bit, so there was a tangible benefit.

I wouldn't worry about the detail levels too much, that's really only there temporarily. Next up is travelling between cells, and it'll pop detail levels in/out as you move around. This will also get rid of the 'number of systems' control (even though I just added that to the intro screen), as new systems will appear as you move.

I've also set it up so it can render specific portions of the surface area now, so eventually when you come down to land on a planet, it'll only draw the immediate area, but in higher detail.
Logged

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Planet Generator 110827
« Reply #39 on: August 28, 2011, 02:30:10 pm »

Ok  new 'galaxy' version 110829. Now the cell system is complete. The 'galaxy' can be explored, planets and stars pop into detail when you are close-by. You can fly forever in any direction without running out of scenery (but it wraps around).

Though the galaxy itself wraps-around and is fairly small, this will do for now (though the detail popping needs to be staggered to get a little smoother frame rate when you enter a star system), so the focus from here on will be inwards, creating more detail on the planets, improving the player's ship. Having some enemies to fight, space stations, trading, fuel to monitor. Something like that.
Logged

freeformschooler

  • Bay Watcher
    • View Profile
Re: Planet Generator 110829 now with galaxy exploration
« Reply #40 on: August 28, 2011, 02:44:44 pm »

Alright, this is just awesome. I would appreciate more detail on the planets as a future detail (though I'm sure ridiculous amounts of detail on explorable-on-foot planets is the end goal). Great work!
Logged

DrPoo

  • Bay Watcher
  • In Russia Putin strikes meteor
    • View Profile
Re: Planet Generator 110829 now with galaxy exploration
« Reply #41 on: August 28, 2011, 03:18:57 pm »

This.. is beuty.. i love you and your world! Give me more of your cake, give me more of your world..

Logged
Would the owner of an ounce of dignity please contact the mall security?

jaxy15

  • Bay Watcher
  • Adept Modder
    • View Profile
Re: Planet Generator 110829 now with galaxy exploration
« Reply #42 on: August 30, 2011, 01:10:12 pm »

This is beautiful.
Posting to follow.
Logged
Dwarf Fortress: Threats of metabolism.

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Planet Generator 110829 now with galaxy exploration
« Reply #43 on: August 30, 2011, 07:39:24 pm »

:o

Anyway ... today's version adds a couple of things.

1. I've started adding texture-mapping. First up is a 2D perlin noise bump-map on the planets. Tried it on everything, it look really wrong on stars, but good on planets / moons. Adds the appearance of greater detail for rocky surfaces. Will eventually use 3D perlin textures (you can see mirroring / moire-type patterns on some parts of the images)

2. Some random cubes flying around ("borg" if you like). And they are controlled by neural networks. This is something I'm still working on. There's currently hard-coded 8 of the cubes, and each time the program is run, they load a table of weight values from a file "weights.dat". If that file is deleted, then the program will re-create a "default" brain for every Borg. The borgs brains mutate over time. And every 200 frames the "weights.dat" file gets saved again. They're supposed to follow you, the player, but this seems a bit intermittent so it's something I'l work on.

Oh yeah and I made an enemy today on the forum, so there's a "special theme" for this version ;) he he he
You can see it in the title bar and intro screen

(BTW the intro options really aren't linked to anything right now, just hit enter for each one)

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

Sample pics of the new planets:



« Last Edit: August 30, 2011, 08:00:27 pm by Reelyanoob »
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Planet Generator 110831 I hate spambots edition
« Reply #44 on: August 30, 2011, 09:39:51 pm »

Seriously, this and droplet are both tied for my second favorite games right now. For the potential alone, I really want to see what you can end up doing.

If anybody was wondering, the answer is DF.
Pages: 1 2 [3] 4