home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Sauerbraten engine development

by Aardappel on 03/03/2004 05:18, 1571 messages, last message: 03/14/2008 18:53, 1700282 views, last view: 05/17/2024 14:10

This thread is for discussion of Sauerbraten coding issues / implementation ideas etc.

Go to first 20 messagesGo to previous 20 messages    Board Index    Go to next 20 messagesGo to last 20 messages

#901: liquids encoding

by Zer0 on 06/16/2005 02:36

all the cubes in octree have their own textures for each side, even if they are empty.

so, if the cube is empty and its material is liquid the engine can store direction (4 bits, 16 directions) and speed (3 bits) of this liquid in texture. last 1 bit can be used to indicate that the engine shoud draw this side of cube, or not.

reply to this message

#902: Re: Game / engine separation

by Aardappel_ on 06/16/2005 10:00, refers to #902

> Can you see a nice weak fault line where the axe could land to split them apart?

No :)
It will just be a lot of work to get right, and require introducing some new structure.

reply to this message

#903: ..

by sinsky on 06/16/2005 19:13

As a non-programming guy who doesn't know what he's doing most of the time, I have to say I prefer to have as much stuff in one file as possible.. probably due to different reasons than the ones discussed here but anyway. I remember some months ago trying to do a cube death function (when something dies it ends up there no matter what it is, no matter the circumstances - for example falling on something deadly etc. - and all "sorting" happens in the function), and had a hard time putting code from various .cpp files together. It would have been easy for a programmer (mature or immature), my point is rather to be more illustrative and offer some more views on the problem. It was a lame example though.

reply to this message

#904: Re: ..

by pushplay on 06/17/2005 02:19, refers to #903

A good editor like Jedit can search within a directory for a string. It makes life easier. Having all the Cube source in one file would be the project from hell.

reply to this message

#905: Re: ..

by sinsky on 06/17/2005 03:33, refers to #904

I use Dev-cpp and it can search through all project files, that's not a problem. My problem were local variables (i think that's how they're called, not sure though) and local stuff in general. Local stuff can easily become global stuff but somehow I managed to screw it up and was entangled in some code too complex for me to mess with. When I finally got the death function working I could't place it anywhere except monster.cpp (if memory serves me well).

Anyway that's some newbie stuff and certainly not very interesting. The important thing is, friendly code such as Cube's code does not depend on where it's placed, how it's documented, how many project files there are etc. but just how it's written.

reply to this message

#906: ..

by HopFrog on 06/17/2005 06:42

I use grep, and it's awesome.

reply to this message

#907: tmapgen

by TOGoS_1u2kuhbui on 06/18/2005 08:57

http://www.uwplatt.edu/~stevenda/projects/tmapgen/files/tmapgen-2005.06.18a.tar.bz2

Well I've gotten tmapgen started. The framework for generating maps is mostly there, the next step is to come up with a decent cave-generating algorithm. Right now there are 2 algorithms to choose from - one called "quilt" which makes diagonal lines of textures throughout the map (cut into it and it looks like a quilt), and "perlin", which is terribly over-engineered, has very little to do with perlin noise, and doesn't make very interesting maps.

How the basic map generator works is it digs down to the specified size factor of cubes and uses a specified function to determine the contents of that cube, and the re-mips on the way out. There's a lua interpreter embedded and I plan to give methods to direcly modify cubes (textures, edges, etc) in the future, as well as offer alternative generating strategies, such as tunnelling.

Anyone have any comments or ideas fer interesting algorithms to try?

Here's a screenshot of the dumb place it generated. http://i3.photobucket.com/albums/y85/TOGoS/Sauerbraten/tmapgen/tmapgen-gaylin.jpg

reply to this message

#908: ..

by CC_machine on 06/18/2005 12:06

this may be a stupid question, but why is there a folder called CVS in every folder of sauer? there isnt in cube, what is it for?

reply to this message

#909: Re: ..

by hungerburg on 06/18/2005 13:33, refers to #908

CVS (concurrent versioning system) is a way for several people to work on one set of files (sourcecode) without getting each other in the way.

did you get the source by CVS? if so, then its part of the system; else just delete them.

reply to this message

#910: Easy way to create Arches

by da-mitaman on 06/18/2005 14:42

Not sure if this is proper thread but here goes-

I really think SAUER needs some pre-fab configs (scripts?) for creating arches like those in CUBE. I also dearly miss using Bascules GOTHIC and HILL config that worked so well in CUBE.

Don't get me wrong, I find editing in SAUER fairly easy and the possibilities for world building are nearly endless, but without several styles of arches (at least some simpler way to make them) Sauer can have a bit of a "square-ish" look to it.

Perhaps I just haven't the proper way to create arches.

Another "feature" I miss is how you could always tell (in CUBE) the 8x8 cube grid layout in edit mode. The highlighted 8x8 grid made it easier to determine how textures would "fall into place" when building your world. My workaround for now is applying any 256x256 texture to everything and using that as my guide.

Any comments? Am I asking too much from Sauer?

BTW, all you guys working on the engine are doing a fantastic job! You should all be proud of your labors.

MitaMAN

reply to this message

#911: useful freeware software

by da-mitaman on 06/18/2005 14:55

Just thought I'd leave this link for some useful software when viewing large amounts of textures. I found the thumbnail viewer and the ability to convert textures (as a batch) from one format to another very helpful.

