Forum

Bounding boxes

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Bounding boxes

Postby JasonX » Tue Oct 12, 2010 2:15 am

I hear a lot on the forums about the limitation of Quake bounding boxes, which is related to the BSP format, but... how can i change the bounding boxes, as well create new types?
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Postby Mexicouger » Tue Oct 12, 2010 2:38 am

It is ridiculous how many things you have to do just to change a world collision bounding box....

There is a thread on here somewhere where I was helped with editing a bounding box, but it would be interesting to see how to add a bounding box.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby leileilol » Tue Oct 12, 2010 3:26 am

You would also have to edit the bsp compiler to accomodate your new bbox sizes. The standard bounding boxes are found in defs.qc
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby JasonX » Tue Oct 12, 2010 3:39 am

Where are they defined in hmap2? :D
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Postby Baker » Tue Oct 12, 2010 3:42 am

Mexicouger wrote:It is ridiculous how many things you have to do just to change a world collision bounding box....

There is a thread on here somewhere where I was helped with editing a bounding box, but it would be interesting to see how to add a bounding box.


Technically, some of the questions that get asked here are the wrong question.

There are a ton of different things that can reasonably be achieved without creating an incompatible map format and a rogue engine that uses it.

Shamblers, fiends, grunts in Quake are way different sizes. Yet unless you pay close attention it is quite hard to tell they are all using the Shambler sized hull.

And a common practice for oversized enemies to make it so they can't get out of their area. I mean the odds you want oversized enemies wandering all over the map are quite slim.

And I've seen several Quake maps with tunnels that'd make you think you had to be crouching to enter. I'm thinking the Soldier of Fortune Quake mod had one of these tunnels (see Quaketerminus mods for download or maybe Quaddicted has it too.)

Most of the time, you can achieve an acceptable desireable result without going on a 2 week or 2 month side plot that really is a time waster.

/End Advice

That be said, what is the main reason this is trying to be achieved? i.e. what is the end goal?

If it is an awesome end goal, maybe it is worthwhile. If the end goal isn't awesome ... I mean this kindly ... but you might consider filing this in the "stupid ideas to make sure I stop working on my mod and make sure I never complete it" folder.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby frag.machine » Tue Oct 12, 2010 12:49 pm

[rant]
First of all, this isn't directed to anyone in particular. So jasonx, mexicouger, please don't get personal about what I'll say here. I'm just using this discussion as a hook.

In the last months I've seen a lot of people come to this forums, trying to make a HL1/CS/Halo/whatever clone for PSP and whinning about what Quake cannot do. And I notice that many of these modders think they are dealing with some port of the Source engine to PSP.

lesson #1: You're working with Quake, not the HL1/Source engine. so learn MORE about what Quake can and cannot accomplish. There's a lot of resources out there to use as examples. And you have here a small, experient and motivated community of engine coders and modders willing to share knowledge. But always remember, you shouldn't expect people to work in your mod for you - at least, not for free. ;) So be prepared to become the mapper, modeller, 2D artist, sound engineer, QuakeC guy and, if it's the case, even the engine coder.

lesson #2: after learning all you can about Quake, if you realize your idea won't work on it (at least, not exactly in the way you want), you can either change the engine to fit you needs, or change your mod to fit what the engine can do. And you may be surprised with what you can obtain if you "relax" your requirements a bit. Remember, it's better to release a non 100% faithful clone of Halo but that's fun to play than releasing NOTHING. So, that 5000 poly Master Chief model you made (or exported from the original) won't work or makes your PSP crawl and cry ? Use something simpler, then. The bound boxes in Quake suck and don't allow you to make medikits fly in realistic way when you shoot a rocket ? If it's fun, who cares if they are unrealistic ? And, if isn't fun nor fundamental for gameplay, then isn't worth the effort, so forget about it.

So, in a nutshell: be creative, use what you have, explore ALL its possibilities (including adapting your initial ideas to what the available technology can do) and finally, evaluate if it's worth the effort before jumping into the engine modification wagon or just quit whinning about what the engine can't do.
[/rant]
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby mh » Tue Oct 12, 2010 2:12 pm

Agreed. :D

There seems to be a conflict of objectives in some cases. Quake is old technology, and that comes with both pros and cons.

The most obvious advantage is that it can, will, and does run on almost anything. It thrives in low-memory situations, doesn't choke on low-powered CPUs, the game data itself is small, fast to install and fast to load. It doesn't try to do anything too complicated so it's reasonably simple to deal with. It's well understood. These are all valid reasons for selecting Quake as a base for a mod.

Disadvantages are that it needs major wrestling and internal surgery to achieve many things outside of it's limits. It's data formats are also limited. Some of the simple things it does, it does them in a fairly roundabout complicated way. There are a lot of things fundamentally wrong with the released source code as-is, and many of these have crept into engine ports without being fixed.

Part of wisdom is knowing when you've made a wrong decision, and knowing to back away from it. If somebody is constantly beating against limits of the Quake engine, then the possibility is there that they've just made a bad choice; maybe the Quake engine isn't suitable for their mod. (Having said that, if they get enjoyment from beating against those limits and fixing them, that's a completely different story. But that approach isn't for everyone. I digress.)

