Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
Will do free coding - if contented donations are welcome #281296
07/26/09 16:30
07/26/09 16:30
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
Hello everyone,

I want (and probably need^^) some variation from the project I am currently working on and so I thought about doing some freelance coding for you.
If you have a small (or medium) task you need to get done, just give me the needed information and I
I'll see if I can/want to do it.

I am nearly coding for 5 years now and I will give you some clear and effective code. If something turns out to be not working the way you want (which shouldn't be the case with a good description of the task) I'm trying to fix it for you.

Of course I would be happy about a donation (as you might have guessed from the title^^), but it's in no way necessary and I will still do you the favour of coding something. If you really want to you can give send it to my paypal account: KaiAlexHiller@web.de

Scorpion


(Hope this donation thing didn't scared too much people...)

PS: I'm talking about lite-c scripting here only (not in the mood for other langs)

Last edited by Scorpion; 07/26/09 17:58.
Re: Will do free coding - if contented donations are welcome [Re: Scorpion] #281303
07/26/09 17:14
07/26/09 17:14
Joined: Jul 2009
Posts: 11
S
Saruniks Offline
Newbie
Saruniks  Offline
Newbie
S

Joined: Jul 2009
Posts: 11
Quote:

PANEL* startgame_pan =
{
bmap = "main2_tga";
pos_x = 0;
pos_y = 468;
button (0, 1, "StartGame3_bmp", "StartGame3_bmp", "StartGame3_bmp",NULL, NULL, NULL);
button (330, 1, "settings3_bmp", "settings1_bmp", "settings2_bmp", startgame_to_settings, NULL, NULL);
button (580, 3, "extras3_bmp", "extras1_bmp", "extras2_bmp", startgame_to_extras, NULL, NULL);
button (800, 0, "quit3_bmp", "quit1_bmp", "quit2_bmp", startgame_to_quit, NULL, NULL);
button (10, 70, "new3_bmp", "new1_bmp", "new2_bmp", start_game, NULL, NULL);
button (10, 120, "load3_bmp", "load1_bmp", "load2_bmp", NULL, NULL, NULL);
button (10, 170, "save3_bmp", "save1_bmp", "save2_bmp", NULL, NULL, NULL);
flags = | OVERLAY | OVERLAY | OVERLAY;
}


function main()
{
fps_max = 70;
video_mode = 9;
video_screen = 1;
mouse_spot.x = 1;
mouse_spot.y = 1;
wait (2);
set (main_pan, VISIBLE);
mouse_mode = 4;
mouse_map = mouse_pcx;
}

function start_game()
{
reset (main_pan, VISIBLE);
game_started = 1;
mouse_mode = 0;
level_load (NULL);
wait (3);
}



When I press new button, game starts but panel is still visible. Maybe because it is visible from the begining I mean there are
set (main_pan, VISIBLE); (in function main)
so it still shows, how to get my panel hidden when I start game?
(this is not full code) ( I don't know how you guys are posting scripts here)

Ps: how can we do donate for you? ( I am not saying I am going to make it )

Last edited by Saruniks; 07/26/09 17:20.
Re: Will do free coding - if contented donations are welcome [Re: Saruniks] #281313
07/26/09 17:55
07/26/09 17:55
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
The first thing is this strange line:
Code:
flags = | OVERLAY | OVERLAY | OVERLAY;


replace it with
Code:
flags = OVERLAY;



for hiding the panel startgame_pan, you have to type
Code:
reset(startgame_pan, VISIBLE);


like you did already for main_pan

I have no idea why you are using the wait(2); in your main function. it doesn't look useful there from that piece of code.

And about the mouse_spot: it defines the offset of the mousespot. So the spot is not in the top left corner anymore in your case. I'm not sure if it's that what you want. Just wanted to mention it.

and one last thing to notice: you don't need a wait(3) behind a level_load in the engine anymore.

So you code would be
Code:
PANEL* startgame_pan =
{
	bmap = "main2_tga";
	pos_x = 0;
	pos_y = 468;
	button (0, 1, "StartGame3_bmp", "StartGame3_bmp", "StartGame3_bmp",NULL, NULL, NULL);
	button (330, 1, "settings3_bmp", "settings1_bmp", "settings2_bmp", startgame_to_settings, NULL, NULL);
	button (580, 3, "extras3_bmp", "extras1_bmp", "extras2_bmp", startgame_to_extras, NULL, NULL);
	button (800, 0, "quit3_bmp", "quit1_bmp", "quit2_bmp", startgame_to_quit, NULL, NULL);
	button (10, 70, "new3_bmp", "new1_bmp", "new2_bmp", start_game, NULL, NULL);
	button (10, 120, "load3_bmp", "load1_bmp", "load2_bmp", NULL, NULL, NULL);
	button (10, 170, "save3_bmp", "save1_bmp", "save2_bmp", NULL, NULL, NULL);
	flags = OVERLAY;
}


function main()
{
	fps_max = 70;
	video_mode = 9;
	video_screen = 1;

	set (main_pan, VISIBLE);
	mouse_mode = 4;
	mouse_map = mouse_pcx;
}

function start_game()
{
	reset(main_pan, VISIBLE);
	reset(startgame_pan, VISIBLE);
	game_started = 1;
	mouse_mode = 0;
	level_load (NULL);
}



Re: Will do free coding - if contented donations are welcome [Re: Scorpion] #281314
07/26/09 18:07
07/26/09 18:07
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
YOu must use SHOW instead of VISIBLE

Code:
PANEL* startgame_pan =
{
	bmap = "main2_tga";
	pos_x = 0;
	pos_y = 468;
	button (0, 1, "StartGame3_bmp", "StartGame3_bmp", "StartGame3_bmp",NULL, NULL, NULL);
	button (330, 1, "settings3_bmp", "settings1_bmp", "settings2_bmp", startgame_to_settings, NULL, NULL);
	button (580, 3, "extras3_bmp", "extras1_bmp", "extras2_bmp", startgame_to_extras, NULL, NULL);
	button (800, 0, "quit3_bmp", "quit1_bmp", "quit2_bmp", startgame_to_quit, NULL, NULL);
	button (10, 70, "new3_bmp", "new1_bmp", "new2_bmp", start_game, NULL, NULL);
	button (10, 120, "load3_bmp", "load1_bmp", "load2_bmp", NULL, NULL, NULL);
	button (10, 170, "save3_bmp", "save1_bmp", "save2_bmp", NULL, NULL, NULL);
	flags = OVERLAY;
}


function main()
{
	fps_max = 70;
	video_mode = 9;
	video_screen = 1;

	set (main_pan, SHOW );
	mouse_mode = 4;
	mouse_map = mouse_pcx;
}

function start_game()
{
	reset(main_pan, SHOW );
	reset(startgame_pan, SHOW );
	game_started = 1;
	mouse_mode = 0;
	level_load (NULL);
}




Visit my site: www.masterq32.de
Re: Will do free coding - if contented donations are welcome [Re: Scorpion] #281315
07/26/09 18:10
07/26/09 18:10
Joined: Jul 2009
Posts: 11
S
Saruniks Offline
Newbie
Saruniks  Offline
Newbie
S

Joined: Jul 2009
Posts: 11
thanks. I can see now that I got confused with main_pan and startgame_pan.

how can I donate you?

Re: Will do free coding - if contented donations are welcome [Re: MasterQ32] #281316
07/26/09 18:10
07/26/09 18:10
Joined: Jul 2009
Posts: 11
S
Saruniks Offline
Newbie
Saruniks  Offline
Newbie
S

Joined: Jul 2009
Posts: 11
why SHOW?

Re: Will do free coding - if contented donations are welcome [Re: Saruniks] #281320
07/26/09 18:16
07/26/09 18:16
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
when I´m right - Show is the same as VISIBLE smile

Re: Will do free coding - if contented donations are welcome [Re: Saruniks] #281322
07/26/09 18:19
07/26/09 18:19
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
SHOW is the never syntax for VISIBLE, but it has the same effect. I think it is confusing that conitec changed that. (they said it would be easier to understand for beginners)

they declared it to be obsolete now: http://www.conitec.net/beta/aAnhang_Syntax.htm

The 2 definitions in atypes.h:
Code:
#define SHOW			(1<<14)
#define VISIBLE			SHOW



Re: Will do free coding - if contented donations are welcome [Re: Scorpion] #281323
07/26/09 18:22
07/26/09 18:22
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Your right laugh - sorry wink

Re: Will do free coding - if contented donations are welcome [Re: Rei_Ayanami] #281327
07/26/09 18:43
07/26/09 18:43
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Scorpion, do you like to convert the Terrain Shadowmapping from the wiki to Lite-C?
http://www.opserver.de/wiki/index.php/Terrain_Shadowmapping
I did the easy part, but I'm still new to Lite-C.
Now I get a "Syntax error: Can't convert a SUB:STRUCT@11:FIXED:."
Got rid of it, was a mistake of mine! replaced p_terrain.x by p_terrain[0], although I shouldn't! grin

Code:
BMAP* canvas;
ENTITY* p_terrain;
var canvas_size[2];
var shadow_brightness=112; 

//-----------------------------------------------------------------------------blur
function blur(passes)
{
  var i;
  var px;
  var py;
  var format;
  var pixel;
  var pixelcolor[3];
  var pixelalpha;
  var sample1[3];
  var sample2[3];
  var sample3[3];
  var sample4[3];
  var sample5[3];
  var sample6[3];
  var sample7[3];
  var sample8[3];
  var sample9[3]; 

  i=0;
  while(i<passes)
  {
    py=0;
    while(py < canvas_size[1])
    {
     px=0;
      while(px<canvas_size[0])
      {
        format=bmap_lock(canvas,0); 

        pixel=pixel_for_bmap(canvas,clamp((canvas_size[0]-1)-px,0,canvas_size[0]-1),clamp(py,0,canvas_size[0]-1));
        pixel_to_vec(sample1,pixelalpha,format,pixel);

        pixel=pixel_for_bmap(canvas,clamp((canvas_size[0]-1)-px-1,0,canvas_size[0]-1),clamp(py,0,canvas_size[0]-1));
        pixel_to_vec(sample2,pixelalpha,format,pixel);
        pixel=pixel_for_bmap(canvas,clamp((canvas_size[0]-1)-px-1,0,canvas_size[0]-1),clamp(py+1,0,canvas_size[0]-1));
        pixel_to_vec(sample3,pixelalpha,format,pixel);
        pixel=pixel_for_bmap(canvas,clamp((canvas_size[0]-1)-px,0,canvas_size[0]-1),clamp(py+1,0,canvas_size[0]-1));
        pixel_to_vec(sample4,pixelalpha,format,pixel);
        pixel=pixel_for_bmap(canvas,clamp((canvas_size[0]-1)-px+1,0,canvas_size[0]-1),clamp(py+1,0,canvas_size[0]-1));
        pixel_to_vec(sample5,pixelalpha,format,pixel);
        pixel=pixel_for_bmap(canvas,clamp((canvas_size[0]-1)-px+1,0,canvas_size[0]-1),clamp(py,0,canvas_size[0]-1));
        pixel_to_vec(sample6,pixelalpha,format,pixel);
        pixel=pixel_for_bmap(canvas,clamp((canvas_size[0]-1)-px+1,0,canvas_size[0]-1),clamp(py-1,0,canvas_size[0]-1));
        pixel_to_vec(sample7,pixelalpha,format,pixel);
        pixel=pixel_for_bmap(canvas,clamp((canvas_size[0]-1)-px,0,canvas_size[0]-1),clamp(py-1,0,canvas_size[0]-1));
        pixel_to_vec(sample8,pixelalpha,format,pixel);
        pixel=pixel_for_bmap(canvas,clamp((canvas_size[0]-1)-px-1,0,canvas_size[0]-1),clamp(py-1,0,canvas_size[0]-1));
        pixel_to_vec(sample9,pixelalpha,format,pixel);

        pixelcolor[0]=integer((sample1[0]*7+sample2[0]*2+sample3[0]+sample4[0]*2+sample5[0]+sample6[0]*2+sample7[0]+sample8[0]*2+sample9[0])/19);
        pixelcolor[1]=integer((sample1[1]*7+sample2[1]*2+sample3[1]+sample4[1]*2+sample5[1]+sample6[1]*2+sample7[1]+sample8[1]*2+sample9[1])/19);
        pixelcolor[2]=integer((sample1[2]*7+sample2[2]*2+sample3[2]+sample4[2]*2+sample5[2]+sample6[2]*2+sample7[2]+sample8[2]*2+sample9[2])/19);

        pixel=pixel_for_vec(pixelcolor,100,format);
        pixel_to_bmap(canvas,(canvas_size[0]-1)-px,py,pixel);

        bmap_unlock(canvas);

        px+=1;
      }
      py+=1;
      wait(1); // without a wait after each line the loop could get too big if the shadow map is huge
    } 
    i+=1;
  }
}

//-----------------------------------------------------------------------------generate_shadows
function getxyz(px,py)
{
  var pixel_size[2];
  pixel_size[0]=(p_terrain.max_x-p_terrain.min_x)/canvas_size[0];
  pixel_size[1]=(p_terrain.max_y-p_terrain.min_y)/canvas_size[1];
    temp[0]=((p_terrain.x-p_terrain.min_x)-(pixel_size[0]*px))-pixel_size[0]/2;
  temp[1]=((p_terrain.y-p_terrain.min_y)-(pixel_size[1]*py))-pixel_size[1]/2;
  c_trace(vector(temp[0],temp[1],p_terrain.z+50000),vector(temp[0],temp[1],p_terrain.z-50000),IGNORE_MODELS|IGNORE_SPRITES|IGNORE_MAPS);
  temp[2]=target.z;
}

function generate_shadows()
{
  var px;
  var py;
  var format;
  var pixel; 

  py=0;
  while(py<canvas_size[1])
  {
    px=0;
    while(px<canvas_size[0])
    { 
      getxyz(px,py); // get the world coordinates of the pixel
      c_trace(sun_pos.x,vector(temp[0],temp[1],temp[2]+1),IGNORE_ME|IGNORE_SPRITES); // trace from the sun to the pixel
      if(trace_hit) // draw shadow pixel if there is no obstacle
      {
        format=bmap_lock(canvas,0);

        pixel=pixel_for_vec(vector(shadow_brightness,shadow_brightness,shadow_brightness),100,format);
        pixel_to_bmap(canvas,(canvas_size[0]-1)-px,py,pixel);

        bmap_unlock(canvas);
      }
      px+=1;
    }
    py+=1;
    wait(1); // without a wait after each line the loop could get too big if the shadow map is huge
  }
  blur(1); // do 1 blur pass
}

//-----------------------------------------------------------------------------terrain
function terrain()
{
  p_terrain=my;
//  my.material=mtl_terrainshadowmap;

  canvas=bmap_for_entity(my,2); // the second texture of the terrain is the shadowmap
  canvas_size[0]=bmap_width(canvas);
  canvas_size[1]=bmap_height(canvas);

  wait(1);
  generate_shadows();
}

//here is a simple example material. the first texture of the terrain has to be the color map (the tiling can be specified with the texture transformation matrix). the second texture of the terrain has to be the shadow map.


//-----------------------------------------------------------------------------materials
//material mtl_terrainshadowmap
//{
//  effect=
//  "
//  texture entSkin1;
//  texture entSkin2;
//
//  technique one_pass_shadow
//  {
//    pass p0
//    {
//      Texture[0]=<entSkin1>;
//      Texture[1]=<entSkin2>;
// 
//      ColorArg1[0]=Texture;
//      ColorOp[0]=Modulate2x;
//      ColorArg2[0]=Diffuse;
//      TexCoordIndex[0]=0;
//      TextureTransformFlags[0]=Count2;
//      TextureTransform[0]={8.0,0.0,0.0,0.0, // color map u scale
//                           0.0,8.0,0.0,0.0, // color map v scale
//                           0.0,0.0,0.0,0.0,
//                           0.0,0.0,0.0,0.0};
//
//      ColorArg1[1]=Texture;
//      ColorOp[1]=Modulate;
//      ColorArg2[1]=Current;
//      TexCoordIndex[1]=0;
//      TextureTransformFlags[1]=Count2;
//      TextureTransform[1]={1.0,0.0,0.0,0.0,
//                           0.0,1.0,0.0,0.0,
//                           0.0,0.0,0.0,0.0,
//                           0.0,0.0,0.0,0.0};
//    }
//  }
//  ";
//}



Last edited by Pappenheimer; 07/26/09 19:00. Reason: Got rid of the error! My fault!
Page 1 of 4 1 2 3 4

Moderated by  checkbutton, Inestical, Perro 

Gamestudio download | chip programmers | 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