My new 'core' library

Published July 12, 2005
Advertisement
I had an awesome vacation last week, I didn't get too much done in the way of coding, but it really got me refreshed and ready to get back on the bandwagon both at work and here on the hobby-front.

Before I left I mentioned I wanted to go really simple, breakout-clone style. No more multi-player this, physics-that. Just some old school arcade action to get a completed title under my belt. I've been coding OpenGL & DirectX for too long to not have a completed game to my name!!!

Rather than just go kamakazi and code up some messiness, I'm organizing my code into a statically linked library and making it as modular as possible for me to build on and use again later.

So far I've ported over all of my old math stuff, my console binding library, and I've just finished the bare-minimum for my graphics foundation. Here is an example screenie & code to use the graphics library.



#include #include "../KFCGraphics/KFCGraphics.h"using namespace Kyrite::Graphics;int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){	CWindow window;		CSprite *pSprite = NULL;	// Create the window.	window.Create(hInstance, false, "WindowTestbed", 800, 600, 16);	window.SetClearColor(RGBA_MAKE(0, 0, 255, 0));	//Create the sprite.	pSprite = new CSprite(&window);	pSprite->SetTexture("CheckBoxCheck.dds", 0);	pSprite->SetSize(128.0f, 128.0f);	pSprite->MoveTo(300.0f, 300.0f);	pSprite->SetCentered(true);	// Application loop.	while(1)	{		window.BeginScene();		pSprite->Draw();		window.EndScene();	}	// Cleanup	delete pSprite;	return 0;}


I have a basic GUI framework for my uber-engine that I'm kind of abandoning. In between tasks at work I'm starting to design a proper GUI that I'll use for my in-game editor. I'd like to distinctly seperate the GUI from any graphics and input so that it might be usefull to others, and if/when I have to upgrade my own graphics stuff, I don't have to redo all my GUI code :)
0 likes 3 comments

Comments

paulecoyote
cooooooool
July 13, 2005 05:49 AM
Rob Loach
What's a *.dds?
July 13, 2005 09:32 AM
SGreth
That's the directx image format (direct draw surface). You can snag plugins for photoshop from the nvidia developer website to export in that format. It's a pretty sweet plugin too as it lets you preview textures in various mipmap levels and also lets you work with normal maps, etc...
July 13, 2005 10:17 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Advertisement