Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 735 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 3
Page 6 of 40 1 2 4 5 6 7 8 39 40
Re: Map-Editor first official screens [Re: ventilator] #52193
08/21/05 16:54
08/21/05 16:54
Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
TripleX Offline OP
Expert
TripleX  Offline OP
Expert

Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
Exakt so hatte ich es geplant Gut jetzt hab ich was, was ich genau nach programmieren kann.. Programmieren mit Vorlage..

Sag mal wie hast du die Boundingbox per Script nachgefahren? Falls ja kannst du mir da vll. den Script mal per PM schicken? Wäre super weil ich das im moment nicht ganz hinbekomme

mfg
TripleX

Re: Map-Editor first official screens [Re: TripleX] #52194
08/21/05 17:10
08/21/05 17:10
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
Code:

//-----------------------------------------------------------------------------line
function boldline3d(&_start, &_end, &_color, _alpha)
{
var _s[3];
var _e[3];
vec_set(_s, _start);
vec_set(_e, _end);
vec_to_screen(_s, camera);
vec_to_screen(_e, camera);

// todo: clipping algorithm?

if (_s.z > camera.clip_near && _e.z > camera.clip_near) // if there is no distortion
{
// bold line 3x3
draw_line(_s, null, _alpha);
draw_line(_s, _color, _alpha);
draw_line(_e, _color, _alpha);
draw_line(vector(_s.x+1, _s.y+1, 0), null, _alpha);
draw_line(vector(_e.x+1, _e.y+1, 0), _color, _alpha);
draw_line(vector(_s.x-1, _s.y-1, 0), null, _alpha);
draw_line(vector(_e.x-1, _e.y-1, 0), _color, _alpha);
draw_line(vector(_s.x+1, _s.y-1, 0), null, _alpha);
draw_line(vector(_e.x+1, _e.y-1, 0), _color, _alpha);
draw_line(vector(_s.x-1, _s.y+1, 0), null, _alpha);
draw_line(vector(_e.x-1, _e.y+1, 0), _color, _alpha);
draw_line(vector(_s.x, _s.y+1, 0), null, _alpha);
draw_line(vector(_e.x, _e.y+1, 0), _color, _alpha);
draw_line(vector(_s.x, _s.y-1, 0), null, _alpha);
draw_line(vector(_e.x, _e.y-1, 0), _color, _alpha);
draw_line(vector(_s.x+1, _s.y, 0), null, _alpha);
draw_line(vector(_e.x+1, _e.y, 0), _color, _alpha);
draw_line(vector(_s.x-1, _s.y, 0), null, _alpha);
draw_line(vector(_e.x-1, _e.y, 0), _color, _alpha);
}
}

function line3d(&_start, &_end, &_color, _alpha)
{
var _s[3];
var _e[3];
vec_set(_s, _start);
vec_set(_e, _end);
vec_to_screen(_s, camera);
vec_to_screen(_e, camera);

// todo: clipping algorithm?

if (_s.z > camera.clip_near && _e.z > camera.clip_near) // if there is no distortion
{
draw_line(_s, null, _alpha);
draw_line(_s, _color, _alpha);
draw_line(_e, _color, _alpha);
}
}

//-----------------------------------------------------------------------------box
var p1[3];
var p2[3];
var p3[3];
var p4[3];
var p5[3];
var p6[3];
var p7[3];
var p8[3];
function drawbox(_entity, &_color, _alpha)
{
you = _entity;
vec_set(p1, vector(you.min_x, you.min_y, you.min_z));
vec_set(p2, vector(you.min_x, you.max_y, you.min_z));
vec_set(p3, vector(you.max_x, you.max_y, you.min_z));
vec_set(p4, vector(you.max_x, you.min_y, you.min_z));
vec_set(p5, vector(you.min_x, you.min_y, you.max_z));
vec_set(p6, vector(you.min_x, you.max_y, you.max_z));
vec_set(p7, vector(you.max_x, you.max_y, you.max_z));
vec_set(p8, vector(you.max_x, you.min_y, you.max_z));
vec_rotate(p1, you.pan); vec_add(p1, you.x);
vec_rotate(p2, you.pan); vec_add(p2, you.x);
vec_rotate(p3, you.pan); vec_add(p3, you.x);
vec_rotate(p4, you.pan); vec_add(p4, you.x);
vec_rotate(p5, you.pan); vec_add(p5, you.x);
vec_rotate(p6, you.pan); vec_add(p6, you.x);
vec_rotate(p7, you.pan); vec_add(p7, you.x);
vec_rotate(p8, you.pan); vec_add(p8, you.x);
line3d(p1, p2, _color, _alpha);
line3d(p2, p3, _color, _alpha);
line3d(p3, p4, _color, _alpha);
line3d(p4, p1, _color, _alpha);
line3d(p1, p5, _color, _alpha);
line3d(p2, p6, _color, _alpha);
line3d(p3, p7, _color, _alpha);
line3d(p4, p8, _color, _alpha);
line3d(p5, p6, _color, _alpha);
line3d(p6, p7, _color, _alpha);
line3d(p7, p8, _color, _alpha);
line3d(p8, p5, _color, _alpha);
}



