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

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
Guest

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

Post 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:
Gezmo P
Posts: 16
Joined: Sun Mar 28, 2004 10:01 am
Location: London, UK

A Noob replies...

Post 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
Post Reply