Welcome to the RaGEZONE - MMORPG development forums.

[Show] Dusk Game Library

This is a discussion on [Show] Dusk Game Library within the Showcase and Releases forums, part of the Coders' Paradise category; Dusk is a simple yet flexible 2D game development library. It (will) feature an extensive set of classes and functions ...

Results 1 to 2 of 2
  1. #1
    Wait wut
    Rank
    Member +
    Join Date
    Apr 2010
    Location
    United States
    Posts
    773
    Liked
    402

    [Show] Dusk Game Library

    Click
    Dusk is a simple yet flexible 2D game development library. It (will) feature an extensive set of classes and functions that will dramatically decrease the time of development. With world parsing, world management, camera, sprite and image management, database management and more built into it, Dusk has hopes of being /decent/! (lol)

    So far, nothing is released and won't be for a couple more months, however I recently hit marker 2 out of 13. As soon as I stomp on some bugs, fix some rigging (I'm actually starting to dislike singletons... :P) and make sure it's running to its peak, I plan on releasing it under the GPL v2.
    As its current state, here is an example of it:

    Code:
    #include "stdafx.h"
    #include "DEngine.h"
    #include "DuskTesting.h"
    
    #pragma comment( lib, "Dusk.lib" )
    
    using namespace Dusk;
    
    DMain* g_pMain = DMain::GetInstance();
    
    DRESULT OnCreate( LPVOID )
    {
        DGetSpriteMgr()->Add( "Ball.png", 1 );
    
        return D_OK;
    }
    
    DRESULT OnUpdate( LPVOID )
    {
        DSprite* pSprite = DGetSpriteMgr()->Find( 1 );
    
        if( pSprite )
        {
            const char* szKeys = DGetInput()->GetKeys();
            D3DXVECTOR3 fPos = pSprite->GetPosition();
    
            if( szKeys[DIK_UP] & 0x80 )
            {
                fPos.y -= 2.05f;
                pSprite->SetPosition( fPos );
            }
            
            if( szKeys[DIK_DOWN] & 0x80 )
            {
                fPos.y += 2.05f;
                pSprite->SetPosition( fPos );
            }
            
            if( szKeys[DIK_LEFT] & 0x80 )
            {
                fPos.x -= 2.05f;
                pSprite->SetPosition( fPos );
            }
            if( szKeys[DIK_RIGHT] & 0x80 )
            {
                fPos.x += 2.05f;
                pSprite->SetPosition( fPos );
            }
        }
    
        return D_OK;
    }
    
    DRESULT OnRender( LPVOID )
    {
        DGetSpriteMgr()->Draw( 1 );
    
        return D_OK;
    }
    
    DRESULT OnDestroy( LPVOID )
    {
        return D_OK;
    }
    
    DRESULT OnRestoreDevice( LPVOID )
    {
        return D_OK;
    }
    
    int WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
    {
        DMainParameters params = DMainParameters();
    
        params.bUseDbgConsole            = true;
        params.nWinHeight                = 600;
        params.nWinWidth                = 800;
        strcpy_s( params.szWindowName, "Dusk Testing" );
    
        DSetFunction( DFT_CREATE, OnCreate );
        DSetFunction( DFT_UPDATE, OnUpdate );
        DSetFunction( DFT_RENDER, OnRender );
        DSetFunction( DFT_DESTROY, OnDestroy );
        DSetFunction( DFT_RESTOREDEVICE, OnRestoreDevice );
    
        if( !g_pMain->Create( params ) )
            return -1;
    
        g_pMain->Run( NULL );
    
        return 0;
    }
    
    
    ///////////////////////
    ///////////////////////
    
    
    Spoiler:
    All of which is fully functional (excluding sprite class as I'm having issues with tilesheets and animations...). List of currently done/in progress features:
    -Camera creation, management and updating
    -File reading and writing
    -Font creation, management and displaying
    -Image and lights creation
    -Particle creation and management
    -Sprite creation, management and updating
    -Timer class implemented
    -Input
    -World parsing

    Will be supported before marker 4:
    -MySQL and MSSQL support
    -Networking via IOCP and P2P
    -Sound
    -GUI classes (slightly started but nothing /major/ done)
    -Custom XML parsing class (currently using irrXML)

    Thoughts? Comments? Ball crunching criticism?
    Last edited by PenguinGuy; 02-05-12 at 08:14 PM.

  2. #2
    Admnistrator
    Rank
    Member +
    Join Date
    Aug 2010
    Posts
    640
    Liked
    197

    Re: [Show] Dusk Game Library

    So far so nice.
    Good Luck.
    C/C++/PHP,OOP/MySQL/Java/JS/HTML/HTML5/CSS/AJAX

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •