PDA

View Full Version : 3D Scripting?


Zanzel
10-08-2007, 12:20 PM
I have been talking to Twinny about this, his
3D rotating ship is really impressive, just wondering how I would
go about 3D Scripting.. a good starting refference,
the wiki was useful on vectors, those are really easy ^^

DustyPorViva
10-08-2007, 08:01 PM
What 3D rotating ship? I wanna see!

Admins
10-08-2007, 08:04 PM
Will update the wiki in a few days and also add some 3d examples (displaying 3d in 2d)

Tolnaftate2004
10-08-2007, 08:09 PM
I wrote the articles on vectors, if you want anything in specific math-wise for 3D, (perhaps the distance to the nearest wall, or how to bounce a ball off a strange surface, or the like) I can help there...

Angel_Light
10-08-2007, 10:15 PM
Basics well first, adjust your Server Config so .3ds, .dts, .ft files are downloadable. Make a model and save it in to one of those formats. Next just use basic showimg controls.


//#CLIENTSIDE
function onCreated()
{

switchtoOpenGL();

with ( findImg( 501)) {
shape = "file.3ds";
x = this.x;
y = this.y;
}

onTimeout();
}

function onTimeout()
{

if ( keydown( 1))
findImg( 501).rotation += 1;

else if ( keydown( 3))
findImg( 501)).rotation -= 1;

setTimer( 0.05);
}


Invern basically helped me out with this so thank him not me.

Switch
10-09-2007, 01:57 AM
What server is it on Twinny

Angel_Light
10-09-2007, 02:52 AM
Litheria

Switch
10-09-2007, 03:14 AM
Didn;t work =\

Twinny
10-09-2007, 03:24 AM
Basics well first, adjust your Server Config so .3ds, .dts, .ft files are downloadable. Make a model and save it in to one of those formats. Next just use basic showimg controls.


if ( keydown( 1))
findImg( 501).rotation += 1;

else if ( keydown( 3))
findImg( 501)).rotation -= 1;


Invern basically helped me out with this so thank him not me.

.rotation? We're working with 3d models here! I'll try and make nice script to manipulate 3d objects.

Didn;t work =\

Did you say /opengl ?

Blitz_Hunter
10-09-2007, 03:28 AM
Goes to "starting 3d mode" then nothing happens.

napo_p2p
10-09-2007, 04:47 AM
There seems to be some problems with OpenGL for me :(. All along I thought that I was doing something wrong with my own 3D tests, but the same funky things are happening with the Litheria ship. The GUI Controls are going out of control.

Angel_Light
10-09-2007, 04:59 AM
There seems to be some problems with OpenGL for me :(. All along I thought that I was doing something wrong with my own 3D tests, but the same funky things are happening with the Litheria ship. The GUI Controls are going out of control.

Do you have truefonts downloaded for your gui texts?

xXziroXx
10-09-2007, 05:03 AM
Nice work Twinny.


And for those it doesnt work for;

First say "/opengl", and if the ship doesnt display after that - restart your Graal client. When you log back on, say "/opengl" again - and voilá.

Twinny
10-09-2007, 05:07 AM
The GUI Controls are going out of control.

I pointed this out in another thread. OpenGL needs fonts which i've only ever found on Login. Try running graal with -opengl added. For instance, "C:\Program Files\Graal\Graal4.exe" -opengl . When you go to login, it should download alot of files and slowly the serverlist will look normal.

napo_p2p
10-09-2007, 05:16 AM
I pointed this out in another thread. OpenGL needs fonts which i've only ever found on Login. Try running graal with -opengl added. For instance, "C:\Program Files\Graal\Graal4.exe" -opengl . When you go to login, it should download alot of files and slowly the serverlist will look normal.

Nice, that did the trick. Stefan will probably clean that up at some point.

Zanzel
10-09-2007, 07:21 AM
Will update the wiki in a few days and also add some 3d examples (displaying 3d in 2d)

That would be great,
Also.. the article on vectors was nice, Enjoyed it.. really helped me
understand the basics of scripting them.
I figured You must have a .3ds file or something.. :p