Easiest Approach to classic Trigger/Event Maps

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
KyleHarrison
Posts: 5
Joined: Tue Sep 03, 2013 5:53 pm

Easiest Approach to classic Trigger/Event Maps

Post by KyleHarrison »

I used to be an old school Quake2 mapper,m and pretty much just want create with that classic way, and I just noticed (and was disappointing to see) that BSP loading doesn't support entities of any kind

I am aware of IrrEdit though I haven't tried it yet.

What I want to know is: how difficult is it to add Entity support to BSP loading? Or should I stick with IrrEdit to create .irr scenes and use Squirrel for scripting sequences?


Thanks!
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: Easiest Approach to classic Trigger/Event Maps

Post by Cube_ »

How difficult? Difficulty is inherently based on your skill level, I cannot accurately answer your question without knowing how good of a programmer you are nor can I estimate the time it would take for a skilled programmer as I do not know the definition of the bsp format and I would have to research it to figure it out.
"this is not the bottleneck you are looking for"
KyleHarrison
Posts: 5
Joined: Tue Sep 03, 2013 5:53 pm

Re: Easiest Approach to classic Trigger/Event Maps

Post by KyleHarrison »

Fair enough!

Im new to IrrLicht, but I'm a fairly competent programmer, just not in the field of Game Development or real time simulation. I've written C++ apps for Windows, Mac and Linux, and Objective-C apps for iOS and Mac, and C# based tools and programs for WIndows. However that all said, my profession is currently Web Development (PHP)


Im not looking into time it takes, im looking into whats worth my time exploring. I can use Radiant or QuArK to create basic Quake3 BSP's with entities and triggerable events (like invisible brushes collision triggers). But those triggers and entities are not supported in IrrLicht, and would have to be added manually.

But I have absolutely never used IrrEdit before and I do not understand it's full capability. All I know is it creates IrrScene files, and supports Squirrel Script.


My project, is intended to be SUPER simple. I want to be able to walk to an area (like inside an invisible brush), and trigger a function in the host program.

Very specifically: I am in first person. I walk into a room. The software uses cURL to check into and parse from an online API I have written to get basic stats about that room ID.

I just need to be able to trigger that function somehow, and figured Quake3 BSP would be a fairly easy approach until I found out IrrLicht doesn't support them natively.


Le Sigh. (Thats french for "sigh" lol)
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Re: Easiest Approach to classic Trigger/Event Maps

Post by sudi »

You are forgetting that irrlicht is only a rendering engine. If you want trigger areas you first have to programm them before you can load them from a file. Irrlicht BSP loader is fully featured it supports loading entities from bsp files but of course you have to programm those entities first.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
KyleHarrison
Posts: 5
Joined: Tue Sep 03, 2013 5:53 pm

Re: Easiest Approach to classic Trigger/Event Maps

Post by KyleHarrison »

Only a rendering engine? You mean like Ogre3D?


So the BSP loader does see "entities", I just need to inform the engine of those entities and what they do? I have no problems with that, from what I was reading, I was under the impression it just loaded geometry and texture data from a BSP and that was it
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Re: Easiest Approach to classic Trigger/Event Maps

Post by sudi »

Code: Select all

 
scene::IQ3LevelMesh* mesh = (scene::IQ3LevelMesh*) smgr->getMesh(mapname);
 
//the you can access the entities by
scene::quake3::tQ3EntityList& entities = mesh->getEntityList();//that list is actually a core::array< scene::quake3::IEntity >
 
//now you can also in case those entities are brush entities get their corresponding mesh
scene::IMesh* brushMesh = mesh->getBrushEntityMesh(entity);
 
and no its not as simply as to just say what it does. you have to code collision response and everything.
and yes like ogre3d.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: Easiest Approach to classic Trigger/Event Maps

Post by Cube_ »

And as usual the experts provided a better response than mine >.>
Anyway, my reply was pretty much meant in the same way as Sudi's reply in the sense that I wouldn't know which to recommend based on not knowing which would be easier for you, experience wise that is. It seems, based on your experience, that you would probably want to program the entities yourself rather than learn a new format as you seem to have sufficient skill to do so without any issues.
"this is not the bottleneck you are looking for"
KyleHarrison
Posts: 5
Joined: Tue Sep 03, 2013 5:53 pm

Re: Easiest Approach to classic Trigger/Event Maps

Post by KyleHarrison »

It's something to contemplate for sure

Thanks Sudi for the code sample, that helps me visualize :)
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Easiest Approach to classic Trigger/Event Maps

Post by hendu »

There's a brush entity example in the patches tracker, it shows an automatic door.

Yo CuteAlien, add the example already, we have people thinking it's not possible since it's hidden in the tracker ;).
CuteAlien
Admin
Posts: 9687
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Easiest Approach to classic Trigger/Event Maps

Post by CuteAlien »

*sigh* you should really get svn access.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
KyleHarrison
Posts: 5
Joined: Tue Sep 03, 2013 5:53 pm

Re: Easiest Approach to classic Trigger/Event Maps

Post by KyleHarrison »

Quick Q about that example, does it use Quake3 BSP or IrrScene?
CuteAlien
Admin
Posts: 9687
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Easiest Approach to classic Trigger/Event Maps

Post by CuteAlien »

It uses Quake3 bsp.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Re: Easiest Approach to classic Trigger/Event Maps

Post by sudi »

KyleHarrison wrote:Quick Q about that example, does it use Quake3 BSP or IrrScene?
IrrScene does not support stuff like "entites" only scenenodes. You though create your own scenenode type which is basicly just an entity placeholder that you could place in the scene.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Re: Easiest Approach to classic Trigger/Event Maps

Post by christianclavet »

Hi, What you could use is "irrlicht nodes" instead of "quake entities".

You could create a "CUBE" node that you give a specific name ("trigger") (You can take IRRedit to place the cube node)

For loading back a .IRR scene producted by IRRedit, Use the .IRR scene loader example to see how it work.
Then in code (C++) check for that CUBE node and check the distance from that CUBE node from the FPS Camera.
When you launch your application, just set the cube scene node to invisible like node->setVisible(false);

Once you got the distance you need, then you can trigger what you wanted to do.
To get the distance you simply need to get the "cube" position and the camera position. There is a specific function to check that.
xt_hydra
Posts: 12
Joined: Sun Jul 08, 2012 2:39 pm

Re: Easiest Approach to classic Trigger/Event Maps

Post by xt_hydra »

you can check if the animated mesh is intersecting against praticly everything by querying the "IMesh"
terrain->getMesh()->getBoundingBox().intersectsWithBox(sydney->getBoundingBox())

or like christian said... you can put invisible node....then check against distance or whatsoever
Post Reply