I need help making a .AAS file on Mac.

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: I need help making a .AAS file on Mac.

Post by ^misantropia^ »

By the way, I've committed some bug fixes and code cleanup in the last few days. Could you try it with the current version? You might want to install git, makes it easier to track changes than downloading the source tarball again and again.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

Actually downloading the tarball isn't bad at all, and I think I have git installed...I may have used it while I was on my insane late-night crusade to make NetRadiant work in snowleopard when I couldn't get any of the guides explaining it to work, I just don't know *how* to use it.

I'd be happy to do the same steps again if it helps you,

tarball
make clean debug
gdb run
bt

etc




I've debugged some code before in my life, but never with anything like :

#0 0x000478ca in Q3_BrushSideWinding (brush=0x8b70034, baseside=0x32ab3000) at l_bsp_q3.c:330
#1 0x00047b1c in Q3_FindVisibleBrushSides () at l_bsp_q3.c:383
#2 0x0004897b in Q3_LoadBSPFile (qf=0x9002000) at l_bsp_q3.c:636
#3 0x0006bd20 in Q3_LoadMapFromBSP (qf=0x9002000) at map_q3.c:619
#4 0x0006329e in LoadMapFromBSP (qf=0x9002000) at map.c:1219
#5 0x0002dfbe in main (argc=4, argv=0xbffff798) at bspc.c:766

I see hex addresses, ...what the hell do you do with hex addresses? Or are you just looking at the .c files that are referenced? How is this information guiding your debug process?

the latest:


(gdb) run
Starting program: /bnoordhuis-bspc-a2c66e9/bspc_g -forcesidesvisible -bsp2aas razztazzmagoria.bsp
Reading symbols for shared libraries +. done
Opened log bspc.log
BSPC version 2.1h, Nov 12 2010 13:29:40
forcesidesvisible = true
bsp2aas: razztazzmagoria.bsp to razztazzmagoria.aas
-- Q3_LoadMapFromBSP --
Loading map from razztazzmagoria.bsp...
100932 triangles
0 patch tris
creating planar surface planes...
searching visible brush sides...
95969 brush sides
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x088d7008
0x00049231 in Q3_FindVisibleBrushSides () at l_bsp_q3.c:378
378 for (j = 0; j < brush->numSides; j++)
(gdb) bt
#0 0x00049231 in Q3_FindVisibleBrushSides () at l_bsp_q3.c:378
#1 0x00049e2a in Q3_LoadBSPFile (qf=0x9002000) at l_bsp_q3.c:636
#2 0x00070204 in Q3_LoadMapFromBSP (qf=0x9002000) at map_q3.c:619
#3 0x00067340 in LoadMapFromBSP (qf=0x9002000) at map.c:1219
#4 0x0002edee in main (argc=4, argv=0xbffff440) at bspc.c:766
(gdb)


keep in mind, I've used bspc for the mac to successfully compile bsp files to aas files, just not razztazzmagoria, which the windows version can do. Razztazzmagoria is a horrible ugly demon of awful mapping practices....but it should still technically be able to work. If you'd like a full working copy of your very own Razztazzmagoria look no further:

http://www.map-factory.org/download/qua ... a-1907.zip

if you want the .map source to razztazzmagoria, I'd be happy to email it to you...but when you open it you might wanna....think about a calm, relaxing place before you go about working with it.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: I need help making a .AAS file on Mac.

Post by ^misantropia^ »

Thanks for the report, Steve, I think I've got a handle on it. Seems to have something to do with pointer sizes: everything works on 64 bits systems but crashes on 32 bits systems.
Actually downloading the tarball isn't bad at all, and I think I have git installed...I may have used it while I was on my insane late-night crusade to make NetRadiant work in snowleopard when I couldn't get any of the guides explaining it to work, I just don't know *how* to use it.
It's well worth learning if you are serious about programming. Git is the Swiss army knife of versioning tools. If you've worked with CVS or SVN, watch out: after two weeks of git you won't be able to go back.
I see hex addresses, ...what the hell do you do with hex addresses? Or are you just looking at the .c files that are referenced? How is this information guiding your debug process?
It points me in the right direction. If for example the code crashes in a certain place but only after the umpteenth iteration, it's a strong hint that some out-of-bounds array write is taking place. But if it crashes on the first call, then we're probably dealing with a stray or NULL pointer.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

Damn interesting. I'll look into git.

I've done next to no social coding, everything I've done so far has been editing system calls so programs work in different platforms. The rest of my work history goes into dabbling lightly in no less than like...12 different languages. I just go to where the problems are (as they pertain to my hobbies or paycheck)