ich habe draw_line zum zeichnen von 3d linien ohne z-buffering missbraucht. man sollte besser mal eine kleine dll mit verschiedenen draw funktionen schreiben, aber ich kenn mich mit direct3d nicht aus.

Re: Map-Editor first official screens [Re: ventilator] #52195
08/21/05 17:31
08/21/05 17:31
Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
TripleX Offline OP
Expert
TripleX  Offline OP
Expert

Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
Okay vielen Dank.. kommst auf jeden fall in die credits

Ich werd den Code nicht ganz übernehmen aber doch halbwegs

mfg
Triple-X

EDIT:

*daumen hoch*
Wichtig ist, dass du nicht vergisst davor mit c_setminmax bzw c_updatehull die min/max werte zu berechnen.
Hab noch hinzugefügt, dass einzelne Linien nicht gezeichnet werden, falls Sie von Panels verdeckt sind (sonst würden Sie die Panels übermalen).



Re: Map-Editor first official screens [Re: TripleX] #52196
08/21/05 21:05
08/21/05 21:05
Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
TripleX Offline OP
Expert
TripleX  Offline OP
Expert

Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
puhh after a long programming day (+8 hours programming.. holidays and my friends are not here.. i go on wendsday) and the 1000ths removed bug the "changing action" and removing&creating entity action is finally finished (I hope so )

Really a bit strange that i have to remove and recreate a model in the wmp file to change the action.. but okay.. I don't want to complain

Tomorrow I'll implement the Move System of objects (like in ventilators example) and than lets see

TripleX

Re: Map-Editor first official screens [Re: TripleX] #52197
08/22/05 08:48
08/22/05 08:48
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline
Senior Expert
Machinery_Frank  Offline
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
You are doing a great job!


Models, Textures and Games from Dexsoft
Re: Map-Editor first official screens [Re: TripleX] #52198
08/22/05 08:55
08/22/05 08:55
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline
Expert
XNASorcerer  Offline
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
Does your map-editor deforme terrain?

Re: Map-Editor first official screens [Re: Machinery_Frank] #52199
08/22/05 08:55
08/22/05 08:55
Joined: Apr 2005
Posts: 3,815
Finland
Inestical Offline
Rabbit Developer
Inestical  Offline
Rabbit Developer

Joined: Apr 2005
Posts: 3,815
Finland
looks very nice! you are really on it


"Yesterday was once today's tomorrow."
Re: Map-Editor first official screens [Re: Machinery_Frank] #52200
08/22/05 09:11
08/22/05 09:11
Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
TripleX Offline OP
Expert
TripleX  Offline OP
Expert

Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
Hey..

I have a small request.. I'm really to dumb to model an arrow.. *winining*
Can someone of you model me such an arrow (only a "line" with a cylinder at the top)



thanks a lot
Triple-X

Re: Map-Editor first official screens [Re: TripleX] #52201
08/22/05 09:41
08/22/05 09:41
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline
Senior Expert
Machinery_Frank  Offline
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
I am glad to help:



Download: 3 colored arrow models


Models, Textures and Games from Dexsoft
Re: Map-Editor first official screens [Re: Machinery_Frank] #52202
08/22/05 09:45
08/22/05 09:45
Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
TripleX Offline OP
Expert
TripleX  Offline OP
Expert

Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
Okay viele Dank

Dann muss ich jetzt nur noch das Problem lösen was ich mache wenn die Pfeile verdeckt sind...

Danke nochmal
TripleX

Page 6 of 40 1 2 4 5 6 7 8 39 40

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