• entries
177
531
• views
163835

# jDoom and some more ZDoom

149 views

jDoom Textures

Like the music, I can now load external textures which means support for the hi-res jDoom textures. Unfortunately the memory use and loading time is insane(might be better in release mode), but hey it sure looks awesome.

Edit: Why the hell can't I use a table?

(yes I took a ton of screenshots)

Right now all the images have to be uncompressed, I'll see what I can find concerning C# and Zip files this weekend.

Speed!

I switched from glBSP to zdbsp, the node builder used by ZDoom. The good part is that it's much faster and can work on a single level, instead of glBSp which has to process the whole WAD. The bad part is that it writes the new data back into the original WAD, which some people familiar with the Doom Engine might not want. I consider it a good trade off though. Even if the node data hasn't been built, the first level loads in a few seconds and the levels after it only take a fraction of a second.

ZDoom MapInfo

I've incorperated the ZDoom MapInfo lump, which allows custom levels to change the way the episodes/levels act then the default Doom/Doom2 settings.

I also fixed up my parsers. Before I had each different class reading lines from a stream reader and then doing a whole bunch of parsing to each string, it was really slow and was a mess. So I came up with my own StringStream class which allows traversal of a stream string by string. Anybody that knows .Net could probably come up with this in about 10 seconds, but I feel like sharing:

using System;using Collections = System.Collections.Generic;using IO = System.IO;namespace id{	public class StringStream	{    	public string CurrentString    	{    		get    		{    			if( ( Position >= StringList.Count ) || ( Position < 0 ) )    			{    				return "";    			}    			return StringList[Position];    		}    	}    	    	public int Length    	{    		get    		{    			return StringList.Count;    		}    	}    	private int Position = 0;		private Collections.List<string> StringList = new Collections.List<string>();		public StringStream( IO.StreamReader StreamReader )		{			string Line = "";			string[] StringArray = null;			StreamReader.BaseStream.Position = 0;			while( true )			{				Line = StreamReader.ReadLine();				if( Line != null )				{					Line = Line.ToUpper().Replace( ",", " , " ).Replace( "+", " + " ).Replace( "-", " - " ).Replace( "(", " ( " ).Replace( ")", " ) " ).Replace( "[", " [ " ).Replace( "]", " ] " ).Replace( "\"", " \" " );					while( Line.Contains( "  " ) )					{						Line = Line.Replace( "  ", " " );					}					Line = Line.Trim( ' ', '\t' );					StringArray = Line.Split( ' ' );					for( int i = 0; i < StringArray.Length; i++ )					{						if( ( StringArray != "\n" ) && ( StringArray != "" ) )						{                    					StringList.Add( StringArray );						}					}					StringList.Add( "\n" );					}				else				{					break;				}			}			return;		}        	public string LookBackward()		{			if( Position - 1 < 0 )    		{    			return "";    		}    		return StringList[Position-1];		}		public string LookBackward( int Amount )		{			if( Position - Amount < 0 )    		{    			return "";    		}    		return StringList[Position-Amount];		}        	public string LookForward()		{			if( Position + 1 >= StringList.Count )    			{    				return "";    			}    			return StringList[Position+1];		}		public string LookForward( int Amount )		{			if( Position + Amount >= StringList.Count )    			{    			return "";    			}    			return StringList[Position+Amount];		}		public string MoveBackward()		{			Position -= 1;			return CurrentString;		}				public string MoveBackward( int Amount )		{			Position -= Amount;			return CurrentString;		}		public string MoveForward()		{			Position += 1;			return CurrentString;		}				public string MoveForward( int Amount )		{			Position += Amount;			return CurrentString;		}				public int ReadInteger()		{			if( MoveForward() == "-" )			{				MoveForward();				return - int.Parse( CurrentString );			}			return int.Parse( CurrentString );		}				public string ReadQuotation()		{			if( MoveForward() != "\"" )			{				return CurrentString;			}			else			{				string Value = "";				while( true )				{					MoveForward();					if( ( CurrentString == "" ) || ( CurrentString == "\n" ) || ( CurrentString == "\"" ) )					{						return Value.Trim( ' ' );					}					else					{						Value += CurrentString + " ";					}				}			}		}	}}

Despite the fact you don't get many comments, I really dig your project. Just because I never say anything doesn't mean I don't lurk on your pages...

##### Link to comment
Quote:
 Original post by visage I really dig your project.

Thanks.

I thought I got enough comments, more then most other journals at least. Although if I post about something non-Doom related, it's usually silent around here.

And I too am guilty of reading everyone elses journals, but rarely saying anything.

##### Link to comment
My case is similar to Visage's. If I said 'awesome' every time -- which I believe I come somewhat close to doing :P -- it would just get out of style. :)

By the by, when do you think a public (test?) version is going to be hitting the streets?

##### Link to comment
Well that depends on what you want for a test version.
Right now it's still just a level viewer, although the scripting will make it easier to add the AI later on.
Deathmatch might be done in a few months, I know I said December, but school is taking it's toll on my development time.

##### Link to comment
Nice. Good work!

Give me blocky square pixels the size of your head any day, though! [wink]

##### Link to comment
Quote:
 Original post by Scet And I too am guilty of reading everyone elses journals, but rarely saying anything.

I'm guilty of that too.

I like your project.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account