http://www.irfanview.com/

MitaMAN

reply to this message

#912: Re: Easy way to create Arches

by Sparr on 06/18/2005 21:12, refers to #910

unfortunately mitaman, good arches are usually impossible in sauer :( in cube you could highlight anything and make a nice arch (or dome, with my editing fork), but in sauer the geometry has to be specifically designed with an arch in mind.

the large majority of heightfields in cube can not be reproduced in sauer. approximating them is one of the points standing in the way of a cube->sauer map converter.

reply to this message

#913: Re: tmapgen

by shadow516 on 06/19/2005 00:15, refers to #907

I checked out the test map, and personally I think that there would be too many problems.

I think that the best solution would be to start with a random maze generator like these:

http://www.charm.net/~shack/java/maze.html

http://www.billsgames.com/mazegenerator/

Have the server consider the path as a red line instead of two walls, and create an octagonal tunnel along the red line. Add noise and prefab rooms to make the cave look interesting and Voila! Instant tunnel.

For multiple levels, put in a "ramp" prefab, and have the server insert it b/w the two levels. And just for variety, put a 25% chance that any level below, say -1, is filled with water.

reply to this message

#914: Re: tmapgen

by TOGoS_1u2kuhbui on 06/19/2005 01:49

I'll probably add a maze generator like you show sometime in the future as another algorithm to choose from. What are the 'too many problems' you speak of? Remember, that test map was just to show that I could output *something*. Right now I'm working on real perlin noise generator which should make some nice natural-looking caves to work in.

reply to this message

#915: Re: Easy way to create Arches

by enigma_0Z on 06/19/2005 21:12, refers to #912

@Sparr

> good arches are usually impossible in sauer

that is completely untrue... it just takes ALOT more work.

You need to start on the wall and push the squares in alot, then push the bottom in further.

Then, push the bottom of the next up one in to match the top of the one beneath it...

Push the top of that one in to a little less than the bottom of that one...

Repeat untill you have the slope of the arch at exactally 45 degrees (the max for a single cube).

Then do the same with the bottoms of cubes instead of sides. You can create a nice graduated arch that way, but it's really time consuming.

Anything really detailed is really timeconsuming in sauerbraten, however. I'd like to see some automation for creating things like wood-slat steps, arches, doorways, slopes, etc.

--another topic--

Are SP triggers/tags working in sauer yet?

reply to this message

#916: ..

by enigma_0Z on 06/19/2005 21:14

I don't know if it was mentioned in this thread, but I believe MitaMan mentioned that a grid would be really helpful...

I second that. Even better, if the grid matched the current gridsize.

reply to this message

#917: Re: Easy way to create Arches

by Sparr on 06/19/2005 22:17, refers to #915

arches made that way are going to be 'lumpy' 95% of the time.

reply to this message

#918: Re: Easy way to create Arches

by shadow516 on 06/20/2005 05:34, refers to #912

I made a prefab map to help alleviate that issue (along with some others) you can get it here:

http://cube.snieb.com/node/86

reply to this message

#919: Re: mac os x port of sauerbraten

by absinth on 06/20/2005 15:43, refers to #890

>that's cool... we will integrate that. eihrul? :)

thanks
as i can see from browsing the cvs tree only the patch has been applied and neither the makefile, the project files or the binary was committed.
can you give me a clue what needs to be done to get them "in"?
I'm sure the makefile could be merged with the standard-linux makefile but my makefile skills are lacking ;(

i think as sauerbraten matures there needs to be done something about the release-process. as it stands the source, the content and the binaries are released as one big package, and depending on who does the release only up2date linux or windows binaries exist, and later there is an followup-release with the other-binaries. this was already sub-optimal with linux and windows support, but adding mac binaries will make this even worse.
two solutions spring to mind:
• notifying all people who build binaries before doing a release so up2date binaries exist for all platforms. i would volunteer to maintain mac-binaries.

• properly separating source-code from content and binaries and making separate releases. this would also enable independent advances in source and content.

thanks, julian

reply to this message

#920: map linking

by ssdd_darkstar on 06/21/2005 13:38

this might be the first step in sauer map linking
i've added two new entities:
telemap and mapdest
telemap is like a teleport but it takes you to the matching destmap in another map. (takes next map from 'telemapX' alias). I believe this was implemented in cube with triggers or something, i haven't looked into it.
only problem is, the game spawns the player at a playerstart _after_ the enity pickup code places him at the mapdest in the new map. how can this be avoided?

code:

in pickup:

case TELEMAP:
{
static int lasttelemap = 0;
char *nextstr; char *nextmap="";

if(lastmillis-lasttelemap<5000) break;
sprintf_sd (nextstr) ("telemap%d",ents[n].attr1);
nextmap=getalias(nextstr);
if(nextmap) changemap(nextmap);
//TODO: check if we actually changed the map
lasttelemap = lastmillis;
telemap(n, d); // telemap is just a clone of teleport, but it looks for destmap entities
break;
};



reply to this message

Go to first 20 messagesGo to previous 20 messages    Board Index    Go to next 20 messagesGo to last 20 messages


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


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
54022730 visitors requested 71802394 pages
page created in 0.075 seconds using 9 queries
hosted by Boost Digital