Question: When you want a program to be 64-bit, do you just need to compile it on 64-bit hardware with a 64-bit compiler? I have one of those early Intel macs so it ..can....run 64 bit code, it's just completely awful at it. I do have an AMD64 system that I could try compiling the code on too if you'd like. It has the distinct advantage of being actually 64-bit, not that I'm annoyed at Intel or anything for trying to emulate 64-bit modes.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

don't you die on me again! The world needs you.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: I need help making a .AAS file on Mac.

Post by ^misantropia^ »

Hah. It's still on my mental to do list!

Already did some digging, seems a pointer all of a sudden flips from <legal value> to <illegal value> without any apparent cause. Gremlins? Solar flares? I'll keep you posted. =)
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: I need help making a .AAS file on Mac.

Post by ^misantropia^ »

Question: When you want a program to be 64-bit, do you just need to compile it on 64-bit hardware with a 64-bit compiler? I have one of those early Intel macs so it ..can....run 64 bit code, it's just completely awful at it. I do have an AMD64 system that I could try compiling the code on too if you'd like. It has the distinct advantage of being actually 64-bit, not that I'm annoyed at Intel or anything for trying to emulate 64-bit modes.
You need to compile it with a compiler that generates 64 bits code, yes. Having a computer that can also run said code will definitely help.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

how many value types could bspc use? it's not like it processes strings at any point other than when it reads command line arguments...so everything else must all be int, double, float, whatever

while it would be incredibly lazy to do so, couldn't you just set all of the memory types to the one that probably uses the most memory, but would also be able to handle more diverse numbers?

(I only suggest this because the most memory I've ever seen bspc use is like 120MB of ram and in modern computers where everyone has 2...4...8...16GB of ram, 120MB seems kinda negligible consider bspc only runs for..at most like 20 minutes)

it seems like bspc has some error messages built in, like MAX_BRUSHES_SOMETHING_OMNIOUS and those are basicialy built around cases where they knew the program would crash, right? perhaps razztazzmagoria is just so big and silly...whatever you did to make it compile in the first place (which I believe changed something to do with memory) might have changed something else down the line that makes it unable to handle huge data sets....but also, it seems like razztazzmagoria could be tripping some limit which in other cases, may simply have returned an error that it's just not triggering in bspc for osx
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: I need help making a .AAS file on Mac.

Post by obsidian »

-fixaas (in particular, read sock's post. Also, I think this is the only thread where a13n actually makes any sense and isn't batshit crazy):

viewtopic.php?f=10&t=31963&hilit=fixaas
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

That would work and certainly with great results but here we're trying to build bspc for the Mac that can work as well, or better than the windows version so we're just treating one of my more unreasonable maps as a benchmark of functionality. the windows version could handle this so we just wanna know why the is os x one is having a rough time with it. However, that's an extremely useful link and should probably be stickied somewhere.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: I need help making a .AAS file on Mac.

Post by obsidian »

I know, I have a Mac too, and seeing a stable working setup would be a benefit to me too. I'm just referring to "perhaps razztazzmagoria is just so big and silly" and how there are solutions to your problems that don't involve brute force. Just putting the alternative out there in case you didn't know about it.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

^misantropia^, have you been making changes? I just compiled the latest tarball and used it to compile my potential submission for the 20 brush competition and it worked really well. The version number looks different, and it seems MUCH faster...but I could just be....drugs

either way, good work, I think

haven't tried razztazzmagoria yet though
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: I need help making a .AAS file on Mac.

Post by ^misantropia^ »

Yeah, I fixed a few bugs and added a number of optimizations.

razztazzmagoria still doesn't compile on 32 bits systems, though. :/
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

Certain aspects to my life are kinda starting to fall into place, and once I'm established with a roof over my head, I'll have about half a year to lock myself in a room with C/C++ books and see how much I can contribute. I'm wondering how complicated it'd be to get bots to have paths to hovering entities, so if someone wants to have hovering CTF flags, they don't need to employ cheap bot-clip brush tricks to make the flags "pathable". I'm also curious to see what kind of "thinking" goes on when the bot is actually running around, or how the decision making process works. I wanna see if I can get it to take more things into consideration, or perhaps change how it responds to the player...maybe employ some type of "learning" or prediction code. Also, how's the new family member, Misantropia? Hope all is well.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: I need help making a .AAS file on Mac.

Post by ^misantropia^ »

She's exceedingly well, growing like something that's growing very fast indeed. =)

For the stuff you want to do knowing how to write C alone isn't enough, you will also need a fairly strong background in mathematics. Stuff like depth-first/breadth-first search and A* pathfinding is part of the basic toolkit.

Don't let that discourage you though. Most of it is pretty simple, you can pick it up in a couple of nights.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

