home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


loading mutliple cube worlds

by concray on 05/27/2013 22:39, 14 messages, last message: 06/01/2013 02:31, 1728 views, last view: 05/04/2024 23:45

hey guys,
i was playing around with sauerbraten a bit trying to (basically) make a mod.
One thing i'm trying to do is loading more than one level into the world(loading a cube into a child cube instead of the root cube).
Has anyone else done that before? In the manual/faq there is something about loading cubes per id.
I'm pretty sure that was just an idea but maybe i'm just overlooking it in the code?
The biggest problem i'd have to do it completely myself, would be the lightmaps and textures. The textures because i wouldn't want to load the same multiple times, the lightmaps because i have no idea how they are linked to the cubes.
Anyone ever thought about something like this or other insights?
regards

   Board Index   

#1: ..

by Q009 on 05/28/2013 08:28

There is such a thing already: octabrushes.
They don't have any particular size limit I know of, you can even easly modify it to save entities.

reply to this message

#2: ..

by concray on 05/29/2013 02:49

thanks, i took a look but the problem is it doesn't save/load lightmaps, which makes sense because it is for editing. Another problem i realized would be the visibility stuff(pvs i think, but i haven't really looked into it).

reply to this message

#3: Re: ..

by Q009 on 05/29/2013 08:12, refers to #2

It wouldn't be much of a deal implementing lightmap handling too. Same for PVS (which is rather useless these days).
All those parts have separate bits of code, fairly easy to distinguish.

reply to this message

#4: ..

by Papriko on 05/29/2013 11:17

Is anyone still using PVS at all?

reply to this message

#5: ..

by concray on 05/30/2013 22:45

don't know, but with sauerbraten i expect it to explode for any old reason.
Loading a cube was surprisingly easy, once i realised that the worldroot wasn't a cube but an array of cubes... yeah, i'm not that smart. So on to lightmaps.
It could be as easy as changing the lightmap-ID in the surfaceinfo or... not. I bet the latter.

reply to this message

#6: Re: ..

by suicizer01 on 05/30/2013 22:58, refers to #4

Yep, evilness does.

reply to this message

#7: ..

by suicizer01 on 05/30/2013 23:01

And PVS culling isn't that useless as it really retrieves some frames per second for a bit of file-size if used right.

reply to this message

#8: ..

by Meigus on 05/31/2013 07:26

I brought this up to the notice of an admin or programmer before:

http://incoherency.co.uk/interest/sauer_map.html

I don't think it has been updating to describe the new map format, but it's a place to start.

There's also:

http://sauerbraten.org/docs/dev/wikistuff.html

I know I saw somewhere a guide which described using portals in levels, to dynamically load new octrees.

A big thing to look at, and get, is:

http://cubeengine.com/forum.php4?action=display_thread&thread_id=2422

Some Russian guy worked up a patch which can save/load subcubes AND entities contained there-in. It STILL hasn't been integrated into the main version, even though the main version REALLY REALLY needs this feature, to actually do anything interesting past one-at-a-time cube editing. Yes I know there's the stupid savebrush thing command already, but it doesn't support entities so it's practically useless.

If you based something on that code, you could probably hack together a system to add to the current lightmaps, so although you modify the cubes, you don't horribly undo all lighting while instantiating the map. That's until Sauer updates to a modern lighting system, anyway.

reply to this message

#9: Re: ..

by Q009 on 05/31/2013 14:26, refers to #7

It isn't useless only on very (very) old hardware. Everything else has built-in hardware occlusion culling.

reply to this message

#10: Re: ..

by eihrul on 05/31/2013 15:55, refers to #9

Not true. The fewer hardware occlusion queries that are issued, the better. If the PVS can determine an OQ is not needed, then it can avoid having to issue one.

reply to this message

#11: Re: ..

by Q009 on 05/31/2013 22:44, refers to #10

*backs off slowly into the shadow*

reply to this message

#12: Re: ..

by PhillipT on 06/01/2013 01:19, refers to #8

Meigus - thanks for posting the links - these are helpful while getting head around codebase - much appreciated.

reply to this message

#13: Re: ..

by concray on 06/01/2013 01:43, refers to #10

just out of curiosity. Would pvs be more effective in tesseract than sauerbraten with all the pretty lights and so on?

so entities now go to the right place. Also kind of easy. I basically just used the gencubeedges in octarender(not literally) to get the position of the new cube and added that to the entities after they were loaded.
Lightmaps still confuse me.

reply to this message

#14: Re: ..

by concray on 06/01/2013 02:31, refers to #13

...but the problem with light is that it doesn't have to be in your line of sight to be seen.

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
53865577 visitors requested 71640726 pages
page created in 0.024 seconds using 10 queries
hosted by Boost Digital