• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code Is GMS2 lacking the basic 3D functions that GM:S had or am I just blind?

G

GproKaru

Guest
I noticed that d3d had been removed from the library of script functions but I've yet to come across GMS2s replacements for some sort of functionality like it.

I've read through the list of obsolete functions and a good majority of functions I used to use are now considered obsolete: http://help.yoyogames.com/hc/en-us/articles/231738328-GameMaker-Studio-2-Obsolete-Function-List

I've spent quite some time now digging through the script library for GMS2 and I can't find anything that replaces these very crucial functions:
• d3d_transform_set_identity
• d3d_transform_add_translation
• d3d_transform_add_scaling
• d3d_transform_add_rotation_x
• d3d_transform_add_rotation_y
• d3d_transform_add_rotation_z

I'm looking for functions that behave almost exactly like the ones listed above. they apply their modifies to anything drawn after the function is called (2D or 3D) and the modifiers are then stopped with d3d_transform_set_identity.

I really hope I'm just blind and haven't found it yet, but if this sort of functionality isn't already in or at least coming to GMS2, then they've already lost a long time customer~


I just hope it's still possible for 3D to be a thing within game maker even though it hasn't been game makers strength, I'd at least like to make it a valid bullet point for it~

Also, I'm pretty stoked that my idea suggestion of room layers was taken on board. It's gonna make 3D map editing sooooo much easier when it comes to heavily clustered areas!


 
Last edited by a moderator:

Roderick

Member
From the announcement thread:

That depends on what you call better 3D. The D3D functions have been stripped out in favour of a more robust GPU/Texture/Camera/Primitive structure. It may be slightly more of a learning curve to get into it, but it does permit you to have more control over 3D stuff. Check this link out for more details of the functions that have been added: http://help.yoyogames.com/hc/en-us/articles/231539867-GameMaker-Studio-2-New-Functions-List

And this link for what has been removed: http://help.yoyogames.com/hc/en-us/articles/231738328-GameMaker-Studio-2-Obsolete-Function-List
 
All the d3d_transform functions have been replaced with shiny new matrix functions, which can be used with matrix_set(matrix_world, matrix) to get the same result.
All the basic shapes have been removed also, and so we must now use vertex buffers.
Cameras, both 2D and 3D, are now effectively integrated and require you to build the matrices and assign them to cameras, from what I can tell.
Everything else is done through the new gpu_* functions
I've not played with the 3D stuff yet, but this seems to be the replacement stuff.

Check the link/quote that Roderick posted too, it's more specific. I just wrote all this already and don't wanna waste it :p

EDIT: Oh, yeah, and d3d_model_save and load is gone too. You gotta use buffer_save and buffer_load with vertex buffers (converted to normal buffers), or write your own format importer/exporter. .
 

xygthop3

Member
Use the matrix_build and matrix_set functions, they've been available for a few years now.
I would say there are a couple topics about it on the old forums that will get you started using them.
 
G

GproKaru

Guest
I guess I'll just have to figure out how those work then. It's gonna be a pain and might make or break my decision on getting GMS2 but I guess we'll see. Thanks!

Edit: From what I can tell. This isn't going to work out. There's no way for me to build/render/use my models within GMS2. So it's pretty much a useless tool for me now... Guess I'm stuck with GM:S.

My 3D process is that I make the model in blender (A free 3D modelling program) and I use a custom script extension that exports the model into a text file that converts the model into a bunch of d3d_model_vertex_normal_texture's that assemble it within game maker.

I pretty much put the contents of the text file into a script in game maker, call the script onto a global variable to give it an ID to call upon and then use d3d_model_draw to render it in game.

Without any of that, I pretty much have no game so... That sucks...
 
Last edited by a moderator:

rwkay

YoYo Games Staff
YYG Staff
if you look in the %programdata%\GameMakerStudio2\Cache\runtimes\runtime-<VersionNumber>\lib directory then you should find a compatibility.zip file... in there you will find all the compatibility scripts that provide the d3d_ functionality in terms of the new API, everything you want is in there and you will find it all easy to use when we open up the importing of 1.x projects.

Russell
 

GMWolf

aka fel666
My 3D process is that I make the model in blender (A free 3D modelling program) and I use a custom script extension that exports the model into a text file that converts the model into a bunch of d3d_model_vertex_normal_texture's that assemble it within game maker
This, for one, is a terrible way of doing things ^^
But if you are interested, I modified this script to work with vertex buffers a while ago.
(I'll post it once I'm at home).

Its not perfect, I only patched the parts I needed...
 

HammerOn

Member
I hope more people notice the difference between "3D" and access to low level graphics api with the new design.
 
Top