That...actually.....is a very welcome challenge, and a very well-timed one. What type of math should I be familiar with before moving into the code itself? Algebra....2? Pre-Calc? Ultra-Calc? Being a philosophy major, I didn't exactly have a TON of math under my belt by the time I graduated college...so any suggestions you have I'll happily investigate.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: I need help making a .AAS file on Mac.

Post by ^misantropia^ »

Did your courses include discrete math or was it mostly logic? The latter won't hurt but the former is what most CS stuff boils down to. Algebra and graph theory is what you'll be using most in 3D programming (and the fundamentals like algorithms and data structures, of course).
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

It was almost exclusively logic. I was thinking I would reread some logic, then refresh myself on some "algebra 2" type stuff, then work my way up to calc, and finally end up with the algorithms, data structure, graph theory, and the basic math tool kit you mentioned. Only then would I start working into the code. I'm ok putting in the time as long as I'm building a firm foundation for the next thing I need to know how to do.

That's why I figured...logic->math->more math->code->more code (CUDA/OpenCL/OpenGL)

Do you know of any books on discrete math I should look into or is it the kind of thing I can more or less wiki/google around for?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: I need help making a .AAS file on Mac.

Post by ^misantropia^ »

You don't need to do first one, then the other. In my experience the best way to learn is to screw around until you hit a wall, then start looking up resources about the problem at hand.

But if you want a really excellent introduction to both discrete math and programming, work your way through MIT's Structure and Interpretation of Computer Programs (free e-book). I have to warn you that it's heavy going at times but well worth it.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

I'm running into a new error with the OSX version of bspc

I've tried depth/breadth first bsp building and it hits about 28501 splits and says "ERROR : Tried parent"

I've tried throwing nocsg, forcesidesvisible, nobrushmerge, it errors at the same point each time.

What does Tried parent mean?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: I need help making a .AAS file on Mac.

Post by ^misantropia^ »

Good question. It means that there are two overlapping AAS nodes, something that shouldn't be possible. Sounds like data corruption. Can you send over the map? What do `bspc -v` and `file bspc` say?
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

"unknown parameter -v" :)

and

"bspc-osx: Mach-O executable i386"

the complete console output is as follows:

BSPC version 2.1h, Nov 9 2010 22:28:31
bsp2aas: /Applications/quake3/baseq3/maps/corefault.bsp to /Applications/quake3/baseq3/maps/corefault.aas
-- Q3_LoadMapFromBSP --
Loading map from /Applications/quake3/baseq3/maps/corefault.bsp...
20288 triangles
17064 patch tris
creating planar surface planes...
searching visible brush sides...
27801 brush sides
1517 brush sides textured out of 27801
Entity 0, Brush 28: duplicate plane
Entity 0, Brush 30: duplicate plane
Entity 0, Brush 30: duplicate plane
Entity 0, Brush 30: duplicate plane
Entity 0, Brush 34: duplicate plane
Entity 0, Brush 36: duplicate plane
Entity 0, Brush 36: duplicate plane
Entity 0, Brush 38: duplicate plane
Entity 0, Brush 40: duplicate plane
Entity 0, Brush 2242: duplicate plane
Entity 0, Brush 2244: duplicate plane
Entity 0, Brush 2246: duplicate plane
Entity 0, Brush 2246: duplicate plane
Entity 0, Brush 2248: duplicate plane
Entity 0, Brush 2372: duplicate plane
Entity 0, Brush 2374: duplicate plane
Entity 0, Brush 6024: duplicate plane
nummapbrushsides = 53896
1836 curve brushes
1 threads
-------- Brush CSG ---------
12314 original brushes
8881 output brushes
-------- Brush BSP ---------
8881 brushes
38943 visible faces
0 nonvisible faces
79810 total sides
pthread multi-threading
1 threads max
depth first bsp building
96791ERROR: Tried parent
Closed log bspc.log
User avatar
Eraser
Posts: 19174
Joined: Fri Dec 01, 2000 8:00 am

Re: I need help making a .AAS file on Mac.

Post by Eraser »

If you want to do programming stuff on software like BSPC then trust me, knowing C syntax is the least of your worries.
fKd
Posts: 2478
Joined: Sat Jun 03, 2006 2:54 am
Location: Wellington
Contact:

Re: I need help making a .AAS file on Mac.

Post by fKd »

just get a pc aye? heh im helping!
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: I need help making a .AAS file on Mac.

Post by VolumetricSteve »

YEAH..yeah....yeah....point taken, just sayin' I've never seen "tried parent" before. It's kinda funny to think my maps are dumb enough that it just...keeps breaking different parts of the compile process.

Plus I'll be building all this stuff in 64-bit linux (openSuse unless convinces me to use something else) soon, I seem to recall bspc worked better in that environment.
Post Reply