Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Probleme mit Matt`s Rende_view.Dll #39805
01/20/05 02:01
01/20/05 02:01
Joined: Apr 2004
Posts: 320
TheGameMaker Offline OP
Senior Member
TheGameMaker  Offline OP
Senior Member

Joined: Apr 2004
Posts: 320
Hallo zusammen!
Ich habe ein Problem mit Matt`s Renderview-Dll.
Wenn ich versuche das Level zu starten meldet sich Gamestudio
mit dem Fehler :

<dllfunctionrender_backbuffer(entity)>
TEST.WDL 104:0 Error(63) unknown entity

Ich habe ein Script (bloom.wdl)
und ein Shadercode Blur.fx.

include<bloom.wdl>;
:
:
In der Main-function steht:
screengrab();
effects_handle=dll_open("render_view.dll");
dll_handle=effects_handle;
dllfunction render_backbuffer(entity);
:
:
var_nsave effects_handle;

Danke im Voraus

Last edited by TheGameMaker; 01/20/05 03:44.
Re: Probleme mit Matt`s Rende_view.Dll [Re: TheGameMaker] #39806
01/20/05 02:50
01/20/05 02:50
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
und das steht in der main? warum setzt du include-dateien in die main??

Re: Probleme mit Matt`s Rende_view.Dll [Re: TheGameMaker] #39807
01/20/05 03:14
01/20/05 03:14
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Your order of events is wrong..
first you must do this:
dllfunction render_backbuffer(entity);

then call screengrab();

Re: Probleme mit Matt`s Rende_view.Dll [Re: Matt_Aufderheide] #39808
01/20/05 03:47
01/20/05 03:47
Joined: Apr 2004
Posts: 320
TheGameMaker Offline OP
Senior Member
TheGameMaker  Offline OP
Senior Member

Joined: Apr 2004
Posts: 320
Thanks Matt
I hope its work!

Natürlich steht Incude<bloom.wdl>; nicht inner Main function!
Bloß nen Tipfehler.

Re: Probleme mit Matt`s Rende_view.Dll [Re: TheGameMaker] #39809
01/20/05 04:41
01/20/05 04:41
Joined: Apr 2004
Posts: 320
TheGameMaker Offline OP
Senior Member
TheGameMaker  Offline OP
Senior Member

Joined: Apr 2004
Posts: 320
Hi
I have tested it and it gave the same failurs
as the first test.(Sorry my english isn`t so good)

Last edited by TheGameMaker; 01/20/05 04:42.
Re: Probleme mit Matt`s Rende_view.Dll [Re: TheGameMaker] #39810
01/20/05 04:50
01/20/05 04:50
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
OK.. show me all the code you are using in the order you have it.. then i can help better.

Re: Probleme mit Matt`s Rende_view.Dll [Re: Matt_Aufderheide] #39811
01/20/05 22:10
01/20/05 22:10
Joined: Apr 2004
Posts: 320
TheGameMaker Offline OP
Senior Member
TheGameMaker  Offline OP
Senior Member

Joined: Apr 2004
Posts: 320
Here is the level Code:


///////////////////////////////////////////////////////////////////////////////////
// GameStudio main script
////////////////////////////////////////////////////////////////////////////
// Files to over-ride:
// * logodark.bmp - the engine logo, include your game title
// * horizon.pcx - A horizon map displayed over the sky and cloud maps
////////////////////////////////////////////////////////////////////////////
// The PATH keyword gives directories where game files can be found,
// relative to the level directory
path "C:\\Programme\\GStudio6\\template"; // Path to WDL templates subdirectory

////////////////////////////////////////////////////////////////////////////
// The INCLUDE keyword can be used to include further WDL files,
// like those in the TEMPLATE subdirectory, with prefabricated actions
include <movement.wdl>;
include <messages.wdl>;
include <menu.wdl>; // must be inserted before doors and weapons
include <particle.wdl>; // remove when you need no particles
include <doors.wdl>; // remove when you need no doors
include <actors.wdl>; // remove when you need no actors
include <weapons.wdl>; // remove when you need no weapons
include <war.wdl>; // remove when you need no fighting
//include <venture.wdl>; // include when doing an adventure
include <lflare.wdl>; // remove when you need no lens flares
include <bloom.wdl>;
////////////////////////////////////////////////////////////////////////////
// The engine starts in the resolution given by the follwing vars.
var video_mode = 6; // screen size 640x480
var video_depth = 16; // 16 bit colour D3D mode

/////////////////////////////////////////////////////////////////
// Strings and filenames
// change this string to your own starting mission message.
string mission_str = "Fight your way through the level. Press [F1] for help";
string level_str = <test.WMB>; // give file names in angular brackets

/////////////////////////////////////////////////////////////////
// define a splash screen with the required A4/A5 logo
bmap splashmap = <logodark.pcx>; // the default logo in templates
panel splashscreen {
bmap = splashmap;
flags = refresh,d3d;
}

////////////////////////////////////////////////////////////////////////////
// The following script controls the sky
sky horizon_sky {
// A backdrop texture's horizontal size must be a power of 2;
// the vertical size does not matter
type = <horizon.pcx>;
tilt = -10;
flags = scene,overlay,visible;
layer = 3;
}

/////////////////////////////////////////////////////////////////
// The main() function is started at game start
function main()
{
// set some common flags and variables
// warn_level = 2; // announce bad texture sizes and bad wdl code
tex_share = on; // map entities share their textures

// center the splash screen for non-640x480 resolutions, and display it
splashscreen.pos_x = (screen_size.x - bmap_width(splashmap))/2;
splashscreen.pos_y = (screen_size.y - bmap_height(splashmap))/2;
splashscreen.visible = on;
// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// now load the level
level_load(level_str);
// freeze the game
freeze_mode = 1;

// wait the required second, then switch the splashscreen off.
sleep(1);
splashscreen.visible = off;
bmap_purge(splashmap); // remove splashscreen from video memory

// load some global variables, like sound volume
load_status();

// display the initial message
msg_show(mission_str,10);

// initialize lens flares when edition supports flares
ifdef CAPS_FLARE;
lensflare_start();
endif;

// use the new 3rd person camera
move_view_cap = 1;

// un-freeze the game
freeze_mode = 0;

// client_move(); // for a possible multiplayer game
// call further functions here...
//dllfunction render_backbuffer(entity);

}


/////////////////////////////////////////////////////////////////
// The following definitions are for the pro edition window composer
// to define the start and exit window of the application.
WINDOW WINSTART
{
TITLE "3D GameStudio";
SIZE 480,320;
MODE IMAGE; //STANDARD;
BG_COLOR RGB(240,240,240);
FRAME FTYP1,0,0,480,320;
// BUTTON BUTTON_START,SYS_DEFAULT,"Start",400,288,72,24;
BUTTON BUTTON_QUIT,SYS_DEFAULT,"Abort",400,288,72,24;
TEXT_STDOUT "Arial",RGB(0,0,0),10,10,460,280;
}

/* no exit window at all..
WINDOW WINEND
{
TITLE "Finished";
SIZE 540,320;
MODE STANDARD;
BG_COLOR RGB(0,0,0);
TEXT_STDOUT "",RGB(255,40,40),10,20,520,270;

SET FONT "",RGB(0,255,255);
TEXT "Any key to exit",10,270;
}*/
var_nsave effects_handle;

/////////////////////////////////////////////////////////////////
//INCLUDE <debug.wdl>;




Here is the fx file:



float4x4 matWorldViewProj;



struct VS_OUTPUT

{

float4 Pos : POSITION;

float2 Tex : TEXCOORD0;

};



VS_OUTPUT mainVS( float4 Pos : POSITION,

float2 Tex : TEXCOORD0 )

{

VS_OUTPUT Out = (VS_OUTPUT) 0;

Out.Pos = mul(Pos,matWorldViewProj );

Out.Tex = Tex;

return Out;

}



texture mtlSkin1;



sampler basemap = sampler_state

{

Texture = <mtlSkin1>;

MinFilter = Linear;

MagFilter = Linear;

MipFilter = Linear;

AddressU = clamp;

AddressV = clamp;

};





// Simple blur filter

float4 mainPS(float2 Tex: TEXCOORD0) : COLOR {



//float4 darken={0.025,0.02,0.02,1};

float4 darken={0.025,0.025,0.025,1};



float4 Color=0;


float2 tap1 = {Tex.x+0.008,Tex.y-0.008};

float2 tap2 = {Tex.x-0.008,Tex.y+0.008};

float2 tap3 = {Tex.x+0.008,Tex.y+0.008};

float2 tap4 = {Tex.x-0.008,Tex.y-0.008};


float2 tap5 = {Tex.x+0.008,Tex.y};

float2 tap6 = {Tex.x-0.008,Tex.y};

float2 tap7 = {Tex.x,Tex.y+0.008};

float2 tap8 = {Tex.x,Tex.y-0.008};


float2 tap9 = {Tex.x+0.016,Tex.y-0.016};

float2 tap10 = {Tex.x-0.016,Tex.y+0.016};

float2 tap11 = {Tex.x+0.016,Tex.y+0.016};

float2 tap12 = {Tex.x-0.016,Tex.y-0.016};


float2 tap13 = {Tex.x+0.016,Tex.y};

float2 tap14 = {Tex.x-0.016,Tex.y};

float2 tap15 = {Tex.x,Tex.y+0.016};

float2 tap16 = {Tex.x,Tex.y-0.016};


float2 tap17 = {Tex.x+0.032,Tex.y-0.032};

float2 tap18 = {Tex.x-0.032,Tex.y+0.032};

float2 tap19 = {Tex.x+0.032,Tex.y+0.032};

float2 tap20 = {Tex.x-0.032,Tex.y-0.032};


float2 tap21 = {Tex.x+0.032,Tex.y};

float2 tap22 = {Tex.x-0.032,Tex.y};

float2 tap23 = {Tex.x,Tex.y+0.032};

float2 tap24 = {Tex.x,Tex.y-0.032};


Color = tex2D( basemap, Tex.xy);



Color += tex2D( basemap, tap1);

Color += tex2D( basemap, tap2);

Color += tex2D( basemap, tap3);

Color += tex2D( basemap, tap4);


Color += tex2D( basemap, tap5);

Color += tex2D( basemap, tap6);

Color += tex2D( basemap, tap7);

Color += tex2D( basemap, tap8);


Color += tex2D( basemap, tap9);

Color += tex2D( basemap, tap10);

Color += tex2D( basemap, tap11);

Color += tex2D( basemap, tap12);


Color += tex2D( basemap, tap13);

Color += tex2D( basemap, tap14);

Color += tex2D( basemap, tap15);

Color += tex2D( basemap, tap16);


Color += tex2D( basemap, tap17);

Color += tex2D( basemap, tap18);

Color += tex2D( basemap, tap19);

Color += tex2D( basemap, tap20);


Color += tex2D( basemap, tap21);

Color += tex2D( basemap, tap22);

Color += tex2D( basemap, tap23);

Color += tex2D( basemap, tap24);


float cutoff=8;



if (Color.r < cutoff && Color.g < cutoff && Color.b < cutoff)

{Color-=((cutoff/Color))*0.3;}


// if (Color.r > cutoff && Color.g > cutoff && Color.b > cutoff)

// {Color+=((Color*0.1);}



// return ((Color)*darken)*0.5; //0.6

return ((Color)*darken)*0.5;


}



technique blur

{



pass Object

{

alphablendenable=true;

srcblend=destalpha;

destblend=srcalpha;

ZENABLE = TRUE;

VertexShader = compile vs_1_1 mainVS();

PixelShader = compile ps_2_0 mainPS();

}



}



and here is the Bloom.wdl:


material mat_blur{}
var_nsave effects_handle;






entity glow_quad

{

type = <bloom_tga.tga>; //128*128 works best but can be any size

//this entity is always invisible..

}



entity glow_quad_view

{

type = <bloom_tga.tga>;

layer = 2; // display above view entities with layer 1

view = CAMERA; // same camera parameters as the default view

// set the x position according to the texture size..

// x = 36; // for 32

// x = 72; // for 64

x = 145; // for 128

y = 0; //center horzontally

z = 0; // and center vertically

}


starter ini(){

effect_load(mat_blur,"blur.fx");
effects_handle = dll_open("render_view.dll");
dll_handle = effects_handle;
dllfunction render_backbuffer(entity);
screengrab();
}

//then you need two functions:Code:

function map_glow()

{

me=glow_quad_view;

my.ambient=100;

my.transparent=on;

my.bright=on;

my.alpha=10;

my.visible=on;

my.material=mat_blur;

my.scale_x=1.33; //this scales it to screen proportions..

while(1)

{

//sets material skin1 to the rendered view tex

mat_blur.skin1=bmap_for_entity(glow_quad,0);

wait(1);

}

}



function screengrab()

{

wait(20);

me=glow_quad;

map_glow();

while(1)

{
dll_handle = effects_handle;
render_backbuffer(my);

wait(1);

}

}




//now in your main function or whereever just call screengrab();

//now here is a material that can be used for the bloom effect, it may not be the best shader, but i have found it works well for me..


//first define your material:
//material mat_blur{}

//now ins a starter function put this:
//effect_load(mat_blur,"blur.fx");




Thanks!

Re: Probleme mit Matt`s Rende_view.Dll [Re: TheGameMaker] #39812
01/21/05 11:57
01/21/05 11:57
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Oh, this is easy..
just nmake sure you define the
entity glow_quad
and
entity glow_quad_view
BEFORE everything else.

Re: Probleme mit Matt`s Rende_view.Dll [Re: Matt_Aufderheide] #39813
01/21/05 23:47
01/21/05 23:47
Joined: Apr 2004
Posts: 320
TheGameMaker Offline OP
Senior Member
TheGameMaker  Offline OP
Senior Member

Joined: Apr 2004
Posts: 320
It dosn`t work, too.
(or Im only to stupid?)
Could you post a published version
of a test Level?

Re: Probleme mit Matt`s Rende_view.Dll [Re: TheGameMaker] #39814
01/25/05 03:05
01/25/05 03:05
Joined: Apr 2004
Posts: 320
TheGameMaker Offline OP
Senior Member
TheGameMaker  Offline OP
Senior Member

Joined: Apr 2004
Posts: 320
Why you don´t answer anymore?
I´m so sad your dll dosn`t work.
I have changed the script on top als like i have done in my level.


Moderated by  Blink, Hummel, Superku 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1