Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsShowcase → playable sodium build
playable sodium build
2006-01-16, 2:54 AM #1
I've been adding more code to the general framework of the sodium engine project. For those that are interested and have jedi knight installed, you can try out the program for yourself.

If you do not have jedi knight installed to the default path, open 'script.ss' in notepad or any text editor and modify the following line to match your jk directory:
jkdir = "c:\program files\lucasarts\jedi knight";

You can also change screen resolution or which level to load by modifying the script.

[http://binarydemons.com/~strike/files/sodiumex.JPG]


Download here (113kb)
http://binarydemons.com/~strike/files/sodium.zip

Updates:
-Added basic temporary physics for camera. Navigating through world is much easier / smoother now. Camera collides with level surfaces.
-Added very basic sphere to level surface collision detection. Velocity is simply inverted on collision for testing purposes, so that's why the objects bounce.
-Stayed up for 12 hours and wrote a resource manager. Can load directories, GOBs, or very easily other types of container files (even zip if I had a library to load them). When a level, texture, 3do, script, etc. is loaded, it will figure out which container it is in and load it differently depending on the container it is in. Directories, for example need a unique file handle to open the file, however container files (like GOB) are already open and need to be able to support loading multiple files at once. Also had to write a few functions to format path strings.
-Geometry vertex lighting. I'm not 100% sure if I'm calculating it right, but it looks pretty good for now regardless.

Need to do:
-Finish custom internal level object and finish code to convert from JKL
---Implement actual cell and portal algorithm
---Work on collision detection, box&sphere and working towards face to face
---Possibly break the level sectors down into a BSP tree for fast cell lookups by position. In JK/COG-speak this would mean a very fast built-in command for "GetSectorAtPos()" would be available to scripters.
-Finish keyframe interpolation for smooth animations
-Optimize/rework object creation, destruction, and processing
-Spring cleaning on code. Debugging has been leaving its nasty mark of commented code and occasional hack, neither of which should be cluttering up low level routines.
[ B A H ]
Bad *** by nature,
Hackers by choice
2006-01-16, 3:00 AM #2
One more note: Starting up the engine is deathly slow now with the new resource manager. Using STL file streams was giving me garbage when loading JKLs so I am now using an unbuffered low-level I/O. I will implement buffered I/O directly into the CResFile class which will drastically reduce load-times. Reading one byte from a file at a time is very very slow..

Code:
char CResFile::get()
{
	char c;
	// this should probably be optimized with some sort of
	// file buffering

	reseekIfIHaveTo();

	if(read(&c, 1) == 1)
		return c;
	else
		return 0;
}
[ B A H ]
Bad *** by nature,
Hackers by choice
2006-01-16, 8:25 AM #3
I don't have JK installed right now to give it a try, but it looks like its coming along great. What are you planning on using it on, though? This is the first time I've seen this.

Don't suppose you could post more screens of it in action?
2006-01-16, 8:32 AM #4
I missed when you first announced this, what is the purpose of this program mod thing?
Was cheated out of lions by happydud
Was cheated out of marriage by sugarless
2006-01-16, 10:20 AM #5
Quote:
even zip if I had a library to load them

zlib. :)

Quote:
Also had to write a few functions to format path strings.

You should check out boost::filesystem.

For your file loading, the simplest thing to do is to load the entire file into a vector<char> once, then work with that.

Code:
 
void readAll(std::vector<char>& into, File* f)
		{
			std::deque<char> queu;
			char buffer[1024];
			int read = 0;
			while ( (read = fread(buffer,sizeof(char),1024,f)) != 0)
				queu.insert(queu.end(),buffer,buffer+read);
			into.reserve(into.size()+queu.size());
			into.insert(into.end(),queu.begin(),queu.end());
		}
Wikissassi sucks.

↑ Up to the top!