|
Post by Xenith on Apr 15, 2006 18:50:38 GMT -5
Hey everyone, mostly to Ism, but i've never gotten into 3d and it's been like 2 years since i used gm so even 2d is different now. But i'd likt to get started soon, so where do i start? I'm not familiar with anything but maybe you could post a few lines of code to setup the camera and room and tell me exactly how they work. or I could proabably look it up in the gm manual.
|
|
|
Post by shad0w on Apr 15, 2006 19:51:01 GMT -5
Marks FPS tutorial is a great place to start.
Setting up 3d usually goes something like this (put in an obj_camera):
d3d_start();//start 3d d3d_set_culling(true);//cull back faces d3d_set_lighting(false);//lighting off d3d_set_shading(true);//smooth shading when lighting is on d3d_set_fog(false,0,0,0);//fog, disabled draw_set_color(c_white);//otherwise everything will be black
(some of the code above is redundant since they are set as default, but it can still be useful to have them there to easily toggle them)
Then the camera projection (put this in the draw event of an object [initialise z in this objects create event, eg z=0]- this should be the first thing to be drawn, so the object should have the highest depth of all objects (eg 100):
d3d_set_projection(x,y,z,x+cos(degtorad(direction)),y-sin(degtorad(direction)),z,0,0,1);//marks tut can explain this, or the manual
And in the step event of this object:
//movement code: if (keyboard_check(vk_left)) { direction+=5; } if (keyboard_check(vk_right)) { direction-=5; }
Now create another object, obj_box, and in its draw event:
draw_set_color(c_blue); d3d_draw_block(x-2,y-2,-2,x+2,y+2,2,-1,0,0); draw_set_color(c_white);
Place the camera in the room, and scatter obj_box in the room and run. You should be able to see the boxes and be able to rotate the camera with arrow keys.
|
|
|
Post by Xenith on Apr 15, 2006 22:39:34 GMT -5
cool!
i did everything you said but then it ended up in an overhead view. Did i mess something up, i'll keep messing around with it for a while.
[edit]
i fixed it, i forgot to give that one object a depth of 100
|
|
|
Post by shad0w on Apr 17, 2006 4:37:23 GMT -5
Cool. You should try marks tut and probably give TGGs tuts a whirl
|
|
|
Post by Xenith on Apr 17, 2006 18:27:46 GMT -5
yeah i've been reading through mark's tutorial. where can i find TGG's?
|
|
|
Post by shad0w on Apr 18, 2006 0:30:56 GMT -5
Pinned in the 3d forum at gmc.
|
|
|
Post by Another Gamer on Apr 18, 2006 11:14:06 GMT -5
Mmm... standard testing time... yummy.
Since alot of things aren't built-in, we have to do most things ourselves, which slows down a bit if you use GM to calculate the math, or you have to use a DLL...
|
|
|
Post by Xenith on Apr 18, 2006 17:35:31 GMT -5
does anyone know when the next gm update will be and what'll be updated? i'd like some better model support and skeleton of course. I just feel like I can't really do any complex designs in area maps or anything unless there was some working built in model support.
also how many polies do you guys think is the average amount that can be put in a room without it slowing down?
|
|
|
Post by IsmAvatar on Apr 18, 2006 19:13:20 GMT -5
The next GM version will be 6.2, and will come out after Mark finishes his book. In it, Mark plans to fix the 6-digit problem and enhance the sprite editor. If either of these things takes too long, he might wrap them over into 7.0. I have heard no rumours of better 3d support.
|
|
|
Post by Xenith on Apr 18, 2006 21:47:28 GMT -5
damn 3d, are other programming languages any harder to learn?
|
|
|
Post by IsmAvatar on Apr 18, 2006 21:59:34 GMT -5
Depends on what language. Some languages, like C++, (bad example, I know, very very hard language to learn) have game examples/engines for creating games. Then there's engines out there specifically designed for making 3d games. Just to name two, The Elder Scrolls Construction Set, and 3d Game Maker (I think that's its name). The first is very easy, as it's barely a language, although it is rather buggy. The latter I can't tell you much about, although I'd assume it's easy as it's an engine.
|
|
|
Post by Xenith on Apr 18, 2006 23:00:48 GMT -5
i know about 3d game maker, but I heard that it's not that flexible,
anyway here's another question i got, is it possible to create objects like floors, tables, chairs, cliffs etc. where i could just put them on map as if they were tiles without slowing down the game, or is that the reason people just generate a whole floored area?
|
|
|
Post by IsmAvatar on Apr 19, 2006 10:11:21 GMT -5
To just plop a chair/cliff onto the map, you might be pretty well off with TESCS. I have a copy and I've been using it to mod up Morrowind a crapload. It's quite fast, and a lot of RPG prerequisites are pre-programmed into it, like Magic, Dialog, Triggers, etc. Unfortunately, don't expect to be customizing something's interaction very much, because it's mostly just a dragNdrop engine with almost no programming involved, and the language that is included is very basic. Come to think of it, I don't think you can make an executable with it, you'd need the user to run Morrowind with your game selected as the only mod/expansion. I guess TESCS isn't a great choice after all.
If you want to talk about other languages, please post in the appropriate section - we're still in GM here, so try to keep it related.
|
|
|
Post by Xenith on Apr 19, 2006 21:43:35 GMT -5
yeah, but would what i said be something stupid in gm? either way i'll work through it.
|
|
|
Post by IsmAvatar on Apr 19, 2006 23:20:49 GMT -5
Yeah you can do that in GM, although they'd probably have to be objects instead of tiles. Since there would eventually be so many objects, and all their events, it would eventually slow down the game. To speed it up a little, you could try some tricky stuff, like having a Chair controller object which takes all the chair objects, remembers where they are, and destroys them all and draws them all himself in 1 object, although collision checking would be difficult.
|
|