Page 1 of 1

Trying to load a Quake 3 map using vb.NET..

Posted: Fri Mar 04, 2005 5:51 pm
by Guest
Hi,
I'm trying to load a *.pk3 file but it doesnt seem to work in VB.NET...
I checked the c++ tutorial and saw that this method unzip the map into memory:

device->getFileSystem()->addZipFileArchive("../../media/map-20kdm2.pk3");

The problem is that I checked in the .NET API and this method isn't written.

So, does anyone have a .NET tutorial on how to load Quake 3 maps into irrlicht?

That would really help me out...

Thanks,
An Irrlicht newbie... :lol:

A Noob replies...

Posted: Fri Mar 04, 2005 8:37 pm
by Gezmo P
Hi there.

I have a response for this query, but this may not be the optimum method for achieving the loading of a level...I am a noob, but have tried to investigate this for myself.

I too found that there seems to be no way of adding a filesystem with Irrlicht.NET yet, so i tried to adapt the standard Irrlicht tutorial, using the fact that a .pk3 file is really a .zip file going under an assumed name :wink:

If you copy and rename the .pk3 file as a .zip, and then extract it, and then position the map directory and the texture directory somewhere relevant, you can make the following calls.

Dim levelMesh As Irrlicht.Scene.IAnimatedMesh
levelMesh = device.SceneManager.GetMesh("media\maps\20kdm2.bsp")
Dim levelNode As Irrlicht.Scene.ISceneNode
levelNode = device.SceneManager.AddAnimatedMeshSceneNode(levelMesh, Nothing, -1)
device.SceneManager.AddOctTreeSceneNode(levelMesh.GetMesh(0), Nothing, -1)
levelNode.Position() = New Core.Vector3D(-1300, -144, -1249)

This seems to work fine for me...

I am currently writing some wrapper classes to go around the idea of scenenodes etc so that .net programmers can create Player objects etc, which will take care of the irrlicht declarations, and will post them when complete...

In return, if anyone can point me in the direction of some hints on implementing the event handler in vb.net, I would appreciate it!

Good luck with the level load!

Gezmo