So if that 5000 poly model runs poorly in Quake, remember that Quake was never designed to handle 5000 poly models. You'll need to change it's model format, rewrite the loader, rewrite the renderer, and do a whole bunch of QC to support it. That's the reason why modern games can use 5000 poly models with good performance but Quake can't. Things were different in 1996; 3D acceleration didn't exist, memory was low, performance was low, and Quake was designed around those constraints.

It took Valve almost 10 years to get from Quake to Source after all.

So, like I said, if that model (or whatever else) turns out to be a crucial part of your mod, then maybe Quake is the wrong technology for your mod; maybe an alternative choice that actually supports the things you want to do would be better.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby JasonX » Tue Oct 12, 2010 2:21 pm

I want to create different bounding boxes for ammo boxes, as well other entities in the map, and apply Gyro physics to it. I understand your worries, guys, but i'm not trying to achieve something impossible with Quake. Is changing the bounding box size so difficult? I really don't mind having a rogue map format, with custom compilers, to achieve my objectives.
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Postby Baker » Tue Oct 12, 2010 2:56 pm

JasonX wrote:I want to create different bounding boxes for ammo boxes, as well other entities in the map, and apply Gyro physics to it. I understand your worries, guys, but i'm not trying to achieve something impossible with Quake. Is changing the bounding box size so difficult? I really don't mind having a rogue map format, with custom compilers, to achieve my objectives.


Search for the words "hull" in the map compiler source and the engine source. Quake has 3 hulls: point size (cannot be changed, for projectiles and so forth), player size, shambler size.

You could dig through the source and try to define more hulls, I guess.

The thing is ... since you are asking this question, I don't see any way you'd actually be able to do it. It is one of those --- "if you understand the concepts, you wouldn't need to ask. If you need to ask, you probably have no chance of actually doing it." kind of questions.

There are changes in the map compiler, changes in the engine and there would likely some modifications so QuakeC can use it. And then you are going to have to have some way to tell QuakeC what models use what extra hull.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby Error » Tue Oct 12, 2010 3:06 pm

would it be possible to add more bounding box sizes to an engine/compiler? or are 3 the max?
User avatar
Error
InsideQC Staff
 
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA

Postby Baker » Tue Oct 12, 2010 3:14 pm

Error wrote:would it be possible to add more bounding box sizes to an engine/compiler? or are 3 the max?


More could be added. It would be a lot of work. Far easier to change existing ones. Kurok, for example, altered the bounding box sizes. Half-Life has 4 hull sizes (a crouch one for the player, the other hull sizes are different).

Changing a bounding box size is not too hard.

Adding several bounding box sizes would be very difficult and require a lot of expertise.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby goldenboy » Tue Oct 12, 2010 3:20 pm

I can't see the sacrilege in wanting new bbox sizes for a mod. Let's not get ridiculous here. It's just code, and code can be changed.

It would have been enough to state that this is difficult. :-)

The really ridiculous fact would be that even Darkplaces / hmap2 still don't support bigger bboxes. If that is really true.

It would be nice to have them, especially for new boss monsters. Remember Quoth's vermis? Heck, even the Gug would probably profit from a bigger size bbox.
User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Postby Baker » Tue Oct 12, 2010 3:31 pm

goldenboy wrote:I can't see the sacrilege in wanting new bbox sizes for a mod. Let's not get ridiculous here. It's just code, and code can be changed.

It would have been enough to state that this is difficult. :-)

The really ridiculous fact would be that even Darkplaces / hmap2 still don't support bigger bboxes. If that is really true.

It would be nice to have them, especially for new boss monsters. Remember Quoth's vermis? Heck, even the Gug would probably profit from a bigger size bbox.


Well if someone wants to make a Quake map format 2.0 I'd be all for it, but wouldn't the map compile times be unbearable for 10 hulls? [I'm not certain and don't have time to look right now.]

Really, some sort of universal Quake 3 map support would be better. But that would be an enormous amount of work, or so I understand it.

[With Q3 map format support, I imagine Quake single player map making might have a renaissance.]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby goldenboy » Tue Oct 12, 2010 3:57 pm

Compile times...

Reasonable maps (I know...) and ideally hub systems (several parts of a hub instead of one megamap) keep these down. My RMQ maps compile in like 2 hours maximum, including fullvis. That might go up to 4 or 5 hours as they get closer to a release. 8 hours instead or even 12 hours would be acceptable. Also, multicore machines make map compiling a lot faster.

10 hulls: I would say we only need two new hull sizes. One about double shambler size, and one boss size. Or thereabouts. Maybe 3 new hulls if we want to principally support player crouching. That's five or six hulls.

Of course, yeah, a friendlier bsp format might be the way to go. I'm open for that and I would use that, as probably others would, but we'd need to think well what it is we want.

Seems like the bsp format question needs to be answered eventually.
User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Postby goldenboy » Tue Oct 12, 2010 4:00 pm

Of course there would be much whining because Worldcraft etc. have no Q3 support as far as I know and thus people would have to switch or learn new editors.

The horror. :^/
User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest