Seed_It, Sphere2, and A7

Posted By: mbartman

Seed_It, Sphere2, and A7 - 07/04/07 23:07

Will I run into any problems using Seed_It and Sphere2 together?

I know that Seed_It requires you to attach the generated script to the terrain, but I am not sure about Sphere.

Also, will both of these add-ons work fine in A7? I am pretty confident that Seed_It will, but I have read in a few places that Sphere2 was written for A6.5/6 which is what causes my concern.

Thanks,
Posted By: mbartman

Re: Seed_It, Sphere2, and A7 - 07/06/07 01:45

Can anyone at least tell me if Sphere is compatible with A7?
Posted By: lostclimate

Re: Seed_It, Sphere2, and A7 - 07/06/07 04:47

You can probably rig it to work but Im not entirely sure so do chase me down and beat me with a baseball bat if im wrong
Posted By: mbartman

Re: Seed_It, Sphere2, and A7 - 07/06/07 08:24

lol thanks

Perhaps I'll just PM the creator, I just thought I'd see if anyone else had any experience first..
Posted By: D3D

Re: Seed_It, Sphere2, and A7 - 07/06/07 14:38

Tried it with A7.04 and it didn't worked. Problem with DLL. Sphere2 was made to run on A6.40, but with fix it runs on A6.50 and 6.60 too. Don't know what the problem is with A7 it runs fine from WED/SED. Only when compiled to exe it doesn't work at all. Hope there will be a -easy to use- Sphere3 w/support for Lite-C in the future.
Posted By: mbartman

Re: Seed_It, Sphere2, and A7 - 07/06/07 16:40

Ah, that's unfortunate.. If I'm not mistaken the release version for A7 is set for 7.10, so perhaps with that release we can expect Sphere3 shortly after..

I guess I'll just have to do without the eye-candy for now..

Thanks for your reply,
Posted By: Matt_Aufderheide

Re: Seed_It, Sphere2, and A7 - 07/17/07 07:46

I havent seen A7 yet, there may be substantial changes in the DLL interface. it is a new engine, so its not surprising that Sphere doesnt work with it.

I am working on a new version of Sphere.
Posted By: frazzle

Re: Seed_It, Sphere2, and A7 - 07/17/07 09:47

Quote:

...
I am working on a new version of Sphere.





Great to hear Matt

Cheers

Frazzle
Posted By: mbartman

Re: Seed_It, Sphere2, and A7 - 07/17/07 19:10

That's great news
Posted By: HeelX

Re: Seed_It, Sphere2, and A7 - 07/17/07 19:15

@Matt

Well, the interface did'nt changed much. Though, try compiling sphere2 with the new SDK, I guess then it works with A7. I compiled a CScript DLL for someone under A6.60 and it worked, but under A7.04 he had problems running it. I re-compiled it with the A7 SDK (I didn't changed anything!) and it runs fine. Give it a try
Posted By: D3D

Re: Seed_It, Sphere2, and A7 - 07/18/07 23:59

When I purchased the Sphere2 plugin, the source was made available too. So can I compile this myself with the A7 SDK inside the GStudio7 directory? Or do I need more!? I understand how to setup the compiler and all that.
Posted By: S3an

Re: Seed_It, Sphere2, and A7 - 08/02/07 06:06

i was able to compile sphere2 with the new a7 plugin sdk. works fine and looks good
Posted By: D3D

Re: Seed_It, Sphere2, and A7 - 08/02/07 07:28

That's nice! I tried to compile the dll, only there was a missing header file. Don't recall the name right now. Guess it's only available in the older DirectX SDK.
Posted By: S3an

Re: Seed_It, Sphere2, and A7 - 08/02/07 20:08

yeah, it was missing "dxutil.h", searched around and found the right one but i forget where at i can send it to you if you would like, just pm me.
Posted By: D3D

Re: Seed_It, Sphere2, and A7 - 08/02/07 21:16

Could you tell me if this is the same file, and will it work with the latest DirectX SDK!? If not, which DirectX SDK version did you used to recompile the DLL?

