home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


New save/load selection feature

by ProtoThad on 06/25/2012 01:39, 11 messages, last message: 07/09/2012 00:12, 1752 views, last view: 04/27/2024 09:51

I've been hacking around on the sauerbraten source code and added a feature that allows me to save the current selection to to file and then later load that selection back into a map. This is in support of another feature I am currently working on... the ability to randomize and auto-generate maps from a set of pre-built components. I could clean it up and share what I have if anyone is interested.

I'm also working on code that can auto-generate complex terrain shapes. I've still got a bit of work to do on that.

   Board Index   

#1: ..

by Quin on 06/25/2012 03:48

Depends how good the code is, I suppose. My curiosity has been piqued at least.

reply to this message

#2: ..

by Q009 on 06/25/2012 12:18

Dude. Dude. Dude? Dude.
That's EXACTLY what I'm waiting for :3
Good luck :)

reply to this message

#3: ..

by eihrul on 06/25/2012 12:45

Someone had previously made a simple system that used the packeditinfo() and unpackeditinfo() in octaedit that are for synchronizing the clipboard, and just rather redirected the output to a file instead to make brushes. I guess I can add in support for this based on that idea when I get some time. It was one of the things in the back of my mind some time ago that I forgot about in all the hectic stream of life events.

reply to this message

#4: Re: ..

by eihrul on 06/25/2012 12:56, refers to #3

Okay, basic way I envision it working:

By default brushes are saved and loaded from packages/brush/ as brushname.oed files.

You can then select geometry to and type savebrush "brushname" to save it as packages/brush/<<brushname>>.oed. If "brushname" has a directory prefix, like "blabla/brushname" it will save to packages/blabla/brushname.oed instead.

You can then just type pastebrush "brushname" to paste the brush at the current selection like any other paste, and the engine will take care of loading the brush if not available.

That's the basic idea, could be rather simple but functional.

reply to this message

#5: Re: ..

by Quin on 06/25/2012 14:53, refers to #4

*pets eihrul lovingly*

reply to this message

#6: ..

by Razgriz on 06/26/2012 12:09

What about this?

http://wrack.github.com/sauerbraten/library.html

reply to this message

#7: Re: ..

by Q009 on 06/26/2012 12:37, refers to #6

https://dl.dropbox.com/u/27217567/844.jpg

O
M
F
G

reply to this message

#8: Re: ..

by Razgriz on 06/26/2012 12:40, refers to #7

I'll take that as "nobody paid the slightest fucking hint when wrack shared it on the channels" :P

reply to this message

#9: ..

by Dratz-_C on 06/27/2012 04:49

I am very happy ProtoThad and eihrul are willing to work on robust copy and paste through brushes. Also, I think Razgriz's reference is exciting and exceeds my expectations and past thoughts on the subject. (This is solid step of progress overarching my starry-eyed idea for the engine for which I am unwilling to do any work. :? )

Autogenerating complex terrain shapes sounds wonderful. I would love to be able to form, subtract or unify groups of shapes with, for instance, pov-ray like language, such as spheres and tori, changing the geometric material. I know saying "keep doing what you're doing" does nothing for you and can be frustrating to hear, but I digress. I just thought it might be good to discuss the thesis before you write the rest of your dissertation. :)

Cheers

reply to this message

#10: Re: ..

by ProtoThad on 07/01/2012 09:13, refers to #9

Actually, my copy and paste is probably a lot uglier than what eihrul would implement, as I was hacking something together mainly to learn how the engine works and to support my eventual random map generator (which is progressing nicely). I should probably leave it to him to add official support for that feature. My code actually saves the cube data out in human readable form, since I was using it largely to debug my terrain system. The better approach would be to save/load the data in the same internal binary format that the engine already stores it in.

I\'m pretty happy with my terrain generator so far. Basically, you hand it a function that returns if a specific x/y/z point is inside or outside an arbitrarily complex volume, and it will generate a matrix of deformed cubes that approximates that shape. So far I\'ve only tested it on spheres, but they look rather nice (a few minor artifacts aside). I\'m going to be busy with other things for the next couple of weeks, but I\'ll share something as soon as I get time to polish it up a bit.

reply to this message

#11: Re: ..

by ProtoThad on 07/09/2012 00:12, refers to #10

If anyone is interested, my automatic terrain generator is going well. Here is a screenshot from a recent test sphere with a 20 unit diameter. It includes a 25 percent randomness in the surface height-map to make it look more like natural terrain.

http://glaci.com/images/sphere_test_3.jpg

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53870325 visitors requested 71645527 pages
page created in 0.024 seconds using 10 queries
hosted by Boost Digital