• entries
    707
  • comments
    1173
  • views
    434115

Untitled

Sign in to follow this  

57 views

Well, my code base is coming along. Doesn't really have everything I want, but instead of trying to put everything I need (or think I'll need) into it, I've been adding things as they come up.

My core system is getting up and running. I've got a base graphics system in place; doesn't have batching yet, but I can get an image on the screen in like 5 lines, so I'm happy (means I get to prototyping faster :D.)

I've also got most of the input system setup; I'm still contemplating whether or not I want to support XBox360 gamepads.

No audio support as of yet. Obviously I will at a later date, but I don't know what to go with. I don't want to use FMOD because their license is out of my price range and audiere kind of sucks. Plus, I suck when it comes to audio programming, so I can't really do my own simple system using DirectSound (well, I could, but I don't really feel like learning a lot about audio at the moment and I despise copying and pasting someone elses code. This is the same reason why I have no network support as of yet.)

Current line count:
[Code Base]
Total: 3682
Source: 3029 (82.3%)
Comments: 213 (5.8%)
Blank: 440 (12.0%)

[Core]
Total: 948
Source: 806 (88.7%)
Comments: 39 (4.1%)
Blank: 103 (10.9%)

Anyway, how long has it been since I posted a screenshot? Way too long says I. So, lets remedy that:


And the source to do it:

class CApp : public IApplication
{
Graphics::HTexture Texture;
public:
virtual bool OnRun()
{
if(!Graphics::Initialize() || !Graphics::CreateDevice(this->GetWindowHandle(), 800, 600))
return false;

Texture = Graphics::LoadTextureFromFile("Resources/Title.png");

Input::Initialize();
Input::OnKeyDown = P16_Bind1(CApp, OnKeyDown, this);
return true;
}

virtual void OnCleanUp()
{
Graphics::CleanUp();
}

virtual void OnIdle(float Seconds)
{
Graphics::ClearRenderTarget(Colors::CornflowerBlue);
Graphics::DrawImage(Texture, 0, 0, Colors::White, Alignments::TopCenter);
Graphics::DrawImageScaled(Texture, 0, 0, 2.0f, 2.0f, Colors::White, Alignments::Center);
Graphics::DrawImageStretched(Texture, 0, 0, 193, 56, Colors::White, Alignments::BottomCenter);
Graphics::PresentRenderTarget();
}

virtual bool OnMessage(HWND Handle, UINT Message, WPARAM Param1, LPARAM Param2)
{
Input::HandleMessage(Message, Param1, Param2);
return false;
}

bool OnKeyDown(Input::EKey Key)
{
if(Key == Input::Keys::F1)
Graphics::SetResolution(800, 600);
else if(Key == Input::Keys::F2)
Graphics::SetResolution(1024, 768);
else if(Key == Input::Keys::F3)
Graphics::SetResolution(1440, 900);
else if(Key == Input::Keys::Tilde)
Graphics::TakeScreenshot();
return false;
}
};

int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
CApp App;
App.Run();
return 0;
}



I'm thinking I'm going to work on adding font support to Graphics and then move onto my GUI system.

No matter which way I head from here, I'm going to be posting crap from prototypes; not projects. As I believe I said, my brother and I are working on a project and we'll be posting screenshots and such for that sometime in the future. The prototypes are just for making sure the code base and core components are sound while building a game components module.

I'll be working on a new website so that I can setup screenshot galleries for all of my prototypes and such. I'll make an entry about it once I'm finished.

[edit]
Btw, Chompy2D isn't anything; it's just the image that I grabbed out of my pictures folder so that I could post a screenshot without worrying about someone saying I stole their graphics lol.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

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

Sign in

Already have an account? Sign in here.

Sign In Now