Code:
//-----------------------------------------------------------------------------
// File: DXUtil.h
//
// Desc: Helper functions and typing shortcuts for DirectX programming.
//
// Copyright (c) 1997-2000 Microsoft Corporation. All rights reserved
//-----------------------------------------------------------------------------
#ifndef DXUTIL_H
#define DXUTIL_H


//-----------------------------------------------------------------------------
// Miscellaneous helper functions
//-----------------------------------------------------------------------------
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
#define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }


//-----------------------------------------------------------------------------
// Name: DXUtil_GetDXSDKMediaPath() and DXUtil_FindMediaFile()
// Desc: Returns the DirectX SDK path, as stored in the system registry
// during the SDK install.
//-----------------------------------------------------------------------------
const TCHAR* DXUtil_GetDXSDKMediaPath();
HRESULT DXUtil_FindMediaFile( TCHAR* strPath, TCHAR* strFilename );


//-----------------------------------------------------------------------------
// Name: DXUtil_Read*RegKey() and DXUtil_Write*RegKey()
// Desc: Helper functions to read/write a string registry key
//-----------------------------------------------------------------------------
HRESULT DXUtil_WriteStringRegKey( HKEY hKey, TCHAR* strRegName, TCHAR* strValue );
HRESULT DXUtil_WriteIntRegKey( HKEY hKey, TCHAR* strRegName, DWORD dwValue );
HRESULT DXUtil_WriteGuidRegKey( HKEY hKey, TCHAR* strRegName, GUID guidValue );
HRESULT DXUtil_WriteBoolRegKey( HKEY hKey, TCHAR* strRegName, BOOL bValue );

HRESULT DXUtil_ReadStringRegKey( HKEY hKey, TCHAR* strRegName, TCHAR* strValue, DWORD dwLength, TCHAR* strDefault );
HRESULT DXUtil_ReadIntRegKey( HKEY hKey, TCHAR* strRegName, DWORD* pdwValue, DWORD dwDefault );
HRESULT DXUtil_ReadGuidRegKey( HKEY hKey, TCHAR* strRegName, GUID* pGuidValue, GUID& guidDefault );
HRESULT DXUtil_ReadBoolRegKey( HKEY hKey, TCHAR* strRegName, BOOL* pbValue, BOOL bDefault );


//-----------------------------------------------------------------------------
// Name: DXUtil_Timer()
// Desc: Performs timer opertations. Use the following commands:
// TIMER_RESET - to reset the timer
// TIMER_START - to start the timer
// TIMER_STOP - to stop (or pause) the timer
// TIMER_ADVANCE - to advance the timer by 0.1 seconds
// TIMER_GETABSOLUTETIME - to get the absolute system time
// TIMER_GETAPPTIME - to get the current time
// TIMER_GETELAPSEDTIME - to get the time that elapsed between
// TIMER_GETELAPSEDTIME calls
//-----------------------------------------------------------------------------
enum TIMER_COMMAND { TIMER_RESET, TIMER_START, TIMER_STOP, TIMER_ADVANCE,
TIMER_GETABSOLUTETIME, TIMER_GETAPPTIME, TIMER_GETELAPSEDTIME };
FLOAT __stdcall DXUtil_Timer( TIMER_COMMAND command );


//-----------------------------------------------------------------------------
// UNICODE support for converting between CHAR, TCHAR, and WCHAR strings
//-----------------------------------------------------------------------------
VOID DXUtil_ConvertAnsiStringToWide( WCHAR* wstrDestination, const CHAR* strSource, int cchDestChar = -1 );
VOID DXUtil_ConvertWideStringToAnsi( CHAR* strDestination, const WCHAR* wstrSource, int cchDestChar = -1 );
VOID DXUtil_ConvertGenericStringToAnsi( CHAR* strDestination, const TCHAR* tstrSource, int cchDestChar = -1 );
VOID DXUtil_ConvertGenericStringToWide( WCHAR* wstrDestination, const TCHAR* tstrSource, int cchDestChar = -1 );
VOID DXUtil_ConvertAnsiStringToGeneric( TCHAR* tstrDestination, const CHAR* strSource, int cchDestChar = -1 );
VOID DXUtil_ConvertWideStringToGeneric( TCHAR* tstrDestination, const WCHAR* wstrSource, int cchDestChar = -1 );


//-----------------------------------------------------------------------------
// Debug printing support
//-----------------------------------------------------------------------------
VOID DXUtil_Trace( TCHAR* strMsg, ... );
HRESULT _DbgOut( TCHAR*, DWORD, HRESULT, TCHAR* );

#if defined(DEBUG) | defined(_DEBUG)
#define DXTRACE DXUtil_Trace
#else
#define DXTRACE sizeof
#endif

#if defined(DEBUG) | defined(_DEBUG)
#define DEBUG_MSG(str) _DbgOut( __FILE__, (DWORD)__LINE__, 0, str )
#else
#define DEBUG_MSG(str) (0L)
#endif


#endif // DXUTIL_H


Posted By: S3an

Re: Seed_It, Sphere2, and A7 - 08/03/07 01:35

I used the Feb 2007 version of DX9 with MSVC++ 7.1 (2003). The header i used is similar but not the same, alot of the CE stuff could be cut out...

Code:

//-----------------------------------------------------------------------------
// File: DXUtil.h
//
// Desc: Helper functions and typing shortcuts for DirectX programming.
//
// Copyright (c) Microsoft Corporation. All rights reserved
//-----------------------------------------------------------------------------
#ifndef DXUTIL_H
#define DXUTIL_H


//-----------------------------------------------------------------------------
// Miscellaneous helper functions
//-----------------------------------------------------------------------------
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
#define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }


#ifndef UNDER_CE
//-----------------------------------------------------------------------------
// Name: DXUtil_GetDXSDKMediaPath() and DXUtil_FindMediaFile()
// Desc: Returns the DirectX SDK path, as stored in the system registry
// during the SDK install.
//-----------------------------------------------------------------------------
HRESULT DXUtil_GetDXSDKMediaPathCch( TCHAR* strDest, int cchDest );
HRESULT DXUtil_GetDXSDKMediaPathCb( TCHAR* szDest, int cbDest );
HRESULT DXUtil_FindMediaFileCch( TCHAR* strDestPath, int cchDest, TCHAR* strFilename );
HRESULT DXUtil_FindMediaFileCb( TCHAR* szDestPath, int cbDest, TCHAR* strFilename );
#endif // !UNDER_CE


//-----------------------------------------------------------------------------
// Name: DXUtil_Read*RegKey() and DXUtil_Write*RegKey()
// Desc: Helper functions to read/write a string registry key
//-----------------------------------------------------------------------------
HRESULT DXUtil_WriteStringRegKey( HKEY hKey, TCHAR* strRegName, TCHAR* strValue );
HRESULT DXUtil_WriteIntRegKey( HKEY hKey, TCHAR* strRegName, DWORD dwValue );
HRESULT DXUtil_WriteGuidRegKey( HKEY hKey, TCHAR* strRegName, GUID guidValue );
HRESULT DXUtil_WriteBoolRegKey( HKEY hKey, TCHAR* strRegName, BOOL bValue );

HRESULT DXUtil_ReadStringRegKeyCch( HKEY hKey, TCHAR* strRegName, TCHAR* strDest, DWORD cchDest, TCHAR* strDefault );
HRESULT DXUtil_ReadStringRegKeyCb( HKEY hKey, TCHAR* strRegName, TCHAR* strDest, DWORD cbDest, TCHAR* strDefault );
HRESULT DXUtil_ReadIntRegKey( HKEY hKey, TCHAR* strRegName, DWORD* pdwValue, DWORD dwDefault );
HRESULT DXUtil_ReadGuidRegKey( HKEY hKey, TCHAR* strRegName, GUID* pGuidValue, GUID& guidDefault );
HRESULT DXUtil_ReadBoolRegKey( HKEY hKey, TCHAR* strRegName, BOOL* pbValue, BOOL bDefault );


