GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2007-10-13 06:34:31

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Primitives

This seems to be an area that could use some improvement.

In another thread Yourself said:

Yourself wrote:

Someone should definitely mention the vertex limit for primitives as well (1024).

This section also doesn't mention that surfaces can be used as textures.


Abusing forum power since 1986.

Offline

#2 2007-10-23 13:02:32

IamCalle
Member
Registered: 2007-10-20
Posts: 23

Re: Primitives

I think most of us does not know how to use primitives, or does not fully understand how to use them. Therefore it will be great to improve the primitives section. =)

You can even make "fake" 3D engines with primitives. (Engines like Gaston3D, Kingspace 2, Gadget3D etc). ^^

Oh, I did not know about the vertex limit =O - Thank you for the information. smile

Offline

#3 2007-10-23 14:37:33

Yourself
Member
Registered: 2007-10-09
Posts: 48

Re: Primitives

Gadget3D

Didn't use primitives.  It used scaled sprites.  I don't think any of them used primitives because they were released in GM 5 where primitives didn't exist.

Offline

#4 2007-10-24 15:34:21

IamCalle
Member
Registered: 2007-10-20
Posts: 23

Re: Primitives

Gadget3D:

Expandbrush_color=make_color(color1,color2,color3);
pen_color=brush_color;
pen_size=1;
draw_polygon_begin(); 
draw_polygon_vertex(point1,195+(global.camz-wall_top)*scale1); 
draw_polygon_vertex(point2,195+(global.camz-wall_top)*scale2);
draw_polygon_vertex(point2,195+(global.camz-wall_bottom)*scale2);
draw_polygon_vertex(point1,195+(global.camz-wall_bottom)*scale1);
draw_polygon_end();

- That is the draw event in object "Wall_basic". There are also several other walls, one for each direction.
But for the textured walls, the code looks like this:

Expand{
draw_sprite_stretched(image,slope/3,x,195,ceil(stretchw*1.43+1),scalex*image_height);
}

EDIT: Probably not, as they all used

Expanddraw_polygon_begin()

(I should have said they used polygons... sleep)
. - But the result looks the same when I convert them over to GM7. wink

Last edited by IamCalle (2007-10-24 15:37:23)

Offline

Board footer

Powered by FluxBB