I get good progress on the engine. I've added several features. Of course they are not final and may change with the evolution of the engine but they still work :)
I have added : - Multi camera support ( Up to 8 cameras ) - OpenGL lights (need to fix light 0 issue) - Objects instancies (share mesh and texture) - Load/save 3D objects. - Compatibility with object/camera position/rotation & command set.
My one suggestion would be to make functions such as DERotateObject() cumulative. Right now, it looks like you're resetting the orientation each time and then rotating it by a new angle (unless you've got the box rotation speeds increasing every frame). When you write a game or world simulation, you generally want to move (including rotation) objects from where they are to a new position based on their speed. This is much easier to do if you can just call DERotateObject(4, deltaTheta, deltaSigma, deltaPhi), or something similar, where "delta" means the change in angle, rather than the new angle. You could always have a DEResetPosition() method if someone wishes to track the angles externally to the object.
In fact, I will only use direction rotation values. But there will be these commands:
ROTATE OBJECT : ROTATE OBJECT Object Number, XAngle, YAngle, ZAngle
MOVE OBJECT : MOVE OBJECT Object Number, Speed
POINT OBJECT : POINT OBJECT Object Number, X, Y, Z
MOVE OBJECT DOWN : MOVE OBJECT DOWN Object Number, Value
MOVE OBJECT LEFT : MOVE OBJECT LEFT Object Number, Value
MOVE OBJECT RIGHT : MOVE OBJECT RIGHT Object Number, Value
MOVE OBJECT UP : MOVE OBJECT UP Object Number, Value
XROTATE OBJECT : XROTATE OBJECT Object Number, XAngle
YROTATE OBJECT : YROTATE OBJECT Object Number, YAngle
ZROTATE OBJECT : ZROTATE OBJECT Object Number, ZAngle
TURN OBJECT LEFT : TURN OBJECT LEFT Object Number, Value
TURN OBJECT RIGHT : TURN OBJECT RIGHT Object Number, Value
PITCH OBJECT UP : PITCH OBJECT UP Object Number, Value
PITCH OBJECT DOWN : PITCH OBJECT DOWN Object Number, Value
ROLL OBJECT LEFT : ROLL OBJECT LEFT Object Number, Value
ROLL OBJECT RIGHT : ROLL OBJECT RIGHT Object Number, Value
so it will be possible to rotate direction object with angle or by altering the actual angle.
Regards, Fred
All we have to decide is what to do with the time that is given to us.
I've made a custom convertion tool on PC with DarkBASIC Professional and I've converted my 1 st 3D Object from PC to Amiga.
I had done some sort of "import" functions. Of course, once the object is loaded in the engine, it can be saved with : DESaveObject( char * FileName, int ObjectID ); So the object is exported to the AmiDARK Engine 3D Object format :)
@freddix Sorry, at moment i know nothink about that Engine, can you explain a bit more about that project ? It's 3d engine which will allow other coders make their 3d prods by easy way ? (like some kind of Demo-machine ?) Or it's somethink different ? And maybe any beta-alpha binary are possible to test ?:)
@kas1e: AmiDARK Engine is similar to DarkGDK from thegamecreators : http://gdk.thegamecreators.com/ It is a SDK to help develop video game easily using OpenGL/AHI,etc ... It should cover many commands set like the ones available in DarkGDK. I should advice you to get alook at the link given upper. It should give you an overview of what kind of Product AmiDARK Engine will be.
Concerning Alpha/Beta binaries to test, it is also planed. I will release soonly a small 3D demo showing the various AmiDARK Engine commands actually working.
Concerning Beta testing it is also planed but it will only start when the project will be more advanced. Beta tester will have to sign an NDA (Non Disclosure Agreement) if they want to be ~.
I hope I've answered every one.
I'll keep you informed
Here is a small list of all commands actually available and working :
Basic2D:
static void DECls( void );
static void DEInk( int ForeGroundcolor, int BackgroundColor );
static void DEDot( int X, int Y );
static void DEBox( int Left, int Top, int Right, int Bottom );
static void DELine( int X1, int Y1, int X2, int Y2 );
static void DECircle( int X, int Y, int Radius );
static void DEElipse( int X, int Y, int XRadius, int YRadius );
static int DERgb( int RedValue, int GreenValue, int BlueValue );
static int DERgbR( int RGBColor );
static int DERgbG( int RGBColor );
static int DERgbB( int RGBColor );
static void DEDotEx( int X, int Y, int RGBColor );
static void DEClsEx( int ClearColor );
static void DESetYAxisToDefault( void );
static void DEReverseYAxis( void );
Basic3D:
static void DEMakeObjectBox( int ObjectID, float X, float Y, float Z );
static void DEMakeObjectCube( int ObjectID, float Width );
static void DEMakeObjectTriangle( int ObjectID, float X1, float Y1, float Z1, float X2, float Y2, float Z2, float X3, float Y3, float Z3 );
static void DEInstanceObject( int ObjectID, int SourceObject );
static void DEDeleteObject( int ObjectID );
static void DEDeleteObjects( int ObjectID1, int ObjectID2 );
static void DEPositionObject( int ObjectID, float XPos, float YPos, float ZPos );
static void DERotateObject( int ObjectID, float XRot, float YRot, float ZRot );
static void DESetObjectRotationXYZ( int ObjectID );
static void DESetObjectRotationZYX( int ObjectID );
static void XRotateObject( int ObjectID, float XAngle );
static void YRotateObject( int ObjectID, float YAngle );
static void ZRotateObject( int ObjectID, float ZAngle );
static void DEColorObjectEx( int ObjectID, int RGBR, int RGBG, int RGBB );
static int DEObjectExist( int ObjectID );
static void SetObject( int ObjectID, BOOL WireFrame, BOOL Transparent, BOOL Cull );
static void SetObjectEx( int ObjectID, BOOL WireFrame, BOOL Transparent, BOOL Cull, int Filter );
static void SetObjectEx2( int ObjectID, BOOL WireFrame, BOOL Transparent, BOOL Cull, int Filter, BOOL Light );
static void SetObjectEx3( int ObjectID, BOOL WireFrame, BOOL Transparent, BOOL Cull, int Filter, BOOL Light, BOOL Fog );
static void SetObjectEx4( int ObjectID, BOOL WireFrame, BOOL Transparent, BOOL Cull, int Filter, BOOL Light, BOOL Fog, BOOL Ambient );
static int DEObjectExist( int ObjectID );
static float DEObjectPositionX( int ObjectID );
static float DeObjectPositionY( int ObjectID );
static float DEObjectPositionZ( int ObjectID );
static float DEObjectAngleX( int ObjectID );
static float DEObjectAngleY( int ObjectID );
static float DEObjectAngleZ( int ObjectID );
static void DETextureObject( int ObjectID, int ImageID );
Camera:
static void DEPositionCamera( float XPos, float YPos, float ZPos );
static void DERotateCamera( float XAngle, float YAngle, float ZAngle );
static void DEXRotateCamera( float XAngle );
static void DEYRotateCamera( float YAngle );
static void DEZRotateCamera( float ZAngle );
static void DESetCameraRange( int NearValue, int FarValue );
static void DESetCameraView( int Left, int Top, int Right, int Bottom );
static void DESetCameraRotationXYZ();
static void DESetCameraRotationZYX();
static void DESetCameraFov( float fieldOfViewAngle );
static void DEAutocamON();
static void DEAutocamOFF();
static void DEBackdropOn();
static void DEBackdropOff();
static void DEColorBackdrop( int RGBColor );
static void DEColorBackdropEx( int iID, int dwColor );
static float DECameraPositionX() ;
static float DECameraPositionY() ;
static float DECameraPositionZ() ;
static float DECameraAngleX() ;
static float DECameraAngleY() ;
static float DECameraAngleZ() ;
static void DEMakeCamera( int CameraID );
static void DEDeleteCamera( int CameraID );
static void DESetCurrentCamera( int CameraID );
static void DEPositionCameraEx( int CameraID, float XPos, float YPos, float ZPos );
static void DERotateCameraEx( int CameraID, float XAngle, float YAngle, float ZAngle );
static void DEXRotateCameraEx( int CameraID, float XAngle );
static void DEYRotateCameraEx( int CameraID, float YAngle );
static void DEZRotateCameraEx( int CameraID, float ZAngle );
static void DESetCameraRangeEx( int CameraID, float NearValue, float FarValue );
static void DESetCameraViewEx( int CameraID, int Left, int Top, int Right, int Bottom );
static void DESetCameraRotationXYZEx( int CameraID );
static void DESetCameraRotationZYXEx( int CameraID );
static void DESetCameraFovEx( int CameraID, float FieldOfViewAngle );
static void DEBackdropOnEx( int CameraID );
static void DEBackdropOffEx( int CameraID );
static float DECameraPositionXEx( int CameraID );
static float DECameraPositionYEx( int CameraID );
static float DECameraPositionZEx( int CameraID );
static float DECameraAngleXEx( int CameraID );
static float DECameraAngleYEx( int CameraID );
static float DECameraAngleZEx( int CameraID );
Core :
static void DESync();
static void DESetCursor( int XPos, int YPos );
static void DEPrint( const char* ZeStr );
static void DERandomize( int Value );
File:
static void DEOpenToRead( int ChannelID, const char *FileName );
static void DEOpenToWrite( int ChannelID, const char *FileName );
static void DECloseFile( int ChannelID );
static WORD DEReadWord( int ChannelID );
static float DEReadFloat( int ChannelID );
static void *DEReadString( int ChannelID );
static void DEWriteword( int ChannelID, WORD ValueToInsert );
static void DEWriteLong( int ChannelID, int ValueToInsert );
static void DEWriteFloat( int ChannelID, float ValueToInsert );
static void DEWriteString( int ChannelID, const char * ValueToInsert );
static int DEFileOpened( int FileID );
static void DEFileOpenToRead( int ChannelID, const char *FileName );
static void DEFileOpenToWrite( int ChannelID, const char *FileName );
static void DEWriteToFile( int ChannelID, void *MemoryPointer, int BytesSize );
static void DEReadFile( int ChannelID, void *MemoryPointer, int BytesSize );
static int DEReadLong( int ChannelID );
static int DEReadInt( int ChannelID );
static void DEWriteInt( int ChannelID, int ValueToInsert );
static void DEFileClose( int ChannelID );
static int DENextFreeFile( void );
static int DEGetFileSize( int ChannelID );
static void DEMakeMemblockFromFileEx( int MemblockID, const char *FileName );
Image:
static void DELoadImage( const char * FileName, int ImageIndex );
static void DELoadImageEx( const char * FileName, int ImageIndex, int ImageMode );
static void DEPasteImage( int ImageID, int X, int Y );
static void DEPasteImageEx( int ImageIndex, int X, int Y, int Transparency );
static void DEDeleteImage( int ImageIndex );
static int DEImageExist( int ImageIndex );
static int DEImageWidth( int ImageID );
static int DEImageHeight( int ImageID );
Input:
static BOOL DEEscapeKey( void );
static int DEMouseX( void );
static int DEMouseY( void );
static int DEMouseZ( void );
static BOOL DEMouseClick( int MButton );
static int DEMouseMoveX( void );
static int DEMouseMoveY( void );
static int DEMouseMoveZ( void );
Lights ( 3D ):
static void DEMakeLight( int LightID );
static void DEDeleteLight( int LightID );
static void DESetLightRange( int LightID, float LDistance );
static void DEPositionLight( int LightID, float XPos, float YPos, float ZPos );
static void DEColorLight( int LightID, int RGBColor );
static void DEColorLightEx( int LightID, int RGBR, int RGBG, int RGBB );
static void DESetAmbientColor( int RGBColor );
static void DEFogON( void );
static void DEFogOFF( void );
static void DEFogColor( int RGBValue );
static void DEFogColorEx( int FRED, int FGREEN, int FBLUE );
static void DEFogDistance( int Distance );
static void DESetAmbientColorEx( int RGBR, int RGBG, int RGBB );
static void DEFogStart( int FSTART );
static void DEFogDensity( int FDENSITY );
static void DEFogMode( int FMODE );
Memblock:
static void DEMakeMemblock( int MemblockID, int MBCSize );
static void DEDeleteMemblock( int MemblockID );
static int DEMemblockExist( int MemblockID );
static void *DEGetMemblockPTR( int MemblockID );
static int DEGetMemblockSize( int MemblockID );
static void DEWriteMemblockByte( int MemblockID, int MemblockPOS, BYTE VALUE );
static BYTE DEMemblockByte( int MemblockID, int MemblockPOS );
static void DEWriteMemblockWord( int MemblockID, int MemblockPOS, WORD VALUE );
static WORD DEMemblockWord( int MemblockID, int MemblockPOS );
static void DEWriteMemblockDWord( int MemblockID, int MemblockPOS, int VALUE );
static int DEMemblockDWord( int MemblockID, int MemblockPOS );
static void DEWriteMemblockFloat( int MemblockID, int MemblockPOS, float VALUE );
static float DEMemblockFloat( int MemblockID, int MemblockPOS );
static int DENextFreeMemblock( void );
static void DEWriteMemblockLong( int MemblockID, int MemblockPOS, int VALUE );
static int DEMemblockLong( int MemblockID, int MemblockPOS );
static void DEWriteMemblockInt( int MemblockID, int MemblockPOS, int VALUE );
static int DEMemblockInt( int MemblockID, int MemblockPOS );
Meshes (3D):
static int DEMeshExist( int MeshID );
static void DEMakeObjectFromMesh( int ObjectID, int MeshID );
static void DEMakeMeshFromMemblock( int MeshID, int MemblockID );
static void DEDeleteMesh( int MeshID );
static int DEGetMeshSize( int MeshID );
static int DENextFreeMesh( void );
Setup:
static void DESetDisplayMode( int Width, int Height, int Depth);
static void DESetWindowOn();
static void DESetWindowOff();
static void DESetWindowSize( int Width, int Height );
static void DESetWindowPosition( int XPos, int YPos );
static void DESetWindowTitle( char *WTitle );
Yeah, thanks for good answer. That all what i need to know :) Indeed, that project looks very good, and i read that topic becouse just saw the first "nice" image and when i see these "easy commands", which remind me some kind of demo-machines.
If you will be in interest about any beta-tests / finding bugs, etc, so just let me know , i with my peg2 will help you with all that NDA and so on :)
@freddix List of fucntions looks pretty clear and understanable ! That cool. Imho that engine can be also used not only for games, but also for making scene-demos (like Karate by m4nkind for 68k/ppc amigas) ?
Have you plans to add support of some "music" formats ? Like mp3, ogg, tracker modules maybe (like mod, s3m, xm, etc) ?
@kas1e Technically you can create demo with AmiDARK Engine. Actually, it is only compatible with Amiga OS 4.1 (not classic)
Support for various music file format is planed. I don't know exactly which formats will be supported but theorically file format like : MP3, MOD, WAV should be supported.
Regards, Fred
All we have to decide is what to do with the time that is given to us.
@spotUP If someone want a specific support to be added to AmiDARK Engine, send an e-mail at : fred (at) amidark-engine (dot ) com I will not add all support but if sources are available to add it, I will check and maybe it'll be added in final AmiDARK Engine :)
Regards, Freddix / AmiDARK
All we have to decide is what to do with the time that is given to us.
EDIT: I've also added commands for drawind priorities : DEDrawAtFront : Trace 3D then 2D DEDrawAtBack : Trace 2D then 3D. I had to put 2D drawing in an extensible list for display.
Edited by freddix on 2009/10/17 1:15:05
All we have to decide is what to do with the time that is given to us.