//-----------------------------------------------------------------------------
// Name: DXUtil_Timer()
// Desc: Performs timer opertations. Use the following commands:
// TIMER_RESET - to reset the timer
// TIMER_START - to start the timer
// TIMER_STOP - to stop (or pause) the timer
// TIMER_ADVANCE - to advance the timer by 0.1 seconds
// TIMER_GETABSOLUTETIME - to get the absolute system time
// TIMER_GETAPPTIME - to get the current time
// TIMER_GETELAPSEDTIME - to get the time that elapsed between
// TIMER_GETELAPSEDTIME calls
//-----------------------------------------------------------------------------
enum TIMER_COMMAND { TIMER_RESET, TIMER_START, TIMER_STOP, TIMER_ADVANCE,
TIMER_GETABSOLUTETIME, TIMER_GETAPPTIME, TIMER_GETELAPSEDTIME };
FLOAT __stdcall DXUtil_Timer( TIMER_COMMAND command );


//-----------------------------------------------------------------------------
// UNICODE support for converting between CHAR, TCHAR, and WCHAR strings
//-----------------------------------------------------------------------------
HRESULT DXUtil_ConvertAnsiStringToWideCch( WCHAR* wstrDestination, const CHAR* strSource, int cchDestChar );
HRESULT DXUtil_ConvertWideStringToAnsiCch( CHAR* strDestination, const WCHAR* wstrSource, int cchDestChar );
HRESULT DXUtil_ConvertGenericStringToAnsiCch( CHAR* strDestination, const TCHAR* tstrSource, int cchDestChar );
HRESULT DXUtil_ConvertGenericStringToWideCch( WCHAR* wstrDestination, const TCHAR* tstrSource, int cchDestChar );
HRESULT DXUtil_ConvertAnsiStringToGenericCch( TCHAR* tstrDestination, const CHAR* strSource, int cchDestChar );
HRESULT DXUtil_ConvertWideStringToGenericCch( TCHAR* tstrDestination, const WCHAR* wstrSource, int cchDestChar );
HRESULT DXUtil_ConvertAnsiStringToWideCb( WCHAR* wstrDestination, const CHAR* strSource, int cbDestChar );
HRESULT DXUtil_ConvertWideStringToAnsiCb( CHAR* strDestination, const WCHAR* wstrSource, int cbDestChar );
HRESULT DXUtil_ConvertGenericStringToAnsiCb( CHAR* strDestination, const TCHAR* tstrSource, int cbDestChar );
HRESULT DXUtil_ConvertGenericStringToWideCb( WCHAR* wstrDestination, const TCHAR* tstrSource, int cbDestChar );
HRESULT DXUtil_ConvertAnsiStringToGenericCb( TCHAR* tstrDestination, const CHAR* strSource, int cbDestChar );
HRESULT DXUtil_ConvertWideStringToGenericCb( TCHAR* tstrDestination, const WCHAR* wstrSource, int cbDestChar );


//-----------------------------------------------------------------------------
// Readme functions
//-----------------------------------------------------------------------------
VOID DXUtil_LaunchReadme( HWND hWnd, TCHAR* strLoc = NULL );

//-----------------------------------------------------------------------------
// GUID to String converting
//-----------------------------------------------------------------------------
HRESULT DXUtil_ConvertGUIDToStringCch( const GUID* pGuidSrc, TCHAR* strDest, int cchDestChar );
HRESULT DXUtil_ConvertGUIDToStringCb( const GUID* pGuidSrc, TCHAR* strDest, int cbDestChar );
HRESULT DXUtil_ConvertStringToGUID( const TCHAR* strIn, GUID* pGuidOut );


//-----------------------------------------------------------------------------
// Debug printing support
// See dxerr9.h for more debug printing support
//-----------------------------------------------------------------------------
VOID DXUtil_Trace( TCHAR* strMsg, ... );

