Finally, an engine refactor

posted in Beals Software
Published August 17, 2006
Advertisement
Well, I started refactoring my engine today (in preperation for my new project) and I'm really glad I did as some of the code was horrible. Here's a quick rundown of what I did:
# - Fixed my Graphics class    # - Enumeration is now done automatically    # - It is no longer locked to an orthographic projection matrix# - Dropped the Input class (I now use Win32)# - Separated everything out (instead of 6+ classes per file I switched to 1 per file)# - Fixed my useless Pool class    # - I now know how to use it (even though I coded both)    # - It uses the weak_ptr/shared_ptr system instead of just shared_ptr# - Converted HtmlLog to a singleton# - The entire thing revolves around a Engine & Game class system# - Setup a bitmap font system to get ready for Tape_Worm's bitmap font builder*hint-hint*# - Started rebuilding my GUI system# - Implemented a global GetAppPath() function (for making absolute path names instead of using relative)# - Implemented memory-leak detection second instead of last this time (HtmlLog was first)# - Dropped hungarian notation (atleast, I'm trying to lol)# - Added a Color class to easier control color values# - Removed my shader system; to be implemented soon


There's still a lot to do before I can start working on the actual game part of the engine. How about another quick rundown?
# - Finish my GUI system    # - Needs to be redesigned (not every widget requires 9 quads. Buttons would only require 3)	# - Implement CSS-esque skinning system	# - Make it less engine dependant, so that I can release it to the public# - Implement font formatting (all I have is now formatting for the \n and \t characters)# - Implement 3D camera system# - Finish technical side of the design document# - Implement an audio system# - Reimplement the shader system

That's all that I can think of at the moment. Obviously, I'm not including ANY of the game specific stuff. To tell you the truth, I'm not quite sure what I'm going to need for the game specifics.

I REALLY wish I knew OpenGL and such right now, since I'd love to be able to make the engine cross platform, but I don't have the time or the will to learn it[sad]. But, learning to make a cross-platform engine will be the first thing I do after I finish this project and then I'll refactor it again.

Anyway, here is the first screenshot of the new engine:



Edit: I decided to upload this second shot I just did. It may seem to be running slow, but it's rendering more than 11750 characters (each line has ' ' to '~', which is 94 characters; there are 25 lines; each line is being rendered 5 times (4 for the black outline and once for the white part; plus each line is being rendered separately. Also, I'm not counting the 5 renders for the FPS display, which are also completely separate from the rest.) If I take out the 4 renders for the black outline it drops down to 100fps, but I'm not doing any sort of batching at the moment (just calling DrawPrimitiveUP().)

That's my tahoma8 font rendered at argb(128, 255, 0, 0). Once I get the shader system back in, I'll be able to apply a texture to each letter, which will be cool.

Anyway, that's all I have for now. I'm not quite sure when I'll be able to update again. I'm going to be hacking away at this and working on Malathedra with EDI (speaking of which, Part 1 is almost done. We've been getting up around 8:30 and spending about 80% of the day on it. Well, I've been getting up at 8:30, Raymond has probably been getting up earlier lol.)

Now, I have to get to bed because I have a shit-ton of work to do tomorrow[bawling] (actual work, not game development.)

Edit 2: I've decided to screw making stuff less engine dependant. If somebody wants to use my engine bad enough, they'll either have to tear it apart or use it all together. Otherwise I lose all of my nifty tricks (like texture tracking, FVF tracking, etc.)

Edit 3: Ok, so I still haven't gone to bed. I decided to work on my terrain system a little (just for fun) and it came out nice:

Loaded from a 65x65 heightmap and rendered using vertices & indices (via DrawIndexedPrimitive().)

Edit 4: lol, how about a shaded view from above?


Btw, can anybody tell me how to enumerate a directory using PHP? I want to setup a gallery on my site.
Previous Entry Untitled
Next Entry Untitled
0 likes 2 comments

Comments

Evil Steve
Quote:Original post by Programmer16
Btw, can anybody tell me how to enumerate a directory using PHP? I want to setup a gallery on my site.

A snippet from my website:

else if($objs = glob($dir.'*.txt'))
{
	echo '<h1>Articles</h1>';
		
	// Any new articles?
	foreach($objs as $obj)
	{
		$name = basename($obj);
		$name = substr($name,0,strlen($name)-4);
		// Stuff
	}
}

August 18, 2006 03:34 AM
Programmer16
Hey, thanks Steve! That worked perfectly. I had tried some other code, but I couldn't get it to work lol.
August 18, 2006 05:08 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement