• Source Code
    4 replies, posted
[code]#include "darkGDK.h" // Source Code is open source! :3 // void DarkGDK(void) { dbSyncOn(); dbSyncRate(60); dbDisableEscapeKey(); dbSetImageColorKey(255,0,255); dbLoadImage("Sprite.bmp",1); dbLoadImage("Wall.bmp",2); dbSprite(1,100,50,1); dbSprite(2,400,50,2); dbSprite(3,0,50,2); while(LoopGDK()) { if(dbRightKey() == 1) { dbRotateSprite(1,90); dbMoveSprite(1,1); dbRotateSprite(1,0); if(dbSpriteCollision(1,0) > 0) { dbRotateSprite(1,270); dbMoveSprite(1,1); dbRotateSprite(1,0); } } if(dbLeftKey() == 1) { dbRotateSprite(1,270); dbMoveSprite(1,1); dbRotateSprite(1,0); if(dbSpriteCollision(1,0) > 0) { dbRotateSprite(1,90); dbMoveSprite(1,1); dbRotateSprite(1,0); } } if(dbEscapeKey() == 1) { break; } dbSync(); } for( int i = 1; i < 10; i ++) { dbDeleteImage(i); dbDeleteSprite(i); } return; }[/code] 'tis open source. Not like anyone would want it.. :P Simple "game". Left and Right keys are used to move the sprite between the walls. This was just a collision test, but I had fun with it, and added a custom sprite. This is my first project.
Where are the images/compiledversion.
In the project folder.
[QUOTE=Trentastic;20951724]In the project folder.[/QUOTE] 404 Download not found. Useless thread for anyone who does not know how to compile.
DarkBasic C++ binding? Well, there's worse ways to start, I suppose. One of those being DarkBasic itself.
Sorry, you need to Log In to post a reply to this thread.