#if defined(DEBUG) | defined(_DEBUG)
#define DXTRACE DXUtil_Trace
#else
#define DXTRACE sizeof
#endif


//-----------------------------------------------------------------------------
// Name: ArrayListType
// Desc: Indicates how data should be stored in a CArrayList
//-----------------------------------------------------------------------------
enum ArrayListType
{
AL_VALUE, // entry data is copied into the list
AL_REFERENCE, // entry pointers are copied into the list
};


//-----------------------------------------------------------------------------
// Name: CArrayList
// Desc: A growable array
//-----------------------------------------------------------------------------
class CArrayList
{
protected:
ArrayListType m_ArrayListType;
void* m_pData;
UINT m_BytesPerEntry;
UINT m_NumEntries;
UINT m_NumEntriesAllocated;

public:
CArrayList( ArrayListType Type, UINT BytesPerEntry = 0 );
~CArrayList( void );
HRESULT Add( void* pEntry );
void Remove( UINT Entry );
void* GetPtr( UINT Entry );
UINT Count( void ) { return m_NumEntries; }
bool Contains( void* pEntryData );
void Clear( void ) { m_NumEntries = 0; }
};

//-----------------------------------------------------------------------------
// WinCE build support
//-----------------------------------------------------------------------------

#ifdef UNDER_CE

#define CheckDlgButton(hdialog, id, state) ::SendMessage(::GetDlgItem(hdialog, id), BM_SETCHECK, state, 0)
#define IsDlgButtonChecked(hdialog, id) ::SendMessage(::GetDlgItem(hdialog, id), BM_GETCHECK, 0L, 0L)
#define GETTIMESTAMP GetTickCount
#define _TWINCE(x) _T(x)

__inline int GetScrollPos(HWND hWnd, int nBar)
{
SCROLLINFO si;
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
si.fMask = SIF_POS;
if (!GetScrollInfo(hWnd, nBar, &si))
{
return 0;
}
else
{
return si.nPos;
}
}

#else // !UNDER_CE

#define GETTIMESTAMP timeGetTime
#define _TWINCE(x) x

#endif // UNDER_CE


#endif // DXUTIL_H



Posted By: D3D

Re: Seed_It, Sphere2, and A7 - 08/03/07 08:04

Thanks S3an i've succesfully compiled Sphere2 against the A7 SDK! However, after trying the new dll with A7 there is a shader compiler error X4532: (cannot map expression to pixel shader instruction set) with parallax.fx or so it seems. Have you noticed this?
Posted By: S3an

Re: Seed_It, Sphere2, and A7 - 08/04/07 05:23

yes, the exact same problem. i removed the "for" loop from the shader and just set the var indexes by hand. not sure why A7's shader compiler is different here.
Posted By: D3D

Re: Seed_It, Sphere2, and A7 - 08/04/07 05:48



This is what I have done to get rid of the shader compiler error X4532. Just change in parallax.fx on line 2807

parallax.fx
Code:
technique depthpass
{

pass p0
{
cullmode=ccw;
alphablendenable=false;
zenable=true;
zwriteenable=true;
stencilenable=false;
alphatestenable=false;

VertexShader = compile vs_2_0 VS_PASSD(); // vs_1_1 produced the error
PixelShader = compile ps_2_0 PS_PASSD();
//VertexShader = compile vs_1_1 VS_PASSD();
//PixelShader = compile ps_1_1 PS_PASSD();
}

}


I'm also using the fix from William. To solve the light issue (empty pointer) with >A6.40.5 change the code like so:

Sphere_Engine.wdl Fixed
Code:
//******************************************************
//Light_Update(): Updates each visible light to the dll
//******************************************************

function Light_Update()
{
var temp2loop=0;

//loop through and update each active light in the array
while(temp2loop<max_sphere_lights)
{
temp=closestlight[temp2loop];
if(temp>0)
{
me=ptr_for_handle(closestlight[temp2loop]);

if my.skill5<=max_light_dist
{
Sp_Init_Light(vector(my.x,my.z,my.y),vector(my.skill8,my.skill9,my.skill10),vector(temp2loop,temp2loop,my.Sp_lightrange*2));

Sp_Light_Dist(my.skill5+20,temp2loop);
}

//if light is not within max dist, make it black and very far away so there can be no popping artifacts

if(my.skill5>max_light_dist)
{
Sp_Init_Light(vector(10000,10000,10000),vector(0,0,0),vector(temp2loop,temp2loop,my.Sp_lightrange));

Sp_Light_Dist(my.skill5+20,temp2loop);
}
}

else
{
if(my)
{
//--- line that produced the empty pointer error
Sp_Init_Light(vector(10000,10000,10000),vector(0,0,0),vector(temp2loop,temp2loop,my.Sp_lightrange));

Sp_Light_Dist(my.skill5+20,temp2loop);
}
}

temp2loop+=1;
}
}



Sphere2 is now working with A7.04.2

MS Server 2003 R2 Platform SDK
MS DirectX SDK Jun 2007
A7.04.2 Plugin SDK
Posted By: S3an

Re: Seed_It, Sphere2, and A7 - 08/04/07 15:51

Still the best water system out i think ( or at least that us indies can afford to play with ) Good catch on the shader version btw. works perfect!


Posted By: frazzle

Re: Seed_It, Sphere2, and A7 - 08/04/07 19:21

Yes indeed, Matt is a genius and a hard working man who likes to get a great result out of his work. Sphere1 and Sphere2 emphasise this for sure !!

Cheers

Frazzle
Posted By: arv

Re: Seed_It, Sphere2, and A7 - 10/09/07 00:15

arvk@bresnan.net
can u send me one
a7 commercial
visual cc+6.0
sphere2
arvk@bresnan.net
Posted By: Matt_Coles

Re: Seed_It, Sphere2, and A7 - 10/09/07 06:28

sweet, any hints on when we can expect sphere 3 or what features it'll have matt?

I wouldn't mind having a copy of the sphere 2 fix also if someone would so kind to send me the changed code, S3162943(at)student.rmit.edu.au

thanks,

matt coles
Posted By: Machinery_Frank

Re: Seed_It, Sphere2, and A7 - 10/09/07 08:13

Quote:

sweet, any hints on when we can expect sphere 3 or what features it'll have matt?




You can find a little hint here (at the end ot this thread):

http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/791095/page/0/fpart/all/vc/1
Posted By: Matt_Coles

Re: Seed_It, Sphere2, and A7 - 10/09/07 09:23

thanks frank, I can hardly wait for the next sphere release, want to use it for redthorn if it comes out in time
Posted By: Machinery_Frank

Re: Seed_It, Sphere2, and A7 - 10/09/07 09:52

I am also interested in Sphere3 but I dont like the movement to exclusive hardware.

My wish-list would be:
- improved shadows (higher resolutions) without glow-coronas around models
- scene-management
- better lighting-system

If we had this then you could expect real games coming. Currently there is no Sphere game available because of this.

It does not have to be SM4.0 and I dont care about relief mapping, real displacement mapping, geometry deforming and such. This will be FPS-killer even with modern GPU. And a scene-management is still missing. So it makes all that even worse.
Posted By: Nowherebrain

Re: Seed_It, Sphere2, and A7 - 10/13/07 00:27

I won't use vista so....whatever..., shame I am curious about sphere3...but in the end I usually end up coding something less dramatic, simpler, and effective...this usually leaves me with no use for such plugins....(I did buy sphere 2 a year ago however...never used it).
Posted By: proteK

Re: Seed_It, Sphere2, and A7 - 12/01/07 21:35

Hi, know somebody where i get my sphere update from my version 1 to version 2, i remember me, that Matt said thats free for customers of the V1.0


But I neaver heard again something, no email, and the homepage is down.

Maybe someone read this post.
© 2024 lite-C Forums